Package com.luciad.ais.util
Class TLcdIntBuffer
java.lang.Object
com.luciad.ais.util.TLcdIntBuffer
-
Constructor Summary
ConstructorDescriptionCreates a newExtendableIntArray
that is able to contain INITIAL_CAPACITY number of integers.TLcdIntBuffer
(int aInitialCapacity) Creates a newExtendableIntArray
that is able to contain aInitialCapacity number of integers.TLcdIntBuffer
(TLcdIntBuffer aIntBuffer) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int aValue) Adds an element to the array of integers.void
add
(int aIndex, int aValue) Inserts the specified value at the specified position.clone()
int
find
(int aNumber) Returns the position of aNumber in this extendable array.int
getNumber
(int aIndex) Returns the integer at position aIndex.int
Returns the number of integers in the array.boolean
remove
(int aValue) void
void
set
(int aIndex, int aValue) Replaces the element at the specified position with the specified value.
-
Constructor Details
-
TLcdIntBuffer
public TLcdIntBuffer()Creates a newExtendableIntArray
that is able to contain INITIAL_CAPACITY number of integers. -
TLcdIntBuffer
public TLcdIntBuffer(int aInitialCapacity) Creates a newExtendableIntArray
that is able to contain aInitialCapacity number of integers.- Parameters:
aInitialCapacity
-
-
TLcdIntBuffer
Copy constructor.- Parameters:
aIntBuffer
- the intBuffer to be copied into a new object
-
-
Method Details
-
add
public void add(int aValue) Adds an element to the array of integers. If there are no free places, the array's sizes is multiplied by GROWTH_FACTOR. -
add
public void add(int aIndex, int aValue) Inserts the specified value at the specified position. Shifts the value currently at that position and all subsequent values (if any) to the right. -
set
public void set(int aIndex, int aValue) Replaces the element at the specified position with the specified value. -
find
public int find(int aNumber) Returns the position of aNumber in this extendable array. A binary search algorithm is used to find the number. If the number is not found, the returned position indicates were to insert aNumber. -
getNumberCount
public int getNumberCount()Returns the number of integers in the array. -
getNumber
public int getNumber(int aIndex) Returns the integer at position aIndex. -
remove
public boolean remove(int aValue) -
removeAll
public void removeAll() -
clone
-