public class ShortList extends PrimitiveList
| Constructor and Description | 
|---|
ShortList()
Constructs a new list. 
 | 
ShortList(int size)
Constructs a new list with a given initial capacity. 
 | 
ShortList(short[] array)
Constructs a new list initialised to the contents of a given array. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
add(short value)
Appends a value to the end of this list. 
 | 
boolean | 
addAll(short[] array)
Appends all the elements of a primitive array to this list. 
 | 
boolean | 
addAll(ShortList other)
Appends all the elements of a second list to this list. 
 | 
short | 
get(int i)
Returns the element at a given position. 
 | 
short[] | 
getShortBuffer()
Returns the array currently used to store the contents of this list. 
 | 
void | 
set(int i,
   short value)
Sets the element at a given position. 
 | 
short[] | 
toShortArray()
Returns the contents of this list as an array. 
 | 
clear, nextCapacity, size, toArraypublic ShortList()
public ShortList(int size)
size - initial capacitypublic ShortList(short[] array)
array - array whose contents form initial contents of listpublic short get(int i)
i - indexipublic void set(int i,
                short value)
i - indexvalue - new value for element ipublic void add(short value)
value - value to appendpublic boolean addAll(ShortList other)
other - other listpublic boolean addAll(short[] array)
array - array to appendpublic short[] toShortArray()
public short[] getShortBuffer()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.