org.multiverse.transactional.collections
Interface TransactionalCollection<E>
- Type Parameters:
E -
- All Superinterfaces:
- java.util.Collection<E>, java.lang.Iterable<E>
- All Known Subinterfaces:
- TransactionalDeque<E>, TransactionalList<E>, TransactionalQueue<E>, TransactionalSet<E>
- All Known Implementing Classes:
- AbstractTransactionalDeque, TransactionalArrayList, TransactionalLinkedList
public interface TransactionalCollection<E>
- extends java.util.Collection<E>
A Transactional version of the Collection interface.
- Author:
- Peter Veentjer.
- See Also:
Collection
size
int size()
- Specified by:
size in interface java.util.Collection<E>
atomicSize
int atomicSize()
- Returns the current size of the TransactionalCollection. The big difference between
the normal
size() method is that this one returns the actual size of
this map and doesn't look at the current transaction. So you could see changes
made by other threads.
- Returns:
- the current size of the TransactionalMap.
isEmpty
boolean isEmpty()
- Specified by:
isEmpty in interface java.util.Collection<E>
contains
boolean contains(java.lang.Object o)
- Specified by:
contains in interface java.util.Collection<E>
iterator
java.util.Iterator<E> iterator()
- Specified by:
iterator in interface java.util.Collection<E>- Specified by:
iterator in interface java.lang.Iterable<E>
toArray
java.lang.Object[] toArray()
- Specified by:
toArray in interface java.util.Collection<E>
toArray
<T> T[] toArray(T[] a)
- Specified by:
toArray in interface java.util.Collection<E>
containsAll
boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAll in interface java.util.Collection<E>
toString
java.lang.String toString()
- Overrides:
toString in class java.lang.Object
equals
boolean equals(java.lang.Object o)
- Specified by:
equals in interface java.util.Collection<E>- Overrides:
equals in class java.lang.Object
hashCode
int hashCode()
- Specified by:
hashCode in interface java.util.Collection<E>- Overrides:
hashCode in class java.lang.Object
add
boolean add(E e)
- Specified by:
add in interface java.util.Collection<E>
remove
boolean remove(java.lang.Object o)
- Specified by:
remove in interface java.util.Collection<E>
addAll
boolean addAll(java.util.Collection<? extends E> c)
- Specified by:
addAll in interface java.util.Collection<E>
removeAll
boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll in interface java.util.Collection<E>
retainAll
boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll in interface java.util.Collection<E>
clear
void clear()
- Specified by:
clear in interface java.util.Collection<E>
Copyright © 2008-2010 Multiverse. All Rights Reserved.