jautil
Class MapInt.Int

java.lang.Object
  extended by jautil.MapInt.Int
Enclosing class:
MapInt<E>

public static class MapInt.Int
extends java.lang.Object

Wrapper class for an integer, acting a MapInt key.


Nested Class Summary
static class MapInt.Int.Comp
          Comparator: it simply compares the wrapped values.
 
Constructor Summary
MapInt.Int()
          Constructs a new wrapper with value -1.
MapInt.Int(int val)
          Constructs a new wrapper for the given value.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Equality test: satisfied if both Ints have the same value.
 int hashCode()
          Returns the hash code for this wrapper, in fact, its value.
 int intValue()
          Returns this wrapper's value.
 void setIntValue(int val)
          Sets this wrapper's value to the given value.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapInt.Int

public MapInt.Int()
Constructs a new wrapper with value -1.


MapInt.Int

public MapInt.Int(int val)
Constructs a new wrapper for the given value.

Method Detail

setIntValue

public void setIntValue(int val)
Sets this wrapper's value to the given value.


intValue

public int intValue()
Returns this wrapper's value.


hashCode

public int hashCode()
Returns the hash code for this wrapper, in fact, its value.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Equality test: satisfied if both Ints have the same value.

Overrides:
equals in class java.lang.Object