org.apache.commons.collections.primitives

Class RandomAccessCharList

public abstract class RandomAccessCharList extends AbstractCharCollection implements CharList

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

Read-only subclasses must override RandomAccessCharList and RandomAccessCharList. Mutable subclasses should also override RandomAccessCharList. Variably-sized subclasses should also override RandomAccessCharList and RandomAccessCharList. 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:36 $

Author: Rodney Waldhoff

Nested Class Summary
static classRandomAccessCharList.ComodChecker
protected static classRandomAccessCharList.RandomAccessCharListIterator
protected static classRandomAccessCharList.RandomAccessCharSubList
Field Summary
int_modCount
Constructor Summary
protected RandomAccessCharList()
Constructs an empty list.
Method Summary
voidadd(int index, char element)
Unsupported in this implementation.
booleanadd(char element)
booleanaddAll(int index, CharCollection collection)
booleanequals(Object that)
abstract charget(int index)
protected intgetModCount()
Get my count of structural modifications.
inthashCode()
protected voidincrModCount()
Increment my count of structural modifications.
intindexOf(char element)
CharIteratoriterator()
intlastIndexOf(char element)
CharListIteratorlistIterator()
CharListIteratorlistIterator(int index)
charremoveElementAt(int index)
Unsupported in this implementation.
charset(int index, char element)
Unsupported in this implementation.
abstract intsize()
CharListsubList(int fromIndex, int toIndex)
StringtoString()

Field Detail

_modCount

private int _modCount

Constructor Detail

RandomAccessCharList

protected RandomAccessCharList()
Constructs an empty list.

Method Detail

add

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

Throws: UnsupportedOperationException since this method is not supported

add

public boolean add(char element)

addAll

public boolean addAll(int index, CharCollection collection)

equals

public boolean equals(Object that)

get

public abstract char 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(char element)

iterator

public CharIterator iterator()

lastIndexOf

public int lastIndexOf(char element)

listIterator

public CharListIterator listIterator()

listIterator

public CharListIterator listIterator(int index)

removeElementAt

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

Throws: UnsupportedOperationException since this method is not supported

set

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

Throws: UnsupportedOperationException since this method is not supported

size

public abstract int size()

subList

public CharList subList(int fromIndex, int toIndex)

toString

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