public final class Attribute<T>
extends java.lang.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(java.lang.Object o) |
java.lang.String |
getName()
Get the attribute’s name.
|
TypeToken<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() |
java.lang.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.
@Nonnull public java.lang.String getName()
Get the attribute’s name.
@Nonnull public TypeToken<T> getType()
Get the attribute’s type.
@Nonnull public T getValue()
Get the attribute’s value.
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object