Package org.openhab.core.types
Interface Type
- All Known Subinterfaces:
Command
,ComplexType
,PrimitiveType
,State
- All Known Implementing Classes:
DateTimeType
,DecimalType
,HSBType
,IncreaseDecreaseType
,NextPreviousType
,OnOffType
,OpenClosedType
,PercentType
,PlayPauseType
,PointType
,QuantityType
,RawType
,RefreshType
,RewindFastforwardType
,StopMoveType
,StringListType
,StringType
,UnDefType
,UpDownType
@NonNullByDefault
public interface Type
This is a parent interface for all states and commands.
It was introduced as many states can be commands at the same time and
vice versa. E.g a light can have the state ON or OFF and one can
also send ON and OFF as commands to the device. This duality is
captured by this marker interface and allows implementing classes
to be both state and command at the same time.
- Author:
- Kai Kreuzer - Initial contribution, Markus Rathgeb - Add the simple and full type string methods
-
Method Summary
-
Method Details
-
format
Formats the value of this type according to a pattern (seeFormatter
).- Parameters:
pattern
- the pattern to use- Returns:
- the formatted string
-
toFullString
String toFullString()Get a string representation that contains the whole internal representation of the type.The returned string could be consumed by the static 'valueOf(String)' method of the respective type to build a new type that is equal to this type.
- Returns:
- a full string representation of the type to be consumed by 'valueOf(String)'
-