Package space.kscience.dataforge.values

Types

DoubleArrayValue
Link copied to clipboard
common
class DoubleArrayValue(value: DoubleArray) : Value, Iterable<Double>

A performance optimized version of list value for doubles

EnumValue
Link copied to clipboard
common
class EnumValue<E : Enum<*>>(value: E) : Value
False
Link copied to clipboard
common
object False : Value

Singleton false value

LazyParsedValue
Link copied to clipboard
common
class LazyParsedValue(string: String) : Value

A value built from string which content and type are parsed on-demand

ListValue
Link copied to clipboard
common
class ListValue(list: List<Value>) : Value, Iterable<Value>
MutableValueProvider
Link copied to clipboard
common
interface MutableValueProvider : ValueProvider

An object that could consume values

Null
Link copied to clipboard
common
object Null : Value

A singleton null value

NumberValue
Link copied to clipboard
common
class NumberValue(number: Number) : Value
StringValue
Link copied to clipboard
common
value class StringValue(string: String) : Value
True
Link copied to clipboard
common
object True : Value

Singleton true value

Value
Link copied to clipboard
common
interface Value

A wrapper class for both Number and non-Number objects.

ValueProvider
Link copied to clipboard
common
fun interface ValueProvider

An object that could provide values

ValueSerializer
Link copied to clipboard
common
object ValueSerializer : KSerializer<Value>
ValueType
Link copied to clipboard
common
enum ValueType : Enum<ValueType>

The list of supported Value types.

Functions

asValue
Link copied to clipboard
common
fun <E : Enum<E>> E.asValue(): Value
fun Boolean.asValue(): Value
fun ByteArray.asValue(): Value
fun DoubleArray.asValue(): Value
fun FloatArray.asValue(): Value
fun IntArray.asValue(): Value
fun LongArray.asValue(): Value
fun Number.asValue(): Value
fun ShortArray.asValue(): Value
fun String.asValue(): Value
fun Iterable<Value>.asValue(): Value
enum
Link copied to clipboard
common
inline fun <E : Enum<E>> Value.enum(): E
getValue
Link copied to clipboard
common
fun ValueProvider.getValue(key: String): Value?
isList
Link copied to clipboard
common
fun Value.isList(): Boolean

Check if value is list.

isNull
Link copied to clipboard
common
fun Value.isNull(): Boolean

Check if value is null

lazyParseValue
Link copied to clipboard
common
fun String.lazyParseValue(): LazyParsedValue
ListValue
Link copied to clipboard
common
fun ListValue(vararg numbers: Number): ListValue
fun ListValue(vararg strings: String): ListValue
parseValue
Link copied to clipboard
common
fun String.parseValue(): Value

Create Value from String using closest match conversion

setValue
Link copied to clipboard
common
fun MutableValueProvider.setValue(key: String, value: Value?)
toMeta
Link copied to clipboard
common
fun Value.toMeta(): Meta

Properties

boolean
Link copied to clipboard
common
val Value.boolean: Boolean
double
Link copied to clipboard
common
val Value.double: Double
doubleArray
Link copied to clipboard
common
val Value.doubleArray: DoubleArray
float
Link copied to clipboard
common
val Value.float: Float
int
Link copied to clipboard
common
val Value.int: Int
long
Link copied to clipboard
common
val Value.long: Long
number
Link copied to clipboard
common
val Value.number: Number

Return Value number content or throw error if value is not a number

numberOrNull
Link copied to clipboard
common
val Value.numberOrNull: Number?

get this value represented as Number

short
Link copied to clipboard
common
val Value.short: Short
string
Link copied to clipboard
common
val Value.string: String
stringList
Link copied to clipboard
common
val Value.stringList: List<String>