Class Pair<X,Y>
java.lang.Object
com.onenetwork.platform.tools.collections.Pair<X,Y>
public class Pair<X,Y>
extends java.lang.Object
A simple container class for a typed pair of objects.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description static boolean
eq(java.lang.Object a, java.lang.Object b)
Statically compares two objects for equality.boolean
equals(java.lang.Object other)
int
hashCode()
static <X, Y> Pair<X,Y>
pair(X first, Y second)
Static utility function for instantiating a new pair, inferring type.java.lang.String
toString()
-
Field Details
-
Constructor Details
-
Pair
Creates a pair and assigns both members.
-
-
Method Details
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)- Overrides:
equals
in classjava.lang.Object
-
eq
public static boolean eq(java.lang.Object a, java.lang.Object b)Statically compares two objects for equality. -
pair
Static utility function for instantiating a new pair, inferring type. -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-