E - The type of element managed by the collection.public abstract class Collection<E> extends Sequence<E>
| Constructor and Description |
|---|
Collection() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAll(java.lang.Iterable<? extends E> elements)
This method determines whether all of the specified elements are contained in
the collection.
|
boolean |
containsAny(java.lang.Iterable<? extends E> elements)
This method determines whether any of the specified elements are contained in
the collection.
|
boolean |
containsElement(E element)
This method determines if an element is contained in the collection.
|
abstract E |
getElement(int index)
This method returns the element at the specified index.
|
abstract Collection<E> |
getElements(int firstIndex,
int lastIndex)
This method returns a collection of the elements in the specified index range.
|
abstract int |
getIndex(E element)
This method return the index of the specified element, or zero if the element
is not found.
|
protected int |
normalizedIndex(int index)
This method converts negative indexes into their corresponding positive indexes and
then checks to make sure the index is in the range [1..size].
|
abstract void |
removeAll()
This method removes all elements from the collection.
|
compareTo, equals, hashCode, toArrayaddSerializableClass, addSerializableClass, addSerializableClass, copy, createMapper, fromString, fromString, toExposedString, toString, toString, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic abstract int getIndex(E element)
element - The element to be checked for in the collection.public abstract E getElement(int index)
index - The index of the element to be returned.public abstract Collection<E> getElements(int firstIndex, int lastIndex)
firstIndex - The index of the first element to be returned.lastIndex - the index of the last element to be returned.public boolean containsElement(E element)
element - The element to be checked for in the collection.public boolean containsAny(java.lang.Iterable<? extends E> elements)
elements - The elements to be checked for in the collection.public boolean containsAll(java.lang.Iterable<? extends E> elements)
elements - The elements to be checked for in the collection.public abstract void removeAll()
protected final int normalizedIndex(int index)
Negative Indexes: -N -N + 1 -N + 2 -N + 3 ... -1 Positive Indexes: 1 2 3 4 ... N
index - The index to be normalized.Copyright © 2016 Crater Dog Technologies(TM). All rights reserved.