|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.heap.DefaultIdentifiable
public class DefaultIdentifiable
Default implementation of the identifiable interface.
Field Summary | |
---|---|
private Integer |
id
The unique id of this Identifiable. |
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
DefaultIdentifiable()
Empty constructor for serialization purposes. |
|
DefaultIdentifiable(Integer id)
Creates a new Identifiable object. |
Method Summary | |
---|---|
int |
compareTo(DefaultIdentifiable o)
Compares this object with the specified object for order. |
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one. |
Integer |
getID()
Returns the unique id of this object. |
int |
hashCode()
Returns a hash code value for the object. |
void |
readExternal(ObjectInput in)
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
String |
toString()
Returns a string representation of the object. |
void |
writeExternal(ObjectOutput out)
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private Integer id
Constructor Detail |
---|
public DefaultIdentifiable()
public DefaultIdentifiable(Integer id)
id
- the unique id of this IdentifiableMethod Detail |
---|
public Integer getID()
getID
in interface Identifiable
public int compareTo(DefaultIdentifiable o)
compareTo
in interface Comparable<DefaultIdentifiable>
o
- the Object to be compared.
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
o
- the reference object with which to compare.public int hashCode()
hashCode
in class Object
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- the stream to write the object to
IOException
- on write errorspublic void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
in
- the stream to read data from in order to restore the object
IOException
- on read errors
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |