public class EntityFunctions
extends java.lang.Object
Constructor and Description |
---|
EntityFunctions() |
Modifier and Type | Method and Description |
---|---|
static com.google.common.base.Supplier<java.util.Collection<Application>> |
applications(ManagementContext mgmt) |
static <T> com.google.common.base.Function<Entity,T> |
attribute(AttributeSensor<T> attribute) |
static <T> com.google.common.base.Function<Entity,T> |
config(ConfigKey<T> key) |
static com.google.common.base.Function<Entity,java.lang.String> |
displayName() |
static com.google.common.base.Function<Identifiable,java.lang.String> |
id() |
static com.google.common.base.Function<Entity,Location> |
locationMatching(com.google.common.base.Predicate<? super Location> filter) |
static java.lang.Runnable |
settingSensorsConstant(Entity entity,
java.util.Map<AttributeSensor<?>,java.lang.Object> values)
as
settingSensorsConstant(Map) but as a Runnable |
static com.google.common.base.Function<Entity,java.lang.Void> |
settingSensorsConstant(java.util.Map<AttributeSensor<?>,java.lang.Object> values)
returns a function which sets the given sensors on the entity passed in,
with
Entities.UNCHANGED and Entities.REMOVE doing those actions. |
static <K,V> com.google.common.base.Function<Entity,java.lang.Void> |
updatingSensorMapEntry(AttributeSensor<java.util.Map<K,V>> mapSensor,
K key,
com.google.common.base.Supplier<? extends V> valueSupplier) |
static <K,V> java.lang.Runnable |
updatingSensorMapEntry(Entity entity,
AttributeSensor<java.util.Map<K,V>> mapSensor,
K key,
com.google.common.base.Supplier<? extends V> valueSupplier) |
public static <T> com.google.common.base.Function<Entity,T> attribute(AttributeSensor<T> attribute)
public static com.google.common.base.Function<Entity,java.lang.String> displayName()
public static com.google.common.base.Function<Identifiable,java.lang.String> id()
public static com.google.common.base.Function<Entity,java.lang.Void> settingSensorsConstant(java.util.Map<AttributeSensor<?>,java.lang.Object> values)
Entities.UNCHANGED
and Entities.REMOVE
doing those actions.public static java.lang.Runnable settingSensorsConstant(Entity entity, java.util.Map<AttributeSensor<?>,java.lang.Object> values)
settingSensorsConstant(Map)
but as a Runnable
public static <K,V> com.google.common.base.Function<Entity,java.lang.Void> updatingSensorMapEntry(AttributeSensor<java.util.Map<K,V>> mapSensor, K key, com.google.common.base.Supplier<? extends V> valueSupplier)
public static <K,V> java.lang.Runnable updatingSensorMapEntry(Entity entity, AttributeSensor<java.util.Map<K,V>> mapSensor, K key, com.google.common.base.Supplier<? extends V> valueSupplier)
public static com.google.common.base.Supplier<java.util.Collection<Application>> applications(ManagementContext mgmt)