coins.flow
クラス FAList

java.lang.Object
  |
  +--coins.flow.FAList
すべての実装インタフェース:
java.util.Collection

public class FAList
extends java.lang.Object
implements java.util.Collection

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:


コンストラクタの概要
FAList()
          Creates a new FAList instance.
FAList(int initialCapacity)
          Creates a new FAList instance with given initial capacity.
 
メソッドの概要
 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()
           
 
クラス java.lang.Object から継承したメソッド
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

FAList

public FAList()
Creates a new FAList instance.


FAList

public FAList(int initialCapacity)
Creates a new FAList instance with given initial capacity.

メソッドの詳細

add

public boolean add(java.lang.Object pElement)
定義:
インタフェース java.util.Collection 内の add

addAll

public boolean addAll(java.util.Collection pCollection)
Inserts the specified element at the specified position in this list.

定義:
インタフェース java.util.Collection 内の addAll
例外:
java.lang.IndexOutOfBoundsException - if the index is not positive or is greater than the size of this list.

addAll

public boolean addAll(int pIndex,
                      java.util.Collection pCollection)

clear

public void clear()
Removes all of the elements from this list. This list will be empty after this call returns.

定義:
インタフェース java.util.Collection 内の clear

contains

public boolean contains(java.lang.Object pObj)
定義:
インタフェース java.util.Collection 内の contains

containsAll

public boolean containsAll(java.util.Collection pCollection)
定義:
インタフェース java.util.Collection 内の containsAll

equals

public boolean equals(java.lang.Object pObj)
定義:
インタフェース java.util.Collection 内の equals
オーバーライド:
クラス java.lang.Object 内の equals

hashCode

public int hashCode()
定義:
インタフェース java.util.Collection 内の hashCode
オーバーライド:
クラス java.lang.Object 内の hashCode

get

public java.lang.Object get(int pIndex)

indexOf

public 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. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index. * @param elem element to search for.

戻り値:
the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.

isEmpty

public boolean isEmpty()
Tests whether this list has any elements.

定義:
インタフェース java.util.Collection 内の isEmpty
戻り値:
true if this list is empty.

iterator

public java.util.Iterator iterator()
Returns the iterator over this list.

定義:
インタフェース java.util.Collection 内の iterator
戻り値:
the iterator over this list.

lastIndexOf

public int lastIndexOf(java.lang.Object pObj)

listIterator

public java.util.ListIterator listIterator()

listIterator

public java.util.ListIterator listIterator(int pIndex)

remove

public java.lang.Object remove(int pIndex)

remove

public boolean remove(java.lang.Object pObj)
定義:
インタフェース java.util.Collection 内の remove

removeAll

public boolean removeAll(java.util.Collection pCollection)
定義:
インタフェース java.util.Collection 内の removeAll

retainAll

public boolean retainAll(java.util.Collection pCollection)
定義:
インタフェース java.util.Collection 内の retainAll

set

public java.lang.Object set(int pIndex,
                            java.lang.Object pElement)

deref

public java.lang.Object deref(int index)
Sets the indexth entry of this list to null.

パラメータ:
index - index that is set to null.
戻り値:
the original indexth element.
例外:
java.lang.IndexOutOfBoundsException - if the index is not positive or is greater than the size of this list.

size

public int size()
Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE - 1.

定義:
インタフェース java.util.Collection 内の size
戻り値:
the number of elements in this list.

toArray

public java.lang.Object[] toArray()
定義:
インタフェース java.util.Collection 内の toArray

toArray

public java.lang.Object[] toArray(java.lang.Object[] pObj)
定義:
インタフェース java.util.Collection 内の toArray

toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString

toList

public java.util.List toList()
Returns the ordinary java.util.List's view of this list. The zero'th index becomes accessible. The member objects' indexes do not change.