it.unimi.dsi.fastutil.objects
Class ReferenceSets.SynchronizedSet<K>

java.lang.Object
  extended by it.unimi.dsi.fastutil.objects.ReferenceCollections.SynchronizedCollection<K>
      extended by it.unimi.dsi.fastutil.objects.ReferenceSets.SynchronizedSet<K>
All Implemented Interfaces:
ObjectIterable<K>, ReferenceCollection<K>, ReferenceSet<K>, Serializable, Iterable<K>, Collection<K>, Set<K>
Direct Known Subclasses:
ReferenceSortedSets.SynchronizedSortedSet
Enclosing class:
ReferenceSets

public static class ReferenceSets.SynchronizedSet<K>
extends ReferenceCollections.SynchronizedCollection<K>
implements ReferenceSet<K>, Serializable

A synchronized wrapper class for sets.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Fields inherited from class it.unimi.dsi.fastutil.objects.ReferenceCollections.SynchronizedCollection
collection, sync
 
Constructor Summary
protected ReferenceSets.SynchronizedSet(ReferenceSet<K> s)
           
protected ReferenceSets.SynchronizedSet(ReferenceSet<K> s, Object sync)
           
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
 boolean remove(Object k)
          Removes an element from this set.
 
Methods inherited from class it.unimi.dsi.fastutil.objects.ReferenceCollections.SynchronizedCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, objectIterator, rem, removeAll, retainAll, size, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceSet
iterator
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceCollection
objectIterator, toArray
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, isEmpty, removeAll, retainAll, size, toArray, toArray
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ReferenceSets.SynchronizedSet

protected ReferenceSets.SynchronizedSet(ReferenceSet<K> s,
                                        Object sync)

ReferenceSets.SynchronizedSet

protected ReferenceSets.SynchronizedSet(ReferenceSet<K> s)
Method Detail

remove

public boolean remove(Object k)
Description copied from interface: ReferenceSet
Removes an element from this set.

Note that the corresponding method of the type-specific collection is rem(). This unfortunate situation is caused by the clash with the similarly named index-based method in the List interface.

Specified by:
remove in interface ReferenceSet<K>
Specified by:
remove in interface Collection<K>
Specified by:
remove in interface Set<K>
Overrides:
remove in class ReferenceCollections.SynchronizedCollection<K>
See Also:
Collection.remove(Object)

equals

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

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<K>
Specified by:
hashCode in interface Set<K>
Overrides:
hashCode in class Object


Copyright © 2011. All Rights Reserved.