|
||||||||||
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.UnmodifiableOrderedSet<E> org.norther.tammi.acorn.util.ModifiableOrderedSet<E>
E
- the element type.public class ModifiableOrderedSet<E>
Extends UnmodifiableOrderedSet 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 | |
---|---|
ModifiableOrderedSet(boolean... modifiable)
Constructs an empty set. |
|
ModifiableOrderedSet(Collection<E> c,
boolean... modifiable)
Constructs a new set for a collection. |
|
ModifiableOrderedSet(OrderedSet<E> s,
boolean... modifiable)
Constructs a new set. |
Method Summary | |
---|---|
boolean |
add(E o)
|
boolean |
addAll(Collection<? extends E> x)
|
boolean |
addAt(int index,
E o)
Adds the specified element at the specified index in this set. |
void |
clear()
|
Object |
clone()
|
protected OrderedSet<E> |
getModifiableSet(boolean... modifiable)
Gets a modifiable instance of the wrapped set. |
boolean |
isModifiable()
Checks whether this set is modifiable. |
Iterator<E> |
iterator()
Returns an ordered iterator over the elements in this set. |
ListIterator<E> |
listIterator()
Returns a list iterator over the elements in this set. |
ListIterator<E> |
listIterator(int index)
Returns a list iterator with a start index over the elements in this set. |
E |
removeAt(int index)
Removes the indexed element in this set. |
E |
set(int index,
E o)
Sets the specified element at the specified index in this set. |
protected void |
setCollection(Collection<E> c)
Sets the collection adaptee. |
E |
shift(int index,
E o)
Shifts the specified element to the specified index in this set. |
List<E> |
valueList()
Returns an ordered list of set values. |
Methods inherited from class org.norther.tammi.acorn.util.UnmodifiableOrderedSet |
---|
addAll, get, getSet, indexOf |
Methods inherited from class org.norther.tammi.acorn.util.UnmodifiableSet |
---|
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 ModifiableOrderedSet(boolean... modifiable)
modifiable
- the modifiable states of the collection, adapter and
adaptee.public ModifiableOrderedSet(OrderedSet<E> s, boolean... modifiable)
s
- a set to wrap.modifiable
- the modifiable states of the collection, adapter and
adaptee.public ModifiableOrderedSet(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()
OrderedSet
isModifiable
in interface Modifiable
isModifiable
in interface OrderedSet<E>
isModifiable
in class UnmodifiableOrderedSet<E>
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 E set(int index, E o)
OrderedSet
set
in interface OrderedSet<E>
set
in class UnmodifiableOrderedSet<E>
index
- the index.o
- the element.
public E shift(int index, E o)
OrderedSet
shift
in interface OrderedSet<E>
shift
in class UnmodifiableOrderedSet<E>
index
- the index.o
- the element.
public boolean addAt(int index, E o)
OrderedSet
addAt
in interface OrderedSet<E>
addAt
in class UnmodifiableOrderedSet<E>
index
- the index.o
- the element.
public E removeAt(int index)
OrderedSet
removeAt
in interface OrderedSet<E>
removeAt
in class UnmodifiableOrderedSet<E>
index
- the index.
public Iterator<E> iterator()
OrderedSet
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in interface Set<E>
iterator
in interface OrderedSet<E>
iterator
in class UnmodifiableCollection<E>
public ListIterator<E> listIterator()
OrderedSet
listIterator
in interface OrderedSet<E>
listIterator
in class UnmodifiableOrderedSet<E>
public ListIterator<E> listIterator(int index)
OrderedSet
listIterator
in interface OrderedSet<E>
listIterator
in class UnmodifiableOrderedSet<E>
index
- the start index.
public List<E> valueList()
OrderedSet
valueList
in interface OrderedSet<E>
valueList
in class UnmodifiableOrderedSet<E>
protected void setCollection(Collection<E> c)
UnmodifiableCollection
setCollection
in class UnmodifiableOrderedSet<E>
c
- the wrapped collection.protected OrderedSet<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 |