Class UnmodifiableByteSet
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableByteCollection
-
- org.eclipse.collections.impl.set.mutable.primitive.UnmodifiableByteSet
-
- All Implemented Interfaces:
java.io.Serializable
,ByteIterable
,MutableByteCollection
,PrimitiveIterable
,ByteSet
,MutableByteSet
public class UnmodifiableByteSet extends AbstractUnmodifiableByteCollection implements MutableByteSet
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 UnmodifiableByteSet(MutableByteSet set)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MutableByteSet
asSynchronized()
MutableByteSet
asUnmodifiable()
LazyIterable<ByteBytePair>
cartesianProduct(ByteSet 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(ByteToObjectFunction<? 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)
.ByteSet
freeze()
Returns a frozen copy of this set.private MutableByteSet
getMutableByteSet()
int
hashCode()
Follows the same general contract asSet.hashCode()
.MutableByteSet
newEmpty()
Creates a new empty mutable version of the same Set type.static UnmodifiableByteSet
of(MutableByteSet set)
This method will take a MutableByteSet and wrap it directly in a UnmodifiableByteSet.MutableByteSet
reject(BytePredicate predicate)
Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.MutableByteSet
select(BytePredicate predicate)
Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.ImmutableByteSet
toImmutable()
Returns an immutable copy of this set.UnmodifiableByteSet
with(byte element)
UnmodifiableByteSet
withAll(ByteIterable elements)
UnmodifiableByteSet
without(byte element)
UnmodifiableByteSet
withoutAll(ByteIterable elements)
-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableByteCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, byteIterator, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, getByteCollection, injectInto, 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.ByteIterable
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.ByteSet
isProperSubsetOf, isSubsetOf
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableByteCollection
add, addAll, addAll, byteIterator, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.MutableByteSet
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
-
UnmodifiableByteSet
public UnmodifiableByteSet(MutableByteSet set)
-
-
Method Detail
-
of
public static UnmodifiableByteSet of(MutableByteSet set)
This method will take a MutableByteSet and wrap it directly in a UnmodifiableByteSet.
-
getMutableByteSet
private MutableByteSet getMutableByteSet()
-
with
public UnmodifiableByteSet with(byte element)
- Specified by:
with
in interfaceMutableByteCollection
- Specified by:
with
in interfaceMutableByteSet
- Overrides:
with
in classAbstractUnmodifiableByteCollection
-
without
public UnmodifiableByteSet without(byte element)
- Specified by:
without
in interfaceMutableByteCollection
- Specified by:
without
in interfaceMutableByteSet
- Overrides:
without
in classAbstractUnmodifiableByteCollection
-
withAll
public UnmodifiableByteSet withAll(ByteIterable elements)
- Specified by:
withAll
in interfaceMutableByteCollection
- Specified by:
withAll
in interfaceMutableByteSet
- Overrides:
withAll
in classAbstractUnmodifiableByteCollection
-
withoutAll
public UnmodifiableByteSet withoutAll(ByteIterable elements)
- Specified by:
withoutAll
in interfaceMutableByteCollection
- Specified by:
withoutAll
in interfaceMutableByteSet
- Overrides:
withoutAll
in classAbstractUnmodifiableByteCollection
-
select
public MutableByteSet select(BytePredicate predicate)
Description copied from interface:ByteIterable
Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.- Specified by:
select
in interfaceByteIterable
- Specified by:
select
in interfaceByteSet
- Specified by:
select
in interfaceMutableByteCollection
- Specified by:
select
in interfaceMutableByteSet
- Overrides:
select
in classAbstractUnmodifiableByteCollection
-
reject
public MutableByteSet reject(BytePredicate predicate)
Description copied from interface:ByteIterable
Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.- Specified by:
reject
in interfaceByteIterable
- Specified by:
reject
in interfaceByteSet
- Specified by:
reject
in interfaceMutableByteCollection
- Specified by:
reject
in interfaceMutableByteSet
- Overrides:
reject
in classAbstractUnmodifiableByteCollection
-
collect
public <V> MutableSet<V> collect(ByteToObjectFunction<? extends V> function)
Description copied from interface:ByteIterable
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 interfaceByteIterable
- Specified by:
collect
in interfaceByteSet
- Specified by:
collect
in interfaceMutableByteCollection
- Specified by:
collect
in interfaceMutableByteSet
- Overrides:
collect
in classAbstractUnmodifiableByteCollection
-
cartesianProduct
public LazyIterable<ByteBytePair> cartesianProduct(ByteSet set)
Description copied from interface:ByteSet
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 interfaceByteSet
-
equals
public boolean equals(java.lang.Object otherSet)
Description copied from interface:ByteSet
Follows the same general contract asSet.equals(Object)
.
-
hashCode
public int hashCode()
Description copied from interface:ByteSet
Follows the same general contract asSet.hashCode()
.
-
asUnmodifiable
public MutableByteSet asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableByteCollection
- Specified by:
asUnmodifiable
in interfaceMutableByteSet
- Overrides:
asUnmodifiable
in classAbstractUnmodifiableByteCollection
-
asSynchronized
public MutableByteSet asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableByteCollection
- Specified by:
asSynchronized
in interfaceMutableByteSet
- Overrides:
asSynchronized
in classAbstractUnmodifiableByteCollection
-
freeze
public ByteSet freeze()
Description copied from interface:MutableByteSet
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 interfaceByteSet
- Specified by:
freeze
in interfaceMutableByteSet
-
toImmutable
public ImmutableByteSet toImmutable()
Description copied from interface:MutableByteSet
Returns an immutable copy of this set.- Specified by:
toImmutable
in interfaceByteSet
- Specified by:
toImmutable
in interfaceMutableByteCollection
- Specified by:
toImmutable
in interfaceMutableByteSet
- Overrides:
toImmutable
in classAbstractUnmodifiableByteCollection
-
newEmpty
public MutableByteSet newEmpty()
Description copied from interface:MutableByteSet
Creates a new empty mutable version of the same Set type.- Specified by:
newEmpty
in interfaceMutableByteCollection
- Specified by:
newEmpty
in interfaceMutableByteSet
- Since:
- 9.2.
-
-