Any class
A type-safe container for single values of literally any type.
Designed meticulously to emulate C++ std::any, this structure holds an arbitrary
object while actively enforcing strict type boundaries during extraction attempts
via the .cast<T>() command.
Constructors
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
-
cast<
T> () → T -
Safely extracts the wrapped pointer back to its real object securely validating type
T. Extremely robust and strictly type-safe natively. -
empty(
) → bool - Returns true if the internal state is exactly empty natively.
-
get(
) → dynamic -
Retrieves the wrapped object as
dynamic. Throws natively if empty. -
hasValue(
) → bool - Determines whether the internal box state currently holds an active value natively.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Destroys the active internal state natively, wiping the object entirely.
-
set(
Object value) → void - Swaps its internal pointer gracefully with another value dynamically.
-
toString(
) → String -
A string representation of this object.
override
-
type(
) → Type - Fetches exactly the strict runtime type of the dynamically wrapped inner memory state. Throws natively if empty.
Operators
-
operator %(
dynamic other) → dynamic - Dynamically modulates exactly natively.
-
operator *(
dynamic other) → dynamic - Dynamically multiplies exactly natively.
-
operator +(
dynamic other) → dynamic - Dynamically adds exactly natively.
-
operator -(
dynamic other) → dynamic - Dynamically subtracts exactly natively.
-
operator /(
dynamic other) → dynamic - Dynamically divides exactly natively.
-
operator <(
dynamic other) → bool - Dynamically resolves logically accurate less-than natively.
-
operator <=(
dynamic other) → bool - Dynamically resolves less-than-or-equal stably natively.
-
operator ==(
Object other) → bool -
The equality operator.
override
-
operator >(
dynamic other) → bool - Dynamically resolves logically accurate greater-than natively.
-
operator >=(
dynamic other) → bool - Dynamically resolves greater-than-or-equal stably natively.
-
operator [](
dynamic key) → dynamic - Dynamically reads an element internally via bracket notation.
-
operator []=(
dynamic key, dynamic val) → void - Dynamically writes an element internally via bracket notation.