Package org.openstreetmap.josm.tools
Class Pair<A,B>
- java.lang.Object
-
- org.openstreetmap.josm.tools.Pair<A,B>
-
- Type Parameters:
A
- Type of first itemB
- Type of second item
public final class Pair<A,B> extends java.lang.Object
A pair of objects.- Since:
- 429
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <U,V>
Pair<U,V>create(U u, V v)
Convenient constructor methodboolean
equals(java.lang.Object other)
int
hashCode()
static <T> Pair<T,T>
sort(Pair<T,T> p)
Sorts a single-typed pair soa <= b
.java.lang.String
toString()
-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
sort
public static <T> Pair<T,T> sort(Pair<T,T> p)
Sorts a single-typed pair soa <= b
.- Type Parameters:
T
- type of both elements- Parameters:
p
- pair- Returns:
p
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-