Package com.luciad.ais.util
Class TLcdIntBuffer
java.lang.Object
com.luciad.ais.util.TLcdIntBuffer
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newExtendableIntArraythat is able to contain INITIAL_CAPACITY number of integers.TLcdIntBuffer(int aInitialCapacity) Creates a newExtendableIntArraythat is able to contain aInitialCapacity number of integers.TLcdIntBuffer(TLcdIntBuffer aIntBuffer) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int aValue) Adds an element to the array of integers.voidadd(int aIndex, int aValue) Inserts the specified value at the specified position.clone()intfind(int aNumber) Returns the position of aNumber in this extendable array.intgetNumber(int aIndex) Returns the integer at position aIndex.intReturns the number of integers in the array.booleanremove(int aValue) voidvoidset(int aIndex, int aValue) Replaces the element at the specified position with the specified value.
-
Constructor Details
-
TLcdIntBuffer
public TLcdIntBuffer()Creates a newExtendableIntArraythat is able to contain INITIAL_CAPACITY number of integers. -
TLcdIntBuffer
public TLcdIntBuffer(int aInitialCapacity) Creates a newExtendableIntArraythat 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
-