public interface Identifiable
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(Identifiable a,
java.lang.Object b)
Checks if the two identifiable objects are equals using their unique identifiers.
|
java.util.UUID |
getID()
Gets the unique identifier.
|
static java.util.UUID |
getID(java.lang.Object obj)
Gets the ID of the object if it is an Identifiable.
|
static int |
hashCode(Identifiable obj)
Generates a hashcode for an identifiable.
|
static java.util.function.Predicate<Identifiable> |
is(Identifiable obj)
Predicate to check if the identifiable is equal to that supplied.
|
static java.util.function.Predicate<Identifiable> |
not(Identifiable obj)
Predicate to check if the identifiable is not equal to that supplied.
|
static java.lang.String |
toString(Identifiable obj)
Creates a simple to string for the identifiable.
|
static boolean equals(Identifiable a, java.lang.Object b)
a
- First object.b
- Second object.static java.util.UUID getID(java.lang.Object obj)
obj
- Object to get ID for.static int hashCode(Identifiable obj)
obj
- Identifiable instance.0
if null.static java.util.function.Predicate<Identifiable> is(Identifiable obj)
obj
- Identifiable to check for.true
if the identifiable is equal or false
if it is not.equals(Identifiable, Object)
static java.util.function.Predicate<Identifiable> not(Identifiable obj)
obj
- Identifiable to check against.false
if the identifiable is equal or true
if it is.getID()
static java.lang.String toString(Identifiable obj)
<SIMPLE_CLASS_NAME> [id=X]
.obj
- Identifiable to create a string representation for.java.util.UUID getID()