Package net.ontopia.persistence.proxy
Class IdentityCollectionWrapper<E>
- java.lang.Object
-
- net.ontopia.persistence.proxy.IdentityCollectionWrapper<E>
-
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
public class IdentityCollectionWrapper<E> extends Object implements Collection<E>
INTERNAL: A set implementation that wraps an identity collection and presents the underlying collection as if it had PersistentIF instances inside. All identity lookup is done lazily, and no state is stored by this instance except for the current TransactionIF and the wrapped identities collection.
-
-
Field Summary
Fields Modifier and Type Field Description protected Collection<?>
other
protected TransactionIF
txn
-
Constructor Summary
Constructors Constructor Description IdentityCollectionWrapper(TransactionIF txn, Collection<?> identities)
-
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()
Object[]
toArray()
<T> T[]
toArray(T[] a)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Field Detail
-
txn
protected final TransactionIF txn
-
other
protected final Collection<?> other
-
-
Constructor Detail
-
IdentityCollectionWrapper
public IdentityCollectionWrapper(TransactionIF txn, Collection<?> identities)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<E>
-
add
public boolean add(E o)
- Specified by:
add
in interfaceCollection<E>
-
addAll
public boolean addAll(Collection<? extends E> c)
- Specified by:
addAll
in interfaceCollection<E>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<E>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<E>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<E>
-
size
public int size()
- Specified by:
size
in interfaceCollection<E>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<E>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<E>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<E>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfaceCollection<E>
-
-