|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A type-specific List
; provides some additional methods that use polymorphism to reduce type juggling.
List
Method Summary | |
void |
getElements(int from,
Object[] a,
int offset,
int length)
Copies (hopefully quickly) elements of this type-specific list into the given array. |
ObjectListIterator |
objectListIterator()
Returns a type-specific list iterator on the list. |
ObjectListIterator |
objectListIterator(int index)
Returns a type-specific list iterator on the list starting at a given index. |
ReferenceList |
referenceSubList(int from,
int to)
|
void |
removeElements(int from,
int to)
Removes (hopefully quickly) elements of this type-specific list. |
void |
size(int size)
Sets the size of this list. |
Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
Methods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceCollection |
objectIterator |
Method Detail |
public ObjectListIterator objectListIterator()
The iterator returned by the List.listIterator()
method and by this
method are identical; however, using this method you can save a type casting.
List.listIterator()
public ObjectListIterator objectListIterator(int index)
The iterator returned by the List.listIterator()
method and by this
method are identical; however, using this method you can save a type casting.
List.listIterator(int)
public ReferenceList referenceSubList(int from, int to)
List.subList(int,int)
public void size(int size)
If the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null
/false
.
size
- the new size.public void getElements(int from, Object[] a, int offset, int length)
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)
from
- the start index (inclusive).to
- the end index (exclusive).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |