java.lang.Object
io.sf.carte.doc.WrapperStringList
- All Implemented Interfaces:
StringList
,Serializable
,Iterable<String>
,Collection<String>
,List<String>
,SequencedCollection<String>
,DOMStringList
An unmodifiable
StringList
that wraps a Collection
.- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection<? extends String> c) boolean
addAll
(Collection<? extends String> c) void
clear()
clone()
Returns a shallow copy of thisStringList
instance.boolean
boolean
boolean
containsAll
(Collection<?> c) get
(int index) int
int
boolean
isEmpty()
item
(int index) iterator()
int
listIterator
(int index) remove
(int index) boolean
boolean
removeAll
(Collection<?> c) void
replaceAll
(UnaryOperator<String> operator) boolean
retainAll
(Collection<?> c) int
size()
void
sort
(Comparator<? super String> c) subList
(int fromIndex, int toIndex) Object[]
toArray()
<T> T[]
toArray
(T[] a) Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, reversed
-
Constructor Details
-
WrapperStringList
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 wrapped by this list.- Throws:
NullPointerException
- if the specified collection isnull
.
-
-
Method Details
-
item
- Specified by:
item
in interfaceDOMStringList
-
getLength
public int getLength()- Specified by:
getLength
in interfaceDOMStringList
-
contains
- Specified by:
contains
in interfaceDOMStringList
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAll
in interfaceCollection<String>
- Specified by:
containsAll
in interfaceList<String>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
replaceAll
- Specified by:
replaceAll
in interfaceList<String>
-
sort
-
clear
public void clear() -
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<String>
-
listIterator
- Specified by:
listIterator
in interfaceList<String>
-
listIterator
- Specified by:
listIterator
in interfaceList<String>
-
subList
-
spliterator
- Specified by:
spliterator
in interfaceCollection<String>
- Specified by:
spliterator
in interfaceIterable<String>
- Specified by:
spliterator
in interfaceList<String>
-
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 classObject
- Returns:
- a clone of this
StringList
.
-