public class JavaLightArrayInt extends Object implements LightArrayInt
LightArrayInt
Constructor and Description |
---|
JavaLightArrayInt()
Construct a
JavaLightArray |
Modifier and Type | Method and Description |
---|---|
int |
get(int index)
get the object at a specific index
|
int |
length()
the length of the array
|
void |
push(int value)
push a value on to the array
|
void |
set(int index,
int value)
put an object to a given index. the array autoexpands and fills up missing values with null
|
int |
shift()
pop a value from the array
|
void |
unshift(int value)
push a value onto the array
|
public JavaLightArrayInt()
JavaLightArray
public int get(int index)
LightArrayInt
get
in interface LightArrayInt
index
- the indexpublic int length()
LightArrayInt
length
in interface LightArrayInt
public void push(int value)
LightArrayInt
push
in interface LightArrayInt
public void set(int index, int value)
LightArrayInt
set
in interface LightArrayInt
index
- the indexvalue
- the value to storepublic int shift()
LightArrayInt
shift
in interface LightArrayInt
public void unshift(int value)
LightArrayInt
unshift
in interface LightArrayInt
value
- to pushCopyright © 2016 Magnolia International Ltd.. All rights reserved.