public interface DriveObject extends DriveElement
| Modifier and Type | Method and Description |
|---|---|
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
|
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
|
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()
Copyright © 2019. All rights reserved.