MCPcopy
hub / github.com/google/guava / lengthIfKnown

Method lengthIfKnown

guava/src/com/google/common/io/CharSource.java:190–192  ·  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. <p>The default implementation returns {@link Optional#absent}. Some sources, such as a {@code CharSequence}, may return a non-absent value. Note that in such cases, it is <i>poss

()

Source from the content-addressed store, hash-verified

188 * @since 19.0
189 */
190 public Optional<Long> lengthIfKnown() {
191 return Optional.absent();
192 }
193
194 /**
195 * Returns the length of this source in chars, even if doing so requires opening and traversing an

Callers 4

lengthMethod · 0.95
isEmptyMethod · 0.95
lengthIfKnownMethod · 0.45
testLengthIfKnownMethod · 0.45

Calls 1

absentMethod · 0.95

Tested by 1

testLengthIfKnownMethod · 0.36