Save This Page
Home » commons-collections-3.2.1-src » org.apache.commons » collections » primitives » [javadoc | source]
org.apache.commons.collections.primitives
public interface: DoubleCollection [javadoc | source]

All Known Implementing Classes:
    BaseUnmodifiableDoubleList, RandomAccessDoubleSubList, ListDoubleList, AbstractListDoubleList, InvocationCounter, InvocationCounter, DoubleCollectionImpl, BaseProxyDoubleList, AbstractRandomAccessDoubleListImpl, NonSerializableCollectionDoubleCollection, UnmodifiableDoubleList, AbstractCollectionDoubleCollection, DoubleList, AbstractDoubleCollection, RandomAccessDoubleList, ArrayDoubleList, BaseProxyDoubleCollection, CollectionDoubleCollection, NonSerializableListDoubleList, NonSerializableUnmodifiableDoubleList

A collection of double values.
Method from org.apache.commons.collections.primitives.DoubleCollection Summary:
add,   addAll,   clear,   contains,   containsAll,   isEmpty,   iterator,   removeAll,   removeElement,   retainAll,   size,   toArray,   toArray
Method from org.apache.commons.collections.primitives.DoubleCollection Detail:
 public boolean add(double element)
    Ensures that I contain the specified element (optional operation). Returns true iff I changed as a result of this call.

    If a collection refuses to add the specified element for any reason other than that it already contains the element, it must throw an exception (rather than simply returning false). This preserves the invariant that a collection always contains the specified element after this call returns.

 public boolean addAll(DoubleCollection c)
    Adds all of the elements in the specified collection to me (optional operation).
 public  void clear()
    Removes all my elements (optional operation). I will be empty after this method successfully returns.
 public boolean contains(double element)
    Returns true iff I contain the specified element.
 public boolean containsAll(DoubleCollection c)
    Returns true iff I contain all of the elements in the given collection.
 public boolean isEmpty()
    Returns true iff I contain no elements.
 public DoubleIterator iterator()
    Returns an iterator over all my elements. This base interface places no constraints on the order in which the elements are returned by the returned iterator.
 public boolean removeAll(DoubleCollection c)
    Removes all of my elements that are contained in the specified collection (optional operation). The behavior of this method is unspecified if the given collection is modified while this method is executing. Note that this includes the case in which the given collection is this collection, and it is not empty.
 public boolean removeElement(double element)
    Removes a single occurrence of the specified element (optional operation).
 public boolean retainAll(DoubleCollection c)
    Removes all of my elements that are not contained in the specified collection (optional operation). (In other words, retains only my elements that are contained in the specified collection.) The behavior of this method is unspecified if the given collection is modified while this method is executing.
 public int size()
    Returns the number of elements I contain.
 public double[] toArray()
    Returns an array containing all of my elements. The length of the returned array will be equal to my size .

    The returned array will be independent of me, so that callers may modify that returned array without modifying this collection.

    When I guarantee the order in which elements are returned by an iterator , the returned array will contain elements in the same order.

 public double[] toArray(double[] a)
    Returns an array containing all of my elements, using the given array if it is large enough. When the length of the given array is larger than the number of elements I contain, values outside of my range will be unchanged.

    The returned array will be independent of me, so that callers may modify that returned array without modifying this collection.

    When I guarantee the order in which elements are returned by an iterator , the returned array will contain elements in the same order.