T - public class IdentifiableObject<T> extends Object implements Identifiable
Identifiable that wraps another object.| Modifier and Type | Field and Description |
|---|---|
T |
data
The data
|
String |
identity
The identity
|
| Constructor and Description |
|---|
IdentifiableObject(String ident,
T data)
Construct with the given identity and data.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Tests if this
Identifiable is equal to a given Object
instance. |
String |
getID() |
public IdentifiableObject(String ident, T data)
ident - the identitydata - the data to wrappublic String getID()
getID in interface Identifiablepublic boolean equals(Object obj)
IdentifiableIdentifiable is equal to a given Object
instance. Equality is defined by equality of the identifier.equals in interface Identifiableequals in class Objectobj - the object to compare to