java.lang.Object
org.yamcs.parameterarchive.BaseSegment
org.yamcs.parameterarchive.IntValueSegment
- All Implemented Interfaces:
ValueSegment
32 bit integers encoded as deltas of deltas (good if the values are relatively constant or in increasing order)
-
Field Summary
Fields inherited from class org.yamcs.parameterarchive.BaseSegment
FORMAT_ID_BinaryValueSegment, FORMAT_ID_BooleanValueSegment, FORMAT_ID_DoubleValueSegment, FORMAT_ID_FloatValueSegment, FORMAT_ID_GapSegment, FORMAT_ID_GenericValueSegment, FORMAT_ID_IntValueSegment, FORMAT_ID_LongValueSegment, FORMAT_ID_ParameterStatusSegment, FORMAT_ID_SortedTimeValueSegmentV1, FORMAT_ID_SortedTimeValueSegmentV2, FORMAT_ID_StringValueSegment, formatId -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd data at the end of the segment.booleanintgetRange(int posStart, int posStop, boolean ascending) returns an array containing the values in the range [posStart, posStop) if ascending or [posStop, posStart) if descendinggetValue(int index) returns Value at position indexinthashCode()voidInsert data at position pos.static IntValueSegmentparseFrom(ByteBuffer bb) intsize()toString()voidwriteTo(ByteBuffer bb) Methods inherited from class org.yamcs.parameterarchive.BaseSegment
consolidate, getFormatId, makeWritable, parseSegmentMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.yamcs.parameterarchive.ValueSegment
consolidate, makeWritable
-
Method Details
-
insert
Description copied from interface:ValueSegmentInsert data at position pos. The data at the subsequent positions is shifted to the right.- Specified by:
insertin interfaceValueSegment
-
add
Description copied from interface:ValueSegmentAdd data at the end of the segment.- Specified by:
addin interfaceValueSegment
-
writeTo
- Specified by:
writeToin classBaseSegment
-
parseFrom
- Throws:
DecodingException
-
getMaxSerializedSize
public int getMaxSerializedSize()- Specified by:
getMaxSerializedSizein classBaseSegment- Returns:
- a high approximation for the serialized size in order to allocate a ByteBuffer big enough
-
getValue
Description copied from interface:ValueSegmentreturns Value at position index- Specified by:
getValuein interfaceValueSegment- Returns:
- the value at the index
-
getRange
Description copied from interface:ValueSegmentreturns an array containing the values in the range [posStart, posStop) if ascending or [posStop, posStart) if descending- Specified by:
getRangein interfaceValueSegment- Returns:
- an array containing the values in the specified range
-
size
public int size()- Specified by:
sizein interfaceValueSegment- Specified by:
sizein classBaseSegment
-
equals
-
hashCode
public int hashCode() -
toString
-