use of org.eclipse.smarthome.core.library.types.StringListType in project smarthome by eclipse.
the class StateUtil method getAllStates.
public static List<State> getAllStates() {
LinkedList<State> states = new LinkedList<>();
DateTimeType dateTime = new DateTimeType();
states.add(dateTime);
DecimalType decimal = new DecimalType(23);
states.add(decimal);
PercentType percent = new PercentType(50);
states.add(percent);
HSBType hsb = new HSBType("50,75,42");
states.add(hsb);
states.add(OnOffType.ON);
states.add(OnOffType.OFF);
states.add(OpenClosedType.OPEN);
states.add(OpenClosedType.CLOSED);
states.add(PlayPauseType.PLAY);
states.add(PlayPauseType.PAUSE);
PointType point = new PointType("42.23,23.5");
states.add(point);
RawType raw = new RawType(new byte[0], "application/octet-stream");
states.add(raw);
states.add(RewindFastforwardType.REWIND);
states.add(RewindFastforwardType.FASTFORWARD);
StringListType stringList = new StringListType(new String[] { "foo", "bar" });
states.add(stringList);
StringType string = new StringType("foo");
states.add(string);
states.add(UnDefType.NULL);
states.add(UnDefType.UNDEF);
states.add(UpDownType.UP);
states.add(UpDownType.DOWN);
QuantityType<Temperature> quantityType = new QuantityType<Temperature>("12 °C");
states.add(quantityType);
return states;
}
use of org.eclipse.smarthome.core.library.types.StringListType in project smarthome by eclipse.
the class CallItemTest method testSetStringListType.
@Test
public void testSetStringListType() {
StringListType callType1 = new StringListType("0699222222", "0179999998");
CallItem callItem1 = new CallItem("testItem");
callItem1.setState(callType1);
assertEquals(callItem1.toString(), "testItem (Type=CallItem, State=0699222222,0179999998, Label=null, Category=null)");
callType1 = new StringListType("0699222222,0179999998");
callItem1.setState(callType1);
assertEquals(callItem1.toString(), "testItem (Type=CallItem, State=0699222222,0179999998, Label=null, Category=null)");
}
Aggregations