Cell<T> class
A wrapper with interior mutability. Useful for primitives and an escape hatch for working with immutable data patterns.
Constructors
- Cell.new(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<
AddString> , provided by the Cell$CellStringExtension extension -
add(
double val) → void -
Available on Cell<
Adddouble> , provided by the Cell$CellDoubleExtension extension -
add(
int val) → void -
Available on Cell<
Addint> , provided by the Cell$CellIntExtension extension -
copy(
) → Cell< T> -
Shallow copy of this Cell.
override
-
dec(
) → void -
Available on Cell<
Decrementint> , provided by the Cell$CellIntExtension extension -
dec(
) → void -
Available on Cell<
Decrementdouble> , provided by the Cell$CellDoubleExtension extension -
div(
double val) → void -
Available on Cell<
dividedouble> , provided by the Cell$CellDoubleExtension extension -
eq(
int val) → bool -
Available on ConstCell<
Equal toint> , provided by the Cell$ConstCellIntExtension extension -
eq(
double val) → bool -
Available on ConstCell<
Equal todouble> , provided by the Cell$ConstCellDoubleExtension extension -
eq(
String val) → bool -
Available on ConstCell<
Equal toString> , provided by the Cell$ConstCellStringExtension extension -
eq(
bool val) → bool -
Available on ConstCell<
Equal tobool> , provided by the Cell$ConstCellBoolExtension extension -
get(
) → T -
Returns the inner value.
override
-
gt(
double val) → bool -
Available on ConstCell<
Greater thandouble> , provided by the Cell$ConstCellDoubleExtension extension -
gt(
int val) → bool -
Available on ConstCell<
Greater thanint> , provided by the Cell$ConstCellIntExtension extension -
gte(
int val) → bool -
Available on ConstCell<
Greater than or equal toint> , provided by the Cell$ConstCellIntExtension extension -
gte(
double val) → bool -
Available on ConstCell<
Greater than or equal todouble> , provided by the Cell$ConstCellDoubleExtension extension -
inc(
) → void -
Available on Cell<
Incrementdouble> , provided by the Cell$CellDoubleExtension extension -
inc(
) → void -
Available on Cell<
Incrementint> , provided by the Cell$CellIntExtension extension -
lt(
double val) → bool -
Available on ConstCell<
Less thandouble> , provided by the Cell$ConstCellDoubleExtension extension -
lt(
int val) → bool -
Available on ConstCell<
Less thanint> , provided by the Cell$ConstCellIntExtension extension -
lte(
int val) → bool -
Available on ConstCell<
Less than or equal toint> , provided by the Cell$ConstCellIntExtension extension -
lte(
double val) → bool -
Available on ConstCell<
Less than or equal todouble> , provided by the Cell$ConstCellDoubleExtension extension -
mod(
double val) → void -
Available on Cell<
moduladouble> , provided by the Cell$CellDoubleExtension extension -
mod(
int val) → void -
Available on Cell<
Moduloint> , provided by the Cell$CellIntExtension extension -
mul(
double val) → void -
Available on Cell<
multiplydouble> , provided by the Cell$CellDoubleExtension extension -
mul(
int val) → void -
Available on Cell<
Multiplyint> , provided by the Cell$CellIntExtension extension -
neg(
) → void -
Available on Cell<
Negatedouble> , provided by the Cell$CellDoubleExtension extension -
neg(
) → void -
Available on Cell<
Negateint> , provided by the Cell$CellIntExtension extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
not(
) → void -
Available on Cell<
"!" on the inner bool value. e.g. val = !val;bool> , provided by the Cell$CellBoolExtension extension -
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<
Subtractdouble> , provided by the Cell$CellDoubleExtension extension -
sub(
int val) → void -
Available on Cell<
Subtractint> , provided by the Cell$CellIntExtension extension -
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<
Performs integer division of this object. Truncate Divideint> , provided by the Cell$CellIntExtension extension -
update(
T fn(T)) → 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<
Performs integer division of this object.int> , provided by the Cell$ConstCellIntExtension extension