Last change
on this file since 741 was 505, checked in by wouter, 17 months ago |
#161 restructuring test code, each test program in its own dir.
|
File size:
1018 bytes
|
Line | |
---|
1 | package testcode.actions;
|
---|
2 |
|
---|
3 | import com.fasterxml.jackson.annotation.JsonValue;
|
---|
4 |
|
---|
5 | /**
|
---|
6 | * HACK containing a "Bid" which is just a string here.
|
---|
7 | */
|
---|
8 | public final class Bid {
|
---|
9 | private final String value;
|
---|
10 |
|
---|
11 | /**
|
---|
12 | *
|
---|
13 | * @param value a simple name, starting with letter, followed by zero or
|
---|
14 | * more letters, digits or _.
|
---|
15 | */
|
---|
16 | public Bid(String value) {
|
---|
17 | this.value = value;
|
---|
18 | }
|
---|
19 |
|
---|
20 | @JsonValue
|
---|
21 | public String getValue() {
|
---|
22 | return value;
|
---|
23 | }
|
---|
24 |
|
---|
25 | @Override
|
---|
26 | public String toString() {
|
---|
27 | return value;
|
---|
28 | }
|
---|
29 |
|
---|
30 | @Override
|
---|
31 | public int hashCode() {
|
---|
32 | final int prime = 31;
|
---|
33 | int result = 1;
|
---|
34 | result = prime * result + ((value == null) ? 0 : value.hashCode());
|
---|
35 | return result;
|
---|
36 | }
|
---|
37 |
|
---|
38 | @Override
|
---|
39 | public boolean equals(Object obj) {
|
---|
40 | if (this == obj)
|
---|
41 | return true;
|
---|
42 | if (obj == null)
|
---|
43 | return false;
|
---|
44 | if (getClass() != obj.getClass())
|
---|
45 | return false;
|
---|
46 | Bid other = (Bid) obj;
|
---|
47 | if (value == null) {
|
---|
48 | if (other.value != null)
|
---|
49 | return false;
|
---|
50 | } else if (!value.equals(other.value))
|
---|
51 | return false;
|
---|
52 | return true;
|
---|
53 | }
|
---|
54 |
|
---|
55 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.