test_class.file: bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/PercentTypeTest.java
test_class.identifier: PercentTypeTest
test_case.body: @Test
      public void testConversionToOpenCloseType() {
          assertEquals(OpenClosedType.OPEN, new PercentType("100.0").as(OpenClosedType.class));
          assertEquals(OpenClosedType.CLOSED, new PercentType("0.0").as(OpenClosedType.class));
          assertNull(new PercentType("50.0").as(OpenClosedType.class));
      }
test_case.class_method_signature: PercentTypeTest.testConversionToOpenCloseType()
test_case.full_signature: @Test public void testConversionToOpenCloseType()
test_case.identifier: testConversionToOpenCloseType
test_case.invocations: assertEquals as assertEquals as assertNull as
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testConversionToOpenCloseType()
focal_class.declarator: serialVersionUID = -9066279845951780879L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = -9066279845951780879L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: ZERO = new PercentType(0)
focal_class.modifier: public static final
focal_class.original_string: public static final PercentType ZERO = new PercentType(0);
focal_class.type: PercentType
focal_class.var_name: ZERO
focal_class.declarator: HUNDRED = new PercentType(100)
focal_class.modifier: public static final
focal_class.original_string: public static final PercentType HUNDRED = new PercentType(100);
focal_class.type: PercentType
focal_class.var_name: HUNDRED
focal_class.file: bundles/org.openhab.core/src/main/java/org/openhab/core/library/types/PercentType.java
focal_class.identifier: PercentType
focal_class.class_method_signature: PercentType.PercentType()
focal_class.full_signature: public  PercentType()
focal_class.identifier: PercentType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  PercentType()
focal_class.class_method_signature: PercentType.PercentType(int value)
focal_class.full_signature: public  PercentType(int value)
focal_class.identifier: PercentType
focal_class.modifiers: public
focal_class.parameters: (int value)
focal_class.signature:  PercentType(int value)
focal_class.class_method_signature: PercentType.PercentType(String value)
focal_class.full_signature: public  PercentType(String value)
focal_class.identifier: PercentType
focal_class.modifiers: public
focal_class.parameters: (String value)
focal_class.signature:  PercentType(String value)
focal_class.class_method_signature: PercentType.PercentType(BigDecimal value)
focal_class.full_signature: public  PercentType(BigDecimal value)
focal_class.identifier: PercentType
focal_class.modifiers: public
focal_class.parameters: (BigDecimal value)
focal_class.signature:  PercentType(BigDecimal value)
focal_class.class_method_signature: PercentType.validateValue(BigDecimal value)
focal_class.full_signature: private void validateValue(BigDecimal value)
focal_class.identifier: validateValue
focal_class.modifiers: private
focal_class.parameters: (BigDecimal value)
focal_class.return: void
focal_class.signature: void validateValue(BigDecimal value)
focal_class.class_method_signature: PercentType.valueOf(String value)
focal_class.full_signature: public static PercentType valueOf(String value)
focal_class.identifier: valueOf
focal_class.modifiers: public static
focal_class.parameters: (String value)
focal_class.return: PercentType
focal_class.signature: PercentType valueOf(String value)
focal_class.class_method_signature: PercentType.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 DecimalType
focal_method.body: @Override
      public <T extends State> @Nullable T as(@Nullable Class<T> target) {
          if (target == OnOffType.class) {
              return target.cast(equals(ZERO) ? OnOffType.OFF : OnOffType.ON);
          } else if (target == DecimalType.class) {
              return target.cast(new DecimalType(toBigDecimal().divide(BigDecimal.valueOf(100), 8, RoundingMode.UP)));
          } else if (target == UpDownType.class) {
              if (equals(ZERO)) {
                  return target.cast(UpDownType.UP);
              } else if (equals(HUNDRED)) {
                  return target.cast(UpDownType.DOWN);
              } else {
                  return null;
              }
          } else if (target == OpenClosedType.class) {
              if (equals(ZERO)) {
                  return target.cast(OpenClosedType.CLOSED);
              } else if (equals(HUNDRED)) {
                  return target.cast(OpenClosedType.OPEN);
              } else {
                  return null;
              }
          } else if (target == HSBType.class) {
              return target.cast(new HSBType(DecimalType.ZERO, PercentType.ZERO, this));
          } else if (target == QuantityType.class) {
              return target.cast(new QuantityType<>(toBigDecimal().doubleValue(), SmartHomeUnits.PERCENT));
          } else {
              return defaultConversion(target);
          }
      }
focal_method.class_method_signature: PercentType.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 cast divide toBigDecimal valueOf equals cast equals cast equals cast equals cast cast cast doubleValue toBigDecimal 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)