Variant class

Defines container for variant values.

Constructors

Variant([dynamic value])
Constructs this class and assignes another variant value.

Properties

asArray List<Variant>
Gets variant value as variant array
getter/setter pair
asBoolean bool
Gets variant value as boolean
getter/setter pair
asDateTime DateTime
Gets variant value as DateTime
getter/setter pair
asDouble double
Gets variant value as double
getter/setter pair
asFloat double
Gets variant value as float
getter/setter pair
asInteger int
Gets variant value as integer
getter/setter pair
asLong int
Gets variant value as long
getter/setter pair
asObject ↔ dynamic
Gets variant value as Object
getter/setter pair
asString String
Gets variant value as string
getter/setter pair
asTimeSpan int
Gets variant value as TimeSpan
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
length int
Gets length of the array Returns The length of the array or 0
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type VariantType
Gets a type of the variant value
no setter

Methods

assing(Variant? value) → void
Assignes a new value to this object.
clear() → void
Clears this object and assignes a VariantType.Null type.
clone() Variant
Cloning the variant value Returns The cloned value of this variant
equals(dynamic obj) bool
Compares this object to the specified one.
getByIndex(int index) Variant
Gets an array element by its index.
isEmpty() bool
isNull() bool
Checks is this variant value Null. Returns true if this variant value is Null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setByIndex(int index, Variant element) → void
Sets an array element by its index.
toString() String
A string representation of this object.
inherited
toString2() String
Returns a string value for this object. Returns a string value for this object.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

Empty Variant
final

Static Methods

fromArray(List<Variant> value) Variant
Creates a new variant from Array value.
fromBoolean(bool value) Variant
Creates a new variant from Boolean value. value a variant value. Returns a created variant object.
fromDateTime(DateTime value) Variant
Creates a new variant from DateTime value.
fromDouble(double value) Variant
Creates a new variant from Double value.
fromFloat(double value) Variant
Creates a new variant from Float value.
fromInteger(int value) Variant
Creates a new variant from Integer value.
fromLong(int value) Variant
Creates a new variant from Long value.
fromObject(dynamic value) Variant
Creates a new variant from Object value.
fromString(String value) Variant
Creates a new variant from String value.
fromTimeSpan(int value) Variant
Creates a new variant from TimeSpan value.