test_class.file: bundles/org.openhab.core/src/test/java/org/openhab/core/library/items/SwitchItemTest.java
test_class.identifier: SwitchItemTest
test_case.body: @Test
      public void getAsDecimalFromSwitch() {
          SwitchItem item = new SwitchItem("Test");
          item.setState(OnOffType.ON);
          assertEquals(new DecimalType(1), item.getStateAs(DecimalType.class));
          item.setState(OnOffType.OFF);
          assertEquals(new DecimalType(0), item.getStateAs(DecimalType.class));
      }
test_case.class_method_signature: SwitchItemTest.getAsDecimalFromSwitch()
test_case.full_signature: @Test public void getAsDecimalFromSwitch()
test_case.identifier: getAsDecimalFromSwitch
test_case.invocations: setState assertEquals getStateAs setState assertEquals getStateAs
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getAsDecimalFromSwitch()
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.file: bundles/org.openhab.core/src/main/java/org/openhab/core/library/items/SwitchItem.java
focal_class.identifier: SwitchItem
focal_class.class_method_signature: SwitchItem.SwitchItem(String name)
focal_class.full_signature: public  SwitchItem(String name)
focal_class.identifier: SwitchItem
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.signature:  SwitchItem(String name)
focal_class.class_method_signature: SwitchItem.SwitchItem(String type, String name)
focal_class.full_signature:   SwitchItem(String type, String name)
focal_class.identifier: SwitchItem
focal_class.parameters: (String type, String name)
focal_class.signature:  SwitchItem(String type, String name)
focal_class.class_method_signature: SwitchItem.send(OnOffType command)
focal_class.full_signature: public void send(OnOffType command)
focal_class.identifier: send
focal_class.modifiers: public
focal_class.parameters: (OnOffType command)
focal_class.return: void
focal_class.signature: void send(OnOffType command)
focal_class.class_method_signature: SwitchItem.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: SwitchItem.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: SwitchItem.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.superclass: extends GenericItem
focal_method.body: @Override
      public void setState(State state) {
          if (isAcceptedState(acceptedDataTypes, state)) {
              super.setState(state);
          } else {
              logSetTypeError(state);
          }
      }
focal_method.class_method_signature: SwitchItem.setState(State state)
focal_method.full_signature: @Override public void setState(State state)
focal_method.identifier: setState
focal_method.invocations: isAcceptedState setState logSetTypeError
focal_method.modifiers: @Override public
focal_method.parameters: (State state)
focal_method.return: void
focal_method.signature: void setState(State state)