public class FloatArraySet extends AbstractFloatSet implements FloatSortedSet
List.indexOf(Object) for no duplication.
Unless a array constructor is used the ArraySet does not allow for duplication.
This implementation does not shrink the backing array| Constructor and Description |
|---|
FloatArraySet()
Default Constructor
|
FloatArraySet(java.util.Collection<? extends java.lang.Float> c)
Deprecated.
|
FloatArraySet(float[] array)
Constructur using initial Array
|
FloatArraySet(float[] array,
int length)
Constructur using initial Array
|
FloatArraySet(FloatCollection c)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
FloatArraySet(FloatSet s)
A Helper constructor that fast copies the element out of a set into the ArraySet.
|
FloatArraySet(int capacity)
Minimum Capacity Constructor
|
FloatArraySet(java.util.Set<? extends java.lang.Float> s)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(float o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAndMoveToFirst(float o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(float o)
A customized add method that allows you to insert into the last index.
|
void |
clear() |
FloatComparator |
comparator()
A Type Specific Comparator method
|
boolean |
contains(float e)
A Type-Specific implementation of contains.
|
float |
firstFloat()
A method to get the first element in the set
|
void |
forEach(FloatConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
FloatSortedSet |
headSet(float toElement)
A Type Specific HeadSet method to reduce boxing/unboxing
|
FloatBidirectionalIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
FloatBidirectionalIterator |
iterator(float fromElement)
A type Specific Iterator starting from a given key
|
float |
lastFloat()
A method to get the last element in the set
|
boolean |
moveToFirst(float o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(float o)
A specific move method to move a given key to the last index.
|
float |
pollFirstFloat()
A method to get and remove the first element in the set
|
float |
pollLastFloat()
A method to get and remove the last element in the set
|
boolean |
remIf(java.util.function.DoublePredicate filter)
A Type-Specific removeIf function to reduce (un)boxing.
|
boolean |
remove(float o)
A Type Specific remove function to reduce boxing/unboxing
|
boolean |
removeAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
removeAll(FloatCollection c)
A Type-Specific implementation of removeAll.
|
boolean |
retainAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
retainAll(FloatCollection c)
A Type-Specific implementation of retainAll.
|
int |
size() |
FloatSortedSet |
subSet(float fromElement,
float toElement)
A Type Specific SubSet method to reduce boxing/unboxing
|
FloatSortedSet |
tailSet(float fromElement)
A Type Specific TailSet method to reduce boxing/unboxing
|
java.lang.Object[] |
toArray()
Deprecated.
|
<E> E[] |
toArray(E[] a)
Deprecated.
|
float[] |
toFloatArray(float[] a)
A Type-Specific implementation of toArray.
|
equals, hashCodeadd, addAll, addAll, contains, containsAll, containsAny, containsAny, remFloat, remove, toFloatArrayfirst, headSet, last, spliterator, subSet, tailSetadd, contains, remFloat, removeaddAll, containsAll, containsAny, containsAny, parallelPrimitiveStream, primitiveStream, removeIf, toFloatArrayforEachpublic FloatArraySet()
public FloatArraySet(int capacity)
capacity - the minimum capacity of the internal arrayjava.lang.NegativeArraySizeException - if the capacity is negativepublic FloatArraySet(float[] array)
array - the array that should be used for set.public FloatArraySet(float[] array,
int length)
array - the array that should be used for set.length - the amount of elements present within the arrayjava.lang.NegativeArraySizeException - if the length is negative@Deprecated public FloatArraySet(java.util.Collection<? extends java.lang.Float> c)
c - the elements that should be added to the set.public FloatArraySet(FloatCollection c)
c - the elements that should be added to the set.@Deprecated public FloatArraySet(java.util.Set<? extends java.lang.Float> s)
s - the set the element should be taken frompublic FloatArraySet(FloatSet s)
s - the set the element should be taken frompublic boolean add(float o)
FloatCollectionadd in interface FloatCollectiono - the element that should be addedpublic boolean addAndMoveToFirst(float o)
FloatSortedSetaddAndMoveToFirst in interface FloatSortedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(float o)
FloatSortedSetaddAndMoveToLast in interface FloatSortedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(float o)
FloatSortedSetmoveToFirst in interface FloatSortedSeto - that should be moved to the first indexpublic boolean moveToLast(float o)
FloatSortedSetmoveToLast in interface FloatSortedSeto - that should be moved to the first lastpublic boolean contains(float e)
AbstractFloatCollectioncontains in interface FloatCollectioncontains in class AbstractFloatCollectione - the element that should be searched for.public float firstFloat()
FloatSortedSetfirstFloat in interface FloatSortedSetpublic float lastFloat()
FloatSortedSetlastFloat in interface FloatSortedSetpublic boolean removeAll(FloatCollection c)
AbstractFloatCollectionremoveAll in interface FloatCollectionremoveAll in class AbstractFloatCollectionc - the elements that should be deletedCollection.removeAll(Collection)public boolean retainAll(FloatCollection c)
AbstractFloatCollectionretainAll in interface FloatCollectionretainAll in class AbstractFloatCollectionc - the elements that should be keptCollection.retainAll(Collection)@Deprecated public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Float>removeAll in interface java.util.Set<java.lang.Float>removeAll in class java.util.AbstractCollection<java.lang.Float>@Deprecated public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Float>retainAll in interface java.util.Set<java.lang.Float>retainAll in class java.util.AbstractCollection<java.lang.Float>public boolean remove(float o)
FloatSetpublic float pollFirstFloat()
FloatSortedSetpollFirstFloat in interface FloatSortedSetpublic float pollLastFloat()
FloatSortedSetpollLastFloat in interface FloatSortedSetpublic boolean remIf(java.util.function.DoublePredicate filter)
FloatCollectionRemoves elements that were selected by the filter
remIf in interface FloatCollectionfilter - Filters the elements that should be removedCollection.removeIf(Predicate)public void forEach(FloatConsumer action)
FloatIterableforEach in interface FloatIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public FloatBidirectionalIterator iterator()
FloatCollectioniterator in interface java.lang.Iterable<java.lang.Float>iterator in interface java.util.Collection<java.lang.Float>iterator in interface java.util.Set<java.lang.Float>iterator in interface FloatCollectioniterator in interface FloatIterableiterator in interface FloatSetiterator in interface FloatSortedSetiterator in class AbstractFloatSetCollection.iterator()public FloatBidirectionalIterator iterator(float fromElement)
FloatSortedSetiterator in interface FloatSortedSetfromElement - the element the iterator should start frompublic FloatSortedSet subSet(float fromElement, float toElement)
FloatSortedSetsubSet in interface FloatSortedSetfromElement - where the SubSet should starttoElement - where the SubSet should endpublic FloatSortedSet headSet(float toElement)
FloatSortedSetheadSet in interface FloatSortedSettoElement - where the HeadSet should endpublic FloatSortedSet tailSet(float fromElement)
FloatSortedSettailSet in interface FloatSortedSetfromElement - where the TailSet should startpublic FloatComparator comparator()
FloatSortedSetcomparator in interface java.util.SortedSet<java.lang.Float>comparator in interface FloatSortedSetpublic void clear()
clear in interface java.util.Collection<java.lang.Float>clear in interface java.util.Set<java.lang.Float>clear in class java.util.AbstractCollection<java.lang.Float>public int size()
size in interface java.util.Collection<java.lang.Float>size in interface java.util.Set<java.lang.Float>size in class java.util.AbstractCollection<java.lang.Float>public float[] toFloatArray(float[] a)
AbstractFloatCollectiontoFloatArray in interface FloatCollectiontoFloatArray in class AbstractFloatCollectiona - array that the elements should be injected to. If null or to small a new array with the right size is createdCollection.toArray(Object[])@Deprecated public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Float>toArray in interface java.util.Set<java.lang.Float>toArray in class java.util.AbstractCollection<java.lang.Float>@Deprecated public <E> E[] toArray(E[] a)
toArray in interface java.util.Collection<java.lang.Float>toArray in interface java.util.Set<java.lang.Float>toArray in class java.util.AbstractCollection<java.lang.Float>