|
||||||||||
| 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
org.norther.tammi.acorn.util.ModifiableSet
public class ModifiableSet
Extends UnmodifiableSet by supporting modifications after cloning.
| Constructor Summary | |
|---|---|
ModifiableSet(boolean modifiable)
Constructs an empty set. |
|
ModifiableSet(Collection c,
boolean modifiable)
Constructs a new set for a collection. |
|
ModifiableSet(Set s,
boolean modifiable)
Constructs a new set. |
|
| Method Summary | |
|---|---|
boolean |
add(int index,
Object o)
Adds the specified element to the specified index in this set. |
Object |
clone()
|
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. |
List |
valueList()
Returns an ordered list of set values. |
| Methods inherited from class org.norther.tammi.acorn.util.UnmodifiableSet |
|---|
get, getSet, indexOf, setSet |
| Methods inherited from class org.norther.tammi.acorn.util.UnmodifiableCollection |
|---|
add, addAll, clear, 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 ModifiableSet(boolean modifiable)
modifiable - true to clone automatically during modifications, false
to allow modifications only after cloning.
public ModifiableSet(Set s,
boolean modifiable)
s - a set to wrap.modifiable - true to clone automatically during modifications, false
to allow modifications only after cloning.
public ModifiableSet(Collection c,
boolean modifiable)
c - a collection to wrap.modifiable - true to clone automatically during modifications, false
to allow modifications only after cloning.| Method Detail |
|---|
public Object clone()
clone in class UnmodifiableCollectionpublic boolean isModifiable()
OrderedSet
isModifiable in interface OrderedSetisModifiable in class UnmodifiableSet
public boolean add(int index,
Object o)
OrderedSet
add in interface OrderedSetadd in class UnmodifiableSetindex - the index.o - the element.
public Object remove(int index)
OrderedSet
remove in interface OrderedSetremove in class UnmodifiableSetindex - the index.
public ListIterator listIterator()
OrderedSet
listIterator in interface OrderedSetlistIterator in class UnmodifiableSetpublic ListIterator listIterator(int index)
OrderedSet
listIterator in interface OrderedSetlistIterator in class UnmodifiableSetindex - the start index.
public List valueList()
OrderedSet
valueList in interface OrderedSetvalueList in class UnmodifiableSetprotected void setCollection(Collection c)
UnmodifiableCollection
setCollection in class UnmodifiableSetc - the wrapped collection.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||