Package org.openhab.core.thing.type
Class ChannelGroupDefinition
- java.lang.Object
-
- org.openhab.core.thing.type.ChannelGroupDefinition
-
@NonNullByDefault public class ChannelGroupDefinition extends Object
TheChannelGroupDefinition
class defines aChannelGroupType
of aThingType
.A
ChannelGroupType
is part of aThing
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
Constructors Constructor Description ChannelGroupDefinition(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable String
getDescription()
Returns the description (if set).String
getId()
Returns the identifier of the channel group.@Nullable String
getLabel()
Returns the label (if set).ChannelGroupTypeUID
getTypeUID()
Returns the type UID of the channel group.String
toString()
-
-
-
Constructor Detail
-
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 Detail
-
getId
public String getId()
Returns the identifier of the channel group.- Returns:
- the identifier of the channel group (not empty)
-
getTypeUID
public ChannelGroupTypeUID getTypeUID()
Returns the type UID of the channel group.- Returns:
- the type UID of the channel group
-
getLabel
public @Nullable String 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
public @Nullable String 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.
-
-