edu.stanford.nlp.util
Class Triple<T1,T2,T3>
java.lang.Object
edu.stanford.nlp.util.Triple<T1,T2,T3>
- All Implemented Interfaces:
- java.io.Serializable
public class Triple<T1,T2,T3>
- extends java.lang.Object
- implements java.io.Serializable
Class representing an ordered triple of objects, possibly typed.
Useful when you'd like a method to return three objects, or would like to put
triples of objects in a Collection or Map. equals() and hashcode() should
work properly.
- Author:
- Teg Grenager (grenager@stanford.edu)
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
first
public T1 first
second
public T2 second
third
public T3 third
Triple
public Triple(T1 first,
T2 second,
T3 third)
first
public T1 first()
second
public T2 second()
third
public T3 third()
setFirst
public void setFirst(T1 o)
setSecond
public void setSecond(T2 o)
setThird
public void setThird(T3 o)
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Stanford NLP Group