ehcache

net.sf.ehcache.util
Class LargeCollection<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by net.sf.ehcache.util.LargeCollection<E>
Type Parameters:
E -
All Implemented Interfaces:
java.lang.Iterable<E>, java.util.Collection<E>
Direct Known Subclasses:
LargeSet

public abstract class LargeCollection<E>
extends java.util.AbstractCollection<E>

Collection for large set. The general purpose is not to iterator through all the keys for add and remove operations.

Author:
Nabib El-Rahman

Constructor Summary
LargeCollection()
          default constructor.
 
Method Summary
 boolean add(E obj)
          
 boolean contains(java.lang.Object obj)
          
 java.util.Iterator<E> iterator()
          
 boolean remove(java.lang.Object obj)
          
 boolean removeAll(java.util.Collection<?> removeCandidates)
          
 int size()
          
abstract  java.util.Iterator<E> sourceIterator()
          Iterator of initial set of entries.
abstract  int sourceSize()
          Initial set of entries size.
 
Methods inherited from class java.util.AbstractCollection
addAll, clear, containsAll, isEmpty, retainAll, toArray, toArray, 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
 

Constructor Detail

LargeCollection

public LargeCollection()
default constructor.

Method Detail

add

public final boolean add(E obj)

Specified by:
add in interface java.util.Collection<E>
Overrides:
add in class java.util.AbstractCollection<E>

contains

public final boolean contains(java.lang.Object obj)

Specified by:
contains in interface java.util.Collection<E>
Overrides:
contains in class java.util.AbstractCollection<E>

remove

public final boolean remove(java.lang.Object obj)

Specified by:
remove in interface java.util.Collection<E>
Overrides:
remove in class java.util.AbstractCollection<E>

removeAll

public final boolean removeAll(java.util.Collection<?> removeCandidates)

Specified by:
removeAll in interface java.util.Collection<E>
Overrides:
removeAll in class java.util.AbstractCollection<E>

iterator

public final java.util.Iterator<E> iterator()

Specified by:
iterator in interface java.lang.Iterable<E>
Specified by:
iterator in interface java.util.Collection<E>
Specified by:
iterator in class java.util.AbstractCollection<E>

size

public final int size()

Specified by:
size in interface java.util.Collection<E>
Specified by:
size in class java.util.AbstractCollection<E>

sourceIterator

public abstract java.util.Iterator<E> sourceIterator()
Iterator of initial set of entries.

Returns:
Iterator < E >

sourceSize

public abstract int sourceSize()
Initial set of entries size.

Returns:
integer

ehcache

true