public class EntityAndAttribute<T>
extends java.lang.Object
Entity
and an AttributeSensor
, which is assumed to be present on the entity.
Allows retrieval of the attribute value
or can be used instead where a Supplier
for
the attribute value is required.
Constructor and Description |
---|
EntityAndAttribute(Entity entity,
AttributeSensor<T> attribute) |
Modifier and Type | Method and Description |
---|---|
static <T> EntityAndAttribute<T> |
create(Entity entity,
AttributeSensor<T> attribute) |
boolean |
equals(java.lang.Object o) |
T |
get()
|
AttributeSensor<T> |
getAttribute() |
Entity |
getEntity() |
T |
getValue() |
int |
hashCode() |
void |
setValue(T val) |
java.lang.String |
toString() |
public EntityAndAttribute(Entity entity, AttributeSensor<T> attribute)
public static <T> EntityAndAttribute<T> create(Entity entity, AttributeSensor<T> attribute)
public Entity getEntity()
public AttributeSensor<T> getAttribute()
public T getValue()
public void setValue(T val)
public T get()
getValue()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object