[Fix] Resource.getTimedState returns List<StrolchTimedState<? extends IValue<?>>>
This commit is contained in:
parent
b654fd4bf7
commit
0067bb7074
|
@ -144,7 +144,7 @@ public class Resource extends AbstractStrolchRootElement implements StrolchRootE
|
||||||
return new HashSet<>(this.timedStateMap.keySet());
|
return new HashSet<>(this.timedStateMap.keySet());
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<StrolchTimedState<IValue<?>>> getTimedStates() {
|
public List<StrolchTimedState<? extends IValue<?>>> getTimedStates() {
|
||||||
if (this.timedStateMap == null) {
|
if (this.timedStateMap == null) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,10 +230,10 @@ public class StrolchElementToSaxWriterVisitor implements StrolchRootElementVisit
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void writeTimedStates(Resource resource) throws XMLStreamException {
|
protected void writeTimedStates(Resource resource) throws XMLStreamException {
|
||||||
List<StrolchTimedState<IValue<?>>> timedStates = resource.getTimedStates();
|
List<StrolchTimedState<? extends IValue<?>>> timedStates = resource.getTimedStates();
|
||||||
for (StrolchTimedState<IValue<?>> timedState : timedStates) {
|
for (StrolchTimedState<? extends IValue<?>> timedState : timedStates) {
|
||||||
ITimeVariable<IValue<?>> timeEvolution = timedState.getTimeEvolution();
|
ITimeVariable<? extends IValue<?>> timeEvolution = timedState.getTimeEvolution();
|
||||||
SortedSet<ITimeValue<IValue<?>>> values = timeEvolution.getValues();
|
SortedSet<? extends ITimeValue<? extends IValue<?>>> values = timeEvolution.getValues();
|
||||||
|
|
||||||
writeStartStrolchElement(Tags.TIMED_STATE, values.isEmpty(), timedState);
|
writeStartStrolchElement(Tags.TIMED_STATE, values.isEmpty(), timedState);
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ public class StrolchElementToSaxWriterVisitor implements StrolchRootElementVisit
|
||||||
if (timedState.getIndex() != 0)
|
if (timedState.getIndex() != 0)
|
||||||
this.writer.writeAttribute(Tags.INDEX, Integer.toString(timedState.getIndex()));
|
this.writer.writeAttribute(Tags.INDEX, Integer.toString(timedState.getIndex()));
|
||||||
|
|
||||||
for (ITimeValue<IValue<?>> timeValue : values) {
|
for (ITimeValue<? extends IValue<?>> timeValue : values) {
|
||||||
this.writer.writeEmptyElement(Tags.VALUE);
|
this.writer.writeEmptyElement(Tags.VALUE);
|
||||||
this.writer
|
this.writer
|
||||||
.writeAttribute(Tags.TIME, ISO8601FormatFactory.getInstance().formatDate(timeValue.getTime()));
|
.writeAttribute(Tags.TIME, ISO8601FormatFactory.getInstance().formatDate(timeValue.getTime()));
|
||||||
|
|
Loading…
Reference in New Issue