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
public class LongHashSet extends AbstractLongSet implements MutableLongSet, Externalizable
This file was automatically generated from template file primitiveHashSet.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LongHashSet()LongHashSet(int initialCapacity)LongHashSet(long... elements)LongHashSet(LongIterable elements)LongHashSet(LongHashSet set)
-
Method Summary
-
Methods inherited from class org.eclipse.collections.impl.set.primitive.AbstractLongSet
cartesianProduct, equals
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractLongIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods 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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.LongSet
cartesianProduct, equals, isProperSubsetOf, isSubsetOf, tap
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableLongCollection
removeIf
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.MutableLongSet
difference, intersect, symmetricDifference, tap, union
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
-
-
-
Constructor Detail
-
LongHashSet
public LongHashSet()
-
LongHashSet
public LongHashSet(int initialCapacity)
-
LongHashSet
public LongHashSet(long... elements)
-
LongHashSet
public LongHashSet(LongIterable elements)
-
LongHashSet
public LongHashSet(LongHashSet set)
-
-
Method Detail
-
boxed
public MutableSet<Long> boxed()
- Specified by:
boxedin interfaceMutableLongSet
-
newSet
public static LongHashSet newSet(LongIterable source)
-
newSetWith
public static LongHashSet newSetWith(long... source)
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceLongSet- Specified by:
hashCodein classAbstractLongSet
-
size
public int size()
- Specified by:
sizein interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- 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
public boolean addAll(LongIterable source)
- Specified by:
addAllin interfaceMutableLongCollection
-
remove
public boolean remove(long value)
- Specified by:
removein interfaceMutableLongCollection
-
removeAll
public boolean removeAll(LongIterable source)
- Specified by:
removeAllin interfaceMutableLongCollection
-
removeAll
public boolean removeAll(long... source)
- Specified by:
removeAllin interfaceMutableLongCollection
-
retainAll
public boolean retainAll(LongIterable source)
- Specified by:
retainAllin interfaceMutableLongCollection
-
retainAll
public boolean retainAll(long... source)
- Specified by:
retainAllin interfaceMutableLongCollection
-
clear
public void clear()
- Specified by:
clearin interfaceMutableLongCollection
-
with
public LongHashSet with(long element)
- Specified by:
within interfaceMutableLongCollection- Specified by:
within interfaceMutableLongSet
-
without
public LongHashSet without(long element)
- Specified by:
withoutin interfaceMutableLongCollection- Specified by:
withoutin interfaceMutableLongSet
-
withAll
public LongHashSet withAll(LongIterable elements)
- Specified by:
withAllin interfaceMutableLongCollection- Specified by:
withAllin interfaceMutableLongSet
-
withoutAll
public LongHashSet withoutAll(LongIterable elements)
- Specified by:
withoutAllin interfaceMutableLongCollection- Specified by:
withoutAllin interfaceMutableLongSet
-
asUnmodifiable
public MutableLongSet asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableLongCollection- Specified by:
asUnmodifiablein interfaceMutableLongSet
-
asSynchronized
public MutableLongSet asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableLongCollection- Specified by:
asSynchronizedin interfaceMutableLongSet
-
toImmutable
public ImmutableLongSet toImmutable()
- Specified by:
toImmutablein interfaceLongSet- Specified by:
toImmutablein interfaceMutableLongCollection- Specified by:
toImmutablein interfaceMutableLongSet
-
longIterator
public MutableLongIterator 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
public void each(LongProcedure procedure)
- Specified by:
eachin interfaceLongIterable- Since:
- 7.0.
-
select
public LongHashSet select(LongPredicate predicate)
- Specified by:
selectin interfaceLongIterable- Specified by:
selectin interfaceLongSet- Specified by:
selectin interfaceMutableLongCollection- Specified by:
selectin interfaceMutableLongSet
-
select
public <R extends MutableLongCollection> R select(LongPredicate predicate, R target)
- Specified by:
selectin interfaceLongIterable- Since:
- 8.1.
-
reject
public LongHashSet reject(LongPredicate predicate)
- Specified by:
rejectin interfaceLongIterable- Specified by:
rejectin interfaceLongSet- Specified by:
rejectin interfaceMutableLongCollection- Specified by:
rejectin interfaceMutableLongSet
-
reject
public <R extends MutableLongCollection> R reject(LongPredicate predicate, R target)
- Specified by:
rejectin interfaceLongIterable- Since:
- 8.1.
-
collect
public <V> MutableSet<V> collect(LongToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceLongIterable- Specified by:
collectin interfaceLongSet- Specified by:
collectin interfaceMutableLongCollection- Specified by:
collectin interfaceMutableLongSet
-
collect
public <V,R extends Collection<V>> R collect(LongToObjectFunction<? extends V> function, R target)
- Specified by:
collectin interfaceLongIterable- Since:
- 8.1.
-
detectIfNone
public long detectIfNone(LongPredicate predicate, long ifNone)
- Specified by:
detectIfNonein interfaceLongIterable
-
count
public int count(LongPredicate predicate)
- Specified by:
countin interfaceLongIterable
-
anySatisfy
public boolean anySatisfy(LongPredicate predicate)
- Specified by:
anySatisfyin interfaceLongIterable
-
allSatisfy
public boolean allSatisfy(LongPredicate predicate)
- 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
public LongSet freeze()
- Specified by:
freezein interfaceLongSet- Specified by:
freezein interfaceMutableLongSet
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
injectInto
public <T> T injectInto(T injectedValue, ObjectLongToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceLongIterable
-
chunk
public RichIterable<LongIterable> chunk(int size)
- Specified by:
chunkin interfaceLongIterable
-
newEmpty
public LongHashSet 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 public void 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.
-
-