public static class AbstractByteList.ByteSubList extends AbstractByteList implements Serializable
AbstractByteList.ByteSubList| Constructor and Description |
|---|
ByteSubList(ByteList l,
int from,
int to) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(byte k) |
void |
add(int index,
byte k) |
boolean |
addAll(int index,
ByteCollection c)
Delegates to a more generic method.
|
boolean |
addAll(int index,
ByteList l)
Delegates to a more generic method.
|
boolean |
addAll(int index,
Collection<? extends Byte> c) |
void |
addElements(int index,
byte[] a,
int offset,
int length)
Adds elements to this type-specific list one-by-one.
|
void |
clear() |
byte |
getByte(int index) |
void |
getElements(int from,
byte[] a,
int offset,
int length)
Copies element of this type-specific list into the given array one-by-one.
|
ByteListIterator |
listIterator(int index)
Returns a type-specific list iterator on the list starting at a given index.
|
boolean |
rem(byte k)
|
boolean |
remove(Object o)
Delegates to
rem(). |
byte |
removeByte(int index) |
void |
removeElements(int from,
int to)
Removes elements of this type-specific list one-by-one.
|
byte |
set(int index,
byte k) |
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, addAll, addAll, addAll, addElements, byteListIterator, byteListIterator, byteSubList, compareTo, contains, equals, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekByte, pop, popByte, push, push, remove, set, size, top, topByte, toStringadd, byteIterator, contains, containsAll, containsAll, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toByteArray, toByteArrayadd, contains, containsAll, isEmpty, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArraybyteIterator, containsAll, removeAll, retainAll, toArray, toArray, toByteArray, toByteArrayparallelStream, removeIf, streampublic ByteSubList(ByteList l, int from, int to)
public boolean add(byte k)
add in interface ByteCollectionadd in interface ByteListadd in class AbstractByteListCollection.add(Object)public void add(int index,
byte k)
add in interface ByteListadd in class AbstractByteListList.add(int,Object)public boolean addAll(int index,
Collection<? extends Byte> c)
addAll in interface List<Byte>addAll in class AbstractByteListpublic byte getByte(int index)
getByte in interface ByteListList.get(int)public byte removeByte(int index)
removeByte in interface ByteListremoveByte in class AbstractByteListList.remove(int)public byte set(int index,
byte k)
set in interface ByteListset in class AbstractByteListList.set(int,Object)public void clear()
clear in interface Collection<Byte>clear in interface List<Byte>clear in class AbstractCollection<Byte>public int size()
size in interface Collection<Byte>size in interface List<Byte>size in class AbstractCollection<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)
ByteListlistIterator in interface ByteListlistIterator in interface List<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 List<Byte>subList in class AbstractByteListList.subList(int,int)public boolean rem(byte k)
ByteCollectionremove(), but the clash with the similarly named index-based method in the List interface
forces us to use a distinguished name. For simplicity, the set interfaces reinstates remove().rem in interface ByteCollectionrem in class AbstractByteListCollection.remove(Object)public boolean remove(Object o)
AbstractByteListrem().remove in interface Collection<Byte>remove in interface List<Byte>remove in class AbstractByteListpublic boolean addAll(int index,
ByteCollection c)
AbstractByteListaddAll in interface ByteListaddAll in class AbstractByteListList.add(int,Object)public boolean addAll(int index,
ByteList l)
AbstractByteListaddAll in interface ByteListaddAll in class AbstractByteListList.add(int,Object)