org.multiverse.transactional.collections
Interface TransactionalCollection<E>

Type Parameters:
E -
All Superinterfaces:
Collection<E>, 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 Collection<E>

A Transactional version of the Collection interface.

Author:
Peter Veentjer.
See Also:
Collection

Method Summary
 boolean add(E e)
           
 boolean addAll(Collection<? extends E> c)
           
 int atomicSize()
          Returns the current size of the TransactionalCollection.
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object o)
           
 int hashCode()
           
 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()
           
 

Method Detail

size

int size()
Specified by:
size in interface 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 Collection<E>

contains

boolean contains(Object o)
Specified by:
contains in interface Collection<E>

iterator

Iterator<E> iterator()
Specified by:
iterator in interface Collection<E>
Specified by:
iterator in interface Iterable<E>

toArray

Object[] toArray()
Specified by:
toArray in interface Collection<E>

toArray

<T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<E>

containsAll

boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<E>

toString

String toString()
Overrides:
toString in class Object

equals

boolean equals(Object o)
Specified by:
equals in interface Collection<E>
Overrides:
equals in class Object

hashCode

int hashCode()
Specified by:
hashCode in interface Collection<E>
Overrides:
hashCode in class Object

add

boolean add(E e)
Specified by:
add in interface Collection<E>

remove

boolean remove(Object o)
Specified by:
remove in interface Collection<E>

addAll

boolean addAll(Collection<? extends E> c)
Specified by:
addAll in interface Collection<E>

removeAll

boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<E>

retainAll

boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<E>

clear

void clear()
Specified by:
clear in interface Collection<E>


Copyright © 2008-2010 Multiverse. All Rights Reserved.