Rev | Line | |
---|
[380] | 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 | @JsonValue
|
---|
| 10 | private final String value;
|
---|
| 11 |
|
---|
| 12 | /**
|
---|
| 13 | *
|
---|
| 14 | * @param value a simple name, starting with letter, followed by zero or
|
---|
| 15 | * more letters, digits or _.
|
---|
| 16 | */
|
---|
| 17 | public Bid(String value) {
|
---|
| 18 | this.value = value;
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 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.