org.apache.commons.collections.primitives

Class RandomAccessLongList

public abstract class RandomAccessLongList extends AbstractLongCollection implements LongList

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

Read-only subclasses must override RandomAccessLongList and RandomAccessLongList. Mutable subclasses should also override RandomAccessLongList. Variably-sized subclasses should also override RandomAccessLongList and RandomAccessLongList. 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 0.1

Version: $Revision: 1.2 $ $Date: 2003/10/14 20:04:26 $

Author: Rodney Waldhoff

Nested Class Summary
static classRandomAccessLongList.ComodChecker
protected static classRandomAccessLongList.RandomAccessLongListIterator
protected static classRandomAccessLongList.RandomAccessLongSubList
Field Summary
int_modCount
Constructor Summary
protected RandomAccessLongList()
Constructs an empty list.
Method Summary
voidadd(int index, long element)
Unsupported in this implementation.
booleanadd(long element)
booleanaddAll(int index, LongCollection collection)
booleanequals(Object that)
abstract longget(int index)
protected intgetModCount()
Get my count of structural modifications.
inthashCode()
protected voidincrModCount()
Increment my count of structural modifications.
intindexOf(long element)
LongIteratoriterator()
intlastIndexOf(long element)
LongListIteratorlistIterator()
LongListIteratorlistIterator(int index)
longremoveElementAt(int index)
Unsupported in this implementation.
longset(int index, long element)
Unsupported in this implementation.
abstract intsize()
LongListsubList(int fromIndex, int toIndex)
StringtoString()

Field Detail

_modCount

private int _modCount

Constructor Detail

RandomAccessLongList

protected RandomAccessLongList()
Constructs an empty list.

Method Detail

add

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

Throws: UnsupportedOperationException since this method is not supported

add

public boolean add(long element)

addAll

public boolean addAll(int index, LongCollection collection)

equals

public boolean equals(Object that)

get

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

iterator

public LongIterator iterator()

lastIndexOf

public int lastIndexOf(long element)

listIterator

public LongListIterator listIterator()

listIterator

public LongListIterator listIterator(int index)

removeElementAt

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

Throws: UnsupportedOperationException since this method is not supported

set

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

Throws: UnsupportedOperationException since this method is not supported

size

public abstract int size()

subList

public LongList subList(int fromIndex, int toIndex)

toString

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