Class ByteHashSet
- java.lang.Object
-
- org.eclipse.collections.impl.set.mutable.primitive.ByteHashSet
-
- All Implemented Interfaces:
Externalizable,Serializable,ByteIterable,MutableByteCollection,PrimitiveIterable,ByteSet,MutableByteSet
public final class ByteHashSet extends Object implements MutableByteSet, Externalizable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteHashSet()ByteHashSet(byte... elements)ByteHashSet(int initialCapacity)Deprecated.since 5.0.ByteHashSet(ByteHashSet set)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.ByteIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, 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
removeIf
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.MutableByteSet
difference, intersect, symmetricDifference, tap, union
-
-
-
-
Constructor Detail
-
ByteHashSet
public ByteHashSet()
-
ByteHashSet
@Deprecated public ByteHashSet(int initialCapacity)
Deprecated.since 5.0.UseByteHashSet()instead.
-
ByteHashSet
public ByteHashSet(byte... elements)
-
ByteHashSet
public ByteHashSet(ByteHashSet set)
-
-
Method Detail
-
boxed
public MutableSet<Byte> boxed()
- Specified by:
boxedin interfaceMutableByteSet
-
newSet
public static ByteHashSet newSet(ByteIterable source)
-
newSetWith
public static ByteHashSet newSetWith(byte... source)
-
add
public boolean add(byte element)
- Specified by:
addin interfaceMutableByteCollection
-
remove
public boolean remove(byte value)
- Specified by:
removein interfaceMutableByteCollection
-
contains
public boolean contains(byte value)
- Specified by:
containsin interfaceByteIterable
-
cartesianProduct
public LazyIterable<ByteBytePair> cartesianProduct(ByteSet set)
- Specified by:
cartesianProductin interfaceByteSet
-
equals
public boolean equals(Object obj)
-
hashCode
public int hashCode()
-
toString
public String toString()
- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
size
public int size()
- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmptyin interfacePrimitiveIterable
-
makeString
public String makeString()
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendStringin interfacePrimitiveIterable
-
addAll
public boolean addAll(byte... source)
- Specified by:
addAllin interfaceMutableByteCollection
-
addAll
public boolean addAll(ByteIterable source)
- Specified by:
addAllin interfaceMutableByteCollection
-
removeAll
public boolean removeAll(ByteIterable source)
- Specified by:
removeAllin interfaceMutableByteCollection
-
removeAll
public boolean removeAll(byte... source)
- Specified by:
removeAllin interfaceMutableByteCollection
-
retainAll
public boolean retainAll(ByteIterable source)
- Specified by:
retainAllin interfaceMutableByteCollection
-
retainAll
public boolean retainAll(byte... source)
- Specified by:
retainAllin interfaceMutableByteCollection
-
clear
public void clear()
- Specified by:
clearin interfaceMutableByteCollection
-
with
public ByteHashSet with(byte element)
- Specified by:
within interfaceMutableByteCollection- Specified by:
within interfaceMutableByteSet
-
without
public ByteHashSet without(byte element)
- Specified by:
withoutin interfaceMutableByteCollection- Specified by:
withoutin interfaceMutableByteSet
-
withAll
public ByteHashSet withAll(ByteIterable elements)
- Specified by:
withAllin interfaceMutableByteCollection- Specified by:
withAllin interfaceMutableByteSet
-
withoutAll
public ByteHashSet withoutAll(ByteIterable elements)
- Specified by:
withoutAllin interfaceMutableByteCollection- Specified by:
withoutAllin interfaceMutableByteSet
-
asUnmodifiable
public MutableByteSet asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableByteCollection- Specified by:
asUnmodifiablein interfaceMutableByteSet
-
asSynchronized
public MutableByteSet asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableByteCollection- Specified by:
asSynchronizedin interfaceMutableByteSet
-
toImmutable
public ImmutableByteSet toImmutable()
- Specified by:
toImmutablein interfaceByteSet- Specified by:
toImmutablein interfaceMutableByteCollection- Specified by:
toImmutablein interfaceMutableByteSet
-
newEmpty
public ByteHashSet newEmpty()
- Specified by:
newEmptyin interfaceMutableByteCollection- Specified by:
newEmptyin interfaceMutableByteSet- Since:
- 9.2.
-
byteIterator
public MutableByteIterator byteIterator()
- Specified by:
byteIteratorin interfaceByteIterable- Specified by:
byteIteratorin interfaceMutableByteCollection
-
toArray
public byte[] toArray()
- Specified by:
toArrayin interfaceByteIterable
-
toArray
public byte[] toArray(byte[] array)
- Specified by:
toArrayin interfaceByteIterable
-
containsAll
public boolean containsAll(byte... source)
- Specified by:
containsAllin interfaceByteIterable
-
containsAll
public boolean containsAll(ByteIterable source)
- Specified by:
containsAllin interfaceByteIterable
-
forEach
public void forEach(ByteProcedure procedure)
- Specified by:
forEachin interfaceByteIterable
-
each
public void each(ByteProcedure procedure)
- Specified by:
eachin interfaceByteIterable- Since:
- 7.0.
-
select
public ByteHashSet select(BytePredicate predicate)
- Specified by:
selectin interfaceByteIterable- Specified by:
selectin interfaceByteSet- Specified by:
selectin interfaceMutableByteCollection- Specified by:
selectin interfaceMutableByteSet
-
reject
public MutableByteSet reject(BytePredicate predicate)
- Specified by:
rejectin interfaceByteIterable- Specified by:
rejectin interfaceByteSet- Specified by:
rejectin interfaceMutableByteCollection- Specified by:
rejectin interfaceMutableByteSet
-
collect
public <V> MutableSet<V> collect(ByteToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceByteIterable- Specified by:
collectin interfaceByteSet- Specified by:
collectin interfaceMutableByteCollection- Specified by:
collectin interfaceMutableByteSet
-
detectIfNone
public byte detectIfNone(BytePredicate predicate, byte ifNone)
- Specified by:
detectIfNonein interfaceByteIterable
-
count
public int count(BytePredicate predicate)
- Specified by:
countin interfaceByteIterable
-
anySatisfy
public boolean anySatisfy(BytePredicate predicate)
- Specified by:
anySatisfyin interfaceByteIterable
-
allSatisfy
public boolean allSatisfy(BytePredicate predicate)
- Specified by:
allSatisfyin interfaceByteIterable
-
noneSatisfy
public boolean noneSatisfy(BytePredicate predicate)
- Specified by:
noneSatisfyin interfaceByteIterable
-
toList
public MutableByteList toList()
- Specified by:
toListin interfaceByteIterable
-
toSet
public MutableByteSet toSet()
- Specified by:
toSetin interfaceByteIterable
-
toBag
public MutableByteBag toBag()
- Specified by:
toBagin interfaceByteIterable
-
asLazy
public LazyByteIterable asLazy()
- Specified by:
asLazyin interfaceByteIterable
-
sum
public long sum()
- Specified by:
sumin interfaceByteIterable
-
max
public byte max()
- Specified by:
maxin interfaceByteIterable
-
maxIfEmpty
public byte maxIfEmpty(byte defaultValue)
- Specified by:
maxIfEmptyin interfaceByteIterable
-
min
public byte min()
- Specified by:
minin interfaceByteIterable
-
minIfEmpty
public byte minIfEmpty(byte defaultValue)
- Specified by:
minIfEmptyin interfaceByteIterable
-
average
public double average()
- Specified by:
averagein interfaceByteIterable
-
median
public double median()
- Specified by:
medianin interfaceByteIterable
-
toSortedArray
public byte[] toSortedArray()
- Specified by:
toSortedArrayin interfaceByteIterable
-
toSortedList
public MutableByteList toSortedList()
- Specified by:
toSortedListin interfaceByteIterable
-
freeze
public ByteSet freeze()
- Specified by:
freezein interfaceByteSet- Specified by:
freezein interfaceMutableByteSet
-
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, ObjectByteToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceByteIterable
-
chunk
public RichIterable<ByteIterable> chunk(int size)
- Specified by:
chunkin interfaceByteIterable
-
-