cc.redberry.core.utils
Class IntArrayList
- java.lang.Object
-
- cc.redberry.core.utils.IntArrayList
-
public final class IntArrayList extends java.lang.ObjectArray list of primitive integers.
-
-
Constructor Summary
Constructors Constructor and Description IntArrayList()IntArrayList(int initialCapacity)IntArrayList(int[] data)IntArrayList(IntArrayList list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(int num)voidadd(int[] src, int fromIndex, int lenght)Copies an array from the specified source array, beginning at the specified position.voidadd(int position, int num)voidaddAll(int[] arr)voidaddAll(IntArray intArray)voidaddAll(IntArrayList intArrayList)voidclear()IntArrayListclone()booleancontains(int value)voidensureCapacity(int minCapacity)booleanequals(java.lang.Object obj)intget(int i)inthashCode()intindexOf(int value)booleanisEmpty()intpeek()Return last element leaving it in stack.intpop()Removes the object at the top of this stack and returns that object as the value of this function.voidpush(int value)Alias for addAll(int) method.intremove(int index)voidremoveAfter(int point)booleanremoveAll(int[] c)booleanremoveAll(int[] c, int cbegin, int cend)booleanremoveAll(IntArrayList c)booleanremoveAll(IntArrayList c, int cbegin, int cend)booleanremoveElement(int element)booleanreplaceAll(int from, int to)booleanreplaceFirst(int from, int to)voidset(int position, int num)intsize()voidsort()voidsort(IntArrayList cosort)int[]toArray()java.lang.StringtoString()
-
-
-
Constructor Detail
-
IntArrayList
public IntArrayList()
-
IntArrayList
public IntArrayList(int initialCapacity)
-
IntArrayList
public IntArrayList(IntArrayList list)
-
IntArrayList
public IntArrayList(int[] data)
-
-
Method Detail
-
clear
public void clear()
-
ensureCapacity
public void ensureCapacity(int minCapacity)
-
add
public void add(int num)
-
add
public void add(int position, int num)
-
addAll
public void addAll(int[] arr)
-
addAll
public void addAll(IntArray intArray)
-
addAll
public void addAll(IntArrayList intArrayList)
-
set
public void set(int position, int num)
-
sort
public void sort()
-
sort
public void sort(IntArrayList cosort)
-
push
public void push(int value)
Alias for addAll(int) method.- Parameters:
value-
-
peek
public int peek()
Return last element leaving it in stack.- Returns:
- last element leaving it in stack
-
pop
public int pop()
Removes the object at the top of this stack and returns that object as the value of this function.- Returns:
- pop
-
add
public void add(int[] src, int fromIndex, int lenght)Copies an array from the specified source array, beginning at the specified position. The number of components copied is equal to the length argument.- Parameters:
src- - the source array.fromIndex- - starting position in the source array.lenght- - the number of array elements to be copied.
-
get
public int get(int i)
-
replaceFirst
public boolean replaceFirst(int from, int to)
-
replaceAll
public boolean replaceAll(int from, int to)
-
toArray
public int[] toArray()
-
size
public int size()
-
contains
public boolean contains(int value)
-
removeAfter
public void removeAfter(int point)
-
remove
public int remove(int index)
-
removeElement
public boolean removeElement(int element)
-
removeAll
public boolean removeAll(IntArrayList c)
-
removeAll
public boolean removeAll(IntArrayList c, int cbegin, int cend)
-
removeAll
public boolean removeAll(int[] c)
-
removeAll
public boolean removeAll(int[] c, int cbegin, int cend)
-
indexOf
public int indexOf(int value)
-
isEmpty
public boolean isEmpty()
-
clone
public IntArrayList clone()
- Overrides:
clonein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG