public interface FloatCollection extends PrimitiveCollection<java.lang.Float>, FloatIterable
float values.
This interface extends Collection allowing
seamless integration with other APIs.
All Collection methods can be used, using the primitive wrapper class Float.
However, it will be much more efficient to use the methods defined here.
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(float value)
Adds a primitive value to this collection (optional operation).
|
boolean |
addAll(float[] values)
Adds an array of primitive values to this collection (optional operation).
|
boolean |
addAll(FloatCollection values)
Adds a collection of primitive values to this collection (optional operation).
|
boolean |
contains(float value)
Checks whether this collection contains a specified primitive value.
|
boolean |
containsAll(float[] values)
Checks if this collection contains all of the values in the specified array.
|
boolean |
containsAll(FloatCollection values)
Checks if this collection contains all of the values in the specified collection.
|
boolean |
containsAny(float[] values)
Checks if this collection contains any of the values in the specified array.
|
boolean |
containsAny(FloatCollection coll)
Checks if this collection contains any of the values in the specified collection.
|
FloatIterator |
iterator()
Gets an iterator over this collection capable of accessing the primitive values.
|
boolean |
removeAll(float value)
Removes all occurrences of the specified primitive value from this collection
(optional operation).
|
boolean |
removeAll(float[] values)
Removes all occurrences from this collection of each primitive in the specified array
(optional operation).
|
boolean |
removeAll(FloatCollection values)
Removes all occurrences from this collection of each primitive in the specified collection
(optional operation).
|
boolean |
removeFirst(float value)
Removes the first occurrence of the specified primitive value from this collection
(optional operation).
|
boolean |
retainAll(float[] values)
Retains each element of this collection that is present in the specified array
removing all other values (optional operation).
|
boolean |
retainAll(FloatCollection values)
Retains each element of this collection that is present in the specified collection
removing all other values (optional operation).
|
float[] |
toFloatArray()
Gets the elements of this collection as an array.
|
float[] |
toFloatArray(float[] array,
int startIndex)
Copies the elements of this collection into an array at a specified position.
|
containsAnyclear, clone, isEmpty, isModifiable, optimize, sizeFloatIterator iterator()
iterator in interface java.util.Collection<java.lang.Float>iterator in interface FloatIterableiterator in interface java.lang.Iterable<java.lang.Float>boolean contains(float value)
value - the value to search fortrue if the value is foundboolean containsAll(float[] values)
true is returned.values - the values to search for, null treated as empty arraytrue if all of the values are foundboolean containsAll(FloatCollection values)
true is returned.values - the values to search for, null treated as empty collectiontrue if all of the values are foundboolean containsAny(float[] values)
false is returned.values - the values to search for, null treated as empty arraytrue if at least one of the values is foundboolean containsAny(FloatCollection coll)
false is returned.coll - the values to search for, null treated as empty collectiontrue if at least one of the values is foundfloat[] toFloatArray()
float[] toFloatArray(float[] array,
int startIndex)
If the array specified is null a new array is created. If the array specified is large enough, it will be modified. If the array is not large enough, a new array will be created containing the values from the specified array before the startIndex plus those from this collection.
array - the array to add the elements to, null creates new arraystartIndex - the position in the array to start setting elementsjava.lang.IndexOutOfBoundsException - if the index is negativeboolean add(float value)
This method is optional, throwing an UnsupportedOperationException if the collection cannot be added to.
value - the value to add to this collectiontrue if this collection was modified by this method calljava.lang.IllegalArgumentException - if value is rejected by this collectionjava.lang.UnsupportedOperationException - if not supported by this collectionboolean addAll(float[] values)
This method is optional, throwing an UnsupportedOperationException if the collection cannot be added to.
values - the values to add to this collection, null treated as empty arraytrue if this collection was modified by this method calljava.lang.IllegalArgumentException - if a value is rejected by this collectionjava.lang.UnsupportedOperationException - if not supported by this collectionboolean addAll(FloatCollection values)
This method is optional, throwing an UnsupportedOperationException if the collection cannot be added to.
values - the values to add to this collection, null treated as empty collectiontrue if this collection was modified by this method calljava.lang.IllegalArgumentException - if a value is rejected by this collectionjava.lang.UnsupportedOperationException - if not supported by this collectionboolean removeFirst(float value)
This method is optional, throwing an UnsupportedOperationException if the collection cannot be removed from.
value - the value to removetrue if this collection was modified by this method calljava.lang.UnsupportedOperationException - if not supported by this collectionboolean removeAll(float value)
This method is optional, throwing an UnsupportedOperationException if the collection cannot be removed from.
value - the value to removetrue if this collection was modified by this method calljava.lang.UnsupportedOperationException - if not supported by this collectionboolean removeAll(float[] values)
This method is optional, throwing an UnsupportedOperationException if the collection cannot be removed from.
values - the values to remove from this collection, null treated as empty arraytrue if this collection was modified by this method calljava.lang.UnsupportedOperationException - if not supported by this collectionboolean removeAll(FloatCollection values)
This method is optional, throwing an UnsupportedOperationException if the collection cannot be removed from.
values - the values to remove from this collection, null treated as empty collectiontrue if this collection was modified by this method calljava.lang.UnsupportedOperationException - if not supported by this collectionboolean retainAll(float[] values)
This method is optional, throwing an UnsupportedOperationException if the collection cannot be removed from.
values - the values to retain in this collection, null treated as empty arraytrue if this collection was modified by this method calljava.lang.UnsupportedOperationException - if not supported by this collectionboolean retainAll(FloatCollection values)
This method is optional, throwing an UnsupportedOperationException if the collection cannot be removed from.
values - the values to retain in this collection, null treated as empty collectiontrue if this collection was modified by this method calljava.lang.UnsupportedOperationException - if not supported by this collectionCopyright © 2005–2018 Joda.org. All rights reserved.