public final class Attribute<T> extends Object
An attribute associated with an entity, consisting of its name, type, and value.
Modifier and Type | Method and Description |
---|---|
static <T> Attribute<T> |
create(TypedName<T> name,
T val)
Create a new attribute pair.
|
boolean |
equals(Object o) |
String |
getName()
Get the attribute’s name.
|
Class<T> |
getType()
Get the attribute’s type.
|
TypedName<T> |
getTypedName()
Get the attribute’s typed name.
|
T |
getValue()
Get the attribute’s value.
|
int |
hashCode() |
String |
toString() |
public static <T> Attribute<T> create(@Nonnull TypedName<T> name, @Nonnull T val)
Create a new attribute pair.
name
- The attribute name.val
- The value.T
- The attribute type.@Nonnull public TypedName<T> getTypedName()
Get the attribute’s typed name.