Class ProfileTypeBuilder<T extends ProfileType>

  • Type Parameters:
    T - the concrete ProfileType sub-interface.

    @NonNullByDefault
    public final class ProfileTypeBuilder<T extends ProfileType>
    extends Object
    Builder for ProfileType instances. It can be used to obtain instances instead of implementing any of the interfaces derived from ProfileType.
    Author:
    Simon Kaufmann - Initial contribution
    • Method Detail

      • withSupportedItemTypes

        public ProfileTypeBuilder<T> withSupportedItemTypes​(String... itemType)
        Declare that the given item type(s) are supported by a profile of this type.
        Parameters:
        itemType -
        Returns:
        the builder itself
      • withSupportedItemTypes

        public ProfileTypeBuilder<T> withSupportedItemTypes​(Collection<String> itemTypes)
        Declare that the given item type(s) are supported by a profile of this type.
        Parameters:
        itemType -
        Returns:
        the builder itself
      • withSupportedChannelTypeUIDs

        public ProfileTypeBuilder<T> withSupportedChannelTypeUIDs​(ChannelTypeUID... channelTypeUIDs)
        Declare that the given channel type(s) are supported by a profile of this type.
        Parameters:
        channelTypeUIDs -
        Returns:
        the builder itself
      • withSupportedChannelTypeUIDs

        public ProfileTypeBuilder<T> withSupportedChannelTypeUIDs​(Collection<ChannelTypeUID> channelTypeUIDs)
        Declare that the given channel type(s) are supported by a profile of this type.
        Parameters:
        channelTypeUIDs -
        Returns:
        the builder itself
      • withSupportedItemTypesOfChannel

        public ProfileTypeBuilder<T> withSupportedItemTypesOfChannel​(String... supportedItemTypesOfChannel)
        Declare that channels with these item type(s) are compatible with profiles of this type.
        Parameters:
        supportedItemTypesOfChannel - item types on channel to which this profile type is compatible with
        Returns:
        the builder itself
      • withSupportedItemTypesOfChannel

        public ProfileTypeBuilder<T> withSupportedItemTypesOfChannel​(Collection<String> supportedItemTypesOfChannel)
        Declare that channels with these item type(s) are compatible with profiles of this type.
        Parameters:
        supportedItemTypesOfChannel - item types on channel to which this profile type is compatible with
        Returns:
        the builder itself
      • build

        public T build()
        Create a profile type instance with the previously given parameters.
        Returns:
        the according subtype of ProfileType