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

Method lengthIfKnown

corpus/java/training/guava/io/CharSource.java:129–132  ·  view source on GitHub ↗

Returns the size of this source in chars, if the size can be easily determined without actually opening the data stream. The default implementation returns Optional#absent. Some sources, such as a CharSequence, may return a non-absent value. Note that in such cases, it is poss

()

Source from the content-addressed store, hash-verified

127 * @since 19.0
128 */
129 @Beta
130 public Optional<Long> lengthIfKnown() {
131 return Optional.absent();
132 }
133
134 /**
135 * Returns the length of this source in chars, even if doing so requires opening and traversing an

Callers 3

lengthMethod · 0.95
isEmptyMethod · 0.95
lengthIfKnownMethod · 0.45

Calls 1

absentMethod · 0.95

Tested by

no test coverage detected