org.jtoolkit.essence.utils
Class Pair<E1,E2>
java.lang.Object
org.jtoolkit.essence.utils.Pair<E1,E2>
- All Implemented Interfaces:
- Datable
public class Pair<E1,E2>
- extends java.lang.Object
- implements Datable
An ordered pair of objects. Useful for key pairs and return value pairs.
- Author:
- Peter Lawrey
|
Constructor Summary |
Pair(E1 first,
E2 second)
|
|
Method Summary |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
void |
writeData(java.io.DataOutput out)
Write this object to DataOutput
must define a constructor. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
first
public final E1 first
second
public final E2 second
Pair
public Pair(E1 first,
E2 second)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
writeData
public void writeData(@NotNull
java.io.DataOutput out)
throws java.io.IOException
- Description copied from interface:
Datable
- Write this object to DataOutput
must define a constructor.
public Datable(@NotNull DataInput in) throws IOException;
- Specified by:
writeData in interface Datable
- Throws:
java.io.IOException
Copyright © Peter Lawrey. All Rights Reserved.