AxelMap class
Two-dimensional array of axels.
Constructors
Properties
-
asColumns
→ Iterable<
Iterable< Axel> > -
Returns a copy of this map rotated by 90 degrees.
no setter
-
data
→ List<
List< Axel> > -
Contained data.
final
-
first
→ Iterable<
Axel> -
The first element.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
Height of this map.
no setter
- isEmpty → bool
-
Whether this collection has no elements.
no setterinherited
- isNotEmpty → bool
-
Whether this collection has at least one element.
no setterinherited
-
iterator
→ Iterator<
Iterable< Axel> > -
A new
Iteratorthat allows iterating the elements of thisIterable.no setteroverride -
last
→ Iterable<
Axel> -
The last element.
no setterinherited
- length → int
-
The number of elements in this Iterable.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
single
→ Iterable<
Axel> -
Checks that this iterable has only one element, and returns that element.
no setterinherited
- width → int
-
Width of this map.
no setter
Methods
-
addColumn(
Iterable< Axel> column, {bool start = false}) → void - Add a column to the right of this map. Left with []
-
addColumns(
Iterable< Iterable< columns, {bool start = false}) → voidAxel> > -
Add columns to this map. Columns must all be the same size, and the same length as the height of this map.
startcauses them to be added to the left side of the map instead of the right. -
addRow(
Iterable< Axel> row, {bool start = false}) → void -
Add a row. Defaults to the bottom, top with
start. Length must be equal to this map's width. -
addRows(
Iterable< Iterable< rows, {bool start = false}) → voidAxel> > - Add multiple rows as with addRow.
-
any(
bool test(Iterable< Axel> element)) → bool -
Checks whether any element of this iterable satisfies
test.inherited -
cast<
R> () → Iterable< R> -
A view of this iterable as an iterable of
Rinstances.inherited -
contains(
Object? element) → bool -
Whether the collection contains an element equal to
element.inherited -
editAxel(
int row, int col, Axel editFunction(Axel)) → void - Update a single axel in the provided position.
-
elementAt(
int index) → Iterable< Axel> -
Returns the
indexth element.inherited -
every(
bool test(Iterable< Axel> element)) → bool -
Checks whether every element of this iterable satisfies
test.inherited -
expand<
T> (Iterable< T> toElements(Iterable<Axel> element)) → Iterable<T> -
Expands each element of this Iterable into zero or more elements.
inherited
-
firstWhere(
bool test(Iterable< Axel> element), {Iterable<Axel> orElse()?}) → Iterable<Axel> -
The first element that satisfies the given predicate
test.inherited -
fold<
T> (T initialValue, T combine(T previousValue, Iterable< Axel> element)) → T -
Reduces a collection to a single value by iteratively combining each
element of the collection with an existing value
inherited
-
followedBy(
Iterable< Iterable< other) → Iterable<Axel> >Iterable< Axel> > -
Creates the lazy concatenation of this iterable and
other.inherited -
forEach(
void action(Iterable< Axel> element)) → void -
Invokes
actionon each element of this iterable in iteration order.inherited -
getPosition(
int x, int y) → Axel? - Get axel from the specified position.
-
join(
[String separator = ""]) → String -
Converts each element to a String and concatenates the strings.
inherited
-
lastWhere(
bool test(Iterable< Axel> element), {Iterable<Axel> orElse()?}) → Iterable<Axel> -
The last element that satisfies the given predicate
test.inherited -
map<
T> (T toElement(Iterable< Axel> e)) → 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
-
overrideStyle(
{ColorPlaceholder? color, ColorPlaceholder? background, TextStyle? textStyle}) → void -
Replace the
color,background, ortextStyleof all axels. -
pad(
int? width, int? height, {bool horizontalStart = true, bool verticalStart = true}) → void - Increases this map's size by padding it with spaces.
-
reduce(
Iterable< Axel> combine(Iterable<Axel> value, Iterable<Axel> element)) → Iterable<Axel> -
Reduces a collection to a single value by iteratively combining elements
of the collection using the provided function.
inherited
-
removeColumns(
int number, {bool start = false}) → void -
Remove
numbercolumns from the end (or start ifstart). -
removeRows(
int number, {bool start = false}) → void -
Remove
numberrows from end, or start ifstart. -
resize(
int? width, int? height, {bool horizontalStart = true, bool verticalStart = true}) → void - Resizes this map to the provided sizes. horizontal/vertical start adds/removes lines from the end of the map.
-
resizeCentered(
int? width, int? height) → void - Resizes this map to the provided sizes, keeping it centred.
-
setPosition(
int x, int y, Axel axel) → void - Update a single axel.
-
singleWhere(
bool test(Iterable< Axel> element), {Iterable<Axel> orElse()?}) → Iterable<Axel> -
The single element that satisfies
test.inherited -
skip(
int count) → Iterable< Iterable< Axel> > -
Creates an Iterable that provides all but the first
countelements.inherited -
skipWhile(
bool test(Iterable< Axel> value)) → Iterable<Iterable< Axel> > -
Creates an
Iterablethat skips leading elements whiletestis satisfied.inherited -
take(
int count) → Iterable< Iterable< Axel> > -
Creates a lazy iterable of the
countfirst elements of this iterable.inherited -
takeWhile(
bool test(Iterable< Axel> value)) → Iterable<Iterable< Axel> > -
Creates a lazy iterable of the leading elements satisfying
test.inherited -
toList(
{bool growable = true}) → List< Iterable< Axel> > -
Creates a List containing the elements of this Iterable.
inherited
-
toSet(
) → Set< Iterable< Axel> > -
Creates a Set containing the same elements as this iterable.
inherited
-
toString(
) → String -
Returns a string representation of (some of) the elements of
this.inherited -
where(
bool test(Iterable< Axel> element)) → Iterable<Iterable< Axel> > -
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 ==(
Object other) → bool -
The equality operator.
inherited