|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.bytes.AbstractByteCollection
it.unimi.dsi.fastutil.bytes.ByteCollections.EmptyCollection
it.unimi.dsi.fastutil.bytes.ByteLists.EmptyList
public static class ByteLists.EmptyList
An immutable class representing an empty type-specific list.
This class may be useful to implement your own in case you subclass a type-specific list.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Method Summary | |
---|---|
boolean |
add(byte k)
|
boolean |
add(Byte k)
Delegates to the corresponding type-specific method. |
void |
add(int index,
byte k)
|
void |
add(int index,
Byte k)
|
boolean |
addAll(ByteCollection c)
Adds all elements of the given type-specific collection to this collection. |
boolean |
addAll(ByteList c)
|
boolean |
addAll(Collection<? extends 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,
Collection<? extends 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. |
Object |
clone()
|
int |
compareTo(List<? extends Byte> o)
|
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 |
indexOf(byte k)
|
int |
indexOf(Object k)
|
int |
lastIndexOf(byte k)
|
int |
lastIndexOf(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. |
Byte |
remove(int k)
|
boolean |
removeAll(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)
|
Byte |
set(int index,
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. |
Methods inherited from class it.unimi.dsi.fastutil.bytes.ByteCollections.EmptyCollection |
---|
clear, contains, containsAll, equals, hashCode, iterator, rem, removeAll, retainAll, size, toArray, toByteArray, toByteArray |
Methods inherited from class it.unimi.dsi.fastutil.bytes.AbstractByteCollection |
---|
contains, containsAll, isEmpty, rem, remove, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface it.unimi.dsi.fastutil.bytes.ByteList |
---|
iterator |
Methods inherited from interface java.util.List |
---|
clear, contains, containsAll, equals, hashCode, isEmpty, remove, retainAll, size, toArray, toArray |
Methods inherited from interface it.unimi.dsi.fastutil.bytes.ByteCollection |
---|
contains, containsAll, rem, removeAll, retainAll, toArray, toArray, toByteArray, toByteArray |
Field Detail |
---|
public static final long serialVersionUID
Method Detail |
---|
public void add(int index, byte k)
add
in interface ByteList
List.add(int,Object)
public boolean add(byte k)
add
in interface ByteCollection
add
in class ByteCollections.EmptyCollection
Collection.add(Object)
public byte removeByte(int i)
removeByte
in interface ByteList
List.remove(int)
public byte set(int index, byte k)
set
in interface ByteList
List.set(int,Object)
public int indexOf(byte k)
indexOf
in interface ByteList
List.indexOf(Object)
public int lastIndexOf(byte k)
lastIndexOf
in interface ByteList
List.lastIndexOf(Object)
public boolean addAll(Collection<? extends Byte> c)
AbstractByteCollection
addAll
in interface Collection<Byte>
addAll
in interface List<Byte>
addAll
in class AbstractByteCollection
c
- a collection.
true
if this collection changed as a result of the call.public boolean addAll(int i, Collection<? extends Byte> c)
addAll
in interface List<Byte>
public boolean removeAll(Collection<?> c)
AbstractByteCollection
removeAll
in interface Collection<Byte>
removeAll
in interface List<Byte>
removeAll
in class AbstractByteCollection
c
- a collection.
true
if this collection changed as a result of the call.public Byte get(int i)
get
in interface List<Byte>
public boolean addAll(ByteCollection c)
AbstractByteCollection
addAll
in interface ByteCollection
addAll
in class ByteCollections.EmptyCollection
c
- a type-specific collection.
true
if this collection changed as a result of the call.Collection.addAll(Collection)
public boolean addAll(ByteList c)
addAll
in interface ByteList
List.add(int,Object)
public boolean addAll(int i, ByteCollection c)
addAll
in interface ByteList
List.add(int,Object)
public boolean addAll(int i, ByteList c)
addAll
in interface ByteList
List.add(int,Object)
public void add(int index, Byte k)
add
in interface List<Byte>
public boolean add(Byte k)
AbstractByteCollection
add
in interface Collection<Byte>
add
in interface List<Byte>
add
in class AbstractByteCollection
public Byte set(int index, Byte k)
set
in interface List<Byte>
public byte getByte(int i)
getByte
in interface ByteList
List.get(int)
public Byte remove(int k)
remove
in interface List<Byte>
public int indexOf(Object k)
indexOf
in interface List<Byte>
public int lastIndexOf(Object k)
lastIndexOf
in interface List<Byte>
@Deprecated public ByteIterator byteIterator()
AbstractByteCollection
byteIterator
in interface ByteCollection
byteIterator
in class AbstractByteCollection
ByteCollection.iterator()
public ByteListIterator listIterator()
ByteList
listIterator
in interface ByteList
listIterator
in interface List<Byte>
ByteList.listIterator()
public ByteListIterator listIterator(int i)
ByteList
listIterator
in interface ByteList
listIterator
in interface List<Byte>
ByteList.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)
.
subList
in interface ByteList
subList
in interface List<Byte>
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 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 s)
ByteList
If the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null
/false
.
size
in interface ByteList
s
- the new size.public int compareTo(List<? extends Byte> o)
compareTo
in interface Comparable<List<? extends Byte>>
public Object clone()
clone
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |