Cell<T> class

A wrapper with interior mutability. Useful for primitives and an escape hatch for working with immutable data patterns.

Implemented types
Available extensions

Constructors

Cell(T val)

Properties

hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(String val) → void

Available on Cell<String>, provided by the Cell$CellStringExtension extension

Add
add(double val) → void

Available on Cell<double>, provided by the Cell$CellDoubleExtension extension

Add
add(int val) → void

Available on Cell<int>, provided by the Cell$CellIntExtension extension

Add
copy() → Cell<T>
Shallow copy of this Cell.
override
dec() → void

Available on Cell<int>, provided by the Cell$CellIntExtension extension

Decrement
dec() → void

Available on Cell<double>, provided by the Cell$CellDoubleExtension extension

Decrement
div(double val) → void

Available on Cell<double>, provided by the Cell$CellDoubleExtension extension

divide
eq(int val) → bool

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

Equal to
eq(double val) → bool

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

Equal to
eq(String val) → bool

Available on ConstCell<String>, provided by the Cell$ConstCellStringExtension extension

Equal to
eq(bool val) → bool

Available on ConstCell<bool>, provided by the Cell$ConstCellBoolExtension extension

Equal to
get() → T
Returns the inner value.
override
gt(double val) → bool

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

Greater than
gt(int val) → bool

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

Greater than
gte(int val) → bool

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

Greater than or equal to
gte(double val) → bool

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

Greater than or equal to
inc() → void

Available on Cell<double>, provided by the Cell$CellDoubleExtension extension

Increment
inc() → void

Available on Cell<int>, provided by the Cell$CellIntExtension extension

Increment
lt(double val) → bool

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

Less than
lt(int val) → bool

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

Less than
lte(int val) → bool

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

Less than or equal to
lte(double val) → bool

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

Less than or equal to
mod(double val) → void

Available on Cell<double>, provided by the Cell$CellDoubleExtension extension

modula
mod(int val) → void

Available on Cell<int>, provided by the Cell$CellIntExtension extension

Modulo
mul(double val) → void

Available on Cell<double>, provided by the Cell$CellDoubleExtension extension

multiply
mul(int val) → void

Available on Cell<int>, provided by the Cell$CellIntExtension extension

Multiply
neg() → void

Available on Cell<double>, provided by the Cell$CellDoubleExtension extension

Negate
neg() → void

Available on Cell<int>, provided by the Cell$CellIntExtension extension

Negate
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
not() → void

Available on Cell<bool>, provided by the Cell$CellBoolExtension extension

"!" on the inner bool value. e.g. val = !val;
replace(T val) → T
Replaces the inner value with the provided val and returns the original inner value.
set(T val) → void
Sets the inner value to val.
sub(double val) → void

Available on Cell<double>, provided by the Cell$CellDoubleExtension extension

Subtract
sub(int val) → void

Available on Cell<int>, provided by the Cell$CellIntExtension extension

Subtract
swap(covariant Cell<T> cell) → void
swaps the inner values between this cell and that cell.
toString() → String
A string representation of this object.
override
truncDiv(int val) → void

Available on Cell<int>, provided by the Cell$CellIntExtension extension

Performs integer division of this object. Truncate Divide
update(T fn(T val)) → T
Updates the contained value using fn and returns the new value

Operators

operator %(ConstCell<double> other) → Cell<double>

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

operator %(ConstCell<int> other) → Cell<int>

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

operator *(ConstCell<double> other) → Cell<double>

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

operator *(ConstCell<int> other) → Cell<int>

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

operator +(ConstCell<double> other) → Cell<double>

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

operator +(ConstCell<int> other) → Cell<int>

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

operator +(ConstCell<String> other) → Cell<String>

Available on ConstCell<String>, provided by the Cell$ConstCellStringExtension extension

operator -(ConstCell<double> other) → Cell<double>

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

operator -(ConstCell<int> other) → Cell<int>

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

operator /(ConstCell<double> other) → Cell<double>

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

operator <(ConstCell<double> other) → bool

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

operator <(ConstCell<int> other) → bool

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

operator <=(ConstCell<double> other) → bool

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

operator <=(ConstCell<int> other) → bool

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

operator ==(covariant Object other) → bool
The equality operator.
override
operator >(ConstCell<double> other) → bool

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

operator >(ConstCell<int> other) → bool

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

operator >=(ConstCell<double> other) → bool

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

operator >=(ConstCell<int> other) → bool

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

operator unary-() → Cell<double>

Available on ConstCell<double>, provided by the Cell$ConstCellDoubleExtension extension

operator unary-() → Cell<int>

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

operator ~/(ConstCell<int> other) → Cell<int>

Available on ConstCell<int>, provided by the Cell$ConstCellIntExtension extension

Performs integer division of this object.