public class ByteOpenHashSet extends AbstractByteSet implements ITrimmable
| Constructor and Description |
|---|
ByteOpenHashSet()
Default Constructor
|
ByteOpenHashSet(byte[] array)
Helper constructor that allow to create a set from unboxed values
|
ByteOpenHashSet(byte[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ByteOpenHashSet(byte[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
ByteOpenHashSet(byte[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ByteOpenHashSet(ByteCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ByteOpenHashSet(ByteCollection collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ByteOpenHashSet(ByteIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ByteOpenHashSet(ByteIterator iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ByteOpenHashSet(java.util.Collection<? extends java.lang.Byte> collection)
Deprecated.
|
ByteOpenHashSet(java.util.Collection<? extends java.lang.Byte> collection,
float loadFactor)
Deprecated.
|
ByteOpenHashSet(int minCapacity)
Constructor that defines the minimum capacity
|
ByteOpenHashSet(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
ByteOpenHashSet(java.util.Iterator<java.lang.Byte> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ByteOpenHashSet(java.util.Iterator<java.lang.Byte> iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(byte o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(ByteCollection c)
A Type-Specific addAll function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Byte> c)
Deprecated.
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
boolean |
contains(byte o)
A Type-Specific implementation of contains.
|
boolean |
contains(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
|
ByteIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
remove(byte o)
A Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
|
int |
size() |
boolean |
trim(int size)
Trims the original collection down to the size of the current elements or the requested size depending which is bigger
|
equals, hashCodeadd, containsAll, containsAny, containsAny, remByte, removeAll, retainAll, toByteArray, toByteArraycontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringclearAndTrim, trimadd, remByte, spliteratorcontainsAll, isEmpty, removeAll, retainAll, toArray, toArraycontainsAll, containsAny, containsAny, parallelPrimitiveStream, primitiveStream, remIf, removeAll, removeIf, retainAll, toByteArray, toByteArrayforEach, forEachpublic ByteOpenHashSet()
public ByteOpenHashSet(int minCapacity)
minCapacity - the minimum capacity the HashSet is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic ByteOpenHashSet(int minCapacity,
float loadFactor)
minCapacity - the minimum capacity the HashSet is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ByteOpenHashSet(byte[] array)
array - the elements that should be put into the setpublic ByteOpenHashSet(byte[] array,
float loadFactor)
array - the elements that should be put into the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ByteOpenHashSet(byte[] array,
int offset,
int length)
array - the elements that should be put into the setoffset - the starting index within the array that should be usedlength - the amount of elements used from the arrayjava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic ByteOpenHashSet(byte[] array,
int offset,
int length,
float loadFactor)
array - the elements that should be put into the setoffset - the starting index within the array that should be usedlength - the amount of elements used from the arrayloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if offset and length causes to step outside of the arrays range@Deprecated public ByteOpenHashSet(java.util.Collection<? extends java.lang.Byte> collection)
collection - the set the elements should be added to the Set@Deprecated
public ByteOpenHashSet(java.util.Collection<? extends java.lang.Byte> collection,
float loadFactor)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ByteOpenHashSet(ByteCollection collection)
collection - the set the elements should be added to the Setpublic ByteOpenHashSet(ByteCollection collection, float loadFactor)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ByteOpenHashSet(java.util.Iterator<java.lang.Byte> iterator)
iterator - the elements that should be added to the setpublic ByteOpenHashSet(java.util.Iterator<java.lang.Byte> iterator,
float loadFactor)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ByteOpenHashSet(ByteIterator iterator)
iterator - the elements that should be added to the setpublic ByteOpenHashSet(ByteIterator iterator, float loadFactor)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public boolean add(byte o)
ByteCollectionadd in interface ByteCollectiono - the element that should be added@Deprecated public boolean addAll(java.util.Collection<? extends java.lang.Byte> c)
AbstractByteCollectionThis default implementation delegates to the corresponding type-specific function.
addAll in interface java.util.Collection<java.lang.Byte>addAll in interface java.util.Set<java.lang.Byte>addAll in class AbstractByteCollectionpublic boolean addAll(ByteCollection c)
ByteCollectionaddAll in interface ByteCollectionaddAll in class AbstractByteCollectionc - the collection of elements that should be addedpublic boolean contains(java.lang.Object o)
AbstractByteCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
contains in interface java.util.Collection<java.lang.Byte>contains in interface java.util.Set<java.lang.Byte>contains in interface ByteCollectioncontains in interface ByteSetcontains in class AbstractByteCollectionpublic boolean remove(java.lang.Object o)
AbstractByteCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
remove in interface java.util.Collection<java.lang.Byte>remove in interface java.util.Set<java.lang.Byte>remove in interface ByteCollectionremove in interface ByteSetremove in class AbstractByteCollectionpublic boolean contains(byte o)
AbstractByteCollectioncontains in interface ByteCollectioncontains in class AbstractByteCollectiono - the element that should be searched for.public boolean remove(byte o)
ByteSetpublic boolean trim(int size)
ITrimmabletrim in interface ITrimmablesize - the requested trim size.public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmablesize - the amount of elements that should be allowedpublic ByteIterator iterator()
ByteCollectioniterator in interface java.lang.Iterable<java.lang.Byte>iterator in interface java.util.Collection<java.lang.Byte>iterator in interface java.util.Set<java.lang.Byte>iterator in interface ByteCollectioniterator in interface ByteIterableiterator in interface ByteSetiterator in class AbstractByteSetCollection.iterator()public void clear()
clear in interface java.util.Collection<java.lang.Byte>clear in interface java.util.Set<java.lang.Byte>clear in class java.util.AbstractCollection<java.lang.Byte>public int size()
size in interface java.util.Collection<java.lang.Byte>size in interface java.util.Set<java.lang.Byte>size in class java.util.AbstractCollection<java.lang.Byte>