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 Identifiable
public boolean equals(Object obj)
Identifiable
Identifiable
is equal to a given Object
instance. Equality is defined by equality of the identifier.equals
in interface Identifiable
equals
in class Object
obj
- the object to compare to