Package org.yamcs.parameterarchive
Class AggrrayIterator
java.lang.Object
org.yamcs.parameterarchive.AggrrayIterator
- All Implemented Interfaces:
AutoCloseable
,ParameterIterator
,ParchiveIterator<TimedValue>
,PeekingIterator<TimedValue>
Iterates over parameter archive segments storing components of an aggregate or array value and reconstructs the
aggregate/array value from those components.
All the values belong to a single parameter group whose id is passed in the constructor.
-
Constructor Summary
ConstructorDescriptionAggrrayIterator
(ParameterArchive parchive, ParameterId parameterId, int parameterGroupId, ParameterRequest req) -
Method Summary
-
Constructor Details
-
AggrrayIterator
public AggrrayIterator(ParameterArchive parchive, ParameterId parameterId, int parameterGroupId, ParameterRequest req)
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceParchiveIterator<TimedValue>
-
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>
-
getParameterId
- Specified by:
getParameterId
in interfaceParameterIterator
-
getParameterGroupId
public int getParameterGroupId()- Specified by:
getParameterGroupId
in interfaceParameterIterator
-