Interface EntityType<ValueType>
- Type Parameters:
ValueType- The type of the entity value.
- All Known Subinterfaces:
HeaderType<ValueType>,ListHeaderType<ValueType>,ParameterType<ValueType>,SingletonHeaderType<ValueType>
public interface EntityType<ValueType>
Represents type of an
Entity. That is, it binds a type name to a value type.-
Method Summary
Modifier and TypeMethodDescriptionFactory method to createEntitys of thisEntityTypefrom a value.entityFromString(String valueString) name()Returns the name of the type.valueFromString(String valueString) Convert a string to a value of type <ValueType>valueString(ValueType value) Returns the string representation of the given entity value as defined for thisEntityType.
-
Method Details
-
name
String name()Returns the name of the type.- Returns:
- The type name, never
null.
-
entityFromString
- Parameters:
valueString- The String representation of the entity value.- Returns:
- A new
Entityinstance.
-
valueFromString
Convert a string to a value of type <ValueType>- Parameters:
valueString- The String representation of the entity value.- Returns:
- A new entity value.
-
entity
Factory method to createEntitys of thisEntityTypefrom a value.- Parameters:
value- The entity value, must not benull- Returns:
- A new
Entityinstance.
-
valueString
Returns the string representation of the given entity value as defined for thisEntityType.- Parameters:
value- The value to convert.- Returns:
- A value String representing the given value.
-