|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<Pair<A,B>>
oracle.javatools.util.ArrayPairList<A,B>
A
- a generic placeholder for any type which will be the first of the Pair.B
- a generic placeholder for any type which will be the second of the Pairpublic class ArrayPairList<A,B>
ArrayPairList is an ArrayList that extends ArrayList and implements the PairList (which extends the List interface) to support Pairs of generic types, say Pair of A,B. The class behaves like an array list except for various search and selection methods which have *FirstType() versions, for example indexOfFirstType( A a) which looks for a Pair whose first member of type A matches the argument A.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
ArrayPairList() |
|
ArrayPairList(java.util.Collection<Pair<A,B>> arg0) |
|
ArrayPairList(int initialCapacity) |
Method Summary | |
---|---|
boolean |
containsFirstType(A a) Returns true if the list conatains an object of type Pair whose first component matches the argument. |
boolean |
containsSecondType(B b) Returns true if the list conatains an object of type Pair whose second component matches the argument. |
int |
indexOfFirstType(A a) Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. |
int |
indexOfSecondType(B b) Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. |
int |
lastIndexOfFirstType(A a) Returns the index of the last occurrence of the specified element, where the first element matches the first element of the entry in this list, or -1 if this list does not contain the element. |
int |
lastIndexOfSecondType(B b) Returns the index of the last occurrence of the specified element, where the second element matches the second element of the entry in this list, or -1 if this list does not contain the element. |
boolean |
removeByFirstType(A a) Removes the first occurence of a Pair whose first matches the first of an entry in the list. |
boolean |
removeBySecondType(B b) Removes the first occurence of a Pair whose second element matches the second of Pair entry in the list. |
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
Constructor Detail |
---|
public ArrayPairList()
public ArrayPairList(int initialCapacity)
public ArrayPairList(java.util.Collection<Pair<A,B>> arg0)
arg0
-Method Detail |
---|
public boolean containsFirstType(A a)
containsFirstType
in interface PairList<A,B>
a
- The object to lookup, standard arraylist semantics for equality are used.public boolean containsSecondType(B b)
PairList
containsSecondType
in interface PairList<A,B>
b
- The object to lookup, standard arraylist semantics for equality are used.public int indexOfFirstType(A a)
PairList
indexOfFirstType
in interface PairList<A,B>
public int indexOfSecondType(B b)
PairList
indexOfSecondType
in interface PairList<A,B>
public int lastIndexOfFirstType(A a)
PairList
lastIndexOfFirstType
in interface PairList<A,B>
public int lastIndexOfSecondType(B b)
PairList
lastIndexOfSecondType
in interface PairList<A,B>
public boolean removeByFirstType(A a)
PairList
removeByFirstType
in interface PairList<A,B>
a
- The object of type A to be removed.public boolean removeBySecondType(B b)
PairList
removeBySecondType
in interface PairList<A,B>
b
- The object of type B to be removed.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |