org.apache.commons.collections.primitives
Class RandomAccessByteList.RandomAccessByteSubList
java.lang.Object
org.apache.commons.collections.primitives.AbstractByteCollection
org.apache.commons.collections.primitives.RandomAccessByteList
org.apache.commons.collections.primitives.RandomAccessByteList.RandomAccessByteSubList
- All Implemented Interfaces:
- ByteCollection, ByteList
- Enclosing class:
- RandomAccessByteList
- protected static class RandomAccessByteList.RandomAccessByteSubList
- extends RandomAccessByteList
- implements ByteList
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 |
_offset
private int _offset
_limit
private int _limit
_list
private RandomAccessByteList _list
_comod
private RandomAccessByteList.ComodChecker _comod
RandomAccessByteList.RandomAccessByteSubList
RandomAccessByteList.RandomAccessByteSubList(RandomAccessByteList list,
int fromIndex,
int toIndex)
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