Skip to content

Value

abstract class Value < Object

Abstract value.

Member Functions

Name Description
accept Accept a generator.
isObject Is this an object?
isArray Is this an array?
isScalar Is this neither an object or an array?
getChild Get a child in an object.
setChild Set a child in an object.
size If this is an array, get its size.
push Push a value onto the end of an array.
getObject Get this as an object.
getArray Get this as an array.
getBoolean Get this as a Boolean.
getInteger Get this as an integer.
getReal Get this as a real.
getString Get this as a string.
getBooleanVector Get this as a vector of Booleans.
getIntegerVector Get this as a vector of integers.
getRealVector Get this as a vector of reals.
getBooleanMatrix Get this as a matrix of Booleans.
getIntegerMatrix Get this as a matrix of integers.
getRealMatrix Get this as a matrix of reals.

Member Fibers

Name Description
walk Iterate through elements of an array.

Member Function Details

accept

abstract function accept(writer:Writer)

Accept a generator.

getArray

function getArray() -> ArrayValue?

Get this as an array.

getBoolean

function getBoolean() -> Boolean?

Get this as a Boolean.

Return: An optional with a value if this is of a compatible type.

getBooleanMatrix

function getBooleanMatrix() -> Boolean[_,_]?

Get this as a matrix of Booleans.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

getBooleanVector

function getBooleanVector() -> Boolean[_]?

Get this as a vector of Booleans.

Return: An optional with a value if this is an array with all elements of a compatible type.

getChild

function getChild(name:String) -> Buffer?

Get a child in an object.

getInteger

function getInteger() -> Integer?

Get this as an integer.

Return: An optional with a value if this is of a compatible type.

getIntegerMatrix

function getIntegerMatrix() -> Integer[_,_]?

Get this as a matrix of integers.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

getIntegerVector

function getIntegerVector() -> Integer[_]?

Get this as a vector of integers.

Return: An optional with a value if this is an array with all elements of a compatible type.

getObject

function getObject() -> ObjectValue?

Get this as an object.

getReal

function getReal() -> Real?

Get this as a real.

Return: An optional with a value if this is of a compatible type.

getRealMatrix

function getRealMatrix() -> Real[_,_]?

Get this as a matrix of reals.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

getRealVector

function getRealVector() -> Real[_]?

Get this as a vector of reals.

Return: An optional with a value if this is an array with all elements of a compatible type.

getString

function getString() -> String?

Get this as a string.

Return: An optional with a value if this is of a compatible type.

isArray

function isArray() -> Boolean

Is this an array?

isObject

function isObject() -> Boolean

Is this an object?

isScalar

function isScalar() -> Boolean

Is this neither an object or an array?

push

function push() -> Buffer

Push a value onto the end of an array.

setChild

function setChild(name:String) -> Buffer

Set a child in an object.

size

function size() -> Integer

If this is an array, get its size.

Return: An optional with a value giving the length if this is an array.

Member Fiber Details

walk

fiber walk() -> Buffer

Iterate through elements of an array.