public class DurationSinceSensor extends AddSensor<Duration>
| Modifier and Type | Field and Description |
|---|---|
static ConfigKey<<any>> |
EPOCH_SUPPLIER |
static ConfigKey<<any>> |
TIME_SUPPLIER |
SENSOR_NAME, SENSOR_PERIOD, SENSOR_TYPE| Constructor and Description |
|---|
DurationSinceSensor(ConfigBag params) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(EntityLocal entity)
Applies initialization logic to a just-built entity.
|
public static final ConfigKey<<any>> EPOCH_SUPPLIER
public static final ConfigKey<<any>> TIME_SUPPLIER
public DurationSinceSensor(ConfigBag params)
public void apply(EntityLocal entity)
EntityInitializerapply in interface EntityInitializerapply in class AddSensor<Duration>entity - guaranteed to be the actual implementation instance,
thus guaranteed to be castable to EntityInternal which is often desired,
or to the type at hand (it is not even a proxy)