public class Id extends Object implements Comparable<Id>
| Constructor and Description |
|---|
Id(String value)
Constructor of this ID.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Id o)
Compares two ID objects by first using case-insensitive String comparison of their respective values.
|
boolean |
equals(Object obj)
Compares this and specified objects.
|
String |
getValue()
Returns this ID's value.
|
int |
hashCode()
Returns a hash code of this ID based on its value.
|
String |
toString()
Returns the string representation of this ID which is its value.
|
public Id(String value)
value - the String value of this IDpublic String getValue()
public int hashCode()
public boolean equals(Object obj)
public int compareTo(Id o)
compareTo in interface Comparable<Id>o - the ID to compare toCopyright © 2021. All rights reserved.