com.carrotsearch.hppc
Class IntScatterSet
- java.lang.Object
-
- com.carrotsearch.hppc.IntHashSet
-
- com.carrotsearch.hppc.IntScatterSet
-
- All Implemented Interfaces:
- IntCollection, IntContainer, IntLookupContainer, IntSet, Preallocable, java.lang.Cloneable, java.lang.Iterable<IntCursor>
@Generated(date="2015-05-07T09:33:04+0200", value="KTypeScatterSet.java") public class IntScatterSet extends IntHashSetSame asIntHashSetbut does not implement per-instance key mixing strategy and uses a simpler (faster) bit distribution function.Note: read about important differences between hash and scatter sets.
- See Also:
IntHashSet, HPPC interfaces diagram
-
-
Field Summary
-
Fields inherited from class com.carrotsearch.hppc.IntHashSet
keys
-
-
Constructor Summary
Constructors Constructor and Description IntScatterSet()New instance with sane defaults.IntScatterSet(int expectedElements)New instance with sane defaults.IntScatterSet(int expectedElements, double loadFactor)New instance with sane defaults.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static IntScatterSetfrom(int... elements)Create a set from a variable number of arguments or an array ofint.intremoveAll(IntLookupContainer c)Default implementation uses a predicate for removal.intretainAll(IntLookupContainer c)Default implementation uses a predicate for retaining.intretainAll(IntPredicate predicate)Default implementation redirects toIntCollection.removeAll(IntPredicate)and negates the predicate.java.lang.StringtoString()Convert the contents of this container to a human-friendly string.-
Methods inherited from class com.carrotsearch.hppc.IntHashSet
add, addAll, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, forEach, hashCode, indexExists, indexGet, indexInsert, indexOf, indexReplace, isEmpty, iterator, release, remove, removeAll, removeAll, size, toArray, visualizeKeyDistribution
-
Methods inherited from interface com.carrotsearch.hppc.IntCollection
removeAll, retainAll, retainAll
-
-
-
-
Constructor Detail
-
IntScatterSet
public IntScatterSet()
New instance with sane defaults.
-
IntScatterSet
public IntScatterSet(int expectedElements)
New instance with sane defaults.
-
IntScatterSet
public IntScatterSet(int expectedElements, double loadFactor)New instance with sane defaults.
-
-
Method Detail
-
from
public static IntScatterSet from(int... elements)
Create a set from a variable number of arguments or an array ofint. The elements are copied from the argument to the internal buffer.
-
removeAll
public int removeAll(IntLookupContainer c)
Default implementation uses a predicate for removal.- Specified by:
removeAllin interfaceIntCollection- Returns:
- Returns the number of removed elements.
-
retainAll
public int retainAll(IntLookupContainer c)
Default implementation uses a predicate for retaining.- Specified by:
retainAllin interfaceIntCollection- Returns:
- Returns the number of removed elements.
-
retainAll
public int retainAll(IntPredicate predicate)
Default implementation redirects toIntCollection.removeAll(IntPredicate)and negates the predicate.- Specified by:
retainAllin interfaceIntCollection- Returns:
- Returns the number of removed elements.
-
toString
public java.lang.String toString()
Convert the contents of this container to a human-friendly string.- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG