endrov.util.collection
Class Tuple<L,R>
java.lang.Object
endrov.util.collection.Tuple<L,R>
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Tuple<L,R>>
- Direct Known Subclasses:
- LineageSelParticle
public class Tuple<L,R>
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Comparable<Tuple<L,R>>
A Java tuple (a,b)
This code was taken from a forum post and modified. It is the only possible technical
implementation and hence not copyrightable.
- See Also:
- Serialized Form
Constructor Summary |
Tuple(L fst,
R right)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
Tuple
public Tuple(L fst,
R right)
fst
public L fst()
- First value (a,_) -> a
snd
public R snd()
- Second value (_,b) -> b
equals
public final boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
equal
public static final boolean equal(java.lang.Object o1,
java.lang.Object o2)
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
make
public static <L,R> Tuple<L,R> make(L a,
R b)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
compareTo
public int compareTo(Tuple<L,R> o)
- Specified by:
compareTo
in interface java.lang.Comparable<Tuple<L,R>>