DataArrayView<Obj extends DataObject, Arr extends DataArray> class base

A base implemention of DataArray as a view of Iterable<Object?> source data.

As this class is defined with the class modifier base, the class can only be extended, but not implemented. When a subtype should be defined with implements, then such a subtype should implement DataArray.

Implemented types
Mixed in types

Constructors

DataArrayView(Iterable<Object?> list, {bool isExposed = false})
Creates a data array view wrapping a source list.

Properties

arrays Iterable<Arr>
Returns an iterable for childs that can be represented as DataArray.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Returns true if the collection has no elements.
no setteroverride
isExposed bool
Whether list is (potentially) exposed to side effects.
final
isNotEmpty bool
Returns true if the collection has at least one element.
no setteroverride
length int
Returns the number of elements in this collection.
no setteroverride
list Iterable<Object?>
Wrapped list containing values view by this class as DataArray.
final
objects Iterable<Obj>
Returns an iterable for childs that can be represented as DataObject.
no setteroverride
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

array(int key) → Arr
Returns a child data array at key.
override
arraysToList<T extends Object>(T map(Arr array), {int? limit}) List<T>
Returns a list of T mapped from child data arrays using map function.
override
encodeJson({Object encodeTime(DateTime time)?}) String
Encodes this element into a JSON string.
override
exists(int key) bool
Returns true if the key references an existing value, null or non-null.
override
existsNonNull(int key) bool
Returns true if a value at key exists and that value is non-null.
inherited
existsNull(int key) bool
Returns true if a value at key exists and that value is null.
inherited
getBigInt(int key, {BigInt? min, BigInt? max}) BigInt
Returns a value at key as BigInt.
inherited
getBool(int key) bool
Returns a value at key as bool.
inherited
getDouble(int key, {double? min, double? max}) double
Returns a value at key as double.
inherited
getId(int key) Identifier
Returns a value at key as Identifier.
inherited
getInt(int key, {int? min, int? max}) int
Returns a value at key as int.
inherited
getNum(int key, {num? min, num? max}) num
Returns a value at key as num.
inherited
getString(int key) String
Returns a value at key as String.
inherited
getTimeUTC(int key, {DateTime parse(Object?)?}) DateTime
Returns a value at key as DateTime in the UTC time zone.
inherited
newEnsureProtected(Iterable<Object?> source) → Arr
Do not use directly, only from sub classes (marked @protected).
newExposed(Iterable<Object?> source) → Arr
Do not use directly, only from sub classes (marked @protected).
newObjectView(Map<String, Object?> source) → Obj
Do not use directly, only from sub classes (marked @protected).
newProtected(Iterable<Object?> source) → Arr
Do not use directly, only from sub classes (marked @protected).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
object(int key) → Obj
Returns a child data object at key.
override
objectsToList<T extends Object>(T map(Obj object), {int? limit}) List<T>
Returns a list of T mapped from child data objects using map function.
override
toEncodable() Iterable<Object?>
Returns data as an encodable object compatible with json.encode().
toJson() Iterable<Object?>
Returns data as an encodable object compatible with json.encode().
override
toNullableValues<T extends Object>() Iterable<T?>
Returns all values as an iterable of T?.
override
toString() String
A string representation of this object.
override
toValues<T extends Object>() Iterable<T>
Returns all values as an iterable of T.
override
tryArray(int key) → Arr?
Returns a child data array at key or null if missing.
override
tryBigInt(int key, {BigInt? min, BigInt? max}) BigInt?
Returns a value at key as BigInt or null if missing.
inherited
tryBool(int key) bool?
Returns a value at key as bool or null if missing.
inherited
tryDouble(int key, {double? min, double? max}) double?
Returns a value at key as double or null if missing.
inherited
tryId(int key) Identifier?
Returns a value at key as Identifier or null if missing.
inherited
tryInt(int key, {int? min, int? max}) int?
Returns a value at key as int or null if missing.
inherited
tryNum(int key, {num? min, num? max}) num?
Returns a value at key as num or null if missing.
inherited
tryObject(int key) → Obj?
Returns a child data object at key or null if missing.
override
tryString(int key) String?
Returns a value at key as String or null if missing.
inherited
tryTimeUTC(int key, {DateTime parse(Object?)?}) DateTime?
Returns a value at key as DateTime in the UTC time zone, or null.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int key) Object?
Returns a value at key, the result can be of any object or null.
override