|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BooleanCollection
Defines a collection of primitive boolean
values.
This interface extends Collection
allowing
seamless integration with other APIs.
All Collection methods can be used, using the primitive wrapper class Boolean
.
However, it will be much more efficient to use the methods defined here.
Method Summary | |
---|---|
boolean |
add(boolean value)
Adds a primitive value to this collection (optional operation). |
boolean |
addAll(boolean[] values)
Adds an array of primitive values to this collection (optional operation). |
boolean |
addAll(BooleanCollection values)
Adds a collection of primitive values to this collection (optional operation). |
boolean |
contains(boolean value)
Checks whether this collection contains a specified primitive value. |
boolean |
containsAll(boolean[] values)
Checks if this collection contains all of the values in the specified array. |
boolean |
containsAll(BooleanCollection values)
Checks if this collection contains all of the values in the specified collection. |
boolean |
containsAny(boolean[] values)
Checks if this collection contains any of the values in the specified array. |
boolean |
containsAny(BooleanCollection coll)
Checks if this collection contains any of the values in the specified collection. |
BooleanIterator |
iterator()
Gets an iterator over this collection capable of accessing the primitive values. |
boolean |
removeAll(boolean value)
Removes all occurrences of the specified primitive value from this collection (optional operation). |
boolean |
removeAll(boolean[] values)
Removes all occurrences from this collection of each primitive in the specified array (optional operation). |
boolean |
removeAll(BooleanCollection values)
Removes all occurrences from this collection of each primitive in the specified collection (optional operation). |
boolean |
removeFirst(boolean value)
Removes the first occurrence of the specified primitive value from this collection (optional operation). |
boolean |
retainAll(boolean[] values)
Retains each element of this collection that is present in the specified array removing all other values (optional operation). |
boolean |
retainAll(BooleanCollection values)
Retains each element of this collection that is present in the specified collection removing all other values (optional operation). |
boolean[] |
toBooleanArray()
Gets the elements of this collection as an array. |
boolean[] |
toBooleanArray(boolean[] array,
int startIndex)
Copies the elements of this collection into an array at a specified position. |
Methods inherited from interface org.joda.primitives.collection.PrimitiveCollection |
---|
containsAny |
Methods inherited from interface org.joda.primitives.PrimitiveCollectable |
---|
clear, clone, isEmpty, isModifiable, optimize, size |
Methods inherited from interface java.util.Collection |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
BooleanIterator iterator()
iterator
in interface BooleanIterable
iterator
in interface Collection<Boolean>
iterator
in interface Iterable<Boolean>
boolean contains(boolean value)
value
- the value to search for
true
if the value is foundboolean containsAll(boolean[] values)
true
is returned.
values
- the values to search for, null treated as empty array
true
if all of the values are foundboolean containsAll(BooleanCollection values)
true
is returned.
values
- the values to search for, null treated as empty collection
true
if all of the values are foundboolean containsAny(boolean[] values)
false
is returned.
values
- the values to search for, null treated as empty array
true
if at least one of the values is foundboolean containsAny(BooleanCollection coll)
false
is returned.
coll
- the values to search for, null treated as empty collection
true
if at least one of the values is foundboolean[] toBooleanArray()
boolean[] toBooleanArray(boolean[] 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 elements
IndexOutOfBoundsException
- if the index is negativeboolean add(boolean value)
This method is optional, throwing an UnsupportedOperationException if the collection cannot be added to.
value
- the value to add to this collection
true
if this collection was modified by this method call
IllegalArgumentException
- if value is rejected by this collection
UnsupportedOperationException
- if not supported by this collectionboolean addAll(boolean[] 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 array
true
if this collection was modified by this method call
IllegalArgumentException
- if a value is rejected by this collection
UnsupportedOperationException
- if not supported by this collectionboolean addAll(BooleanCollection 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 collection
true
if this collection was modified by this method call
IllegalArgumentException
- if a value is rejected by this collection
UnsupportedOperationException
- if not supported by this collectionboolean removeFirst(boolean value)
This method is optional, throwing an UnsupportedOperationException if the collection cannot be removed from.
value
- the value to remove
true
if this collection was modified by this method call
UnsupportedOperationException
- if not supported by this collectionboolean removeAll(boolean value)
This method is optional, throwing an UnsupportedOperationException if the collection cannot be removed from.
value
- the value to remove
true
if this collection was modified by this method call
UnsupportedOperationException
- if not supported by this collectionboolean removeAll(boolean[] 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 array
true
if this collection was modified by this method call
UnsupportedOperationException
- if not supported by this collectionboolean removeAll(BooleanCollection 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 collection
true
if this collection was modified by this method call
UnsupportedOperationException
- if not supported by this collectionboolean retainAll(boolean[] 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 array
true
if this collection was modified by this method call
UnsupportedOperationException
- if not supported by this collectionboolean retainAll(BooleanCollection 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 collection
true
if this collection was modified by this method call
UnsupportedOperationException
- if not supported by this collection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |