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

Class LongParser

output/java_guava/1.4.18/CacheBuilderSpec.java:292–306  ·  view source on GitHub ↗

Base class for parsing integers.

Source from the content-addressed store, hash-verified

290 /** Base class for parsing integers. */
291
292 abstract static class LongParser implements ValueParser {
293
294
295 protected abstract void parseLong(CacheBuilderSpec spec, long value);
296
297 @Override
298 public void parse(CacheBuilderSpec spec, String key, String value) {
299 checkArgument(value != null && !value.isEmpty(), "value of key %s omitted", key);
300 try {
301 parseLong(spec, Long.parseLong(value));
302 } catch (NumberFormatException e) {
303 throw new IllegalArgumentException(format("key %s value set to %s, must be integer", key, value), e);
304 }
305 }
306 }
307
308 /** Parse initialCapacity */
309

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected