Class ChannelDTOMapper

java.lang.Object
org.openhab.core.thing.dto.ChannelDTOMapper

@NonNullByDefault public class ChannelDTOMapper extends Object
The ChannelDTOMapper is a utility class to map channels into channel data transfer objects (DTOs).
Author:
Stefan Bußweiler - Initial contribution, Kai Kreuzer - added DTO to channel mapping
  • Constructor Details

    • ChannelDTOMapper

      public ChannelDTOMapper()
  • Method Details

    • map

      public static ChannelDTO map(Channel channel)
      Maps channel into channel DTO object.
      Parameters:
      channel - the channel
      Returns:
      the channel DTO object
    • map

      public static Channel map(ChannelDTO channelDTO)
      Maps channel DTO into channel object.
      Parameters:
      channelDTO - the channel DTO
      Returns:
      the channel object