ariba.ui.aribaweb.util
Class AWArrayManager
java.lang.Object
ariba.ui.aribaweb.util.AWBaseObject
ariba.ui.aribaweb.util.AWArrayManager
- All Implemented Interfaces:
- AWObject
public final class AWArrayManager
- extends AWBaseObject
This class manages a one-dimensional java array and allows for easily adding to the
array by managing resizing and by keeping track of how many elements are in the
array. Any type of array can be managed, not just Object[] types.
| Fields inherited from class ariba.ui.aribaweb.util.AWBaseObject |
AribaHashtableClass, AribaVectorClass, ClassClass, EmptyHashtable, EmptyMap, EmptyVector, False, IntegerClass, JavaHashtableClass, JavaMapClass, JavaVectorClass, LogHandling, NullObject, ObjectClass, StringClass, True, UndefinedObject, UndefinedString, UninitializedRealNumber |
AWArrayManager
public AWArrayManager(Object array,
int currentSize)
AWArrayManager
public AWArrayManager(Class componentType,
int capacity)
AWArrayManager
public AWArrayManager(Class componentType)
array
public Object array()
intArray
public int[] intArray()
componentType
public Class componentType()
capacity
public int capacity()
size
public int size()
clear
public void clear()
reset
public void reset()
- Use this instead of clear() when it doesn't matter if the contents are cleared out.
addElement
public void addElement(Object value)
addElement
public void addElement(boolean value)
addElement
public void addElement(byte value)
addElement
public void addElement(char value)
addElement
public void addElement(double value)
addElement
public void addElement(float value)
addElement
public void addElement(int value)
addElement
public void addElement(long value)
addElement
public void addElement(short value)
insertElementAt
public void insertElementAt(int index,
Object object)
insertElementAt
public void insertElementAt(int index,
int intValue)
- Replaces the existing value at index with intValue. Does NOT attempt to scoot
things down. This may need to change in the future as this naming is a bit
misleading.
- Parameters:
intValue - index -
objectAt
public Object objectAt(int index)
intAt
public int intAt(int index)
isEmpty
public boolean isEmpty()
removeAllElements
public void removeAllElements()
- Resets the size without decreasing the capacity
If the componentType is Object or subclass, then
sets all slots to null, otherwise leaves slots
with existing values.
objectArray
public Object[] objectArray()
lastElement
public Object lastElement()
removeLastElement
public Object removeLastElement()
lastInt
public int lastInt()
lastByte
public byte lastByte()
removeLastInt
public int removeLastInt()
removeLast
public void removeLast()
- Note: does NOT clear the value of the last element -- simply reduces the size.
printf
public void printf(PrintStream printStream)
toString
public String toString()
- Overrides:
toString in class Object
trimmedArrayCopy
public Object trimmedArrayCopy()
AribaWeb User Interface Development Framework
Copyright © 2000-2009 Ariba, Inc. All Rights Reserved.