Package org.yamcs.parameterarchive
Class BooleanValueSegment
java.lang.Object
org.yamcs.parameterarchive.BaseSegment
org.yamcs.parameterarchive.BooleanValueSegment
- All Implemented Interfaces:
ValueSegment
Boolean value sgement uses BitSet to represent the boolean values as a set of bits
-
Field Summary
Fields inherited from class org.yamcs.parameterarchive.BaseSegment
FORMAT_ID_BinaryValueSegment, FORMAT_ID_BooleanValueSegment, FORMAT_ID_DoubleValueSegment, FORMAT_ID_FloatValueSegment, FORMAT_ID_GenericValueSegment, FORMAT_ID_IntValueSegment, FORMAT_ID_LongValueSegment, FORMAT_ID_ParameterStatusSegment, FORMAT_ID_SortedTimeValueSegment, FORMAT_ID_StringValueSegment, formatId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add data at the end of the segment.int
getRange
(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 indexvoid
Insert data at position pos.static BooleanValueSegment
parseFrom
(ByteBuffer bb) int
size()
returns the size of the BitSet storing the values - this will round up to the size of longvoid
writeTo
(ByteBuffer bb) write the segment to bufferMethods inherited from class org.yamcs.parameterarchive.BaseSegment
consolidate, getFormatId, parseSegment
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.yamcs.parameterarchive.ValueSegment
consolidate
-
Constructor Details
-
BooleanValueSegment
public BooleanValueSegment()
-
-
Method Details
-
insert
Description copied from interface:ValueSegment
Insert data at position pos. The data at the subsequent positions is shifted to the right.- Specified by:
insert
in interfaceValueSegment
-
add
Description copied from interface:ValueSegment
Add data at the end of the segment.- Specified by:
add
in interfaceValueSegment
-
writeTo
write the segment to buffer- Specified by:
writeTo
in classBaseSegment
- Parameters:
bb
-
-
parseFrom
- Throws:
DecodingException
-
getMaxSerializedSize
public int getMaxSerializedSize()- Specified by:
getMaxSerializedSize
in classBaseSegment
- Returns:
- a high approximation for the serialized size in order to allocate a ByteBuffer big enough
-
getValue
Description copied from interface:ValueSegment
returns Value at position index- Specified by:
getValue
in interfaceValueSegment
- Returns:
- the value at the index
-
getRange
Description copied from interface:ValueSegment
returns an array containing the values in the range [posStart, posStop) if ascending or [posStop, posStart) if descending- Specified by:
getRange
in interfaceValueSegment
- Returns:
- an array containing the values in the specified range
-
size
public int size()returns the size of the BitSet storing the values - this will round up to the size of long- Specified by:
size
in interfaceValueSegment
- Specified by:
size
in classBaseSegment
-