Package net.ontopia.persistence.proxy
Class ReadOnlySet<E>
- java.lang.Object
-
- net.ontopia.persistence.proxy.ReadOnlySet<E>
-
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,Set<E>
public class ReadOnlySet<E> extends Object implements Set<E>
INTERNAL: A set implementation that track the changes performed on it. It keeps track of the objects that have been added and the ones that has been removed.
-
-
Field Summary
Fields Modifier and Type Field Description protected Collection<?>
coll
protected TransactionIF
txn
-
Constructor Summary
Constructors Constructor Description ReadOnlySet(TransactionIF txn, Collection<?> coll)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(E o)
boolean
addAll(Collection<? extends E> c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
boolean
isEmpty()
Iterator<E>
iterator()
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
retainAll(Collection<?> c)
int
size()
Spliterator<E>
spliterator()
Object[]
toArray()
<T> T[]
toArray(T[] a)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Field Detail
-
txn
protected TransactionIF txn
-
coll
protected final Collection<?> coll
-
-
Constructor Detail
-
ReadOnlySet
public ReadOnlySet(TransactionIF txn, Collection<?> coll)
-
-
Method Detail
-
clear
public void clear()
-
add
public boolean add(E o)
-
addAll
public boolean addAll(Collection<? extends E> c)
-
remove
public boolean remove(Object o)
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<E>
- Specified by:
containsAll
in interfaceSet<E>
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
spliterator
public Spliterator<E> spliterator()
- Specified by:
spliterator
in interfaceCollection<E>
- Specified by:
spliterator
in interfaceIterable<E>
- Specified by:
spliterator
in interfaceSet<E>
-
-