org.jgrapht.alg.util
Class UnorderedPair<A,B>
- java.lang.Object
-
- org.jgrapht.alg.util.Pair<A,B>
-
- org.jgrapht.alg.util.UnorderedPair<A,B>
-
- Type Parameters:
A- the first element typeB- the second element type
- All Implemented Interfaces:
- java.io.Serializable
public class UnorderedPair<A,B> extends Pair<A,B> implements java.io.Serializable
Generic unordered pair.Although the instances of this class are immutable, it is impossible to ensure that the references passed to the constructor will not be modified by the caller.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description UnorderedPair(A a, B b)Create a new unordered pair
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object o)inthashCode()static <A,B> UnorderedPair<A,B>of(A a, B b)Creates new unordered pair of elements pulling of the necessity to provide corresponding types of the elements supplied.java.lang.StringtoString()-
Methods inherited from class org.jgrapht.alg.util.Pair
getFirst, getSecond, hasElement
-
-
-
-
Method Detail
-
of
public static <A,B> UnorderedPair<A,B> of(A a, B b)
Creates new unordered pair of elements pulling of the necessity to provide corresponding types of the elements supplied.- Type Parameters:
A- the first element typeB- the second element type- Parameters:
a- first elementb- second element- Returns:
- new unordered pair
-
-
DataMelt 3.0 © DataMelt by jWork.ORG