| Modifier and Type | Class and Description |
|---|---|
| public static class | Pair.Externalizer
An externalizer for |
| Modifier and Type | Field and Description |
|---|---|
| private final A | |
| private final B | |
| private final transient int | |
| private static final long | |
| private static final FieldSetter |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static < the first value type A, the second value type B> Pair | |
| public boolean | Returns: true if they are equal, false otherwisethe other pair other)Overrides java. |
| public boolean | |
| public A | |
| public B | |
| private static int | |
| public int | Returns: the combined hash codeOverrides java. |
| private void | readObject(ObjectInputStream
the object input stream ois)Reinitialize the object and set the hash code. |
| public String | Returns: the string representationOverrides java. |
| a | back to summary |
|---|---|
| private final A a | |
| b | back to summary |
|---|---|
| private final B b | |
| hashCode | back to summary |
|---|---|
private final transient int hashCode
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| setter | back to summary |
|---|---|
| private static final FieldSetter setter | |
| Pair | back to summary |
|---|---|
| public Pair(final A a, final B b) Create a new instance.
| |
| create | back to summary |
|---|---|
| public static <A, B> Pair Create a new instance.
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object other) Overrides java. Determine if this pair equals another. A pair is equal to another pair if both members are equal.
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Pair<?, ?> other) Determine if this pair equals another. A pair is equal to another pair if both members are equal.
| |
| getA | back to summary |
|---|---|
| public A getA() Get the first value.
| |
| getB | back to summary |
|---|---|
| public B getB() Get the second value.
| |
| hashCode | back to summary |
|---|---|
| private static int hashCode(final Object a, final Object b) Calculate the combined hash code of two objects. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Return the combined hash code of the two argument objects.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException Reinitialize the object and set the hash code.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Get a string representation of this pair.
| |
Pair instances.
| Modifier and Type | Field and Description |
|---|---|
| private static final Pair. | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | createExternal(final Class<?>
the type of object to create subjectType, final ObjectInput the input input)Implements org. |
| public static Pair. | |
| public void | readExternal(final ObjectInput
the stream to read data from in order to restore the object in)Implements java. |
| protected Object | |
| public void | writeExternal(final Object
the object to externalize subject, final ObjectOutput the output output)Implements org. |
| public void | writeExternal(final ObjectOutput
the stream to write the object to out)Implements java. |
| instance | back to summary |
|---|---|
| private static final Pair. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Externalizer | back to summary |
|---|---|
| public Externalizer() | |
| createExternal | back to summary |
|---|---|
| public Object createExternal(final Class<?> subjectType, final ObjectInput input) throws IOException, ClassNotFoundException Implements org. Doc from org. Create an instance of a type. The object may then be initialized from
| |
| getInstance | back to summary |
|---|---|
| public static Pair. Get the single instance. Though multiple instances can be created using the public constructor, only a single instance need be used in practice since this class maintains no internal state.
| |
| readExternal | back to summary |
|---|---|
| public void readExternal(final ObjectInput in) Implements java. Doc from java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.
| |
| readResolve | back to summary |
|---|---|
| protected Object readResolve() Resolve the object to the single externalizer instance.
| |
| writeExternal | back to summary |
|---|---|
| public void writeExternal(final Object subject, final ObjectOutput output) throws IOException Implements org. Doc from org. Write the external representation of an object. The object's class and the externalizer's class will already have been written.
| |
| writeExternal | back to summary |
|---|---|
| public void writeExternal(final ObjectOutput out) Implements java. Doc from java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
| |