p2pMapReduce.mapreduceModule
Class ID
java.lang.Object
p2pMapReduce.mapreduceModule.ID
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<ID>
- Direct Known Subclasses:
- JobID, TaskAttemptID, TaskID
public abstract class ID
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Comparable<ID>
A general identifier, which internally stores the id
as an integer. This is the super class of JobID
,
TaskID
and TaskAttemptID
.
- See Also:
JobID
,
TaskID
,
TaskAttemptID
,
Serialized Form
Field Summary |
protected int |
id
|
protected static char |
SEPARATOR
|
Constructor Summary |
protected |
ID()
|
|
ID(int id)
constructs an ID object from the given int |
Method Summary |
int |
compareTo(ID that)
Compare IDs by associated numbers |
boolean |
equals(java.lang.Object o)
|
int |
getId()
returns the int which represents the identifier |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SEPARATOR
protected static final char SEPARATOR
- See Also:
- Constant Field Values
id
protected int id
ID
public ID(int id)
- constructs an ID object from the given int
ID
protected ID()
getId
public int getId()
- returns the int which represents the identifier
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
compareTo
public int compareTo(ID that)
- Compare IDs by associated numbers
- Specified by:
compareTo
in interface java.lang.Comparable<ID>