|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectzombie.util.AbstractIntCollection
zombie.util.list.AbstractIntList
public abstract class AbstractIntList
This class represents an abstract base for implementing lists of int values. All operations that can be implemented using iterators and the get() and set() methods are implemented as such. In most cases, this is hardly an efficient solution, and at least some of those methods should be overridden by sub-classes.
| Method Summary | |
|---|---|
boolean |
add(int v)
Throws UnsupportedOperationException. |
void |
add(int index,
int v)
Throws UnsupportedOperationException. |
boolean |
addAll(int index,
IntCollection c)
Adds all the elements of a specified collection to this list starting at a specified index. |
boolean |
equals(java.lang.Object obj)
Indicates whether this collection is equal to some object. |
int |
hashCode()
Returns a hash code value for this collection. |
int |
indexOf(int c)
Returns the index of the first occurance of a specified element in this list. |
int |
indexOf(int index,
int c)
Returns the index of the first occurance of a specified element in this list after or at a specified index. |
IntIterator |
iterator()
Returns an iterator over this collection. |
int |
lastIndexOf(int c)
Returns the index of the last occurance of a specified element in this list. |
int |
lastIndexOf(int index,
int c)
Returns the index of the last occurance of a specified element in this list before a specified index. |
IntListIterator |
listIterator()
Returns a list iterator over this list. |
IntListIterator |
listIterator(int index)
Returns a list iterator over this list, starting from a specified index. |
int |
removeElementAt(int index)
Throws UnsupportedOperationException. |
| Methods inherited from class zombie.util.AbstractIntCollection |
|---|
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface zombie.util.list.IntList |
|---|
get, set |
| Methods inherited from interface zombie.util.IntCollection |
|---|
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, trimToSize |
| Method Detail |
|---|
public boolean add(int v)
AbstractIntCollection
add in interface IntCollectionadd in class AbstractIntCollectionv - the element to add to this collection.
IntCollection.addAll(IntCollection)
public void add(int index,
int v)
add in interface IntListindex - the index at which to add the element. If
index == size() the element is appended
to this list.v - the int value to add to this list.
java.lang.UnsupportedOperationException - unconditionally.IntCollection.add(int),
IntCollection.addAll(IntCollection),
IntList.addAll(int,IntCollection)
public boolean addAll(int index,
IntCollection c)
IntList
addAll in interface IntListindex - the index at which to insert the elements of
the specified collection. If
index == size() the elements are appended
to this list.c - the collection whose elements to add to this
list.
IntCollection.add(int),
IntList.add(int, int),
IntCollection.addAll(IntCollection)public int indexOf(int c)
IntList
indexOf in interface IntListc - the element to find.
public int indexOf(int index,
int c)
IntList
indexOf in interface IntListindex - the index at which to start the search.c - the element to find.
public IntIterator iterator()
IntCollection
iterator in interface IntCollectionpublic int lastIndexOf(int c)
IntList
lastIndexOf in interface IntListc - the element to find.
public int lastIndexOf(int index,
int c)
IntList
lastIndexOf in interface IntListindex - the index at which to start the search. Note that
the element at index is not included
in the search.c - the element to find.
public IntListIterator listIterator()
IntList
listIterator in interface IntListpublic IntListIterator listIterator(int index)
IntList
listIterator in interface IntListindex - the index at which to begin the iteration.
public int removeElementAt(int index)
removeElementAt in interface IntListindex - the index of the element to remove.
java.lang.UnsupportedOperationException - unconditionally.public boolean equals(java.lang.Object obj)
IntCollection
equals in interface IntCollectionequals in class java.lang.Objectobj - the object with which to compare this collection.
public int hashCode()
IntCollection
hashCode in interface IntCollectionhashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||