|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.aflow.util.FAList
Title:
Description: 1 based list that prohibits the remove operation.
Since many indexes in COINS are 1 based, it should be convenient to use a list whose base is 1. Collection of such indexed objects are often expressed in terms of BitVector, and the meaning of the bits in the vector should be maintained by such a 1-based list, which serves as a map between the bit space and the space of indexed objects. Removal of elements in such a list, which results in re-indexing of list elements, will break the map and is not desirable. This list therefore prohibits such a removal.
Copyright: Copyright (c) 2002
Company:
| Constructor Summary | |
FAList()
Creates a new FAList instance. |
|
FAList(int initialCapacity)
Creates a new FAList instance with given initial capacity. |
|
| Method Summary | |
boolean |
add(java.lang.Object pElement)
|
boolean |
addAll(java.util.Collection pCollection)
Inserts the specified element at the specified position in this list. |
boolean |
addAll(int pIndex,
java.util.Collection pCollection)
|
void |
clear()
Removes all of the elements from this list. |
boolean |
contains(java.lang.Object pObj)
|
boolean |
containsAll(java.util.Collection pCollection)
|
java.lang.Object |
deref(int index)
Sets the indexth entry of this list to null. |
boolean |
equals(java.lang.Object pObj)
|
java.lang.Object |
get(int pIndex)
|
int |
hashCode()
|
int |
indexOf(java.lang.Object elem)
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. |
boolean |
isEmpty()
Tests whether this list has any elements. |
java.util.Iterator |
iterator()
Returns the iterator over this list. |
int |
lastIndexOf(java.lang.Object pObj)
|
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int pIndex)
|
java.lang.Object |
remove(int pIndex)
|
boolean |
remove(java.lang.Object pObj)
|
boolean |
removeAll(java.util.Collection pCollection)
|
boolean |
retainAll(java.util.Collection pCollection)
|
java.lang.Object |
set(int pIndex,
java.lang.Object pElement)
|
int |
size()
Returns the number of elements in this list. |
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] pObj)
|
java.util.List |
toList()
Returns the ordinary java.util.List's view of this list. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public FAList()
FAList instance.
public FAList(int initialCapacity)
FAList instance with given initial capacity.
| Method Detail |
public boolean add(java.lang.Object pElement)
add in interface java.util.Collectionpublic boolean addAll(java.util.Collection pCollection)
addAll in interface java.util.Collectionjava.lang.IndexOutOfBoundsException - if the index is not positive or is greater than the size of this list.
public boolean addAll(int pIndex,
java.util.Collection pCollection)
public void clear()
clear in interface java.util.Collectionpublic boolean contains(java.lang.Object pObj)
contains in interface java.util.Collectionpublic boolean containsAll(java.util.Collection pCollection)
containsAll in interface java.util.Collectionpublic boolean equals(java.lang.Object pObj)
equals in interface java.util.Collectionpublic int hashCode()
hashCode in interface java.util.Collectionpublic java.lang.Object get(int pIndex)
public int indexOf(java.lang.Object elem)
public boolean isEmpty()
isEmpty in interface java.util.Collectionpublic java.util.Iterator iterator()
iterator in interface java.util.Collectionpublic int lastIndexOf(java.lang.Object pObj)
public java.util.ListIterator listIterator()
public java.util.ListIterator listIterator(int pIndex)
public java.lang.Object remove(int pIndex)
public boolean remove(java.lang.Object pObj)
remove in interface java.util.Collectionpublic boolean removeAll(java.util.Collection pCollection)
removeAll in interface java.util.Collectionpublic boolean retainAll(java.util.Collection pCollection)
retainAll in interface java.util.Collection
public java.lang.Object set(int pIndex,
java.lang.Object pElement)
public java.lang.Object deref(int index)
index - index that is set to null.
java.lang.IndexOutOfBoundsException - if the index is not positive or is greater than the size of this list.public int size()
size in interface java.util.Collectionpublic java.lang.Object[] toArray()
toArray in interface java.util.Collectionpublic java.lang.Object[] toArray(java.lang.Object[] pObj)
toArray in interface java.util.Collectionpublic java.lang.String toString()
public java.util.List toList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||