E
- class of the object encapsulated by this DataObjectpublic class DataObject<E> extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<DataObject<E>>
Constructor and Description |
---|
DataObject(E object,
int id)
Constructs a new DataObject with an object of type E and its unique identifier number.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DataObject<E> o) |
boolean |
equals(java.lang.Object other) |
E |
getData()
Gets the object of type E encapsulated by this DataObject
|
int |
getId()
Gets the unique identifier of this DataObject
|
int |
hashCode() |
public DataObject(E object, int id)
object
- the object of type E encapsulated by this DataObjectid
- the unique identifier number of the DataObjectpublic E getData()
public int getId()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(DataObject<E> o)
compareTo
in interface java.lang.Comparable<DataObject<E>>