org.clazzes.util.lang
Class Triple<A,B,C>
java.lang.Object
org.clazzes.util.lang.Triple<A,B,C>
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- ComparableTriple
public class Triple<A,B,C>
- extends java.lang.Object
- implements java.io.Serializable
- Author:
- wglas
A trio of three java objects, implemented as a Java 1.5 generic. The
lack of this type is actually a bug of JRE 1.5
- See Also:
- Serialized Form
Constructor Summary |
Triple()
Contructs a triple holding two null values. |
Triple(A a,
B b,
C c)
Contructs a triple holding the given objects. |
Triple(Triple<A,B,C> p)
Contructs a triple holding the objects of the given pair. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Triple
public Triple()
- Contructs a triple holding two null values.
Triple
public Triple(A a,
B b,
C c)
- Contructs a triple holding the given objects.
Triple
public Triple(Triple<A,B,C> p)
- Contructs a triple holding the objects of the given pair.
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
getFirst
public A getFirst()
- Returns:
- Returns the first object.
setFirst
public void setFirst(A first)
- Parameters:
first
- The first object to set.
getSecond
public B getSecond()
- Returns:
- Returns the second object.
setSecond
public void setSecond(B second)
- Parameters:
second
- The second objet to set.
getThird
public C getThird()
- Returns:
- the third
setThird
public void setThird(C third)
- Parameters:
third
- the third to set
Copyright © 2009. All Rights Reserved.