public class EntityAttribute
extends java.lang.Object
Constructor and Description |
---|
EntityAttribute(java.lang.String name,
EntityAttributeType type,
java.util.List<java.lang.Object> values) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName() |
EntityAttributeType |
getType() |
<T> T |
getValue(java.lang.Class<T> clazz)
Casts the first value to the specified generic type and returns it, or null if there are no values.
|
<T> java.util.List<T> |
getValues(java.lang.Class<T> clazz)
Casts the values to the specified generic type and return them all as a list.
|
public EntityAttribute(java.lang.String name, EntityAttributeType type, java.util.List<java.lang.Object> values)
public java.lang.String getName()
public EntityAttributeType getType()
public <T> T getValue(java.lang.Class<T> clazz)
T
- The expected type of the value in the attribute.clazz
- Type of the attribute. This needs to match what the library has deserialized or an exception will be
thrown.public <T> java.util.List<T> getValues(java.lang.Class<T> clazz)
T
- The expected type of the values in the attribute.clazz
- Type of the attribute. This needs to match what the library has deserialized or an exception will be
thrown.