edu.stanford.nlp.util
Class IntTuple
java.lang.Object
edu.stanford.nlp.util.IntTuple
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- IntPair, IntQuadruple, IntTriple, IntUni
public class IntTuple
- extends Object
- implements Serializable
A tuple of int . There are special classes for IntUni, IntPair, IntTriple
and IntQuadruple. The motivation for that was the different hashCode implementations.
By using the static IntTuple.getIntTuple(numElements) one can obtain an instance of the appropriate sub-class.
- See Also:
- Serialized Form
IntTuple
public IntTuple(int[] arr)
IntTuple
public IntTuple(int num)
IntTuple
public IntTuple()
get
public int get(int num)
set
public void set(int num,
int val)
shiftLeft
public void shiftLeft()
getCopy
public IntTuple getCopy()
elems
public int[] elems()
equals
public boolean equals(Object iO)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
length
public int length()
getIntTuple
public static IntTuple getIntTuple(int num)
getIntTuple
public static IntTuple getIntTuple(ArrayList integers)
toString
public String toString()
- Overrides:
toString
in class Object
concat
public static IntTuple concat(IntTuple t1,
IntTuple t2)
print
public void print()
Stanford NLP Group