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
|
DriveElementArray |
deepClone()
Deep clones this element and returns the clone
|
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
|
int |
getSize() |
DriveElementArray |
subtract(DriveElement driveElement)
Subtracts a Drive element from this element leaving only the difference
of this object compared to the parameter element.
|
add, 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 typeDriveElementArray deepClone()
DriveElementdeepClone in interface DriveElementDriveElementArray subtract(DriveElement driveElement)
DriveElementsubtract in interface DriveElementdriveElement - the element to subtractint getSize()
Copyright © 2020. All rights reserved.