Package zombie.util.list
Class IntArrayList
java.lang.Object
zombie.util.AbstractIntCollection
zombie.util.list.AbstractIntList
zombie.util.list.IntArrayList
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,IntCollection
,IntList
public class IntArrayList extends AbstractIntList implements java.lang.Cloneable, java.io.Serializable
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_CAPACITY
static int
DEFAULT_GROWTH_CHUNK
static double
DEFAULT_GROWTH_FACTOR
-
Constructor Summary
Constructors Constructor Description IntArrayList()
IntArrayList(int capacity)
IntArrayList(int[] a)
IntArrayList(int capacity, double growthFactor)
IntArrayList(int capacity, int growthChunk)
IntArrayList(IntCollection c)
-
Method Summary
Modifier and Type Method Description void
add(int index, int v)
int
capacity()
void
clear()
java.lang.Object
clone()
boolean
contains(int v)
int
ensureCapacity(int capacity)
boolean
equals(java.lang.Object obj)
int
get(int index)
int
hashCode()
int
indexOf(int c)
int
indexOf(int index, int c)
boolean
isEmpty()
int
lastIndexOf(int c)
boolean
remove(int v)
int
removeElementAt(int index)
int
set(int index, int v)
int
size()
int[]
toArray()
int[]
toArray(int[] a)
void
trimToSize()
Methods inherited from class zombie.util.list.AbstractIntList
add, addAll, iterator, lastIndexOf, listIterator, listIterator
Methods inherited from class zombie.util.AbstractIntCollection
addAll, containsAll, removeAll, retainAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface zombie.util.IntCollection
addAll, containsAll, removeAll, retainAll
-
Field Details
-
DEFAULT_GROWTH_FACTOR
public static final double DEFAULT_GROWTH_FACTOR- See Also:
- Constant Field Values
-
DEFAULT_GROWTH_CHUNK
public static final int DEFAULT_GROWTH_CHUNK- See Also:
- Constant Field Values
-
DEFAULT_CAPACITY
public static final int DEFAULT_CAPACITY- See Also:
- Constant Field Values
-
-
Constructor Details
-
IntArrayList
public IntArrayList() -
IntArrayList
-
IntArrayList
public IntArrayList(int[] a) -
IntArrayList
public IntArrayList(int capacity) -
IntArrayList
public IntArrayList(int capacity, double growthFactor) -
IntArrayList
public IntArrayList(int capacity, int growthChunk)
-
-
Method Details
-
ensureCapacity
public int ensureCapacity(int capacity) -
capacity
public int capacity() -
add
public void add(int index, int v)- Specified by:
add
in interfaceIntList
- Overrides:
add
in classAbstractIntList
-
get
public int get(int index) -
set
public int set(int index, int v) -
removeElementAt
public int removeElementAt(int index)- Specified by:
removeElementAt
in interfaceIntList
- Overrides:
removeElementAt
in classAbstractIntList
-
trimToSize
public void trimToSize()- Specified by:
trimToSize
in interfaceIntCollection
- Overrides:
trimToSize
in classAbstractIntCollection
-
clone
public java.lang.Object clone()- Overrides:
clone
in classjava.lang.Object
-
size
public int size()- Specified by:
size
in interfaceIntCollection
- Overrides:
size
in classAbstractIntCollection
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceIntCollection
- Overrides:
isEmpty
in classAbstractIntCollection
-
clear
public void clear()- Specified by:
clear
in interfaceIntCollection
- Overrides:
clear
in classAbstractIntCollection
-
contains
public boolean contains(int v)- Specified by:
contains
in interfaceIntCollection
- Overrides:
contains
in classAbstractIntCollection
-
indexOf
public int indexOf(int c)- Specified by:
indexOf
in interfaceIntList
- Overrides:
indexOf
in classAbstractIntList
-
indexOf
public int indexOf(int index, int c)- Specified by:
indexOf
in interfaceIntList
- Overrides:
indexOf
in classAbstractIntList
-
lastIndexOf
public int lastIndexOf(int c)- Specified by:
lastIndexOf
in interfaceIntList
- Overrides:
lastIndexOf
in classAbstractIntList
-
remove
public boolean remove(int v)- Specified by:
remove
in interfaceIntCollection
- Overrides:
remove
in classAbstractIntCollection
-
toArray
public int[] toArray()- Specified by:
toArray
in interfaceIntCollection
- Overrides:
toArray
in classAbstractIntCollection
-
toArray
public int[] toArray(int[] a)- Specified by:
toArray
in interfaceIntCollection
- Overrides:
toArray
in classAbstractIntCollection
-
equals
public boolean equals(java.lang.Object obj)- Specified by:
equals
in interfaceIntCollection
- Overrides:
equals
in classAbstractIntList
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceIntCollection
- Overrides:
hashCode
in classAbstractIntList
-