org.apache.commons.collections.primitives

Class RandomAccessShortList

public abstract class RandomAccessShortList extends AbstractShortCollection implements ShortList

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

Read-only subclasses must override RandomAccessShortList and RandomAccessShortList. Mutable subclasses should also override RandomAccessShortList. Variably-sized subclasses should also override RandomAccessShortList and RandomAccessShortList. 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 classRandomAccessShortList.ComodChecker
protected static classRandomAccessShortList.RandomAccessShortListIterator
protected static classRandomAccessShortList.RandomAccessShortSubList
Field Summary
int_modCount
Constructor Summary
protected RandomAccessShortList()
Constructs an empty list.
Method Summary
voidadd(int index, short element)
Unsupported in this implementation.
booleanadd(short element)
booleanaddAll(int index, ShortCollection collection)
booleanequals(Object that)
abstract shortget(int index)
protected intgetModCount()
Get my count of structural modifications.
inthashCode()
protected voidincrModCount()
Increment my count of structural modifications.
intindexOf(short element)
ShortIteratoriterator()
intlastIndexOf(short element)
ShortListIteratorlistIterator()
ShortListIteratorlistIterator(int index)
shortremoveElementAt(int index)
Unsupported in this implementation.
shortset(int index, short element)
Unsupported in this implementation.
abstract intsize()
ShortListsubList(int fromIndex, int toIndex)
StringtoString()

Field Detail

_modCount

private int _modCount

Constructor Detail

RandomAccessShortList

protected RandomAccessShortList()
Constructs an empty list.

Method Detail

add

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

Throws: UnsupportedOperationException since this method is not supported

add

public boolean add(short element)

addAll

public boolean addAll(int index, ShortCollection collection)

equals

public boolean equals(Object that)

get

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

iterator

public ShortIterator iterator()

lastIndexOf

public int lastIndexOf(short element)

listIterator

public ShortListIterator listIterator()

listIterator

public ShortListIterator listIterator(int index)

removeElementAt

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

Throws: UnsupportedOperationException since this method is not supported

set

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

Throws: UnsupportedOperationException since this method is not supported

size

public abstract int size()

subList

public ShortList subList(int fromIndex, int toIndex)

toString

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