Package org.openhab.core.thing.type
Class ChannelGroupDefinition
java.lang.Object
org.openhab.core.thing.type.ChannelGroupDefinition
The
ChannelGroupDefinition
class defines a ChannelGroupType
of a ThingType
.
A ChannelGroupType
is part of a Thing
that represents a set of channels (functionalities) of it.
Hint: This class is immutable.
- Author:
- Michael Grammling - Initial contribution, Dennis Nobel - Introduced ChannelTypeRegistry and channel type references
-
Constructor Summary
ConstructorDescriptionChannelGroupDefinition
(String id, ChannelGroupTypeUID typeUID) Creates a new instance of this class with the specified parameters.ChannelGroupDefinition
(String id, ChannelGroupTypeUID typeUID, @Nullable String label, @Nullable String description) Creates a new instance of this class with the specified parameters. -
Method Summary
-
Constructor Details
-
ChannelGroupDefinition
public ChannelGroupDefinition(String id, ChannelGroupTypeUID typeUID, @Nullable String label, @Nullable String description) throws IllegalArgumentException Creates a new instance of this class with the specified parameters.- Parameters:
id
- the identifier of the channel group (must not be empty)typeUID
- the type UID of the channel grouplabel
- the label for the channel group to override ChannelGroupTypedescription
- the description for the channel group to override ChannelGroupType- Throws:
IllegalArgumentException
- if the ID is empty
-
ChannelGroupDefinition
public ChannelGroupDefinition(String id, ChannelGroupTypeUID typeUID) throws IllegalArgumentException Creates a new instance of this class with the specified parameters.- Parameters:
id
- the identifier of the channel group (must not be empty)typeUID
- the type UID of the channel group- Throws:
IllegalArgumentException
- if the ID is empty
-
-
Method Details
-
getId
Returns the identifier of the channel group.- Returns:
- the identifier of the channel group (not empty)
-
getTypeUID
Returns the type UID of the channel group.- Returns:
- the type UID of the channel group
-
getLabel
Returns the label (if set). If no label is set, getLabel will return null and the default label for theChannelGroupType
is used.- Returns:
- the label for the channel group.
-
getDescription
Returns the description (if set). If no description is set, getDescription will return null and the default description for theChannelGroupType
is used.- Returns:
- the description for the channel group.
-
toString
-