T - The value type of the attribute.public class AttributeKey<T> extends Object
Serializable, but only if the concrete
type of all the values is serializable!| Modifier and Type | Field and Description |
|---|---|
T |
defaultValue |
String |
key |
| Constructor and Description |
|---|
AttributeKey(String key) |
AttributeKey(String key,
T defaultValue) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
T |
get(Map<String,?> values)
Get a value for this attribute from a map of string to native value
types.
|
T |
getFromString(Map<String,String> values)
Get a value for this attribute from a map of string to strings.
|
int |
hashCode() |
String |
toString(T value)
Convert an instance of
T to a string. |
T |
toValue(String str)
Convert a string representation of
T to its native type. |
public AttributeKey(String key)
public T getFromString(Map<String,String> values)
values - The map from which to get the value.public T get(Map<String,?> values)
values - The map from which to get the value.public String toString(T value)
T to a string.value - The value to convert. Will never be null.public T toValue(String str)
T to its native type.
This implementation always throws an
UnsupportedOperationException. Subclasses should override this
method to implement it.
str - The string representation to convert. Will never be
null.T.Copyright © 2011–2023 pepsoft.org. All rights reserved.