HGrid class

HGrid is an immutable two dimension data structure of cols and rows. Use HGridBuilder to construct a HGrid instance.

See Project Haystack

Inheritance
Mixed in types
Available Extensions

Constructors

HGrid(HDict _meta, List<HCol> cols, List<List<HVal?>> rowList)

Properties

cols List<HCol>
final
first HRow
The first element.
getter/setter pairinherited
hashCode int
Hash code is value based.
no setteroverride
isEmpty bool
Returns true if number of rows is zero.
no setteroverride
isErr bool
Error grid have the meta.err marker tag.
no setter
isNotEmpty bool
Returns true if number of rows is more than zero.
no setteroverride
iterator Iterator<HRow>
A new Iterator that allows iterating the elements of this Iterable.
no setterinherited
last HRow
The last element.
getter/setter pairinherited
length int
The number of objects in this list.
getter/setter pairoverride
meta HDict
//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// Returns grid level meta.
no setter
numCols int
Get number of columns.
no setter
numRows int
Returns number of rows
no setter
reversed Iterable<HRow>
An Iterable of the objects in this list in reverse order.
no setterinherited
rows UnmodifiableListView<HRow>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
single HRow
Checks that this iterable has only one element, and returns that element.
no setterinherited

Methods

add(HRow value) → void
This operation is not supported by an unmodifiable list.
override
addAll(Iterable<HRow> iterable) → void
This operation is not supported by an unmodifiable list.
override
any(bool test(HRow element)) bool
Checks whether any element of this iterable satisfies test.
inherited
asMap() Map<int, HRow>
An unmodifiable Map view of this list.
inherited
cast<R>() List<R>
Returns a view of this list as a list of R instances.
inherited
clear() → void
This operation is not supported by an unmodifiable list.
override
colByIndex(int index, [bool checked = true]) HCol
colByName(String name, [bool checked = true]) HCol?
compareTo(Object that) int
Returns sort order as negative, 0, or positive.
inherited
contains(Object? element) bool
Whether the collection contains an element equal to element.
inherited
dump(StringBuffer out) → void
/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// Prints grid to out.
elementAt(int index) HRow
Returns the indexth element.
inherited
every(bool test(HRow element)) bool
Checks whether every element of this iterable satisfies test.
inherited
expand<T>(Iterable<T> f(HRow element)) Iterable<T>
Expands each element of this Iterable into zero or more elements.
inherited
fillRange(int start, int end, [HRow? fillValue]) → void
This operation is not supported by an unmodifiable list.
override
firstWhere(bool test(HRow element), {HRow orElse()?}) HRow
The first element that satisfies the given predicate test.
inherited
fold<T>(T initialValue, T combine(T previousValue, HRow element)) → T
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
inherited
followedBy(Iterable<HRow> other) Iterable<HRow>
Creates the lazy concatenation of this iterable and other.
inherited
forEach(void action(HRow element)) → void
Invokes action on each element of this iterable in iteration order.
inherited
getRange(int start, int end) Iterable<HRow>
Creates an Iterable that iterates over a range of elements.
inherited
indexOf(Object? element, [int startIndex = 0]) int
The first index of element in this list.
override
indexWhere(bool test(HRow element), [int start = 0]) int
The first index in the list that satisfies the provided test.
inherited
insert(int index, HRow element) → void
This operation is not supported by an unmodifiable list.
override
insertAll(int at, Iterable<HRow> iterable) → void
This operation is not supported by an unmodifiable list.
override
join([String separator = ""]) String
Converts each element to a String and concatenates the strings.
inherited
lastIndexOf(Object? element, [int? start]) int
The last index of element in this list.
inherited
lastIndexWhere(bool test(HRow element), [int? start]) int
The last index in the list that satisfies the provided test.
inherited
lastWhere(bool test(HRow element), {HRow orElse()?}) HRow
The last element that satisfies the given predicate test.
inherited
map<T>(T f(HRow element)) Iterable<T>
The current elements of this iterable modified by toElement.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reduce(HRow combine(HRow previousValue, HRow element)) HRow
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
inherited
remove(Object? element) bool
This operation is not supported by an unmodifiable list.
override
removeAt(int index) HRow
This operation is not supported by an unmodifiable list.
override
removeLast() HRow
This operation is not supported by an unmodifiable list.
override
removeRange(int start, int end) → void
This operation is not supported by an unmodifiable list.
override
removeWhere(bool test(HRow element)) → void
This operation is not supported by an unmodifiable list.
override
replaceRange(int start, int end, Iterable<HRow> iterable) → void
This operation is not supported by an unmodifiable list.
override
retainWhere(bool test(HRow element)) → void
This operation is not supported by an unmodifiable list.
override
row(int i) HRow
Get a row by its zero based index.
setAll(int at, Iterable<HRow> iterable) → void
This operation is not supported by an unmodifiable list.
override
setRange(int start, int end, Iterable<HRow> iterable, [int skipCount = 0]) → void
This operation is not supported by an unmodifiable list.
override
shuffle([Random? random]) → void
This operation is not supported by an unmodifiable list.
override
singleWhere(bool test(HRow element), {HRow orElse()?}) HRow
The single element that satisfies test.
inherited
skip(int count) Iterable<HRow>
Creates an Iterable that provides all but the first count elements.
inherited
skipWhile(bool test(HRow element)) Iterable<HRow>
Creates an Iterable that skips leading elements while test is satisfied.
inherited
sort([Comparator<HRow>? compare]) → void
This operation is not supported by an unmodifiable list.
override
sublist(int start, [int? end]) List<HRow>
Returns a new list containing the elements between start and end.
inherited
take(int count) Iterable<HRow>
Creates a lazy iterable of the count first elements of this iterable.
inherited
takeWhile(bool test(HRow element)) Iterable<HRow>
Creates a lazy iterable of the leading elements satisfying test.
inherited
toJson() String
Encodes to JSON string value.
override
toList({bool growable = true}) List<HRow>
Creates a List containing the elements of this Iterable.
inherited
toSet() Set<HRow>
Creates a Set containing the same elements as this iterable.
inherited
toString() String
String format is for human consumption only.
override
toZinc() String
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
override
where(bool test(HRow element)) Iterable<HRow>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
inherited
whereType<T>() Iterable<T>
Creates a new lazy Iterable with all elements that have type T.
inherited

Operators

operator +(List<HRow> other) List<HRow>
Returns the concatenation of this list and other.
inherited
operator ==(Object other) bool
The equality operator.
override
operator [](int index) HRow
The object at the given index in the list.
override
operator []=(int index, HRow value) → void
/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// This operation is not supported by an unmodifiable list.
override

Static Properties

EMPTY HGrid
Empty grid with one column called "empty" and zero rows.
final