public interface DriveElementArray extends DriveElement
| Modifier and Type | Method and Description |
|---|---|
void |
addObject(DriveElement element)
Adds an element to the end of the array
|
void |
addObject(int num,
DriveElement element)
Writes an element to the list
|
void |
addPrimitive(int num,
Object object)
Writes an primitive element to the list
|
void |
addPrimitive(Object object)
Adds an primitive element to the end of the array
|
DriveElement |
get(int num)
Retrieves an item from the list
|
DriveObject |
getAsObject(int num)
Retrieves an item from the list
|
<T> List<T> |
getAsTypedList(Class<T> clazz)
Returns this object converted to an object of the specified type
|
List<DriveElement> |
getContents()
Returns all contents as a mutable list
|
getAsBoolean, getAsChar, getAsDouble, getAsElement, getAsElementArray, getAsFloat, getAsInt, getAsLong, getAsObject, getAsShort, getAsString, getPrimitiveValue, getSubComponentsDriveElement get(int num)
num - used to identify an itemDriveObject getAsObject(int num)
num - used to identify an itemvoid addObject(int num,
DriveElement element)
throws ObjectReadOnlyException
num - position to insert atelement - element to storeObjectReadOnlyException - thrown if this object does not support writingvoid addPrimitive(int num,
Object object)
throws ObjectReadOnlyException,
NotAPrimitiveTypeException
num - position to insert atobject - primitive type objectNotAPrimitiveTypeException - thrown if object parameter is not a primitive typeObjectReadOnlyException - thrown if this object does not support writing<T> List<T> getAsTypedList(Class<T> clazz) throws ClassCastException
T - type to convert object toclazz - type to convert object toClassCastException - thrown if this object can not be converted into the specified object.List<DriveElement> getContents()
void addObject(DriveElement element)
element - element to be addedvoid addPrimitive(Object object) throws NotAPrimitiveTypeException
object - element to be addedNotAPrimitiveTypeException - thrown if object parameter is not a primitive typeCopyright © 2019. All rights reserved.