[Minor] Code cleanup

This commit is contained in:
Robert von Burg 2023-04-04 16:12:02 +02:00
parent 056a2b2314
commit 89dc892172
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
1 changed files with 23 additions and 3 deletions

View File

@ -12,10 +12,10 @@ public abstract class TimedStateBuilder<T extends StrolchTimedState<?>> {
protected final String id;
protected final String name;
protected final boolean hidden = false;
protected boolean hidden = false;
protected int index;
protected final String interpretation = INTERPRETATION_NONE;
protected final String uom = UOM_NONE;
protected String interpretation = INTERPRETATION_NONE;
protected String uom = UOM_NONE;
public TimedStateBuilder(ResourceBuilder builder, String id, String name) {
this.builder = builder;
@ -23,6 +23,26 @@ public abstract class TimedStateBuilder<T extends StrolchTimedState<?>> {
this.name = name;
}
public TimedStateBuilder<T> hidden(boolean hidden) {
this.hidden = hidden;
return this;
}
public TimedStateBuilder<T> index(int index) {
this.index = index;
return this;
}
public TimedStateBuilder<T> interpretation(String interpretation) {
this.interpretation = interpretation;
return this;
}
public TimedStateBuilder<T> uom(String uom) {
this.uom = uom;
return this;
}
public ResourceBuilder end() {
return this.builder;
}