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:
Iterable<E>, Collection<E>
Direct Known Subclasses:
LargeSet

public abstract class LargeCollection<E>
extends 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(Object obj)
          
 Iterator<E> iterator()
          
 boolean remove(Object obj)
          
 boolean removeAll(Collection<?> removeCandidates)
          
 int size()
          
abstract  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 Collection<E>
Overrides:
add in class AbstractCollection<E>

contains

public final boolean contains(Object obj)

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

remove

public final boolean remove(Object obj)

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

removeAll

public final boolean removeAll(Collection<?> removeCandidates)

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

iterator

public final Iterator<E> iterator()

Specified by:
iterator in interface Iterable<E>
Specified by:
iterator in interface Collection<E>
Specified by:
iterator in class AbstractCollection<E>

size

public final int size()

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

sourceIterator

public abstract 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

Copyright 2001-2014, Terracotta, Inc.