java.lang.Object
- All Implemented Interfaces:
StringList
,Serializable
,Cloneable
,Iterable<String>
,Collection<String>
,Deque<String>
,List<String>
,Queue<String>
,SequencedCollection<String>
,DOMStringList
Implementation of
StringList
based on LinkedList
.- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorDescriptionConstructs an empty list.LinkedStringList
(Collection<? extends String> c) Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. -
Method Summary
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, 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, reversed, set, size, spliterator, 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.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
LinkedStringList
public LinkedStringList()Constructs an empty list. -
LinkedStringList
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.- Parameters:
c
- the collection whose elements are to be placed into this list.- Throws:
NullPointerException
- if the specified collection is null.
-
-
Method Details
-
item
- Specified by:
item
in interfaceDOMStringList
-
getLength
public int getLength()- Specified by:
getLength
in interfaceDOMStringList
-
contains
- Specified by:
contains
in interfaceDOMStringList
-
clone
Description copied from interface:StringList
Returns a shallow copy of thisStringList
instance. (The elements themselves are not copied.)- Specified by:
clone
in interfaceStringList
- Overrides:
clone
in classLinkedList<String>
- Returns:
- a clone of this
StringList
.
-