com.carrotsearch.hppc
Class LongScatterSet
- java.lang.Object
-
- com.carrotsearch.hppc.LongHashSet
-
- com.carrotsearch.hppc.LongScatterSet
-
- All Implemented Interfaces:
- LongCollection, LongContainer, LongLookupContainer, LongSet, Preallocable, java.lang.Cloneable, java.lang.Iterable<LongCursor>
@Generated(date="2015-05-07T09:33:04+0200", value="KTypeScatterSet.java") public class LongScatterSet extends LongHashSetSame asLongHashSetbut 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:
LongHashSet, HPPC interfaces diagram
-
-
Field Summary
-
Fields inherited from class com.carrotsearch.hppc.LongHashSet
keys
-
-
Constructor Summary
Constructors Constructor and Description LongScatterSet()New instance with sane defaults.LongScatterSet(int expectedElements)New instance with sane defaults.LongScatterSet(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 LongScatterSetfrom(long... elements)Create a set from a variable number of arguments or an array oflong.intremoveAll(LongLookupContainer c)Default implementation uses a predicate for removal.intretainAll(LongLookupContainer c)Default implementation uses a predicate for retaining.intretainAll(LongPredicate predicate)Default implementation redirects toLongCollection.removeAll(LongPredicate)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.LongHashSet
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.LongCollection
removeAll, retainAll, retainAll
-
-
-
-
Constructor Detail
-
LongScatterSet
public LongScatterSet()
New instance with sane defaults.
-
LongScatterSet
public LongScatterSet(int expectedElements)
New instance with sane defaults.
-
LongScatterSet
public LongScatterSet(int expectedElements, double loadFactor)New instance with sane defaults.
-
-
Method Detail
-
from
public static LongScatterSet from(long... elements)
Create a set from a variable number of arguments or an array oflong. The elements are copied from the argument to the internal buffer.
-
removeAll
public int removeAll(LongLookupContainer c)
Default implementation uses a predicate for removal.- Specified by:
removeAllin interfaceLongCollection- Returns:
- Returns the number of removed elements.
-
retainAll
public int retainAll(LongLookupContainer c)
Default implementation uses a predicate for retaining.- Specified by:
retainAllin interfaceLongCollection- Returns:
- Returns the number of removed elements.
-
retainAll
public int retainAll(LongPredicate predicate)
Default implementation redirects toLongCollection.removeAll(LongPredicate)and negates the predicate.- Specified by:
retainAllin interfaceLongCollection- 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