|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--javautils.ImmutablePair
A simple immutable pair of objects.
| Field Summary | |
java.lang.Object |
first
Immutable field of the pair. |
java.lang.Object |
second
Immutable field of the pair. |
| Constructor Summary | |
ImmutablePair(boolean f,
boolean s)
|
|
ImmutablePair(boolean f,
byte s)
|
|
ImmutablePair(boolean f,
char s)
|
|
ImmutablePair(boolean f,
double s)
|
|
ImmutablePair(boolean f,
float s)
|
|
ImmutablePair(boolean f,
int s)
|
|
ImmutablePair(boolean f,
long s)
|
|
ImmutablePair(boolean f,
java.lang.Object s)
|
|
ImmutablePair(boolean f,
short s)
|
|
ImmutablePair(byte f,
boolean s)
|
|
ImmutablePair(byte f,
byte s)
|
|
ImmutablePair(byte f,
char s)
|
|
ImmutablePair(byte f,
double s)
|
|
ImmutablePair(byte f,
float s)
|
|
ImmutablePair(byte f,
int s)
|
|
ImmutablePair(byte f,
long s)
|
|
ImmutablePair(byte f,
java.lang.Object s)
|
|
ImmutablePair(byte f,
short s)
|
|
ImmutablePair(char f,
boolean s)
|
|
ImmutablePair(char f,
byte s)
|
|
ImmutablePair(char f,
char s)
|
|
ImmutablePair(char f,
double s)
|
|
ImmutablePair(char f,
float s)
|
|
ImmutablePair(char f,
int s)
|
|
ImmutablePair(char f,
long s)
|
|
ImmutablePair(char f,
java.lang.Object s)
|
|
ImmutablePair(char f,
short s)
|
|
ImmutablePair(double f,
boolean s)
|
|
ImmutablePair(double f,
byte s)
|
|
ImmutablePair(double f,
char s)
|
|
ImmutablePair(double f,
double s)
|
|
ImmutablePair(double f,
float s)
|
|
ImmutablePair(double f,
int s)
|
|
ImmutablePair(double f,
long s)
|
|
ImmutablePair(double f,
java.lang.Object s)
|
|
ImmutablePair(double f,
short s)
|
|
ImmutablePair(float f,
boolean s)
|
|
ImmutablePair(float f,
byte s)
|
|
ImmutablePair(float f,
char s)
|
|
ImmutablePair(float f,
double s)
|
|
ImmutablePair(float f,
float s)
|
|
ImmutablePair(float f,
int s)
|
|
ImmutablePair(float f,
long s)
|
|
ImmutablePair(float f,
java.lang.Object s)
|
|
ImmutablePair(float f,
short s)
|
|
ImmutablePair(int f,
boolean s)
|
|
ImmutablePair(int f,
byte s)
|
|
ImmutablePair(int f,
char s)
|
|
ImmutablePair(int f,
double s)
|
|
ImmutablePair(int f,
float s)
|
|
ImmutablePair(int f,
int s)
|
|
ImmutablePair(int f,
long s)
|
|
ImmutablePair(int f,
java.lang.Object s)
|
|
ImmutablePair(int f,
short s)
|
|
ImmutablePair(long f,
boolean s)
|
|
ImmutablePair(long f,
byte s)
|
|
ImmutablePair(long f,
char s)
|
|
ImmutablePair(long f,
double s)
|
|
ImmutablePair(long f,
float s)
|
|
ImmutablePair(long f,
int s)
|
|
ImmutablePair(long f,
long s)
|
|
ImmutablePair(long f,
java.lang.Object s)
|
|
ImmutablePair(long f,
short s)
|
|
ImmutablePair(java.lang.Object f,
boolean s)
|
|
ImmutablePair(java.lang.Object f,
byte s)
|
|
ImmutablePair(java.lang.Object f,
char s)
|
|
ImmutablePair(java.lang.Object f,
double s)
|
|
ImmutablePair(java.lang.Object f,
float s)
|
|
ImmutablePair(java.lang.Object f,
int s)
|
|
ImmutablePair(java.lang.Object f,
long s)
|
|
ImmutablePair(java.lang.Object f,
java.lang.Object s)
|
|
ImmutablePair(java.lang.Object f,
short s)
|
|
ImmutablePair(short f,
boolean s)
|
|
ImmutablePair(short f,
byte s)
|
|
ImmutablePair(short f,
char s)
|
|
ImmutablePair(short f,
double s)
|
|
ImmutablePair(short f,
float s)
|
|
ImmutablePair(short f,
int s)
|
|
ImmutablePair(short f,
long s)
|
|
ImmutablePair(short f,
java.lang.Object s)
|
|
ImmutablePair(short f,
short s)
|
|
| Method Summary | |
boolean |
equals(java.lang.Object other)
True if and only if the other object is not-null and this and the other object have the same class and the first fields of this and the other pair are both null or both equal and the second fields of this and the other pair are both null or both equal. |
java.lang.Object |
firstOfFirst()
|
java.lang.Object |
firstOfSecond()
|
java.lang.Object |
getKey()
The first. |
java.lang.Object |
getValue()
The second. |
int |
hashCode()
The hashCode is designed to be asymmetric, so that generally new ImmutablePair(a,b) ! |
java.lang.Object |
secondOfFirst()
|
java.lang.Object |
secondOfSecond()
|
java.lang.Object |
setValue(java.lang.Object value)
throw new UnsupportedOperationException(); |
ImmutablePair |
swap()
A new immutable pair with the first and second swapped. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public final java.lang.Object first
Immutable field of the pair.
public final java.lang.Object second
Immutable field of the pair.
| Constructor Detail |
public ImmutablePair(java.lang.Object f,
java.lang.Object s)
public ImmutablePair(java.lang.Object f,
boolean s)
public ImmutablePair(java.lang.Object f,
byte s)
public ImmutablePair(java.lang.Object f,
char s)
public ImmutablePair(java.lang.Object f,
double s)
public ImmutablePair(java.lang.Object f,
float s)
public ImmutablePair(java.lang.Object f,
int s)
public ImmutablePair(java.lang.Object f,
long s)
public ImmutablePair(java.lang.Object f,
short s)
public ImmutablePair(boolean f,
java.lang.Object s)
public ImmutablePair(boolean f,
boolean s)
public ImmutablePair(boolean f,
byte s)
public ImmutablePair(boolean f,
char s)
public ImmutablePair(boolean f,
double s)
public ImmutablePair(boolean f,
float s)
public ImmutablePair(boolean f,
int s)
public ImmutablePair(boolean f,
long s)
public ImmutablePair(boolean f,
short s)
public ImmutablePair(byte f,
java.lang.Object s)
public ImmutablePair(byte f,
boolean s)
public ImmutablePair(byte f,
byte s)
public ImmutablePair(byte f,
char s)
public ImmutablePair(byte f,
double s)
public ImmutablePair(byte f,
float s)
public ImmutablePair(byte f,
int s)
public ImmutablePair(byte f,
long s)
public ImmutablePair(byte f,
short s)
public ImmutablePair(char f,
java.lang.Object s)
public ImmutablePair(char f,
boolean s)
public ImmutablePair(char f,
byte s)
public ImmutablePair(char f,
char s)
public ImmutablePair(char f,
double s)
public ImmutablePair(char f,
float s)
public ImmutablePair(char f,
int s)
public ImmutablePair(char f,
long s)
public ImmutablePair(char f,
short s)
public ImmutablePair(double f,
java.lang.Object s)
public ImmutablePair(double f,
boolean s)
public ImmutablePair(double f,
byte s)
public ImmutablePair(double f,
char s)
public ImmutablePair(double f,
double s)
public ImmutablePair(double f,
float s)
public ImmutablePair(double f,
int s)
public ImmutablePair(double f,
long s)
public ImmutablePair(double f,
short s)
public ImmutablePair(float f,
java.lang.Object s)
public ImmutablePair(float f,
boolean s)
public ImmutablePair(float f,
byte s)
public ImmutablePair(float f,
char s)
public ImmutablePair(float f,
double s)
public ImmutablePair(float f,
float s)
public ImmutablePair(float f,
int s)
public ImmutablePair(float f,
long s)
public ImmutablePair(float f,
short s)
public ImmutablePair(int f,
java.lang.Object s)
public ImmutablePair(int f,
boolean s)
public ImmutablePair(int f,
byte s)
public ImmutablePair(int f,
char s)
public ImmutablePair(int f,
double s)
public ImmutablePair(int f,
float s)
public ImmutablePair(int f,
int s)
public ImmutablePair(int f,
long s)
public ImmutablePair(int f,
short s)
public ImmutablePair(long f,
java.lang.Object s)
public ImmutablePair(long f,
boolean s)
public ImmutablePair(long f,
byte s)
public ImmutablePair(long f,
char s)
public ImmutablePair(long f,
double s)
public ImmutablePair(long f,
float s)
public ImmutablePair(long f,
int s)
public ImmutablePair(long f,
long s)
public ImmutablePair(long f,
short s)
public ImmutablePair(short f,
java.lang.Object s)
public ImmutablePair(short f,
boolean s)
public ImmutablePair(short f,
byte s)
public ImmutablePair(short f,
char s)
public ImmutablePair(short f,
double s)
public ImmutablePair(short f,
float s)
public ImmutablePair(short f,
int s)
public ImmutablePair(short f,
long s)
public ImmutablePair(short f,
short s)
| Method Detail |
public ImmutablePair swap()
A new immutable pair with the first and second swapped.
public final java.lang.Object getKey()
The first.
getKey in interface java.util.Map.Entrypublic final java.lang.Object getValue()
The second.
getValue in interface java.util.Map.Entrypublic final java.lang.Object setValue(java.lang.Object value)
throw new UnsupportedOperationException();
setValue in interface java.util.Map.Entrypublic int hashCode()
The hashCode is designed to be asymmetric, so that
generally new ImmutablePair(a,b) != new
ImmutablePair(b,a).
hashCode in interface java.util.Map.EntryhashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
True if and only if
equals in interface java.util.Map.Entryequals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic final java.lang.Object firstOfFirst()
public final java.lang.Object secondOfFirst()
public final java.lang.Object firstOfSecond()
public final java.lang.Object secondOfSecond()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||