java.lang.Object
io.sf.carte.doc.WrapperStringList
- All Implemented Interfaces:
StringList,Serializable,Cloneable,Iterable<String>,Collection<String>,List<String>,SequencedCollection<String>,DOMStringList
An unmodifiable
StringList that wraps a Collection.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends String> c) booleanaddAll(Collection<? extends String> c) voidclear()clone()Returns a shallow copy of thisStringListinstance.booleanbooleanbooleancontainsAll(Collection<?> c) get(int index) intintbooleanisEmpty()item(int index) iterator()intlistIterator(int index) remove(int index) booleanbooleanremoveAll(Collection<?> c) voidreplaceAll(UnaryOperator<String> operator) booleanretainAll(Collection<?> c) intsize()voidsort(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, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods 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:
itemin interfaceDOMStringList
-
getLength
public int getLength()- Specified by:
getLengthin interfaceDOMStringList
-
contains
- Specified by:
containsin interfaceDOMStringList
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<String>- Specified by:
containsAllin interfaceList<String>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
replaceAll
- Specified by:
replaceAllin interfaceList<String>
-
sort
-
clear
public void clear() -
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<String>
-
listIterator
- Specified by:
listIteratorin interfaceList<String>
-
listIterator
- Specified by:
listIteratorin interfaceList<String>
-
subList
-
spliterator
- Specified by:
spliteratorin interfaceCollection<String>- Specified by:
spliteratorin interfaceIterable<String>- Specified by:
spliteratorin interfaceList<String>
-
clone
Description copied from interface:StringListReturns a shallow copy of thisStringListinstance. (The elements themselves are not copied.)- Specified by:
clonein interfaceStringList- Overrides:
clonein classObject- Returns:
- a clone of this
StringList.
-