org.jboss.cache.pojo.collection
Class CachedSetImpl
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet
org.jboss.cache.pojo.collection.CachedSetImpl
- All Implemented Interfaces:
- Iterable, Collection, Set
public class CachedSetImpl
- extends AbstractSet
Set implementation that uses a cache as an underlying backend store.
Set data is stored in children nodes named based on the attached Object's hash code
in hexidecimal string form.
If there are conflicts between two Objects with the same hash code, then a
counter (upper 32 bits of 64) is used.
- Author:
- Ben Wang, Scott Marlow, Jussi Pyorre
CachedSetImpl
public CachedSetImpl(PojoCacheImpl cache,
AbstractCollectionInterceptor interceptor)
add
public boolean add(Object o)
- Specified by:
add
in interface Collection
- Specified by:
add
in interface Set
- Overrides:
add
in class AbstractCollection
clear
public void clear()
- Specified by:
clear
in interface Collection
- Specified by:
clear
in interface Set
- Overrides:
clear
in class AbstractCollection
contains
public boolean contains(Object o)
- Specified by:
contains
in interface Collection
- Specified by:
contains
in interface Set
- Overrides:
contains
in class AbstractCollection
iterator
public Iterator iterator()
- Specified by:
iterator
in interface Iterable
- Specified by:
iterator
in interface Collection
- Specified by:
iterator
in interface Set
- Specified by:
iterator
in class AbstractCollection
remove
public boolean remove(Object o)
- Specified by:
remove
in interface Collection
- Specified by:
remove
in interface Set
- Overrides:
remove
in class AbstractCollection
size
public int size()
- Specified by:
size
in interface Collection
- Specified by:
size
in interface Set
- Specified by:
size
in class AbstractCollection
toString
public String toString()
- Overrides:
toString
in class AbstractCollection
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Collection
- Specified by:
hashCode
in interface Set
- Overrides:
hashCode
in class AbstractSet
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Collection
- Specified by:
equals
in interface Set
- Overrides:
equals
in class AbstractSet
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.