|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.acorn.util.UnmodifiableCollection
org.norther.tammi.acorn.util.UnmodifiableSet
public class UnmodifiableSet
An unmodifiable set wrapper filtering out additions and removals.
| Constructor Summary | |
|---|---|
UnmodifiableSet()
Constructs an empty set. |
|
UnmodifiableSet(Collection c)
Constructs a new set for a collection. |
|
UnmodifiableSet(Set s)
Constructs a new set. |
|
| Method Summary | |
|---|---|
boolean |
add(int index,
Object o)
Adds the specified element to the specified index in this set. |
Object |
get(int index)
Gets the indexed element in this set. |
protected Set |
getSet()
Gets the set adaptee. |
int |
indexOf(Object o)
Returns the index of the specified element, or -1 if not found. |
boolean |
isModifiable()
Checks whether this set is modifiable. |
ListIterator |
listIterator()
Returns a list iterator over the elements in this set. |
ListIterator |
listIterator(int index)
Returns a list iterator with a start index over the elements in this set. |
Object |
remove(int index)
Removes the indexed element in this set. |
protected void |
setCollection(Collection c)
Sets the collection adaptee. |
protected void |
setSet(Set s)
Sets the set adaptee. |
List |
valueList()
Returns an ordered list of set values. |
| Methods inherited from class org.norther.tammi.acorn.util.UnmodifiableCollection |
|---|
add, addAll, clear, clone, contains, containsAll, equals, getCollection, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.acorn.util.OrderedSet |
|---|
iterator |
| Methods inherited from interface java.util.Set |
|---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray |
| Constructor Detail |
|---|
public UnmodifiableSet()
public UnmodifiableSet(Set s)
s - a set to wrap.public UnmodifiableSet(Collection c)
c - a collection to wrap.| Method Detail |
|---|
public boolean isModifiable()
OrderedSet
isModifiable in interface OrderedSetpublic int indexOf(Object o)
OrderedSet
indexOf in interface OrderedSeto - the element.
public Object get(int index)
OrderedSet
get in interface OrderedSetindex - the index.
public boolean add(int index,
Object o)
OrderedSet
add in interface OrderedSetindex - the index.o - the element.
public Object remove(int index)
OrderedSet
remove in interface OrderedSetindex - the index.
public ListIterator listIterator()
OrderedSet
listIterator in interface OrderedSetpublic ListIterator listIterator(int index)
OrderedSet
listIterator in interface OrderedSetindex - the start index.
public List valueList()
OrderedSet
valueList in interface OrderedSetprotected Set getSet()
protected void setSet(Set s)
s - the wrapped set.protected void setCollection(Collection c)
UnmodifiableCollection
setCollection in class UnmodifiableCollectionc - the wrapped collection.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||