org.apache.commons.collections.primitives

Class RandomAccessIntList

public abstract class RandomAccessIntList extends AbstractIntCollection implements IntList

Abstract base class for IntLists backed by random access structures like arrays.

Read-only subclasses must override RandomAccessIntList and RandomAccessIntList. Mutable subclasses should also override RandomAccessIntList. Variably-sized subclasses should also override RandomAccessIntList and RandomAccessIntList. All other methods have at least some base implementation derived from these. Subclasses may choose to override these methods to provide a more efficient implementation.

Since: Commons Primitives 1.0

Version: $Revision: 1.3 $ $Date: 2003/10/16 20:49:35 $

Author: Rodney Waldhoff

Nested Class Summary
static classRandomAccessIntList.ComodChecker
protected static classRandomAccessIntList.RandomAccessIntListIterator
protected static classRandomAccessIntList.RandomAccessIntSubList
Field Summary
int_modCount
Constructor Summary
protected RandomAccessIntList()
Constructs an empty list.
Method Summary
voidadd(int index, int element)
Unsupported in this implementation.
booleanadd(int element)
booleanaddAll(int index, IntCollection collection)
booleanequals(Object that)
abstract intget(int index)
protected intgetModCount()
Get my count of structural modifications.
inthashCode()
protected voidincrModCount()
Increment my count of structural modifications.
intindexOf(int element)
IntIteratoriterator()
intlastIndexOf(int element)
IntListIteratorlistIterator()
IntListIteratorlistIterator(int index)
intremoveElementAt(int index)
Unsupported in this implementation.
intset(int index, int element)
Unsupported in this implementation.
abstract intsize()
IntListsubList(int fromIndex, int toIndex)
StringtoString()

Field Detail

_modCount

private int _modCount

Constructor Detail

RandomAccessIntList

protected RandomAccessIntList()
Constructs an empty list.

Method Detail

add

public void add(int index, int element)
Unsupported in this implementation.

Throws: UnsupportedOperationException since this method is not supported

add

public boolean add(int element)

addAll

public boolean addAll(int index, IntCollection collection)

equals

public boolean equals(Object that)

get

public abstract int get(int index)

getModCount

protected int getModCount()
Get my count of structural modifications.

hashCode

public int hashCode()

incrModCount

protected void incrModCount()
Increment my count of structural modifications.

indexOf

public int indexOf(int element)

iterator

public IntIterator iterator()

lastIndexOf

public int lastIndexOf(int element)

listIterator

public IntListIterator listIterator()

listIterator

public IntListIterator listIterator(int index)

removeElementAt

public int removeElementAt(int index)
Unsupported in this implementation.

Throws: UnsupportedOperationException since this method is not supported

set

public int set(int index, int element)
Unsupported in this implementation.

Throws: UnsupportedOperationException since this method is not supported

size

public abstract int size()

subList

public IntList subList(int fromIndex, int toIndex)

toString

public String toString()
Copyright (c) 2002-2003 - Apache Software Foundation