AnchorEntityTester


public final class AnchorEntityTester


A test-only accessor for AnchorEntity that enables direct manipulation and inspection of its internal state.

Summary

Public methods

boolean
equals(Object other)
final AnchorEntity.State

The state of the AnchorEntity.

int
final void

The state of the AnchorEntity.

final void

Simulates a change to the underlying space's origin.

Public methods

equals

public boolean equals(Object other)

getState

Added in 1.0.0-alpha16
public final AnchorEntity.State getState()

The state of the AnchorEntity.

Setting this property simulates a system-level state change (e.g., from AnchorEntity.State.UNANCHORED to AnchorEntity.State.ANCHORED) and triggers the listener set by AnchorEntity.addStateChangedListener.

hashCode

public int hashCode()

setState

Added in 1.0.0-alpha16
public final void setState(AnchorEntity.State value)

The state of the AnchorEntity.

Setting this property simulates a system-level state change (e.g., from AnchorEntity.State.UNANCHORED to AnchorEntity.State.ANCHORED) and triggers the listener set by AnchorEntity.addStateChangedListener.

triggerOnOriginChanged

Added in 1.0.0-alpha16
public final void triggerOnOriginChanged()

Simulates a change to the underlying space's origin.

This function manually triggers any listeners registered via AnchorEntity.addOriginChangedListener, allowing tests to verify that the application correctly responds to spatial updates from the system.