Package io.sf.carte.doc
Class WrapperStringList
java.lang.Object
io.sf.carte.doc.WrapperStringList
- All Implemented Interfaces:
StringList
,Serializable
,Iterable<String>
,Collection<String>
,List<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()
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
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>
-