org.apache.commons.collections.primitives
Class RandomAccessByteList.RandomAccessByteSubList

java.lang.Object
  extended byorg.apache.commons.collections.primitives.AbstractByteCollection
      extended byorg.apache.commons.collections.primitives.RandomAccessByteList
          extended byorg.apache.commons.collections.primitives.RandomAccessByteList.RandomAccessByteSubList
All Implemented Interfaces:
ByteCollection, ByteList
Enclosing class:
RandomAccessByteList

protected static class RandomAccessByteList.RandomAccessByteSubList
extends RandomAccessByteList
implements ByteList


Nested Class Summary
 
Nested classes inherited from class org.apache.commons.collections.primitives.RandomAccessByteList
RandomAccessByteList.RandomAccessByteListIterator, RandomAccessByteList.RandomAccessByteSubList
 
Field Summary
private  RandomAccessByteList.ComodChecker _comod
           
private  int _limit
           
private  RandomAccessByteList _list
           
private  int _offset
           
 
Fields inherited from class org.apache.commons.collections.primitives.RandomAccessByteList
 
Constructor Summary
(package private) RandomAccessByteList.RandomAccessByteSubList(RandomAccessByteList list, int fromIndex, int toIndex)
           
 
Method Summary
 void add(int index, byte element)
          Inserts the specified element at the specified position (optional operation).
private  void checkRange(int index)
           
private  void checkRangeIncludingEndpoint(int index)
           
 byte get(int index)
          Returns the value of the element at the specified position within me.
 byte removeElementAt(int index)
          Removes the element at the specified position in (optional operation).
 byte set(int index, byte element)
          Replaces the element at the specified position in me with the specified element (optional operation).
 int size()
          Returns the number of elements I contain.
private  int toUnderlyingIndex(int index)
           
 
Methods inherited from class org.apache.commons.collections.primitives.RandomAccessByteList
add, addAll, equals, getModCount, hashCode, incrModCount, indexOf, iterator, lastIndexOf, listIterator, listIterator, subList, toString
 
Methods inherited from class org.apache.commons.collections.primitives.AbstractByteCollection
addAll, clear, contains, containsAll, isEmpty, removeAll, removeElement, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.commons.collections.primitives.ByteList
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, subList
 
Methods inherited from interface org.apache.commons.collections.primitives.ByteCollection
addAll, clear, contains, containsAll, isEmpty, removeAll, removeElement, retainAll, toArray, toArray
 

Field Detail

_offset

private int _offset

_limit

private int _limit

_list

private RandomAccessByteList _list

_comod

private RandomAccessByteList.ComodChecker _comod
Constructor Detail

RandomAccessByteList.RandomAccessByteSubList

RandomAccessByteList.RandomAccessByteSubList(RandomAccessByteList list,
                                             int fromIndex,
                                             int toIndex)
Method Detail

get

public byte get(int index)
Description copied from interface: ByteList
Returns the value of the element at the specified position within me.

Specified by:
get in interface ByteList
Specified by:
get in class RandomAccessByteList

removeElementAt

public byte removeElementAt(int index)
Description copied from interface: ByteList
Removes the element at the specified position in (optional operation). Any subsequent elements are shifted to the left, subtracting one from their indices. Returns the element that was removed.

Specified by:
removeElementAt in interface ByteList
Overrides:
removeElementAt in class RandomAccessByteList

set

public byte set(int index,
                byte element)
Description copied from interface: ByteList
Replaces the element at the specified position in me with the specified element (optional operation).

Specified by:
set in interface ByteList
Overrides:
set in class RandomAccessByteList

add

public void add(int index,
                byte element)
Description copied from interface: ByteList
Inserts the specified element at the specified position (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right, increasing their indices.

Specified by:
add in interface ByteList
Overrides:
add in class RandomAccessByteList

size

public int size()
Description copied from interface: ByteCollection
Returns the number of elements I contain.

Specified by:
size in interface ByteCollection
Specified by:
size in class RandomAccessByteList

checkRange

private void checkRange(int index)

checkRangeIncludingEndpoint

private void checkRangeIncludingEndpoint(int index)

toUnderlyingIndex

private int toUnderlyingIndex(int index)


Copyright (c) 2002-2003 - Apache Software Foundation