|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectPIP.Collections.Persistent.AbstractCollection<E>
PIP.Collections.Persistent.AbstractList
PIP.Collections.Pair<E>
PIP.Collections.SymmetricPair<E>
public class SymmetricPair<E>
This class treats pairs symmetrically so that a:b is the same a b:a and it does not matter the order of the input into a new pair
| Field Summary |
|---|
| Fields inherited from class PIP.Collections.Pair |
|---|
o1, o2 |
| Constructor Summary | |
|---|---|
SymmetricPair(E o1,
E o2)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Compares the specified object with this list for equality. |
int |
hashCode()
Returns the hash code value for this list. |
| Methods inherited from class PIP.Collections.Pair |
|---|
areValuesEqual, get, getFirst, getSecond, reversed, setFirst, setSecond, size, swap, toString |
| Methods inherited from class PIP.Collections.Persistent.AbstractList |
|---|
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList |
| Methods inherited from class PIP.Collections.Persistent.AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public SymmetricPair(E o1,
E o2)
| Method Detail |
|---|
public boolean equals(java.lang.Object o)
AbstractListThis implementation first checks if the specified object is this list. If so, it returns true; if not, it checks if the specified object is a list. If not, it returns false; if so, it iterates over both lists, comparing corresponding pairs of elements. If any comparison returns false, this method returns false. If either iterator runs out of elements before the other it returns false (as the lists are of unequal length); otherwise it returns true when the iterations complete.
equals in interface java.util.Collectionequals in interface java.util.Listequals in class Pair<E>o - the object to be compared for equality with this list.
public int hashCode()
AbstractListThis implementation uses exactly the code that is used to define the list hash stampFilter in the documentation for the List.hashCode method.
hashCode in interface java.util.CollectionhashCode in interface java.util.ListhashCode in class Pair<E>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||