public interface DriveObject extends DriveElement
| Modifier and Type | Method and Description |
|---|---|
DriveObject |
deepClone()
Deep clones this element and returns the clone
|
DriveElement |
get(String key)
Retrieves an item from the list
|
DriveObject |
getAsObject(String key)
Retrieves an item from the list
|
<T> T |
getAsTypedObject(Class<T> clazz)
Returns this object converted to an object of the specified type
|
DriveObjectFactory |
getFactory()
The factory this object uses to construct sub objects and clones
|
boolean |
isEmpty()
Checks if this object is empty
|
void |
setObject(String key,
DriveElement element)
Writes an element to the list
|
void |
setPrimitive(String key,
Object object)
Writes an primitive element to the list
|
DriveObject |
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(String key)
key - used to identify an itemDriveObject getAsObject(String key)
key - used to identify an itemvoid setObject(String key, DriveElement element) throws ObjectReadOnlyException
key - key to affiliate the element withelement - element to storeObjectReadOnlyException - thrown if this object does not support writingvoid setPrimitive(String key, Object object) throws ObjectReadOnlyException, NotAPrimitiveTypeException
key - key to affiliate the element withobject - primitive type objectNotAPrimitiveTypeException - thrown if object parameter is not a primitive typeObjectReadOnlyException - thrown if this object does not support writing<T> T getAsTypedObject(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.boolean isEmpty()
DriveObject deepClone()
DriveElementdeepClone in interface DriveElementDriveObject subtract(DriveElement driveElement)
DriveElementsubtract in interface DriveElementdriveElement - the element to subtractDriveObjectFactory getFactory()
Copyright © 2020. All rights reserved.