Class LongHashSet
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractLongIterable
org.eclipse.collections.impl.set.primitive.AbstractLongSet
org.eclipse.collections.impl.set.mutable.primitive.LongHashSet
- All Implemented Interfaces:
Externalizable,Serializable,MutableLongCollection,LongIterable,PrimitiveIterable,LongSet,MutableLongSet
This file was automatically generated from template file primitiveHashSet.stg.
- Since:
- 3.0.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLongHashSet(int initialCapacity) LongHashSet(long... elements) LongHashSet(LongIterable elements) LongHashSet(LongHashSet set) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(long element) booleanaddAll(long... source) booleanaddAll(LongIterable source) booleanallSatisfy(LongPredicate predicate) booleananySatisfy(LongPredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) boxed()chunk(int size) voidclear()<V> MutableSet<V>collect(LongToObjectFunction<? extends V> function) <V,R extends Collection<V>>
Rcollect(LongToObjectFunction<? extends V> function, R target) voidcompact()Deprecated.booleancontains(long value) intcount(LongPredicate predicate) longdetectIfNone(LongPredicate predicate, long ifNone) voideach(LongProcedure procedure) freeze()inthashCode()<T> TinjectInto(T injectedValue, ObjectLongToObjectFunction<? super T, ? extends T> function) longmax()longmin()newEmpty()Creates a new empty LongHashSet.static LongHashSetnewSet(LongIterable source) static LongHashSetnewSetWith(long... source) voidreject(LongPredicate predicate) <R extends MutableLongCollection>
Rreject(LongPredicate predicate, R target) booleanremove(long value) booleanremoveAll(long... source) booleanremoveAll(LongIterable source) booleanretainAll(long... source) booleanretainAll(LongIterable source) select(LongPredicate predicate) <R extends MutableLongCollection>
Rselect(LongPredicate predicate, R target) intsize()longsum()long[]toArray()long[]toArray(long[] array) booleanwith(long element) withAll(LongIterable elements) without(long element) withoutAll(LongIterable elements) voidMethods inherited from class org.eclipse.collections.impl.set.primitive.AbstractLongSet
cartesianProduct, equalsMethods inherited from class org.eclipse.collections.impl.primitive.AbstractLongIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.LongIterable
asLazy, 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, toSortedListByMethods inherited from interface org.eclipse.collections.api.set.primitive.LongSet
cartesianProduct, equals, isProperSubsetOf, isSubsetOf, tapMethods inherited from interface org.eclipse.collections.api.collection.primitive.MutableLongCollection
removeIfMethods inherited from interface org.eclipse.collections.api.set.primitive.MutableLongSet
difference, intersect, symmetricDifference, tap, unionMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
Constructor Details
-
LongHashSet
public LongHashSet() -
LongHashSet
public LongHashSet(int initialCapacity) -
LongHashSet
public LongHashSet(long... elements) -
LongHashSet
-
LongHashSet
-
-
Method Details
-
boxed
- Specified by:
boxedin interfaceMutableLongSet
-
newSet
-
newSetWith
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceLongSet- Specified by:
hashCodein classAbstractLongSet
-
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
add
public boolean add(long element) - Specified by:
addin interfaceMutableLongCollection
-
addAll
public boolean addAll(long... source) - Specified by:
addAllin interfaceMutableLongCollection
-
addAll
- Specified by:
addAllin interfaceMutableLongCollection
-
remove
public boolean remove(long value) - Specified by:
removein interfaceMutableLongCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableLongCollection
-
removeAll
public boolean removeAll(long... source) - Specified by:
removeAllin interfaceMutableLongCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableLongCollection
-
retainAll
public boolean retainAll(long... source) - Specified by:
retainAllin interfaceMutableLongCollection
-
clear
public void clear()- Specified by:
clearin interfaceMutableLongCollection
-
with
- Specified by:
within interfaceMutableLongCollection- Specified by:
within interfaceMutableLongSet
-
without
- Specified by:
withoutin interfaceMutableLongCollection- Specified by:
withoutin interfaceMutableLongSet
-
withAll
- Specified by:
withAllin interfaceMutableLongCollection- Specified by:
withAllin interfaceMutableLongSet
-
withoutAll
- Specified by:
withoutAllin interfaceMutableLongCollection- Specified by:
withoutAllin interfaceMutableLongSet
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableLongCollection- Specified by:
asUnmodifiablein interfaceMutableLongSet
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableLongCollection- Specified by:
asSynchronizedin interfaceMutableLongSet
-
toImmutable
- Specified by:
toImmutablein interfaceLongSet- Specified by:
toImmutablein interfaceMutableLongCollection- Specified by:
toImmutablein interfaceMutableLongSet
-
longIterator
- Specified by:
longIteratorin interfaceLongIterable- Specified by:
longIteratorin interfaceMutableLongCollection
-
toArray
public long[] toArray()- Specified by:
toArrayin interfaceLongIterable
-
toArray
public long[] toArray(long[] array) - Specified by:
toArrayin interfaceLongIterable
-
contains
public boolean contains(long value) - Specified by:
containsin interfaceLongIterable
-
each
- Specified by:
eachin interfaceLongIterable- Since:
- 7.0.
-
select
- Specified by:
selectin interfaceLongIterable- Specified by:
selectin interfaceLongSet- Specified by:
selectin interfaceMutableLongCollection- Specified by:
selectin interfaceMutableLongSet
-
select
- Specified by:
selectin interfaceLongIterable- Since:
- 8.1.
-
reject
- Specified by:
rejectin interfaceLongIterable- Specified by:
rejectin interfaceLongSet- Specified by:
rejectin interfaceMutableLongCollection- Specified by:
rejectin interfaceMutableLongSet
-
reject
- Specified by:
rejectin interfaceLongIterable- Since:
- 8.1.
-
collect
- Specified by:
collectin interfaceLongIterable- Specified by:
collectin interfaceLongSet- Specified by:
collectin interfaceMutableLongCollection- Specified by:
collectin interfaceMutableLongSet
-
collect
- Specified by:
collectin interfaceLongIterable- Since:
- 8.1.
-
detectIfNone
- Specified by:
detectIfNonein interfaceLongIterable
-
count
- Specified by:
countin interfaceLongIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceLongIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceLongIterable
-
sum
public long sum()- Specified by:
sumin interfaceLongIterable
-
max
public long max()- Specified by:
maxin interfaceLongIterable
-
min
public long min()- Specified by:
minin interfaceLongIterable
-
freeze
- Specified by:
freezein interfaceLongSet- Specified by:
freezein interfaceMutableLongSet
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
injectInto
public <T> T injectInto(T injectedValue, ObjectLongToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceLongIterable
-
chunk
- Specified by:
chunkin interfaceLongIterable
-
newEmpty
Creates a new empty LongHashSet.- Specified by:
newEmptyin interfaceMutableLongCollection- Specified by:
newEmptyin interfaceMutableLongSet- Since:
- 9.2.
-
trimToSize
public boolean trimToSize()- Since:
- 12.0
-
compact
Deprecated.since 12.0 - UsetrimToSize()insteadRehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
-
trimToSize()instead