[New] Added StrolchTimedState.size()
This commit is contained in:
parent
a9e895b2c0
commit
8f71812654
|
@ -145,6 +145,13 @@ public interface ITimeVariable<T extends IValue> {
|
|||
*/
|
||||
void setReadonly();
|
||||
|
||||
/**
|
||||
* Returns the number of values stored on this time variable
|
||||
*
|
||||
* @return the number of values stored on this time variable
|
||||
*/
|
||||
int size();
|
||||
|
||||
/**
|
||||
* Returns true if the given {@link ITimeVariable} is equal to this {@link ITimeVariable} by validating that the
|
||||
* values {@link IValue IValues} have the same time and actual value
|
||||
|
|
|
@ -36,6 +36,11 @@ public class TimeVariable<T extends IValue> implements ITimeVariable<T>, Seriali
|
|||
public NavigableSet<ITimeValue<T>> container = new TreeSet<>();
|
||||
private boolean readonly;
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return this.container.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITimeValue<T> getValueAt(long time) {
|
||||
return this.container.floor(new TimeValue<>(time, null));
|
||||
|
|
Loading…
Reference in New Issue