test_class.declarator: ITEM_NAME = "test"
test_class.modifier: private static final
test_class.original_string: private static final String ITEM_NAME = "test";
test_class.type: String
test_class.var_name: ITEM_NAME
test_class.declarator: stateDescriptionService
test_class.modifier: private @Mock
test_class.original_string: private @Mock StateDescriptionService stateDescriptionService;
test_class.type: StateDescriptionService
test_class.var_name: stateDescriptionService
test_class.file: bundles/org.openhab.core/src/test/java/org/openhab/core/library/items/NumberItemTest.java
test_class.identifier: NumberItemTest
test_case.body: @SuppressWarnings("null")
      @Test
      public void testLeaveUnitPlaceholderOnDimensionNumberItem() {
          NumberItem item = new NumberItem("Number:Temperature", ITEM_NAME);
          item.setStateDescriptionService(stateDescriptionService);
  
          assertThat(item.getStateDescription().getPattern(), is("%.1f " + UnitUtils.UNIT_PLACEHOLDER));
      }
test_case.class_method_signature: NumberItemTest.testLeaveUnitPlaceholderOnDimensionNumberItem()
test_case.full_signature: @SuppressWarnings("null") @Test public void testLeaveUnitPlaceholderOnDimensionNumberItem()
test_case.identifier: testLeaveUnitPlaceholderOnDimensionNumberItem
test_case.invocations: setStateDescriptionService assertThat getPattern getStateDescription is
test_case.modifiers: @SuppressWarnings("null") @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLeaveUnitPlaceholderOnDimensionNumberItem()
focal_class.declarator: acceptedDataTypes = new ArrayList<>()
focal_class.modifier: private static
focal_class.original_string: private static List<Class<? extends State>> acceptedDataTypes = new ArrayList<>();
focal_class.type: List<Class<? extends State>>
focal_class.var_name: acceptedDataTypes
focal_class.declarator: acceptedCommandTypes = new ArrayList<>()
focal_class.modifier: private static
focal_class.original_string: private static List<Class<? extends Command>> acceptedCommandTypes = new ArrayList<>();
focal_class.type: List<Class<? extends Command>>
focal_class.var_name: acceptedCommandTypes
focal_class.declarator: dimension
focal_class.modifier: @Nullable
      private
focal_class.original_string: @Nullable
      private Class<? extends Quantity<?>> dimension;
focal_class.type: Class<? extends Quantity<?>>
focal_class.var_name: dimension
focal_class.file: bundles/org.openhab.core/src/main/java/org/openhab/core/library/items/NumberItem.java
focal_class.identifier: NumberItem
focal_class.class_method_signature: NumberItem.NumberItem(String name)
focal_class.full_signature: public  NumberItem(String name)
focal_class.identifier: NumberItem
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.signature:  NumberItem(String name)
focal_class.class_method_signature: NumberItem.NumberItem(String type, String name)
focal_class.full_signature: public  NumberItem(String type, String name)
focal_class.identifier: NumberItem
focal_class.modifiers: public
focal_class.parameters: (String type, String name)
focal_class.signature:  NumberItem(String type, String name)
focal_class.class_method_signature: NumberItem.getAcceptedDataTypes()
focal_class.full_signature: @Override public List<Class<? extends State>> getAcceptedDataTypes()
focal_class.identifier: getAcceptedDataTypes
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<Class<? extends State>>
focal_class.signature: List<Class<? extends State>> getAcceptedDataTypes()
focal_class.class_method_signature: NumberItem.getAcceptedCommandTypes()
focal_class.full_signature: @Override public List<Class<? extends Command>> getAcceptedCommandTypes()
focal_class.identifier: getAcceptedCommandTypes
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<Class<? extends Command>>
focal_class.signature: List<Class<? extends Command>> getAcceptedCommandTypes()
focal_class.class_method_signature: NumberItem.send(DecimalType command)
focal_class.full_signature: public void send(DecimalType command)
focal_class.identifier: send
focal_class.modifiers: public
focal_class.parameters: (DecimalType command)
focal_class.return: void
focal_class.signature: void send(DecimalType command)
focal_class.class_method_signature: NumberItem.getStateDescription(@Nullable Locale locale)
focal_class.full_signature: @Override public @Nullable StateDescription getStateDescription(@Nullable Locale locale)
focal_class.identifier: getStateDescription
focal_class.modifiers: @Override public @Nullable
focal_class.parameters: (@Nullable Locale locale)
focal_class.return: StateDescription
focal_class.signature: StateDescription getStateDescription(@Nullable Locale locale)
focal_class.class_method_signature: NumberItem.getDimension()
focal_class.full_signature: public @Nullable Class<? extends Quantity<?>> getDimension()
focal_class.identifier: getDimension
focal_class.modifiers: public @Nullable
focal_class.parameters: ()
focal_class.return: Class<? extends Quantity<?>>
focal_class.signature: Class<? extends Quantity<?>> getDimension()
focal_class.class_method_signature: NumberItem.setState(State state)
focal_class.full_signature: @Override public void setState(State state)
focal_class.identifier: setState
focal_class.modifiers: @Override public
focal_class.parameters: (State state)
focal_class.return: void
focal_class.signature: void setState(State state)
focal_class.class_method_signature: NumberItem.getUnitSymbol()
focal_class.full_signature: public @Nullable String getUnitSymbol()
focal_class.identifier: getUnitSymbol
focal_class.modifiers: public @Nullable
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getUnitSymbol()
focal_class.class_method_signature: NumberItem.getUnit()
focal_class.full_signature: public @Nullable Unit<? extends Quantity<?>> getUnit()
focal_class.identifier: getUnit
focal_class.modifiers: public @Nullable
focal_class.parameters: ()
focal_class.return: Unit<? extends Quantity<?>>
focal_class.signature: Unit<? extends Quantity<?>> getUnit()
focal_class.class_method_signature: NumberItem.toQuantityType(DecimalType originalType,
              @Nullable Class<? extends Quantity<?>> dimension)
focal_class.full_signature: public @Nullable QuantityType<?> toQuantityType(DecimalType originalType,
              @Nullable Class<? extends Quantity<?>> dimension)
focal_class.identifier: toQuantityType
focal_class.modifiers: public @Nullable
focal_class.parameters: (DecimalType originalType,
              @Nullable Class<? extends Quantity<?>> dimension)
focal_class.return: QuantityType<?>
focal_class.signature: QuantityType<?> toQuantityType(DecimalType originalType,
              @Nullable Class<? extends Quantity<?>> dimension)
focal_class.class_method_signature: NumberItem.getUnit(@Nullable Class<? extends Quantity<?>> dimension)
focal_class.full_signature: @SuppressWarnings({ "unchecked", "rawtypes" }) private @Nullable Unit<? extends Quantity<?>> getUnit(@Nullable Class<? extends Quantity<?>> dimension)
focal_class.identifier: getUnit
focal_class.modifiers: @SuppressWarnings({ "unchecked", "rawtypes" }) private @Nullable
focal_class.parameters: (@Nullable Class<? extends Quantity<?>> dimension)
focal_class.return: Unit<? extends Quantity<?>>
focal_class.signature: Unit<? extends Quantity<?>> getUnit(@Nullable Class<? extends Quantity<?>> dimension)
focal_class.superclass: extends GenericItem
focal_method.body: @Override
      public @Nullable StateDescription getStateDescription(@Nullable Locale locale) {
          StateDescription stateDescription = super.getStateDescription(locale);
          if (getDimension() == null && stateDescription != null && stateDescription.getPattern() != null
                  && stateDescription.getPattern().contains(UnitUtils.UNIT_PLACEHOLDER)) {
              return StateDescriptionFragmentBuilder.create(stateDescription)
                      .withPattern(stateDescription.getPattern().replaceAll(UnitUtils.UNIT_PLACEHOLDER, "").trim())
                      .build().toStateDescription();
          }
  
          return stateDescription;
      }
focal_method.class_method_signature: NumberItem.getStateDescription(@Nullable Locale locale)
focal_method.full_signature: @Override public @Nullable StateDescription getStateDescription(@Nullable Locale locale)
focal_method.identifier: getStateDescription
focal_method.invocations: getStateDescription getDimension getPattern contains getPattern toStateDescription build withPattern create trim replaceAll getPattern
focal_method.modifiers: @Override public @Nullable
focal_method.parameters: (@Nullable Locale locale)
focal_method.return: StateDescription
focal_method.signature: StateDescription getStateDescription(@Nullable Locale locale)