SensorEval

public class SensorEval extends SensorBase

Class SensorEval. Provides sensoreval functionality for the Hytale server.

java.lang.Object > SensorBase > SensorEval

Field Summary

instructions

protected ExecutionContext.Instruction[] instructions

Field instructions.

isValid

protected boolean isValid

Field isValid.

scope

final StdScope scope

Field scope.

valueType

final ValueType valueType

Field valueType.

executionContext

final ExecutionContext executionContext

Field executionContext.

Method Detail

SensorEval

public public SensorEval (@Nonnull final BuilderSensorEval builderSensorEval, @Nonnull final BuilderSupport support)

Method SensorEval.

Parameters:
@Nonnull final BuilderSensorEval builderSensorEval
@Nonnull final BuilderSupport support

IllegalStateException

public new IllegalStateException ("Expression '" + this.expression + "' must return boolean value but is:" + String.valueOf(valueType)

Method IllegalStateException.

Parameters:
"Expression '" + this.expression + "' must return boolean value but is:" + String.valueOf(valueType

RuntimeException

public new RuntimeException ("Error evaluating '" + this.expression, (Throwable)

Method RuntimeException.

Parameters:
"Error evaluating '" + this.expression
(Throwable (Throwable

matches

public boolean matches (@Nonnull final Ref ref, @Nonnull final Role role, final double dt, @Nonnull final Store store)

Method matches.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
final double dt
@Nonnull final Store store

getSensorInfo

public InfoProvider getSensorInfo ()

Method getSensorInfo.

compile

protected ValueType compile (@Nonnull final String expression, final StdScope sensorScope, final List instructions)

Method compile.

Parameters:
@Nonnull final String expression
final StdScope sensorScope
final List instructions

evalBoolean

protected boolean evalBoolean (final StdScope sensorScope, @Nonnull final ExecutionContext.Instruction[] instructions)

Method evalBoolean.

Parameters:
final StdScope sensorScope
@Nonnull final ExecutionContext.Instruction[] instructions