public static class ByteLists.UnmodifiableList extends ByteCollections.UnmodifiableCollection implements ByteList, java.io.Serializable
Modifier and Type | Method and Description |
---|---|
void |
add(int i,
byte k) |
void |
add(int i,
java.lang.Byte k) |
boolean |
addAll(ByteList l) |
boolean |
addAll(int index,
ByteCollection c) |
boolean |
addAll(int index,
ByteList l) |
boolean |
addAll(int index,
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.
|
ByteListIterator |
byteListIterator()
Deprecated.
|
ByteListIterator |
byteListIterator(int i)
Deprecated.
|
ByteList |
byteSubList(int from,
int to)
Deprecated.
|
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 o) |
ByteListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
int |
lastIndexOf(byte k) |
int |
lastIndexOf(java.lang.Object o) |
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 i) |
byte |
removeByte(int i) |
void |
removeElements(int from,
int to)
Removes (hopefully quickly) elements of this type-specific list.
|
byte |
set(int i,
byte k) |
java.lang.Byte |
set(int index,
java.lang.Byte k) |
void |
size(int size)
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. |
add, add, addAll, addAll, byteIterator, clear, contains, contains, containsAll, containsAll, isEmpty, rem, remove, removeAll, removeAll, retainAll, retainAll, size, toArray, toArray, toArray, toByteArray, toByteArray, toString
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArray
addAll, byteIterator, contains, containsAll, rem, removeAll, retainAll, toArray, toArray, toByteArray, toByteArray
public byte getByte(int i)
public byte set(int i, byte k)
public void add(int i, byte k)
public byte removeByte(int i)
removeByte
in interface ByteList
List.remove(int)
public int indexOf(byte k)
public int lastIndexOf(byte k)
lastIndexOf
in interface ByteList
List.lastIndexOf(Object)
public boolean addAll(int index, java.util.Collection<? extends java.lang.Byte> c)
addAll
in interface java.util.List<java.lang.Byte>
public void getElements(int from, byte[] a, int offset, int length)
ByteList
getElements
in interface ByteList
from
- 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)
ByteList
removeElements
in interface ByteList
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(int index, byte[] a, int offset, int length)
ByteList
addElements
in interface ByteList
index
- 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)
ByteList
addElements
in interface ByteList
index
- the index at which to add elements.a
- the array containing the elements.public void size(int size)
ByteList
If the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null
/false
.
public ByteListIterator iterator()
ByteCollection
Note 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 ByteCollection
iterator
in interface ByteIterable
iterator
in interface ByteList
iterator
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.UnmodifiableCollection
public ByteListIterator listIterator()
ByteList
listIterator
in interface ByteList
listIterator
in interface java.util.List<java.lang.Byte>
List.listIterator()
public ByteListIterator listIterator(int i)
ByteList
listIterator
in interface ByteList
listIterator
in interface java.util.List<java.lang.Byte>
List.listIterator(int)
@Deprecated public ByteListIterator byteListIterator()
ByteList
byteListIterator
in interface ByteList
ByteList.listIterator()
@Deprecated public ByteListIterator byteListIterator(int i)
ByteList
byteListIterator
in interface ByteList
ByteList.listIterator(int)
public ByteList subList(int from, int to)
ByteList
from
, 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)
ByteList
from
, inclusive, to the index to
, exclusive.byteSubList
in interface ByteList
List.subList(int,int)
public 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 java.lang.Object
public int hashCode()
hashCode
in interface java.util.Collection<java.lang.Byte>
hashCode
in interface java.util.List<java.lang.Byte>
hashCode
in class java.lang.Object
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 boolean addAll(int index, ByteCollection c)
public boolean addAll(ByteList l)
public boolean addAll(int index, ByteList l)
public java.lang.Byte get(int i)
get
in interface java.util.List<java.lang.Byte>
public void add(int i, java.lang.Byte k)
add
in interface java.util.List<java.lang.Byte>
public java.lang.Byte set(int index, java.lang.Byte k)
set
in interface java.util.List<java.lang.Byte>
public java.lang.Byte remove(int i)
remove
in interface java.util.List<java.lang.Byte>
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List<java.lang.Byte>
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List<java.lang.Byte>