|
SoftNet-Consult Java Utility Library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softnetConsult.utils.collections.Pair<T1,T2>
T1
- Type of the first object of this Pair
.T2
- Type of the second object of this Pair
.public class Pair<T1,T2>
A convenience memory structure to hold two objects.
This product includes software developed by the
SoftNet-Consult Java Utility Library project and its contributors.
(http://java-tools.sourceforge.net)
Copyright (c) 2007-2008 SoftNet-Consult.
Copyright (c) 2007-2008 G. Paperin.
All rights reserved.
File: Pair.java
Library API version: "2.02"
Java compliance version: "1.5"
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following terms and conditions are met:
1. Redistributions of source code must retain the above
acknowledgement of the SoftNet-Consult Java Utility Library project, the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above acknowledgement of the
SoftNet-Consult Java Utility Library project, the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
3. All advertising materials mentioning features or use of this software or any derived
software must display the following acknowledgement:
This product includes software developed by the SoftNet-Consult Java Utility Library
project and its contributors.
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Field Summary | |
---|---|
T1 |
elem1
The first object of this Pair . |
T2 |
elem2
The second object of this Pair . |
Constructor Summary | |
---|---|
Pair(T1 elem1,
T2 elem2)
Creates a new pair of the specified objects. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Returns whether this Pair is equal to a specified object. |
boolean |
equals(Pair<?,?> p)
Returns whether this Pair is equal to a specified Pair . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public T1 elem1
Pair
.
public T2 elem2
Pair
.
Constructor Detail |
---|
public Pair(T1 elem1, T2 elem2)
null
objects are permitted.
elem1
- The first object for this Pair
.elem2
- The second object for this Pair
.Method Detail |
---|
public boolean equals(java.lang.Object o)
Pair
is equal to a specified object.
A Pair
p
is equal to an object o
if and only
if o
is of class (of subclass of) Pair
and
p.equals((Pair<?, ?>) o)
returns true
.
equals
in class java.lang.Object
true
if this Pair
is equal to the specified object,
false
otherwise.equals(Pair)
public boolean equals(Pair<?,?> p)
Pair
is equal to a specified Pair
.
Two Pair
s are equal if and only if their first and second objects are
both respectively equal. The first (or second) objects of two Pair
s are
equal if they are both null
or if they are equal in respect to their
respective equals
methods.
p
- A Pair
to which the equality must be veryfied
true
if this Pair
is equal to the specified Pair
,
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |