public class ExtList
extends java.util.LinkedList<java.lang.Object>
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
Constructor and Description |
---|
ExtList() |
ExtList(java.lang.Object[] a) |
Modifier and Type | Method and Description |
---|---|
<T> T[] |
collect(java.lang.Class<T> cl)
collects (non-null) elements of the classtype cl and returns a typed array
|
<T> T |
get(java.lang.Class<T> cl)
returns first element in list of type cl
|
<T> T |
removeFirstOccurrence(java.lang.Class<T> cl)
returns first element in list of type cl and removes the found
element from the list if the elemnt has not been found null
is returned
|
private static <T> T[] |
toArray(java.lang.Class<T> cl,
java.util.LinkedList<T> list)
copies list to array (array has type of cl)
|
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, spliterator, toArray, toArray
equals, hashCode, listIterator, removeRange, subList
containsAll, isEmpty, removeAll, retainAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
private static final long serialVersionUID
private static <T> T[] toArray(java.lang.Class<T> cl, java.util.LinkedList<T> list)
public <T> T[] collect(java.lang.Class<T> cl)
cl
- Class the type of the elements that are selectedpublic <T> T get(java.lang.Class<T> cl)
cl
- the type to be searched in listpublic <T> T removeFirstOccurrence(java.lang.Class<T> cl)
cl
- the type to be searched in list