DiagramDocumentBatch class final
Element edits against one snapshot, derived as a single proven successor.
Any number of replacements, removals and insertions produce one document whose change evidence points directly at document. Replacements alone share identity positions and copy only the touched chunks. Reads observe pending edits, so later edits can build on earlier ones.
Constructors
- DiagramDocumentBatch(DiagramDocument document)
Properties
- document → DiagramDocument
-
The snapshot every edit in this batch is applied to.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
no setter
-
pending
→ Iterable<
DiagramElement> -
Pending insertions and replacements, excluding removed identities.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
) → DiagramDocument - Derives the successor snapshot, or returns document when empty.
-
contains(
String id) → bool -
elementById(
String id) → DiagramElement? - Current element, including pending edits.
-
insert(
DiagramElement element, {String? after, String? before}) → void -
Inserts a new identity at the end, or next to an existing
afterorbeforeelement. At most one anchor may be supplied. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String id) → void - Removes one existing element. Dependants are not removed implicitly.
-
replace(
DiagramElement element) → void - Replaces an existing element with a new instance of the same identity.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited