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

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

public static class ObjectSets.UnmodifiableSet<K>
extends ObjectCollections.UnmodifiableCollection<K>
implements ObjectSet<K>, java.io.Serializable

An unmodifiable wrapper class for sets.

See Also:
Serialized Form

Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 boolean remove(java.lang.Object k)
          Removes an element from this set.
 
Methods inherited from class it.unimi.dsi.fastutil.objects.ObjectCollections.UnmodifiableCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, objectIterator, removeAll, retainAll, size, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
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
 

Method Detail

remove

public boolean remove(java.lang.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 java.util.Collection<K>
Specified by:
remove in interface java.util.Set<K>
Overrides:
remove in class ObjectCollections.UnmodifiableCollection<K>
See Also:
Collection.remove(Object)

equals

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

hashCode

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