MCPcopy Create free account
hub / github.com/antlr/codebuff / writeTo

Method writeTo

output/java_guava/1.4.17/Stats.java:565–572  ·  view source on GitHub ↗

Writes to the given ByteBuffer a byte representation of this instance. Note: No guarantees are made regarding stability of the representation between versions. @param buffer A ByteBuffer with at least BYTES ByteBuffer#remaining, ordered as {@link ByteOrder#LIT

(ByteBuffer buffer)

Source from the content-addressed store, hash-verified

563 */
564
565 void writeTo(ByteBuffer buffer) {
566 checkNotNull(buffer);
567 checkArgument(buffer.remaining() >= BYTES,
568 "Expected at least Stats.BYTES = %s remaining , got %s",
569 BYTES,
570 buffer.remaining());
571 buffer.putLong(count).putDouble(mean).putDouble(sumOfSquaresOfDeltas).putDouble(min).putDouble(max);
572 }
573
574 /**
575 * Creates a Stats instance from the given byte representation which was obtained by

Callers 1

toByteArrayMethod · 0.95

Calls 5

putDoubleMethod · 0.65
putLongMethod · 0.65
checkNotNullMethod · 0.45
checkArgumentMethod · 0.45
remainingMethod · 0.45

Tested by

no test coverage detected