public class ExtList extends LinkedList<Object>
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
modCount
Modifier and Type | Method and Description |
---|---|
<T> T[] |
collect(Class<T> cl)
collects (non-null) elements of the classtype cl and returns a typed array
|
<T> T |
get(Class<T> cl)
returns first element in list of type cl
|
<T> T |
removeFirstOccurrence(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(Class<T> cl,
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, toArray, toArray
iterator
equals, hashCode, listIterator, removeRange, subList
containsAll, isEmpty, removeAll, retainAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
private static final long serialVersionUID
public ExtList()
public ExtList(Object[] a)
private static <T> T[] toArray(Class<T> cl, LinkedList<T> list)
public <T> T[] collect(Class<T> cl)
cl
- Class the type of the elements that are selectedpublic <T> T get(Class<T> cl)
cl
- the type to be searched in listpublic <T> T removeFirstOccurrence(Class<T> cl)
cl
- the type to be searched in list