|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<E>
java.util.LinkedList<E>
ptolemy.actor.gt.data.Tuple<java.lang.Object>
ptolemy.actor.gt.data.Pair<E1,E2>
E1
- Type of the first element.E2
- Type of the second element.public class Pair<E1,E2>
Generic pair data structure.
Red (tfeng) |
Yellow (tfeng) |
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
Pair(E1 first,
E2 second)
Construct a pair with two elements. |
Method Summary | |
---|---|
E1 |
getFirst()
Get the first element. |
E2 |
getSecond()
Get the second element. |
void |
set(E1 first,
E2 second)
Set the two elements in this pair. |
void |
setFirst(E1 first)
Set the first element in this pair. |
void |
setSecond(E2 second)
Set the second element in this pair. |
Methods inherited from class java.util.LinkedList |
---|
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, element, get, getLast, indexOf, lastIndexOf, listIterator, offer, peek, poll, remove, remove, remove, removeFirst, removeLast, set, size, toArray, toArray |
Methods inherited from class java.util.AbstractSequentialList |
---|
iterator |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, isEmpty, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
---|
public Pair(E1 first, E2 second)
first
- The first element.second
- The second element.Method Detail |
---|
public E1 getFirst()
getFirst
in class java.util.LinkedList<java.lang.Object>
setFirst(Object)
public E2 getSecond()
setSecond(Object)
public void set(E1 first, E2 second)
first
- The first element.second
- The second element.public void setFirst(E1 first)
first
- The first element.getFirst()
public void setSecond(E2 second)
second
- The first element.getSecond()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |