|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.starlink.util.PrimitiveList
uk.ac.starlink.util.IntList
public class IntList
Extendable array of integers.
| Constructor Summary | |
|---|---|
IntList()
Constructs a new list. |
|
IntList(int size)
Constructs a new list with a given initial capacity. |
|
IntList(int[] array)
Constructs a new list initialised to the contents of a given array. |
|
| Method Summary | |
|---|---|
void |
add(int value)
Appends a value to the end of this list. |
int |
get(int i)
Returns the element at a given position. |
void |
set(int i,
int value)
Sets the element at a given position. |
int[] |
toIntArray()
Returns the contents of this list as an array. |
| Methods inherited from class uk.ac.starlink.util.PrimitiveList |
|---|
nextCapacity, size, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntList()
public IntList(int size)
size - initial capacitypublic IntList(int[] array)
array - array whose contents form initial contents of list| Method Detail |
|---|
public int get(int i)
i - index
i
public void set(int i,
int value)
i - indexvalue - new value for element ipublic void add(int value)
value - value to appendpublic int[] toIntArray()
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||