jasi.sim.user.value
Class TInteger

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

public class TInteger
extends AbstractComparableObject<TInteger>

Integer variable for condition tables.

See Also:
Serialized Form

Constructor Summary
TInteger(int content)
          Constructor.
TInteger(java.lang.String content)
          Constructor.
 
Method Summary
 int compareTo(TInteger o)
          Compares the specified object with this assignable object for equality.
 boolean equals(java.lang.Object o)
          Indicates, whether some other object is "equal to" this one.
 int hashCode()
          Returns the hash code value for this assignable object.
 java.lang.String toString()
          Returns a string representation of this object.
 int value()
          Get this value's content.
 
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
 

Constructor Detail

TInteger

public TInteger(java.lang.String content)
Constructor.

Parameters:
content - The content.

TInteger

public TInteger(int content)
Constructor.

Parameters:
content - The content.
Method Detail

toString

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

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

value

public final int value()
Get this value's content.

Returns:
The value.

hashCode

public int hashCode()
Returns the hash code value for this assignable object. The hash code of a assignable object is defined to be the hashCode of the enclose value of the object, which implements the ConditionType interface. This ensures that t1.equals(t2) implies that t1.hashCode()==t2.hashCode() for any two objects t1 and t2, as required by the general contract of Object.hashCode.

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

equals

public boolean equals(java.lang.Object o)
Indicates, whether some other object is "equal to" this one.

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(TInteger o)
Compares the specified object with this assignable object for equality. Returns true if the given object is also an assignable object and the two objects represent the same values. More formally, two t1 and t2 represent the same objects if t1.get().equals(t2.get()). This ensures that the equals method works properly across different implementations of the ConditionType interface.

Specified by:
compareTo in interface java.lang.Comparable<TInteger>
Specified by:
compareTo in class AbstractComparableObject<TInteger>
Parameters:
o - The object to be compared for equality with this object.
Returns:
True if the specified object is equal to this object.
See Also:
Comparable.compareTo(Object)