public class LongHashSet extends AbstractLongSet implements MutableLongSet, Externalizable
| Constructor and Description |
|---|
LongHashSet() |
LongHashSet(int initialCapacity) |
LongHashSet(long... elements) |
LongHashSet(LongHashSet set) |
LongHashSet(LongIterable elements) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long element) |
boolean |
addAll(long... source) |
boolean |
addAll(LongIterable source) |
boolean |
allSatisfy(LongPredicate predicate) |
boolean |
anySatisfy(LongPredicate predicate) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
MutableLongSet |
asSynchronized() |
MutableLongSet |
asUnmodifiable() |
RichIterable<LongIterable> |
chunk(int size) |
void |
clear() |
<V> MutableSet<V> |
collect(LongToObjectFunction<? extends V> function) |
<V,R extends Collection<V>> |
collect(LongToObjectFunction<? extends V> function,
R target) |
void |
compact()
Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
|
boolean |
contains(long value) |
int |
count(LongPredicate predicate) |
long |
detectIfNone(LongPredicate predicate,
long ifNone) |
void |
each(LongProcedure procedure) |
LongSet |
freeze() |
int |
hashCode() |
<T> T |
injectInto(T injectedValue,
ObjectLongToObjectFunction<? super T,? extends T> function) |
MutableLongIterator |
longIterator() |
long |
max() |
long |
min() |
LongHashSet |
newEmpty()
Creates a new empty LongHashSet.
|
static LongHashSet |
newSet(LongIterable source) |
static LongHashSet |
newSetWith(long... source) |
void |
readExternal(ObjectInput in) |
LongHashSet |
reject(LongPredicate predicate) |
<R extends MutableLongCollection> |
reject(LongPredicate predicate,
R target) |
boolean |
remove(long value) |
boolean |
removeAll(long... source) |
boolean |
removeAll(LongIterable source) |
boolean |
retainAll(long... source) |
boolean |
retainAll(LongIterable source) |
LongHashSet |
select(LongPredicate predicate) |
<R extends MutableLongCollection> |
select(LongPredicate predicate,
R target) |
int |
size() |
long |
sum() |
long[] |
toArray() |
long[] |
toArray(long[] array) |
ImmutableLongSet |
toImmutable() |
LongHashSet |
with(long element) |
LongHashSet |
withAll(LongIterable elements) |
LongHashSet |
without(long element) |
LongHashSet |
withoutAll(LongIterable elements) |
void |
writeExternal(ObjectOutput out) |
cartesianProduct, equalsasLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringdifference, intersect, symmetricDifference, tap, unionremoveIfcartesianProduct, equals, isProperSubsetOf, isSubsetOfasLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByappendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toStringpublic LongHashSet()
public LongHashSet(int initialCapacity)
public LongHashSet(long... elements)
public LongHashSet(LongIterable elements)
public LongHashSet(LongHashSet set)
public static LongHashSet newSet(LongIterable source)
public static LongHashSet newSetWith(long... source)
public int hashCode()
hashCode in interface LongSethashCode in class AbstractLongSetpublic int size()
size in interface PrimitiveIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic boolean add(long element)
add in interface MutableLongCollectionpublic boolean addAll(long... source)
addAll in interface MutableLongCollectionpublic boolean addAll(LongIterable source)
addAll in interface MutableLongCollectionpublic boolean remove(long value)
remove in interface MutableLongCollectionpublic boolean removeAll(LongIterable source)
removeAll in interface MutableLongCollectionpublic boolean removeAll(long... source)
removeAll in interface MutableLongCollectionpublic boolean retainAll(LongIterable source)
retainAll in interface MutableLongCollectionpublic boolean retainAll(long... source)
retainAll in interface MutableLongCollectionpublic void clear()
clear in interface MutableLongCollectionpublic LongHashSet with(long element)
with in interface MutableLongCollectionwith in interface MutableLongSetpublic LongHashSet without(long element)
without in interface MutableLongCollectionwithout in interface MutableLongSetpublic LongHashSet withAll(LongIterable elements)
withAll in interface MutableLongCollectionwithAll in interface MutableLongSetpublic LongHashSet withoutAll(LongIterable elements)
withoutAll in interface MutableLongCollectionwithoutAll in interface MutableLongSetpublic MutableLongSet asUnmodifiable()
asUnmodifiable in interface MutableLongCollectionasUnmodifiable in interface MutableLongSetpublic MutableLongSet asSynchronized()
asSynchronized in interface MutableLongCollectionasSynchronized in interface MutableLongSetpublic ImmutableLongSet toImmutable()
toImmutable in interface MutableLongCollectiontoImmutable in interface LongSettoImmutable in interface MutableLongSetpublic MutableLongIterator longIterator()
longIterator in interface MutableLongCollectionlongIterator in interface LongIterablepublic long[] toArray()
toArray in interface LongIterablepublic long[] toArray(long[] array)
toArray in interface LongIterablepublic boolean contains(long value)
contains in interface LongIterablepublic void each(LongProcedure procedure)
each in interface LongIterablepublic LongHashSet select(LongPredicate predicate)
select in interface MutableLongCollectionselect in interface LongIterableselect in interface LongSetselect in interface MutableLongSetpublic <R extends MutableLongCollection> R select(LongPredicate predicate, R target)
select in interface LongIterablepublic LongHashSet reject(LongPredicate predicate)
reject in interface MutableLongCollectionreject in interface LongIterablereject in interface LongSetreject in interface MutableLongSetpublic <R extends MutableLongCollection> R reject(LongPredicate predicate, R target)
reject in interface LongIterablepublic <V> MutableSet<V> collect(LongToObjectFunction<? extends V> function)
collect in interface MutableLongCollectioncollect in interface LongIterablecollect in interface LongSetcollect in interface MutableLongSetpublic <V,R extends Collection<V>> R collect(LongToObjectFunction<? extends V> function, R target)
collect in interface LongIterablepublic long detectIfNone(LongPredicate predicate, long ifNone)
detectIfNone in interface LongIterablepublic int count(LongPredicate predicate)
count in interface LongIterablepublic boolean anySatisfy(LongPredicate predicate)
anySatisfy in interface LongIterablepublic boolean allSatisfy(LongPredicate predicate)
allSatisfy in interface LongIterablepublic long sum()
sum in interface LongIterablepublic long max()
max in interface LongIterablepublic long min()
min in interface LongIterablepublic LongSet freeze()
freeze in interface LongSetfreeze in interface MutableLongSetpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionpublic <T> T injectInto(T injectedValue,
ObjectLongToObjectFunction<? super T,? extends T> function)
injectInto in interface LongIterablepublic RichIterable<LongIterable> chunk(int size)
chunk in interface LongIterablepublic LongHashSet newEmpty()
newEmpty in interface MutableLongCollectionnewEmpty in interface MutableLongSetpublic void compact()
Copyright © 2004–2022. All rights reserved.