/** as {@link #settingSensorsConstant(Map)} but as a {@link Runnable} */ public static Runnable settingSensorsConstant(final Entity entity, final Map<AttributeSensor<?>,Object> values) { checkNotNull(entity, "entity"); checkNotNull(values, "values"); return Functionals.runnable(Suppliers.compose(settingSensorsConstant(values), Suppliers.ofInstance(entity))); }
public static <K,V> Runnable updatingSensorMapEntry(final Entity entity, final AttributeSensor<Map<K,V>> mapSensor, final K key, final Supplier<? extends V> valueSupplier) { return Functionals.runnable(Suppliers.compose(updatingSensorMapEntry(mapSensor, key, valueSupplier), Suppliers.ofInstance(entity))); }