Class UnmodifiableLongSet
java.lang.Object
org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableLongCollection
org.eclipse.collections.impl.set.mutable.primitive.UnmodifiableLongSet
- All Implemented Interfaces:
Serializable
,MutableLongCollection
,LongIterable
,PrimitiveIterable
,LongSet
,MutableLongSet
public class UnmodifiableLongSet extends AbstractUnmodifiableLongCollection implements MutableLongSet
This file was automatically generated from template file unmodifiablePrimitiveSet.stg.
- Since:
- 3.1.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description UnmodifiableLongSet(MutableLongSet set)
-
Method Summary
Modifier and Type Method Description MutableLongSet
asSynchronized()
MutableLongSet
asUnmodifiable()
<V> MutableSet<V>
collect(LongToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.boolean
equals(Object otherSet)
Follows the same general contract asSet.equals(Object)
.LongSet
freeze()
Returns a frozen copy of this set.int
hashCode()
Follows the same general contract asSet.hashCode()
.MutableLongSet
newEmpty()
Creates a new empty mutable version of the same Set type.static UnmodifiableLongSet
of(MutableLongSet set)
This method will take a MutableLongSet and wrap it directly in a UnmodifiableLongSet.MutableLongSet
reject(LongPredicate predicate)
Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.MutableLongSet
select(LongPredicate predicate)
Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.ImmutableLongSet
toImmutable()
Returns an immutable copy of this set.UnmodifiableLongSet
with(long element)
UnmodifiableLongSet
withAll(LongIterable elements)
UnmodifiableLongSet
without(long element)
UnmodifiableLongSet
withoutAll(LongIterable elements)
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableLongCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, chunk, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, isEmpty, longIterator, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
Methods inherited from interface org.eclipse.collections.api.LongIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableLongCollection
add, addAll, addAll, clear, longIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Constructor Details
-
Method Details
-
of
This method will take a MutableLongSet and wrap it directly in a UnmodifiableLongSet. -
with
- Specified by:
with
in interfaceMutableLongCollection
- Specified by:
with
in interfaceMutableLongSet
- Overrides:
with
in classAbstractUnmodifiableLongCollection
-
without
- Specified by:
without
in interfaceMutableLongCollection
- Specified by:
without
in interfaceMutableLongSet
- Overrides:
without
in classAbstractUnmodifiableLongCollection
-
withAll
- Specified by:
withAll
in interfaceMutableLongCollection
- Specified by:
withAll
in interfaceMutableLongSet
- Overrides:
withAll
in classAbstractUnmodifiableLongCollection
-
withoutAll
- Specified by:
withoutAll
in interfaceMutableLongCollection
- Specified by:
withoutAll
in interfaceMutableLongSet
- Overrides:
withoutAll
in classAbstractUnmodifiableLongCollection
-
select
Description copied from interface:LongIterable
Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.- Specified by:
select
in interfaceLongIterable
- Specified by:
select
in interfaceLongSet
- Specified by:
select
in interfaceMutableLongCollection
- Specified by:
select
in interfaceMutableLongSet
- Overrides:
select
in classAbstractUnmodifiableLongCollection
-
reject
Description copied from interface:LongIterable
Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.- Specified by:
reject
in interfaceLongIterable
- Specified by:
reject
in interfaceLongSet
- Specified by:
reject
in interfaceMutableLongCollection
- Specified by:
reject
in interfaceMutableLongSet
- Overrides:
reject
in classAbstractUnmodifiableLongCollection
-
collect
Description copied from interface:LongIterable
Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collect
in interfaceLongIterable
- Specified by:
collect
in interfaceLongSet
- Specified by:
collect
in interfaceMutableLongCollection
- Specified by:
collect
in interfaceMutableLongSet
- Overrides:
collect
in classAbstractUnmodifiableLongCollection
-
equals
Description copied from interface:LongSet
Follows the same general contract asSet.equals(Object)
. -
hashCode
public int hashCode()Description copied from interface:LongSet
Follows the same general contract asSet.hashCode()
. -
asUnmodifiable
- Specified by:
asUnmodifiable
in interfaceMutableLongCollection
- Specified by:
asUnmodifiable
in interfaceMutableLongSet
- Overrides:
asUnmodifiable
in classAbstractUnmodifiableLongCollection
-
asSynchronized
- Specified by:
asSynchronized
in interfaceMutableLongCollection
- Specified by:
asSynchronized
in interfaceMutableLongSet
- Overrides:
asSynchronized
in classAbstractUnmodifiableLongCollection
-
freeze
Description copied from interface:MutableLongSet
Returns a frozen copy of this set. A frozen copy is the same thing as an immutable copy without safe-publish guarantees.- Specified by:
freeze
in interfaceLongSet
- Specified by:
freeze
in interfaceMutableLongSet
-
toImmutable
Description copied from interface:MutableLongSet
Returns an immutable copy of this set.- Specified by:
toImmutable
in interfaceLongSet
- Specified by:
toImmutable
in interfaceMutableLongCollection
- Specified by:
toImmutable
in interfaceMutableLongSet
- Overrides:
toImmutable
in classAbstractUnmodifiableLongCollection
-
newEmpty
Description copied from interface:MutableLongSet
Creates a new empty mutable version of the same Set type.- Specified by:
newEmpty
in interfaceMutableLongCollection
- Specified by:
newEmpty
in interfaceMutableLongSet
- Since:
- 9.2.
-