org.codehaus.gpars

groovyx.gpars.extra166y
[Java] Class CustomConcurrentHashMap.KeySet

java.lang.Object
  java.util.AbstractCollection
      java.util.AbstractSet
          groovyx.gpars.extra166y.CustomConcurrentHashMap.KeySet
All Implemented Interfaces:
java.util.Set, java.io.Serializable

public static class CustomConcurrentHashMap.KeySet
extends java.util.AbstractSet

Creates a set with the given parameters.

Parameters:
strength - the strength of elements
equivalence - the Equivalence to use
expectedSize - an estimate of the number of elements that will be held in the set. If no estimate is known, zero is an acceptable value.


Field Summary
CustomConcurrentHashMap cchm

 
Constructor Summary
CustomConcurrentHashMap.KeySet(Strength strength, Equivalence equivalence, int expectedSize)

 
Method Summary
boolean add(java.lang.Object e)

Returns true if this set contains no elements.

void clear()

boolean contains(java.lang.Object o)

Adds the specified element to this set if there is not already an element equivalent to the given element with respect to this set's Equivalence.

int hashCode()

java.lang.Object intern(java.lang.Object e)

Returns a weakly consistent iterator over the elements in this set, that may reflect some, all or none of the changes made to the set after the iterator was created.

boolean isEmpty()

Returns the sum of the hash codes of each element, as computed by this set's Equivalence.

java.util.Iterator iterator()

Removes an element equivalent to the given element with respect to this set's Equivalence, if one is present.

boolean remove(java.lang.Object o)

Removes all of the elements from this set.

int size()

 
Methods inherited from class java.util.AbstractSet
java.util.AbstractSet#equals(java.lang.Object), java.util.AbstractSet#hashCode(), java.util.AbstractSet#removeAll(java.util.Collection), java.util.AbstractSet#add(java.lang.Object), java.util.AbstractSet#toString(), java.util.AbstractSet#clear(), java.util.AbstractSet#addAll(java.util.Collection), java.util.AbstractSet#iterator(), java.util.AbstractSet#remove(java.lang.Object), java.util.AbstractSet#contains(java.lang.Object), java.util.AbstractSet#isEmpty(), java.util.AbstractSet#size(), java.util.AbstractSet#toArray(), java.util.AbstractSet#toArray([Ljava.lang.Object;), java.util.AbstractSet#containsAll(java.util.Collection), java.util.AbstractSet#retainAll(java.util.Collection), java.util.AbstractSet#wait(long, int), java.util.AbstractSet#wait(long), java.util.AbstractSet#wait(), java.util.AbstractSet#getClass(), java.util.AbstractSet#notify(), java.util.AbstractSet#notifyAll(), java.util.AbstractSet#iterator(), java.util.AbstractSet#size()
 
Methods inherited from class java.util.AbstractCollection
java.util.AbstractCollection#add(java.lang.Object), java.util.AbstractCollection#toString(), java.util.AbstractCollection#clear(), java.util.AbstractCollection#addAll(java.util.Collection), java.util.AbstractCollection#iterator(), java.util.AbstractCollection#remove(java.lang.Object), java.util.AbstractCollection#contains(java.lang.Object), java.util.AbstractCollection#isEmpty(), java.util.AbstractCollection#size(), java.util.AbstractCollection#toArray(), java.util.AbstractCollection#toArray([Ljava.lang.Object;), java.util.AbstractCollection#containsAll(java.util.Collection), java.util.AbstractCollection#removeAll(java.util.Collection), java.util.AbstractCollection#retainAll(java.util.Collection), java.util.AbstractCollection#wait(long, int), java.util.AbstractCollection#wait(long), java.util.AbstractCollection#wait(), java.util.AbstractCollection#equals(java.lang.Object), java.util.AbstractCollection#hashCode(), java.util.AbstractCollection#getClass(), java.util.AbstractCollection#notify(), java.util.AbstractCollection#notifyAll()
 

Field Detail

cchm

final CustomConcurrentHashMap cchm


 
Constructor Detail

CustomConcurrentHashMap.KeySet

public CustomConcurrentHashMap.KeySet(Strength strength, Equivalence equivalence, int expectedSize)


 
Method Detail

add

public boolean add(java.lang.Object e)
Returns true if this set contains no elements.
Returns:
true if this set contains no elements


clear

public void clear()


contains

public boolean contains(java.lang.Object o)
Adds the specified element to this set if there is not already an element equivalent to the given element with respect to this set's Equivalence.
Parameters:
e - element to be added to this set
Returns:
true if this set did not already contain the specified element


hashCode

public int hashCode()


intern

public java.lang.Object intern(java.lang.Object e)
Returns a weakly consistent iterator over the elements in this set, that may reflect some, all or none of the changes made to the set after the iterator was created.
Returns:
an Iterator over the elements in this set


isEmpty

public boolean isEmpty()
Returns the sum of the hash codes of each element, as computed by this set's Equivalence.
Returns:
the hash code


iterator

public java.util.Iterator iterator()
Removes an element equivalent to the given element with respect to this set's Equivalence, if one is present.
Parameters:
o - object to be removed from this set, if present
Returns:
true if the set contained the specified element


remove

public boolean remove(java.lang.Object o)
Removes all of the elements from this set.


size

public int size()


 

Copyright © 2008–2013 Václav Pech. All Rights Reserved.