← Standard library

object

class object

Available without an import.

The root class for reference types. Default equality and hashing use object identity; content-based classes can override both. Default text is object. Identity is independent of a moving heap address; nullable identity operations accept null.

Object.wax:9

Members

ReferenceEqualsmethod

public static fn ReferenceEquals(object? left, object? right) : bool

Tests whether two references identify the same object. Two nulls compare equal; this bypasses virtual content equality.

Object.wax:14

StableIdmethod

public static fn StableId(object? value) : uint64

Returns the runtime identity of an object, or zero for null. It remains stable across promotion, but is meaningful within its originating execution/recording, not as a universal cross-run identifier.

Object.wax:20

GetHashCodemethod

public virtual fn GetHashCode() : uint32

Hashes this object's stable identity. A content-equality override should supply a matching content hash.

Object.wax:34

Equalsmethod

public virtual fn Equals(object other) : bool

Tests reference identity by default. Overrides can implement content equality against another object.

Object.wax:47

ToStringmethod

public virtual fn ToString() : string

Returns object by default; overrides can supply useful text.

Object.wax:61

ToStringBuffermethod

public virtual fn ToStringBuffer(StringBuilder builder) : int32

Appends the virtual ToString result and returns the number of UTF-8 bytes appended.

Object.wax:72

TextFromBuffermethod

public static fn TextFromBuffer<T>(T value) : string

Builds a new string by invoking the value's ToStringBuffer method. Intended for types providing a buffer-based text implementation.

Object.wax:90

BufferFromTextmethod

public static fn BufferFromText<T>(T value, StringBuilder builder) : int32

Appends the value's ToString result to the supplied builder and returns the number of bytes appended.

Object.wax:102

constructorconstructor

public constructor ()

Provided by the compiler.