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

java.lang.Object
  extended by it.unimi.dsi.fastutil.objects.ObjectCollections.SynchronizedCollection<K>
      extended by it.unimi.dsi.fastutil.objects.ObjectSets.SynchronizedSet<K>
All Implemented Interfaces:
ObjectCollection<K>, ObjectIterable<K>, ObjectSet<K>, Serializable, Iterable<K>, Collection<K>, Set<K>
Direct Known Subclasses:
ObjectSortedSets.SynchronizedSortedSet
Enclosing class:
ObjectSets

public static class ObjectSets.SynchronizedSet<K>
extends ObjectCollections.SynchronizedCollection<K>
implements ObjectSet<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.ObjectCollections.SynchronizedCollection
collection, sync
 
Constructor Summary
protected ObjectSets.SynchronizedSet(ObjectSet<K> s)
           
protected ObjectSets.SynchronizedSet(ObjectSet<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.ObjectCollections.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.ObjectSet
iterator
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectCollection
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

ObjectSets.SynchronizedSet

protected ObjectSets.SynchronizedSet(ObjectSet<K> s,
                                     Object sync)

ObjectSets.SynchronizedSet

protected ObjectSets.SynchronizedSet(ObjectSet<K> s)
Method Detail

remove

public boolean remove(Object k)
Description copied from interface: ObjectSet
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 ObjectSet<K>
Specified by:
remove in interface Collection<K>
Specified by:
remove in interface Set<K>
Overrides:
remove in class ObjectCollections.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.