Package skyview.util
Class SmartIntArray
java.lang.Object
skyview.util.SmartIntArray
this class allows you to build an array as you go.
-
Constructor Summary
ConstructorsConstructorDescriptionSmartIntArray
(int initialSize) SmartIntArray
(int initialSize, int growthSize) -
Method Summary
-
Constructor Details
-
SmartIntArray
public SmartIntArray() -
SmartIntArray
public SmartIntArray(int initialSize) -
SmartIntArray
public SmartIntArray(int initialSize, int growthSize)
-
-
Method Details
-
add
public void add(int i) add element (integer) to array , check size and increase it if necessary- Parameters:
i
- integer to add to array
-
toArray
public int[] toArray()trim array before return- Returns:
- trimmed array of integers
-