Package org.yamcs.parameterarchive
Class SimpleParameterIterator
java.lang.Object
org.yamcs.parameterarchive.SimpleParameterIterator
- All Implemented Interfaces:
AutoCloseable
,ParameterIterator
,ParchiveIterator<TimedValue>
,PeekingIterator<TimedValue>
For a given parameter id and group id, iterates over all parameters in the parameter archive (across all segments and
partitions).
Provides objects of type TimedValue
.
It embeds an SegmentIterator
object.
-
Constructor Summary
ConstructorDescriptionSimpleParameterIterator
(ParameterArchive parchive, ParameterId parameterId, int parameterGroupId, ParameterRequest req) -
Method Summary
-
Constructor Details
-
SimpleParameterIterator
public SimpleParameterIterator(ParameterArchive parchive, ParameterId parameterId, int parameterGroupId, ParameterRequest req)
-
-
Method Details
-
isValid
public boolean isValid()Description copied from interface:PeekingIterator
Returnstrue
if the iterator has more elements.This method allows to verify whether the iterator has a valid value to be fetched.
- Specified by:
isValid
in interfacePeekingIterator<TimedValue>
- Returns:
true
if the iterator has more elements orfalse
otherwise
-
value
Description copied from interface:PeekingIterator
Returns the current value from the iterator without advancing.This method can only be called if
PeekingIterator.isValid()
returnstrue
. If called afterPeekingIterator.isValid()
returnsfalse
, this method will throw an exception.- Specified by:
value
in interfaceParameterIterator
- Specified by:
value
in interfacePeekingIterator<TimedValue>
- Returns:
- the current element
-
next
public void next()Description copied from interface:PeekingIterator
Moves the iterator to the next element.If
PeekingIterator.isValid()
returnsfalse
, calling this method has no effect.- Specified by:
next
in interfacePeekingIterator<TimedValue>
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceParchiveIterator<TimedValue>
-
getParameterId
- Specified by:
getParameterId
in interfaceParameterIterator
-
getParameterGroupId
public int getParameterGroupId()- Specified by:
getParameterGroupId
in interfaceParameterIterator
-