ByteCollection, ByteIterable, ByteList, ByteStack, Stack<java.lang.Byte>, java.io.Serializable, java.lang.Comparable<java.util.List<? extends java.lang.Byte>>, java.lang.Iterable<java.lang.Byte>, java.util.Collection<java.lang.Byte>, java.util.List<java.lang.Byte>public static class AbstractByteList.ByteSubList extends AbstractByteList implements java.io.Serializable
AbstractByteList.ByteSubList| Constructor | Description |
|---|---|
ByteSubList(ByteList l,
int from,
int to) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
add(byte k) |
Ensures that this collection contains the specified element (optional
operation).
|
void |
add(int index,
byte k) |
Inserts the specified element at the specified position in this list
(optional operation).
|
boolean |
addAll(int index,
ByteCollection c) |
Inserts all of the elements in the specified type-specific collection into
this type-specific list at the specified position (optional operation).
|
boolean |
addAll(int index,
ByteList l) |
Inserts all of the elements in the specified type-specific list into this
type-specific list at the specified position (optional operation).
|
boolean |
addAll(int index,
java.util.Collection<? extends java.lang.Byte> c) |
Adds all of the elements in the specified collection to this list (optional
operation).
|
void |
addElements(int index,
byte[] a,
int offset,
int length) |
Add (hopefully quickly) elements to this type-specific list.
|
byte |
getByte(int index) |
Returns the element at the specified position in this list.
|
void |
getElements(int from,
byte[] a,
int offset,
int length) |
Copies (hopefully quickly) elements of this type-specific list into the given
array.
|
ByteListIterator |
listIterator(int index) |
Returns a type-specific list iterator on the list starting at a given index.
|
boolean |
rem(byte k) |
Removes a single instance of the specified element from this collection, if
it is present (optional operation).
|
byte |
removeByte(int index) |
Removes the element at the specified position in this list (optional
operation).
|
void |
removeElements(int from,
int to) |
Removes (hopefully quickly) elements of this type-specific list.
|
byte |
set(int index,
byte k) |
Replaces the element at the specified position in this list with the
specified element (optional operation).
|
int |
size() |
|
ByteList |
subList(int from,
int to) |
Returns a type-specific view of the portion of this list from the index
from, inclusive, to the index to, exclusive. |
add, contains, containsAll, remove, removeAll, retainAll, toArray, toByteArray, toByteArrayaddAll, addAll, addAll, addElements, clear, compareTo, contains, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, peekByte, popByte, push, size, topByte, toStringcontainsAll, isEmpty, removeAll, retainAll, toArray, toArraycontainsAll, removeAll, removeIf, removeIf, retainAll, toArray, toByteArray, toByteArrayforEach, forEachadd, add, contains, get, indexOf, lastIndexOf, remove, remove, setpublic ByteSubList(ByteList l, int from, int to)
public boolean add(byte k)
AbstractByteList
This implementation always throws an UnsupportedOperationException.
This implementation delegates to the type-specific version of
List.add(int, Object).
add in interface ByteCollectionadd in interface ByteListadd in class AbstractByteListCollection.add(Object)public void add(int index,
byte k)
AbstractByteList
This implementation always throws an UnsupportedOperationException.
add in interface ByteListadd in class AbstractByteListList.add(int,Object)public boolean addAll(int index,
java.util.Collection<? extends java.lang.Byte> c)
AbstractByteListaddAll in interface java.util.List<java.lang.Byte>addAll in class AbstractByteListpublic byte getByte(int index)
ByteListpublic byte removeByte(int index)
AbstractByteList
This implementation always throws an UnsupportedOperationException.
removeByte in interface ByteListremoveByte in class AbstractByteListList.remove(int)public byte set(int index,
byte k)
AbstractByteList
This implementation always throws an UnsupportedOperationException.
set in interface ByteListset in class AbstractByteListList.set(int,Object)public int size()
size in interface java.util.Collection<java.lang.Byte>size in interface java.util.List<java.lang.Byte>size in class java.util.AbstractCollection<java.lang.Byte>public void getElements(int from,
byte[] a,
int offset,
int length)
AbstractByteListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements in interface ByteListgetElements in class AbstractByteListfrom - the start index (inclusive).a - the destination array.offset - the offset into the destination array where to store the first
element copied.length - the number of elements to be copied.public void removeElements(int from,
int to)
AbstractByteListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface ByteListremoveElements in class AbstractByteListfrom - the start index (inclusive).to - the end index (exclusive).public void addElements(int index,
byte[] a,
int offset,
int length)
AbstractByteListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements in interface ByteListaddElements in class AbstractByteListindex - the index at which to add elements.a - the array containing the elements.offset - the offset of the first element to add.length - the number of elements to add.public ByteListIterator listIterator(int index)
AbstractByteListThis implementation is based on the random-access methods.
listIterator in interface ByteListlistIterator in interface java.util.List<java.lang.Byte>listIterator in class AbstractByteListList.listIterator(int)public ByteList subList(int from, int to)
ByteListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in
List.subList(int,int).
subList in interface ByteListsubList in interface java.util.List<java.lang.Byte>subList in class AbstractByteListList.subList(int,int)public boolean rem(byte k)
AbstractByteList
This implementation delegates to indexOf().
rem in interface ByteCollectionrem in class AbstractByteListList.remove(Object)public boolean addAll(int index,
ByteCollection c)
ByteListaddAll in interface ByteListaddAll in class AbstractByteListList.addAll(int,java.util.Collection)public boolean addAll(int index,
ByteList l)
AbstractByteList
This implementation delegates to the type-specific version of
List.addAll(int, Collection).
addAll in interface ByteListaddAll in class AbstractByteListList.add(int,Object)