MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / longValue

Method longValue

src/core/BatchedDataPoints.java:434–450  ·  view source on GitHub ↗
(final int i)

Source from the content-addressed store, hash-verified

432 }
433
434 @Override
435 public long longValue(final int i) {
436 checkIndex(i);
437 // compute the prope value and qualifier offsets
438 int v_offset = 0;
439 int q_offset = 0;
440 for (int j = 0; j < i; j++) {
441 v_offset += Internal.getValueLengthFromQualifier(batched_qualifier, q_offset);
442 q_offset += Internal.getQualifierLength(batched_qualifier, q_offset);
443 }
444
445 if (isInteger(i, q_offset)) {
446 final short flags = Internal.getFlagsFromQualifier(batched_qualifier, q_offset);
447 return Internal.extractIntegerValue(batched_value, v_offset, (byte)flags);
448 }
449 throw new ClassCastException("value #" + i + " is not a long in " + this);
450 }
451
452 @Override
453 public double doubleValue(final int i) {

Callers

nothing calls this directly

Calls 6

checkIndexMethod · 0.95
getQualifierLengthMethod · 0.95
isIntegerMethod · 0.95
getFlagsFromQualifierMethod · 0.95
extractIntegerValueMethod · 0.95

Tested by

no test coverage detected