E - The type of element managed by the collection.public abstract class Collection<E> extends java.lang.Object implements Accessible<E>
| Constructor and Description |
|---|
Collection() |
| Modifier and Type | Method and Description |
|---|---|
int |
addElements(E[] elements)
This method adds an array of new elements to the collection.
|
int |
addElements(java.lang.Iterable<? extends E> elements)
This method adds a list of new elements to the collection.
|
boolean |
containsAllElementsIn(java.lang.Iterable<? extends E> collection)
This method determines whether all of the specified elements are contained in
the collection.
|
boolean |
containsAnyElementsIn(java.lang.Iterable<? extends E> collection)
This method determines whether any of the specified elements are contained in
the collection.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
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].
|
int |
removeElements(E[] elements)
This method removes the elements in the specified array from the collection.
|
int |
removeElements(java.lang.Iterable<? extends E> elements)
This method removes the specified elements from the collection.
|
void |
toArray(E[] array) |
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.String indentation) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitaddElement, containsElement, removeElementcreateDefaultIterator, removeAllElementsgetNumberOfElementspublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.lang.String indentation)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic final boolean isEmpty()
isEmpty in interface Sequential<E>public final void toArray(E[] array)
toArray in interface Sequential<E>public final boolean containsAnyElementsIn(java.lang.Iterable<? extends E> collection)
AccessiblecontainsAnyElementsIn in interface Accessible<E>collection - The elements to be checked for in the collection.public final boolean containsAllElementsIn(java.lang.Iterable<? extends E> collection)
AccessiblecontainsAllElementsIn in interface Accessible<E>collection - The elements to be checked for in the collection.public final int addElements(E[] elements)
AccessibleaddElements in interface Accessible<E>elements - The array of new elements to be added.public final int addElements(java.lang.Iterable<? extends E> elements)
AccessibleaddElements in interface Accessible<E>elements - The list of new elements to be added.public final int removeElements(E[] elements)
AccessibleremoveElements in interface Accessible<E>elements - The array of elements to be removed from the collection.public final int removeElements(java.lang.Iterable<? extends E> elements)
AccessibleremoveElements in interface Accessible<E>elements - The list of elements to be removed from the collection.public final Iterator<E> iterator()
iterator in interface Sequential<E>iterator in interface java.lang.Iterable<E>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 © 2014 Crater Dog Technologies(TM). All rights reserved.