|
|||||||||
| 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<O>
public class Pair<O>
| Field Summary | |
|---|---|
O |
o1
|
O |
o2
|
| Constructor Summary | |
|---|---|
Pair(O o1,
O o2)
|
|
| Method Summary | |
|---|---|
boolean |
areValuesEqual()
|
boolean |
equals(java.lang.Object o)
Compares the specified object with this list for equality. |
O |
get(int i)
Returns the element at the specified position in this list. |
O |
getFirst()
|
O |
getSecond()
|
int |
hashCode()
Returns the hash code value for this list. |
Pair<O> |
reversed()
|
void |
setFirst(O o)
|
void |
setSecond(O o)
|
int |
size()
Returns the number of elements in this collection. |
void |
swap()
|
java.lang.String |
toString()
Returns a string representation of this collection. |
| 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 |
| Field Detail |
|---|
public O o1
public O o2
| Constructor Detail |
|---|
public Pair(O o1,
O o2)
| Method Detail |
|---|
public int size()
AbstractCollection
size in interface java.util.Collectionsize in interface java.util.Listsize in class AbstractCollectionpublic O getFirst()
public void setFirst(O o)
public O getSecond()
public void setSecond(O o)
public O get(int i)
AbstractList
get in interface java.util.Listget in class AbstractListi - index of element to return.
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 AbstractListo - the object to be compared for equality with this list.
public boolean areValuesEqual()
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 AbstractListpublic java.lang.String toString()
AbstractCollectionThis implementation creates an empty string buffer, appends a left square bracket, and iterates over the collection appending the string representation of each element in turn. After appending each element except the last, the string ", " is appended. Finally a right bracket is appended. A string is obtained from the string buffer, and returned.
toString in class AbstractCollectionpublic void swap()
public Pair<O> reversed()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||