Operation<Item> class

A single operation on a list – either an insertion or deletion of an item at an index.

Can be applied to a List by calling applyTo.

Constructors

Operation({required OperationType type, required int index, required Item item})

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
final
isDeletion bool
no setter
isInsertion bool
no setter
item → Item
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type OperationType
final

Methods

applyTo(List<Item> list) → void
Actually applies this operation on the list by mutating it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shift(int shiftAmount) Operation<Item>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited