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

Method readFrom

corpus/java/training/guava/math/Stats.java:569–582  ·  view source on GitHub ↗

Creates a Stats instance from the byte representation read from the given ByteBuffer. Note: No guarantees are made regarding stability of the representation between versions. @param buffer A ByteBuffer with at least BYTES ByteBuffer#remaining, ordered as {@lin

(ByteBuffer buffer)

Source from the content-addressed store, hash-verified

567 * instance is read. In the process increases the position of {@link ByteBuffer} by BYTES.
568 */
569 static Stats readFrom(ByteBuffer buffer) {
570 checkNotNull(buffer);
571 checkArgument(
572 buffer.remaining() >= BYTES,
573 "Expected at least Stats.BYTES = %s remaining , got %s",
574 BYTES,
575 buffer.remaining());
576 return new Stats(
577 buffer.getLong(),
578 buffer.getDouble(),
579 buffer.getDouble(),
580 buffer.getDouble(),
581 buffer.getDouble());
582 }
583
584 private static final long serialVersionUID = 0;
585}

Callers 2

fromByteArrayMethod · 0.95
fromByteArrayMethod · 0.95

Calls 3

checkNotNullMethod · 0.45
checkArgumentMethod · 0.45
remainingMethod · 0.45

Tested by

no test coverage detected