Class UnmodifiableLongSet
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableLongCollection
-
- org.eclipse.collections.impl.set.mutable.primitive.UnmodifiableLongSet
-
- All Implemented Interfaces:
java.io.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
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description UnmodifiableLongSet(MutableLongSet set)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MutableLongSet
asSynchronized()
MutableLongSet
asUnmodifiable()
LazyIterable<LongLongPair>
cartesianProduct(LongSet set)
Returns the set whose members are all possible ordered pairs (a, b) where a is a member ofthis
and b is a member ofset
.<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(java.lang.Object otherSet)
Follows the same general contract asSet.equals(Object)
.LongSet
freeze()
Returns a frozen copy of this set.private MutableLongSet
getMutableLongSet()
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, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, getLongCollection, 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
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, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.LongSet
isProperSubsetOf, isSubsetOf
-
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.set.primitive.MutableLongSet
difference, intersect, symmetricDifference, tap, union
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UnmodifiableLongSet
public UnmodifiableLongSet(MutableLongSet set)
-
-
Method Detail
-
of
public static UnmodifiableLongSet of(MutableLongSet set)
This method will take a MutableLongSet and wrap it directly in a UnmodifiableLongSet.
-
getMutableLongSet
private MutableLongSet getMutableLongSet()
-
with
public UnmodifiableLongSet with(long element)
- Specified by:
with
in interfaceMutableLongCollection
- Specified by:
with
in interfaceMutableLongSet
- Overrides:
with
in classAbstractUnmodifiableLongCollection
-
without
public UnmodifiableLongSet without(long element)
- Specified by:
without
in interfaceMutableLongCollection
- Specified by:
without
in interfaceMutableLongSet
- Overrides:
without
in classAbstractUnmodifiableLongCollection
-
withAll
public UnmodifiableLongSet withAll(LongIterable elements)
- Specified by:
withAll
in interfaceMutableLongCollection
- Specified by:
withAll
in interfaceMutableLongSet
- Overrides:
withAll
in classAbstractUnmodifiableLongCollection
-
withoutAll
public UnmodifiableLongSet withoutAll(LongIterable elements)
- Specified by:
withoutAll
in interfaceMutableLongCollection
- Specified by:
withoutAll
in interfaceMutableLongSet
- Overrides:
withoutAll
in classAbstractUnmodifiableLongCollection
-
select
public MutableLongSet select(LongPredicate predicate)
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
public MutableLongSet reject(LongPredicate predicate)
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
public <V> MutableSet<V> collect(LongToObjectFunction<? extends V> function)
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
-
cartesianProduct
public LazyIterable<LongLongPair> cartesianProduct(LongSet set)
Description copied from interface:LongSet
Returns the set whose members are all possible ordered pairs (a, b) where a is a member ofthis
and b is a member ofset
.- Specified by:
cartesianProduct
in interfaceLongSet
-
equals
public boolean equals(java.lang.Object otherSet)
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
public MutableLongSet asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableLongCollection
- Specified by:
asUnmodifiable
in interfaceMutableLongSet
- Overrides:
asUnmodifiable
in classAbstractUnmodifiableLongCollection
-
asSynchronized
public MutableLongSet asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableLongCollection
- Specified by:
asSynchronized
in interfaceMutableLongSet
- Overrides:
asSynchronized
in classAbstractUnmodifiableLongCollection
-
freeze
public LongSet 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
public ImmutableLongSet 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
public MutableLongSet 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.
-
-