Interface ObjectSet<K>
-
- All Superinterfaces:
Collection<K>,Iterable<K>,ObjectCollection<K>,ObjectIterable<K>,Set<K>
- All Known Subinterfaces:
Char2ObjectMap.FastEntrySet<V>
- All Known Implementing Classes:
AbstractObjectSet
public interface ObjectSet<K> extends ObjectCollection<K>, Set<K>
A type-specificSet; provides some additional methods that use polymorphism to avoid (un)boxing.Additionally, this interface strengthens (again)
iterator().- See Also:
Set
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectIterator<K>iterator()Returns a type-specific iterator on the elements of this set.booleanremove(Object k)Removes an element from this set.-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface org.codelibs.jhighlight.fastutil.objects.ObjectCollection
objectIterator, toArray
-
-
-
-
Method Detail
-
iterator
ObjectIterator<K> iterator()
Returns a type-specific iterator on the elements of this set.Note that this specification strengthens the one given in
Iterable.iterator(), which was already strengthened in the corresponding type-specific class, but was weakened by the fact that this interface extendsSet.- Specified by:
iteratorin interfaceCollection<K>- Specified by:
iteratorin interfaceIterable<K>- Specified by:
iteratorin interfaceObjectCollection<K>- Specified by:
iteratorin interfaceObjectIterable<K>- Specified by:
iteratorin interfaceSet<K>- Returns:
- a type-specific iterator on the elements of this set.
-
remove
boolean remove(Object k)
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 theListinterface.- Specified by:
removein interfaceCollection<K>- Specified by:
removein interfaceSet<K>- See Also:
Collection.remove(Object)
-
-