Package org.lionsoul.jcseg.util
Class IntArrayList
- java.lang.Object
-
- org.lionsoul.jcseg.util.IntArrayList
-
public class IntArrayList extends Object
array list for basic int data type to instead of ArrayList Well, this will save a lot work to Reopened and Unpacking- Author:
- chenxin
-
-
Constructor Summary
Constructors Constructor Description IntArrayList()IntArrayList(int opacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int val)Append a new Integer to the end.voidclear()intget(int idx)voidremove(int idx)remove the element at the specified position use System.arraycopy instead of a loop may be more efficientvoidset(int idx, int val)intsize()
-
-
-
Method Detail
-
add
public void add(int val)
Append a new Integer to the end.- Parameters:
val-
-
get
public int get(int idx)
-
set
public void set(int idx, int val)
-
remove
public void remove(int idx)
remove the element at the specified position use System.arraycopy instead of a loop may be more efficient- Parameters:
idx-
-
size
public int size()
-
clear
public void clear()
-
-