Class UnmodifiableIntSet
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableIntCollection
-
- org.eclipse.collections.impl.set.mutable.primitive.UnmodifiableIntSet
-
- All Implemented Interfaces:
java.io.Serializable
,MutableIntCollection
,IntIterable
,PrimitiveIterable
,IntSet
,MutableIntSet
public class UnmodifiableIntSet extends AbstractUnmodifiableIntCollection implements MutableIntSet
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 UnmodifiableIntSet(MutableIntSet set)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MutableIntSet
asSynchronized()
MutableIntSet
asUnmodifiable()
LazyIterable<IntIntPair>
cartesianProduct(IntSet 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(IntToObjectFunction<? 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)
.IntSet
freeze()
Returns a frozen copy of this set.private MutableIntSet
getMutableIntSet()
int
hashCode()
Follows the same general contract asSet.hashCode()
.MutableIntSet
newEmpty()
Creates a new empty mutable version of the same Set type.static UnmodifiableIntSet
of(MutableIntSet set)
This method will take a MutableIntSet and wrap it directly in a UnmodifiableIntSet.MutableIntSet
reject(IntPredicate predicate)
Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.MutableIntSet
select(IntPredicate predicate)
Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.ImmutableIntSet
toImmutable()
Returns an immutable copy of this set.UnmodifiableIntSet
with(int element)
UnmodifiableIntSet
withAll(IntIterable elements)
UnmodifiableIntSet
without(int element)
UnmodifiableIntSet
withoutAll(IntIterable elements)
-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableIntCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, getIntCollection, injectInto, intIterator, isEmpty, 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.IntIterable
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.IntSet
isProperSubsetOf, isSubsetOf
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableIntCollection
add, addAll, addAll, clear, intIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.MutableIntSet
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
-
UnmodifiableIntSet
public UnmodifiableIntSet(MutableIntSet set)
-
-
Method Detail
-
of
public static UnmodifiableIntSet of(MutableIntSet set)
This method will take a MutableIntSet and wrap it directly in a UnmodifiableIntSet.
-
getMutableIntSet
private MutableIntSet getMutableIntSet()
-
with
public UnmodifiableIntSet with(int element)
- Specified by:
with
in interfaceMutableIntCollection
- Specified by:
with
in interfaceMutableIntSet
- Overrides:
with
in classAbstractUnmodifiableIntCollection
-
without
public UnmodifiableIntSet without(int element)
- Specified by:
without
in interfaceMutableIntCollection
- Specified by:
without
in interfaceMutableIntSet
- Overrides:
without
in classAbstractUnmodifiableIntCollection
-
withAll
public UnmodifiableIntSet withAll(IntIterable elements)
- Specified by:
withAll
in interfaceMutableIntCollection
- Specified by:
withAll
in interfaceMutableIntSet
- Overrides:
withAll
in classAbstractUnmodifiableIntCollection
-
withoutAll
public UnmodifiableIntSet withoutAll(IntIterable elements)
- Specified by:
withoutAll
in interfaceMutableIntCollection
- Specified by:
withoutAll
in interfaceMutableIntSet
- Overrides:
withoutAll
in classAbstractUnmodifiableIntCollection
-
select
public MutableIntSet select(IntPredicate predicate)
Description copied from interface:IntIterable
Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.- Specified by:
select
in interfaceIntIterable
- Specified by:
select
in interfaceIntSet
- Specified by:
select
in interfaceMutableIntCollection
- Specified by:
select
in interfaceMutableIntSet
- Overrides:
select
in classAbstractUnmodifiableIntCollection
-
reject
public MutableIntSet reject(IntPredicate predicate)
Description copied from interface:IntIterable
Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.- Specified by:
reject
in interfaceIntIterable
- Specified by:
reject
in interfaceIntSet
- Specified by:
reject
in interfaceMutableIntCollection
- Specified by:
reject
in interfaceMutableIntSet
- Overrides:
reject
in classAbstractUnmodifiableIntCollection
-
collect
public <V> MutableSet<V> collect(IntToObjectFunction<? extends V> function)
Description copied from interface:IntIterable
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 interfaceIntIterable
- Specified by:
collect
in interfaceIntSet
- Specified by:
collect
in interfaceMutableIntCollection
- Specified by:
collect
in interfaceMutableIntSet
- Overrides:
collect
in classAbstractUnmodifiableIntCollection
-
cartesianProduct
public LazyIterable<IntIntPair> cartesianProduct(IntSet set)
Description copied from interface:IntSet
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 interfaceIntSet
-
equals
public boolean equals(java.lang.Object otherSet)
Description copied from interface:IntSet
Follows the same general contract asSet.equals(Object)
.
-
hashCode
public int hashCode()
Description copied from interface:IntSet
Follows the same general contract asSet.hashCode()
.
-
asUnmodifiable
public MutableIntSet asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableIntCollection
- Specified by:
asUnmodifiable
in interfaceMutableIntSet
- Overrides:
asUnmodifiable
in classAbstractUnmodifiableIntCollection
-
asSynchronized
public MutableIntSet asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableIntCollection
- Specified by:
asSynchronized
in interfaceMutableIntSet
- Overrides:
asSynchronized
in classAbstractUnmodifiableIntCollection
-
freeze
public IntSet freeze()
Description copied from interface:MutableIntSet
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 interfaceIntSet
- Specified by:
freeze
in interfaceMutableIntSet
-
toImmutable
public ImmutableIntSet toImmutable()
Description copied from interface:MutableIntSet
Returns an immutable copy of this set.- Specified by:
toImmutable
in interfaceIntSet
- Specified by:
toImmutable
in interfaceMutableIntCollection
- Specified by:
toImmutable
in interfaceMutableIntSet
- Overrides:
toImmutable
in classAbstractUnmodifiableIntCollection
-
newEmpty
public MutableIntSet newEmpty()
Description copied from interface:MutableIntSet
Creates a new empty mutable version of the same Set type.- Specified by:
newEmpty
in interfaceMutableIntCollection
- Specified by:
newEmpty
in interfaceMutableIntSet
- Since:
- 9.2.
-
-