ValueNucleus<V> class

A specialized Nucleus blueprint designed to manage and propagate a discrete, persistent state value of type V.

This is the internal blueprint that powers ValueCell. You almost never construct it directly – Cell.state does it for you.

When to use

Only if you're building custom cell types or advanced tooling. For application code, use Cell.state.

How it works

It holds a Box<V> (the physical storage) and integrates the transformation logic (transform) with the commitment pipeline (ValueCell.postProcessRule). The Box is resolved by walking up the principal chain, so deputies share the same storage.

Non‑obvious

  • The forceLock parameter in the primary constructor is true by default (unlike the generic Nucleus), because state cells need their own lock to prevent race conditions.
  • When you evolve a ValueNucleus, the new nucleus shares the same Box as its principal – no state duplication.

See also: ValueCell, Box, Cell.state.

Inheritance

Constructors

ValueNucleus({Pulse<V>? transform(ValueCell<V> host, Pulse input, {dynamic user})?, Cell? bind, Context context = Context.system, Receptor<Cell> receptor = Receptor.passThrough, TestCell<Cell> testRule = TestCell.allowAll, Synapses<Pulse, Cell> synapses = Synapses.enabled, EphemeralPolicy<Cell>? ephemeralPolicy, Record? user, bool forceLock = true})
Initializes a new primary ValueNucleus – the blueprint for a stateful cell.
ValueNucleus.evolve({Instruction<ValueCell<V>, Pulse, Pulse<V?>>? instruction, EphemeralPolicy<Cell>? ephemeralPolicy, Cell? bind, Context? context, Receptor<Cell>? receptor, TestCell<Cell>? testRule, Synapses<Pulse, Cell>? synapses, Record? user, ValueNucleus? override, required ValueNucleus principal})
Synthesizes a derivative ValueNucleus that shares the same physical state (Box) as its principal but may override behavior (rule, context, testRule, etc.).
ValueNucleus.from({Instruction<ValueCell<V>, Pulse, Pulse<V?>>? instruction, Cell? bind, Context context = Context.system, Receptor<Cell> receptor = Receptor.passThrough, TestCell<Cell> testRule = TestCell.allowAll, Synapses<Pulse, Cell> synapses = Synapses.enabled, EphemeralPolicy<Cell>? ephemeralPolicy, Record? user})
Initializes a new primary ValueNucleus using a pre‑configured Instruction – the preferred way to reuse transformation logic.

Properties

bind Cell?
The upstream Cell dependency that serves as the primary Ingress Source for this node's reactive logic.
no setterinherited
cell Cell
Returns the live Cell instance that this nucleus is bound to.
no setterinherited
clone ValueNucleus<V>
Generates a decoupled, peer-level replica of the current Nucleus blueprint with an independent synchronization domain.
no setteroverride
context Context
The operational Context defining the forensic identity, administrative authority, and causal lineage of this specific Cell handle.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
inheritable InheritableHandle
Retrieves the optimized Logic Inheritance Handle containing the shared behavioral configuration for this Nucleus.
no setterinherited
isActivated bool
Indicates whether this nucleus has been bound to a live Cell.
no setterinherited
isGoverned bool
Indicates whether this node is subject to active Administrative Oversight or specialized Lifecycle Governance.
no setterinherited
isInvalidated bool
Indicates whether this node has reached the end of its Functional Lifecycle and is no longer capable of processing pulses or maintaining state.
no setterinherited
lock Lock?
The synchronization primitive used to ensure thread-safe and atomic operations across the reactive Cell associated with this Nucleus.
no setterinherited
principal ValueNucleus<V>?
The optional reference to a precursor Nucleus in the inheritance hierarchy.
no setteroverride
receptor Receptor<Cell>
The Transformation Pipeline and pulse processing engine for the associated Cell.
no setterinherited
record → dynamic
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state Box<V>
Resolves the physical Box storage container that holds the current state.
no setter
synapses Synapses<Pulse, Cell>
The connectivity manager responsible for tracking and notifying downstream observers of this Cell.
no setterinherited
testRule TestCell<Cell>
The active TestCell integrity gate that governs and validates all state transitions for this node.
no setterinherited
timestamp DateTime
The Temporal Origin and synthesis record of this Nucleus instance.
no setterinherited
user Record?
Retrieves the optional Record containing developer-defined metadata or custom property extensions for the associated Cell.
no setterinherited

Methods

activate(covariant Cell cell) bool
Activates this nucleus by binding it to a live Cell instance.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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