|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| 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<T>
cetus.hir.ChainedList<T>
public class ChainedList<T>
Very similar to a LinkedList, except provides an add method that returns the list itself, allowing you to perform method chaining. A beneficial side effect is that you can add multiple elements directly to a list created with the new operator, without first creating a new variable to hold a reference to the list object. ChainedLists can be used anywhere a LinkedList or List occurs, and are entirely optional. It is possible to write passes for Cetus without using this class, however you will find that your code contains a lot of temporary lists created for the sole purpose of passing them as method arguments.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
ChainedList()
Constructs an empty list. |
|
ChainedList(java.util.Collection<T> c)
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. |
|
| Method Summary | |
|---|---|
ChainedList |
addAllLinks(java.util.Collection<T> c)
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator. |
ChainedList |
addLink(T o)
Appends the specified element to the end of this list. |
| Methods inherited from class java.util.LinkedList |
|---|
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, 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 |
| Methods inherited from interface java.util.Deque |
|---|
iterator |
| Constructor Detail |
|---|
public ChainedList()
public ChainedList(java.util.Collection<T> c)
c - The collection whose elements are to be placed into this list.| Method Detail |
|---|
public ChainedList addAllLinks(java.util.Collection<T> c)
c - The collection whose elements are to be placed into this list.
public ChainedList addLink(T o)
o - Element to be appended to this list.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||