org.apache.commons.collections.primitives

Class RandomAccessByteList

public abstract class RandomAccessByteList extends AbstractByteCollection implements ByteList

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

Read-only subclasses must override RandomAccessByteList and RandomAccessByteList. Mutable subclasses should also override RandomAccessByteList. Variably-sized subclasses should also override RandomAccessByteList and RandomAccessByteList. 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 classRandomAccessByteList.ComodChecker
protected static classRandomAccessByteList.RandomAccessByteListIterator
protected static classRandomAccessByteList.RandomAccessByteSubList
Field Summary
int_modCount
Constructor Summary
protected RandomAccessByteList()
Constructs an empty list.
Method Summary
voidadd(int index, byte element)
Unsupported in this implementation.
booleanadd(byte element)
booleanaddAll(int index, ByteCollection collection)
booleanequals(Object that)
abstract byteget(int index)
protected intgetModCount()
Get my count of structural modifications.
inthashCode()
protected voidincrModCount()
Increment my count of structural modifications.
intindexOf(byte element)
ByteIteratoriterator()
intlastIndexOf(byte element)
ByteListIteratorlistIterator()
ByteListIteratorlistIterator(int index)
byteremoveElementAt(int index)
Unsupported in this implementation.
byteset(int index, byte element)
Unsupported in this implementation.
abstract intsize()
ByteListsubList(int fromIndex, int toIndex)
StringtoString()

Field Detail

_modCount

private int _modCount

Constructor Detail

RandomAccessByteList

protected RandomAccessByteList()
Constructs an empty list.

Method Detail

add

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

Throws: UnsupportedOperationException since this method is not supported

add

public boolean add(byte element)

addAll

public boolean addAll(int index, ByteCollection collection)

equals

public boolean equals(Object that)

get

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

iterator

public ByteIterator iterator()

lastIndexOf

public int lastIndexOf(byte element)

listIterator

public ByteListIterator listIterator()

listIterator

public ByteListIterator listIterator(int index)

removeElementAt

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

Throws: UnsupportedOperationException since this method is not supported

set

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

Throws: UnsupportedOperationException since this method is not supported

size

public abstract int size()

subList

public ByteList subList(int fromIndex, int toIndex)

toString

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