E - The type of element managed by the collection.public abstract class Collection<E> extends java.lang.Object implements java.lang.Comparable<Collection<E>>, Accessible<E>, Sequential<E>, Composite
| Constructor and Description |
|---|
Collection() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Collection<E> that) |
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 |
containsElement(E element)
This method determines if an element is contained in the collection.
|
boolean |
equals(java.lang.Object object) |
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].
|
E[] |
toArray() |
void |
toArray(E[] array)
Deprecated.
|
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.String indentation) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateDefaultIterator, getElementAtIndex, getElementsInRange, getIndexOfElement, removeAllElementsgetNumberOfElementspublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.lang.String indentation)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int compareTo(Collection<E> that)
compareTo in interface java.lang.Comparable<Collection<E>>public boolean isEmpty()
isEmpty in interface Sequential<E>public boolean containsElement(E element)
AccessiblecontainsElement in interface Accessible<E>element - The element to be checked for in the collection.public boolean containsAnyElementsIn(java.lang.Iterable<? extends E> collection)
AccessiblecontainsAnyElementsIn in interface Accessible<E>collection - The elements to be checked for in the collection.public boolean containsAllElementsIn(java.lang.Iterable<? extends E> collection)
AccessiblecontainsAllElementsIn in interface Accessible<E>collection - The elements to be checked for in the collection.@Deprecated public void toArray(E[] array)
toArray in interface Sequential<E>public E[] toArray()
toArray in interface Sequential<E>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.