Package org.pepsoft.util
Class StringAttributeKey
An implementation of
AttributeKey for String-typed values.-
Field Summary
Fields inherited from class org.pepsoft.util.AttributeKey
defaultValue, key -
Constructor Summary
ConstructorsConstructorDescriptionStringAttributeKey(String key) StringAttributeKey(String key, String defaultValue) -
Method Summary
Modifier and TypeMethodDescriptionConvert an instance ofAttributeKeyto a string.Convert a string representation ofAttributeKeyto its native type.Methods inherited from class org.pepsoft.util.AttributeKey
equals, get, getFromString, hashCode
-
Constructor Details
-
StringAttributeKey
-
StringAttributeKey
-
-
Method Details
-
toString
Description copied from class:AttributeKeyConvert an instance ofAttributeKeyto a string.- Overrides:
toStringin classAttributeKey<String>- Parameters:
value- The value to convert. Will never benull.- Returns:
- A string representation of the value.
-
toValue
Description copied from class:AttributeKeyConvert a string representation ofAttributeKeyto its native type.This implementation always throws an
UnsupportedOperationException. Subclasses should override this method to implement it.- Overrides:
toValuein classAttributeKey<String>- Parameters:
str- The string representation to convert. Will never benull.- Returns:
- A corresponding instance of
AttributeKey.
-