|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.acorn.util.UnmodifiableCollection<E> org.norther.tammi.acorn.util.UnmodifiableSet<E> org.norther.tammi.acorn.util.ModifiableSet<E>
E
- the element type.public class ModifiableSet<E>
Extends UnmodifiableSet by supporting modifications after cloning.
Field Summary |
---|
Fields inherited from interface org.norther.tammi.acorn.util.Modifiable |
---|
MODIFIABLE_ADAPTEE, MODIFIABLE_ADAPTER, MODIFIABLE_COLLECTION, MODIFIABLE_MASK |
Constructor Summary | |
---|---|
ModifiableSet(boolean... modifiable)
Constructs an empty set. |
|
ModifiableSet(Collection<E> c,
boolean... modifiable)
Constructs a new set for a collection. |
|
ModifiableSet(Set<E> s,
boolean... modifiable)
Constructs a new set. |
Method Summary | |
---|---|
boolean |
add(E o)
|
boolean |
addAll(Collection<? extends E> x)
|
void |
clear()
|
Object |
clone()
|
protected Set<E> |
getModifiableSet(boolean... modifiable)
Gets a modifiable instance of the wrapped set. |
boolean |
isModifiable()
Checks whether this collection is modifiable. |
Iterator<E> |
iterator()
|
protected void |
setCollection(Collection<E> c)
Sets the collection adaptee. |
Methods inherited from class org.norther.tammi.acorn.util.UnmodifiableSet |
---|
getSet, setSet |
Methods inherited from class org.norther.tammi.acorn.util.UnmodifiableCollection |
---|
contains, containsAll, equals, getCollection, hashCode, isEmpty, 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 java.util.Set |
---|
contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray |
Constructor Detail |
---|
public ModifiableSet(boolean... modifiable)
modifiable
- the modifiable states of the collection, adapter and
adaptee.public ModifiableSet(Set<E> s, boolean... modifiable)
s
- a set to wrap.modifiable
- the modifiable states of the collection, adapter and
adaptee.public ModifiableSet(Collection<E> c, boolean... modifiable)
c
- a collection to wrap.modifiable
- the modifiable states of the collection, adapter and
adaptee.Method Detail |
---|
public Object clone()
clone
in class UnmodifiableCollection<E>
public boolean isModifiable()
Modifiable
isModifiable
in interface Modifiable
public boolean add(E o)
add
in interface Collection<E>
add
in interface Set<E>
add
in class UnmodifiableCollection<E>
public boolean addAll(Collection<? extends E> x)
addAll
in interface Collection<E>
addAll
in interface Set<E>
addAll
in class UnmodifiableCollection<E>
public void clear()
clear
in interface Collection<E>
clear
in interface Set<E>
clear
in class UnmodifiableCollection<E>
public Iterator<E> iterator()
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in interface Set<E>
iterator
in class UnmodifiableCollection<E>
protected void setCollection(Collection<E> c)
UnmodifiableCollection
setCollection
in class UnmodifiableSet<E>
c
- the wrapped collection.protected Set<E> getModifiableSet(boolean... modifiable)
modifiable
- the modifiable states of the collection, adapter and
adaptee.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |