public final class UnmodifiableSortedSet extends AbstractSortedSetDecorator implements Unmodifiable, Serializable
SortedSet
to ensure it can't be altered.
This class is Serializable from Commons Collections 3.1.
collection
Modifier and Type | Method and Description |
---|---|
boolean |
add(Object object) |
boolean |
addAll(Collection coll) |
void |
clear() |
static SortedSet |
decorate(SortedSet set)
Factory method to create an unmodifiable set.
|
SortedSet |
headSet(Object toElement) |
Iterator |
iterator() |
boolean |
remove(Object object) |
boolean |
removeAll(Collection coll) |
boolean |
retainAll(Collection coll) |
SortedSet |
subSet(Object fromElement,
Object toElement) |
SortedSet |
tailSet(Object fromElement) |
comparator, first, getSortedSet, last
getSet
contains, containsAll, equals, getCollection, hashCode, isEmpty, size, toArray, toArray, toString
public static SortedSet decorate(SortedSet set)
set
- the set to decorate, must not be nullIllegalArgumentException
- if set is nullpublic Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface Set
iterator
in class AbstractCollectionDecorator
public boolean add(Object object)
add
in interface Collection
add
in interface Set
add
in class AbstractCollectionDecorator
public boolean addAll(Collection coll)
addAll
in interface Collection
addAll
in interface Set
addAll
in class AbstractCollectionDecorator
public void clear()
clear
in interface Collection
clear
in interface Set
clear
in class AbstractCollectionDecorator
public boolean remove(Object object)
remove
in interface Collection
remove
in interface Set
remove
in class AbstractCollectionDecorator
public boolean removeAll(Collection coll)
removeAll
in interface Collection
removeAll
in interface Set
removeAll
in class AbstractCollectionDecorator
public boolean retainAll(Collection coll)
retainAll
in interface Collection
retainAll
in interface Set
retainAll
in class AbstractCollectionDecorator
public SortedSet subSet(Object fromElement, Object toElement)
subSet
in interface SortedSet
subSet
in class AbstractSortedSetDecorator
public SortedSet headSet(Object toElement)
headSet
in interface SortedSet
headSet
in class AbstractSortedSetDecorator
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.