test_class.file: bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/HSBTypeTest.java
test_class.identifier: HSBTypeTest
test_case.body: @Test
      public void testConversionToPercentType() {
          assertEquals(PercentType.HUNDRED, new HSBType("100,100,100").as(PercentType.class));
          assertEquals(new PercentType("1"), new HSBType("100,100,1").as(PercentType.class));
          assertEquals(PercentType.ZERO, new HSBType("100,100,0").as(PercentType.class));
      }
test_case.class_method_signature: HSBTypeTest.testConversionToPercentType()
test_case.full_signature: @Test public void testConversionToPercentType()
test_case.identifier: testConversionToPercentType
test_case.invocations: assertEquals as assertEquals as assertEquals as
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testConversionToPercentType()
focal_class.declarator: serialVersionUID = 322902950356613226L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 322902950356613226L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: KEY_HUE = "h"
focal_class.modifier: public static final
focal_class.original_string: public static final String KEY_HUE = "h";
focal_class.type: String
focal_class.var_name: KEY_HUE
focal_class.declarator: KEY_SATURATION = "s"
focal_class.modifier: public static final
focal_class.original_string: public static final String KEY_SATURATION = "s";
focal_class.type: String
focal_class.var_name: KEY_SATURATION
focal_class.declarator: KEY_BRIGHTNESS = "b"
focal_class.modifier: public static final
focal_class.original_string: public static final String KEY_BRIGHTNESS = "b";
focal_class.type: String
focal_class.var_name: KEY_BRIGHTNESS
focal_class.declarator: BLACK = new HSBType("0,0,0")
focal_class.modifier: public static final
focal_class.original_string: public static final HSBType BLACK = new HSBType("0,0,0");
focal_class.type: HSBType
focal_class.var_name: BLACK
focal_class.declarator: WHITE = new HSBType("0,0,100")
focal_class.modifier: public static final
focal_class.original_string: public static final HSBType WHITE = new HSBType("0,0,100");
focal_class.type: HSBType
focal_class.var_name: WHITE
focal_class.declarator: RED = new HSBType("0,100,100")
focal_class.modifier: public static final
focal_class.original_string: public static final HSBType RED = new HSBType("0,100,100");
focal_class.type: HSBType
focal_class.var_name: RED
focal_class.declarator: GREEN = new HSBType("120,100,100")
focal_class.modifier: public static final
focal_class.original_string: public static final HSBType GREEN = new HSBType("120,100,100");
focal_class.type: HSBType
focal_class.var_name: GREEN
focal_class.declarator: BLUE = new HSBType("240,100,100")
focal_class.modifier: public static final
focal_class.original_string: public static final HSBType BLUE = new HSBType("240,100,100");
focal_class.type: HSBType
focal_class.var_name: BLUE
focal_class.declarator: XY2RGB[][] = { { 3.2406f, -1.5372f, -0.4986f }, { -0.9689f, 1.8758f, 0.0415f },
              { 0.0557f, -0.2040f, 1.0570f } }
focal_class.modifier: private static final
focal_class.original_string: private static final float XY2RGB[][] = { { 3.2406f, -1.5372f, -0.4986f }, { -0.9689f, 1.8758f, 0.0415f },
              { 0.0557f, -0.2040f, 1.0570f } };
focal_class.type: float
focal_class.var_name: XY2RGB
focal_class.declarator: RGB2XY[][] = { { 0.4124f, 0.3576f, 0.1805f }, { 0.2126f, 0.7152f, 0.0722f },
              { 0.0193f, 0.1192f, 0.9505f } }
focal_class.modifier: private static final
focal_class.original_string: private static final float RGB2XY[][] = { { 0.4124f, 0.3576f, 0.1805f }, { 0.2126f, 0.7152f, 0.0722f },
              { 0.0193f, 0.1192f, 0.9505f } };
focal_class.type: float
focal_class.var_name: RGB2XY
focal_class.declarator: hue
focal_class.modifier: protected
focal_class.original_string: protected BigDecimal hue;
focal_class.type: BigDecimal
focal_class.var_name: hue
focal_class.declarator: saturation
focal_class.modifier: protected
focal_class.original_string: protected BigDecimal saturation;
focal_class.type: BigDecimal
focal_class.var_name: saturation
focal_class.file: bundles/org.openhab.core/src/main/java/org/openhab/core/library/types/HSBType.java
focal_class.identifier: HSBType
focal_class.interfaces: implements ComplexType, State, Command
focal_class.class_method_signature: HSBType.HSBType()
focal_class.full_signature: public  HSBType()
focal_class.identifier: HSBType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  HSBType()
focal_class.class_method_signature: HSBType.HSBType(DecimalType h, PercentType s, PercentType b)
focal_class.full_signature: public  HSBType(DecimalType h, PercentType s, PercentType b)
focal_class.identifier: HSBType
focal_class.modifiers: public
focal_class.parameters: (DecimalType h, PercentType s, PercentType b)
focal_class.signature:  HSBType(DecimalType h, PercentType s, PercentType b)
focal_class.class_method_signature: HSBType.HSBType(String value)
focal_class.full_signature: public  HSBType(String value)
focal_class.identifier: HSBType
focal_class.modifiers: public
focal_class.parameters: (String value)
focal_class.signature:  HSBType(String value)
focal_class.class_method_signature: HSBType.validateValue(BigDecimal hue, BigDecimal saturation, BigDecimal value)
focal_class.full_signature: private void validateValue(BigDecimal hue, BigDecimal saturation, BigDecimal value)
focal_class.identifier: validateValue
focal_class.modifiers: private
focal_class.parameters: (BigDecimal hue, BigDecimal saturation, BigDecimal value)
focal_class.return: void
focal_class.signature: void validateValue(BigDecimal hue, BigDecimal saturation, BigDecimal value)
focal_class.class_method_signature: HSBType.valueOf(String value)
focal_class.full_signature: public static HSBType valueOf(String value)
focal_class.identifier: valueOf
focal_class.modifiers: public static
focal_class.parameters: (String value)
focal_class.return: HSBType
focal_class.signature: HSBType valueOf(String value)
focal_class.class_method_signature: HSBType.fromRGB(int r, int g, int b)
focal_class.full_signature: public static HSBType fromRGB(int r, int g, int b)
focal_class.identifier: fromRGB
focal_class.modifiers: public static
focal_class.parameters: (int r, int g, int b)
focal_class.return: HSBType
focal_class.signature: HSBType fromRGB(int r, int g, int b)
focal_class.class_method_signature: HSBType.fromXY(float x, float y)
focal_class.full_signature: public static HSBType fromXY(float x, float y)
focal_class.identifier: fromXY
focal_class.modifiers: public static
focal_class.parameters: (float x, float y)
focal_class.return: HSBType
focal_class.signature: HSBType fromXY(float x, float y)
focal_class.class_method_signature: HSBType.getConstituents()
focal_class.full_signature: @Override public SortedMap<String, PrimitiveType> getConstituents()
focal_class.identifier: getConstituents
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: SortedMap<String, PrimitiveType>
focal_class.signature: SortedMap<String, PrimitiveType> getConstituents()
focal_class.class_method_signature: HSBType.getHue()
focal_class.full_signature: public DecimalType getHue()
focal_class.identifier: getHue
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: DecimalType
focal_class.signature: DecimalType getHue()
focal_class.class_method_signature: HSBType.getSaturation()
focal_class.full_signature: public PercentType getSaturation()
focal_class.identifier: getSaturation
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: PercentType
focal_class.signature: PercentType getSaturation()
focal_class.class_method_signature: HSBType.getBrightness()
focal_class.full_signature: public PercentType getBrightness()
focal_class.identifier: getBrightness
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: PercentType
focal_class.signature: PercentType getBrightness()
focal_class.class_method_signature: HSBType.getRed()
focal_class.full_signature: public PercentType getRed()
focal_class.identifier: getRed
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: PercentType
focal_class.signature: PercentType getRed()
focal_class.class_method_signature: HSBType.getGreen()
focal_class.full_signature: public PercentType getGreen()
focal_class.identifier: getGreen
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: PercentType
focal_class.signature: PercentType getGreen()
focal_class.class_method_signature: HSBType.getBlue()
focal_class.full_signature: public PercentType getBlue()
focal_class.identifier: getBlue
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: PercentType
focal_class.signature: PercentType getBlue()
focal_class.class_method_signature: HSBType.getRGB()
focal_class.full_signature: public int getRGB()
focal_class.identifier: getRGB
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getRGB()
focal_class.class_method_signature: HSBType.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: HSBType.toFullString()
focal_class.full_signature: @Override public String toFullString()
focal_class.identifier: toFullString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toFullString()
focal_class.class_method_signature: HSBType.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: HSBType.equals(@Nullable Object obj)
focal_class.full_signature: @Override public boolean equals(@Nullable Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(@Nullable Object obj)
focal_class.class_method_signature: HSBType.toRGB()
focal_class.full_signature: public PercentType[] toRGB()
focal_class.identifier: toRGB
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: PercentType[]
focal_class.signature: PercentType[] toRGB()
focal_class.class_method_signature: HSBType.gammaCompress(float c)
focal_class.full_signature: private static float gammaCompress(float c)
focal_class.identifier: gammaCompress
focal_class.modifiers: private static
focal_class.parameters: (float c)
focal_class.return: float
focal_class.signature: float gammaCompress(float c)
focal_class.class_method_signature: HSBType.gammaDecompress(float c)
focal_class.full_signature: private static float gammaDecompress(float c)
focal_class.identifier: gammaDecompress
focal_class.modifiers: private static
focal_class.parameters: (float c)
focal_class.return: float
focal_class.signature: float gammaDecompress(float c)
focal_class.class_method_signature: HSBType.toXY()
focal_class.full_signature: public PercentType[] toXY()
focal_class.identifier: toXY
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: PercentType[]
focal_class.signature: PercentType[] toXY()
focal_class.class_method_signature: HSBType.convertPercentToByte(PercentType percent)
focal_class.full_signature: private int convertPercentToByte(PercentType percent)
focal_class.identifier: convertPercentToByte
focal_class.modifiers: private
focal_class.parameters: (PercentType percent)
focal_class.return: int
focal_class.signature: int convertPercentToByte(PercentType percent)
focal_class.class_method_signature: HSBType.as(@Nullable Class<T> target)
focal_class.full_signature: @Override public T as(@Nullable Class<T> target)
focal_class.identifier: as
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable Class<T> target)
focal_class.return: T
focal_class.signature: T as(@Nullable Class<T> target)
focal_class.superclass: extends PercentType
focal_method.body: @Override
      public <T extends State> @Nullable T as(@Nullable Class<T> target) {
          if (target == OnOffType.class) {
              // if brightness is not completely off, we consider the state to be on
              return target.cast(PercentType.ZERO.equals(getBrightness()) ? OnOffType.OFF : OnOffType.ON);
          } else if (target == DecimalType.class) {
              return target.cast(new DecimalType(
                      getBrightness().toBigDecimal().divide(BigDecimal.valueOf(100), 8, RoundingMode.UP)));
          } else if (target == PercentType.class) {
              return target.cast(new PercentType(getBrightness().toBigDecimal()));
          } else {
              return defaultConversion(target);
          }
      }
focal_method.class_method_signature: HSBType.as(@Nullable Class<T> target)
focal_method.full_signature: @Override public T as(@Nullable Class<T> target)
focal_method.identifier: as
focal_method.invocations: cast equals getBrightness cast divide toBigDecimal getBrightness valueOf cast toBigDecimal getBrightness defaultConversion
focal_method.modifiers: @Override public
focal_method.parameters: (@Nullable Class<T> target)
focal_method.return: T
focal_method.signature: T as(@Nullable Class<T> target)