Package dev.webfx.platform.ast
Interface ReadOnlyAstObject
- All Superinterfaces:
ReadOnlyAstNode
- All Known Subinterfaces:
AstObject,Config,NativeAstObject
- All Known Implementing Classes:
AstObjectWrapper,ChildConfig,ConfigImpl,ImmutableAstObject,MapAstObject,MapBasedAstObject,ReadOnlyAstObjectWrapper,ReadOnlyMergedAstObject,RootConfig
- Author:
- Bruno Salmon
-
Method Summary
Modifier and TypeMethodDescription<T> TReturn the element as a value or wrapped object/array.default ReadOnlyAstArrayReturn the element as a JsonArray.default BooleangetBoolean(String key) Return the element as a boolean.default BooleangetBoolean(String key, Boolean defaultValue) Return the element as a boolean.default DoubleReturn the element as a double.default DoubleReturn the element as a double.default InstantgetInstant(String key) Return the element as an instant.default InstantgetInstant(String key, Instant defaultValue) Return the element as an instant.default IntegergetInteger(String key) Return the element as an int.default IntegergetInteger(String key, Integer defaultValue) Return the element as an int.default LongReturn the element as a long.default LongReturn the element as a long.default ReadOnlyAstObjectReturn the element as a JsonObject.default <T> Tdefault <T> Tdefault StringReturn the element as a String.default StringReturn the element as a String.default booleanTest whether a given key has present.default booleandefault booleandefault booleandefault booleankeys()All keys of the object.default intsize()
-
Method Details
-
has
Test whether a given key has present. -
keys
ReadOnlyAstArray keys()All keys of the object. -
size
default int size()- Specified by:
sizein interfaceReadOnlyAstNode
-
get
Return the element as a value or wrapped object/array. -
isObject
-
isArray
-
isScalar
-
getObject
Return the element as a JsonObject. If the type is not an object, this can result in runtime errors. -
getArray
Return the element as a JsonArray. If the type is not an array, this can result in runtime errors. -
getScalar
-
getScalar
-
isTrue
-
getBoolean
Return the element as a boolean. If the type is not a boolean, this can result in runtime errors. -
getBoolean
Return the element as a boolean. If the type is not a boolean, this can result in runtime errors. -
getString
Return the element as a String. If the type is not a String, this can result in runtime errors. -
getString
Return the element as a String. If the type is not a String, this can result in runtime errors. -
getInteger
Return the element as an int. If the type is not a int, this can result in runtime errors. -
getInteger
Return the element as an int. If the type is not a int, this can result in runtime errors. -
getLong
Return the element as a long. If the type is not a long, this can result in runtime errors. -
getLong
Return the element as a long. If the type is not a long, this can result in runtime errors. -
getDouble
Return the element as a double. If the type is not a double, this can result in runtime errors. -
getDouble
Return the element as a double. If the type is not a double, this can result in runtime errors. -
getInstant
Return the element as an instant. If the type is not an instant, this can result in runtime errors. -
getInstant
Return the element as an instant. If the type is not an instant, this can result in runtime errors.
-