jasi.sim.basic.id
Class Id

java.lang.Object
  extended by jasi.sim.basic.value.AbstractSimValueType
      extended by jasi.sim.basic.value.AbstractComparableObject<Id>
          extended by jasi.sim.basic.id.Id
All Implemented Interfaces:
ExtendedComparable<Id>, SimValue, java.io.Serializable, java.lang.Comparable<Id>

public final class Id
extends AbstractComparableObject<Id>

Identifiers (IDs) for simulation elements, that are based on exact integers.

See Also:
BigInteger, Serialized Form

Field Summary
static Id ZERO
          An invalid ID.
 
Constructor Summary
Id(Id id)
          Construct an ID.
Id(java.lang.String s)
          Construct an ID.
 
Method Summary
 int compareTo(Id o)
          Compares this object with the specified object for order.
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 int hashCode()
          Returns a hash code value for the object.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class jasi.sim.basic.value.AbstractComparableObject
isEQ, isGE, isGT, isLE, isLT, isNE
 
Methods inherited from class jasi.sim.basic.value.AbstractSimValueType
getContent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO

public static final Id ZERO
An invalid ID.

Constructor Detail

Id

public Id(Id id)
Construct an ID.

Parameters:
id - A ID.

Id

public Id(java.lang.String s)
Construct an ID.

Parameters:
s - The string representation of the ID.
Method Detail

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hash tables.

Overrides:
hashCode in class java.lang.Object
Returns:
A hash code value for this object.

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one. This method compares the events' time, priority and ID.

Overrides:
equals in class java.lang.Object
Parameters:
o - That object which is compared with this object.
Returns:
True, if this object is the same as that object.

compareTo

public int compareTo(Id o)
Compares this object with the specified object for order. Implementation of Comparable interface.

Specified by:
compareTo in interface java.lang.Comparable<Id>
Specified by:
compareTo in class AbstractComparableObject<Id>
Parameters:
o - The Object to be compared.
Returns:
A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
See Also:
Comparable.compareTo(Object)

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
The string.