public static class ByteLists.EmptyList extends ByteCollections.EmptyCollection implements ByteList, java.io.Serializable, java.lang.Cloneable
This class may be useful to implement your own in case you subclass a type-specific list.
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(byte k) |
boolean |
add(java.lang.Byte k)
Delegates to the corresponding type-specific method.
|
void |
add(int index,
byte k) |
void |
add(int index,
java.lang.Byte k) |
boolean |
addAll(ByteCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(ByteList c) |
boolean |
addAll(java.util.Collection<? extends java.lang.Byte> c)
Adds all elements of the given collection to this collection.
|
boolean |
addAll(int i,
ByteCollection c) |
boolean |
addAll(int i,
ByteList c) |
boolean |
addAll(int i,
java.util.Collection<? extends java.lang.Byte> c) |
void |
addElements(int index,
byte[] a)
Add (hopefully quickly) elements to this type-specific list.
|
void |
addElements(int index,
byte[] a,
int offset,
int length)
Add (hopefully quickly) elements to this type-specific list.
|
ByteIterator |
byteIterator()
Deprecated.
|
ByteListIterator |
byteListIterator()
Deprecated.
|
ByteListIterator |
byteListIterator(int i)
Deprecated.
|
ByteList |
byteSubList(int from,
int to)
Deprecated.
|
java.lang.Object |
clone() |
int |
compareTo(java.util.List<? extends java.lang.Byte> o) |
boolean |
equals(java.lang.Object o) |
java.lang.Byte |
get(int i) |
byte |
getByte(int i) |
void |
getElements(int from,
byte[] a,
int offset,
int length)
Copies (hopefully quickly) elements of this type-specific list into the given array.
|
int |
hashCode() |
int |
indexOf(byte k) |
int |
indexOf(java.lang.Object k) |
ByteListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
int |
lastIndexOf(byte k) |
int |
lastIndexOf(java.lang.Object k) |
ByteListIterator |
listIterator()
Returns a type-specific list iterator on the list.
|
ByteListIterator |
listIterator(int i)
Returns a type-specific list iterator on the list starting at a given index.
|
java.lang.Byte |
remove(int k) |
boolean |
removeAll(java.util.Collection<?> c)
Remove from this collection all elements in the given collection.
|
byte |
removeByte(int i) |
void |
removeElements(int from,
int to)
Removes (hopefully quickly) elements of this type-specific list.
|
byte |
set(int index,
byte k) |
java.lang.Byte |
set(int index,
java.lang.Byte k) |
void |
size(int s)
Sets the size of this list.
|
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. |
java.lang.String |
toString() |
clear, contains, containsAll, rem, removeAll, retainAll, size, toArray, toByteArray, toByteArraycontains, containsAll, isEmpty, rem, remove, retainAll, toArray, toArrayclear, contains, containsAll, isEmpty, remove, replaceAll, retainAll, size, sort, spliterator, toArray, toArraycontains, containsAll, rem, removeAll, retainAll, toArray, toArray, toByteArray, toByteArraypublic void add(int index,
byte k)
public boolean add(byte k)
add in interface ByteCollectionadd in interface ByteListadd in class ByteCollections.EmptyCollectionCollection.add(Object)public byte removeByte(int i)
removeByte in interface ByteListList.remove(int)public byte set(int index,
byte k)
public int indexOf(byte k)
public int lastIndexOf(byte k)
lastIndexOf in interface ByteListList.lastIndexOf(Object)public boolean addAll(java.util.Collection<? extends java.lang.Byte> c)
AbstractByteCollectionaddAll in interface java.util.Collection<java.lang.Byte>addAll in interface java.util.List<java.lang.Byte>addAll in class AbstractByteCollectionc - a collection.true if this collection changed as a result of the call.public boolean addAll(int i,
java.util.Collection<? extends java.lang.Byte> c)
addAll in interface java.util.List<java.lang.Byte>public boolean removeAll(java.util.Collection<?> c)
AbstractByteCollectionremoveAll in interface java.util.Collection<java.lang.Byte>removeAll in interface java.util.List<java.lang.Byte>removeAll in class AbstractByteCollectionc - a collection.true if this collection changed as a result of the call.public java.lang.Byte get(int i)
get in interface java.util.List<java.lang.Byte>public boolean addAll(ByteCollection c)
AbstractByteCollectionaddAll in interface ByteCollectionaddAll in class ByteCollections.EmptyCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean addAll(ByteList c)
public boolean addAll(int i,
ByteCollection c)
public boolean addAll(int i,
ByteList c)
public void add(int index,
java.lang.Byte k)
add in interface java.util.List<java.lang.Byte>public boolean add(java.lang.Byte k)
AbstractByteCollectionadd in interface java.util.Collection<java.lang.Byte>add in interface java.util.List<java.lang.Byte>add in class AbstractByteCollectionpublic java.lang.Byte set(int index,
java.lang.Byte k)
set in interface java.util.List<java.lang.Byte>public byte getByte(int i)
public java.lang.Byte remove(int k)
remove in interface java.util.List<java.lang.Byte>public int indexOf(java.lang.Object k)
indexOf in interface java.util.List<java.lang.Byte>public int lastIndexOf(java.lang.Object k)
lastIndexOf in interface java.util.List<java.lang.Byte>@Deprecated public ByteIterator byteIterator()
AbstractByteCollectionbyteIterator in interface ByteCollectionbyteIterator in class AbstractByteCollectionByteCollection.iterator()public ByteListIterator listIterator()
ByteListlistIterator in interface ByteListlistIterator in interface java.util.List<java.lang.Byte>List.listIterator()public ByteListIterator iterator()
ByteCollectionNote that this specification strengthens the one given in
Iterable.iterator(), which was already
strengthened in the corresponding type-specific class,
but was weakened by the fact that this interface extends Collection.
iterator in interface ByteCollectioniterator in interface ByteIterableiterator in interface ByteListiterator in interface java.lang.Iterable<java.lang.Byte>iterator in interface java.util.Collection<java.lang.Byte>iterator in interface java.util.List<java.lang.Byte>iterator in class ByteCollections.EmptyCollectionpublic ByteListIterator listIterator(int i)
ByteListlistIterator in interface ByteListlistIterator in interface java.util.List<java.lang.Byte>List.listIterator(int)@Deprecated public ByteListIterator byteListIterator()
ByteListbyteListIterator in interface ByteListByteList.listIterator()@Deprecated public ByteListIterator byteListIterator(int i)
ByteListbyteListIterator in interface ByteListByteList.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).
@Deprecated public ByteList byteSubList(int from, int to)
ByteListfrom, inclusive, to the index to, exclusive.byteSubList in interface ByteListList.subList(int,int)public void getElements(int from,
byte[] a,
int offset,
int length)
ByteListgetElements in interface ByteListfrom - 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)
ByteListremoveElements in interface ByteListfrom - the start index (inclusive).to - the end index (exclusive).public void addElements(int index,
byte[] a,
int offset,
int length)
ByteListaddElements in interface ByteListindex - 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 void addElements(int index,
byte[] a)
ByteListaddElements in interface ByteListindex - the index at which to add elements.a - the array containing the elements.public void size(int s)
ByteListIf the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null/false.
public int compareTo(java.util.List<? extends java.lang.Byte> o)
compareTo in interface java.lang.Comparable<java.util.List<? extends java.lang.Byte>>public java.lang.Object clone()
clone in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Collection<java.lang.Byte>hashCode in interface java.util.List<java.lang.Byte>hashCode in class ByteCollections.EmptyCollectionpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collection<java.lang.Byte>equals in interface java.util.List<java.lang.Byte>equals in class ByteCollections.EmptyCollectionpublic java.lang.String toString()
toString in class AbstractByteCollection