MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / ensureArguments

Method ensureArguments

test/Test.java:92–100  ·  view source on GitHub ↗
(final String[] args,
                                      final int min,
                                      final int max)

Source from the content-addressed store, hash-verified

90 }
91
92 private static void ensureArguments(final String[] args,
93 final int min,
94 final int max) {
95 if (args.length < min) {
96 fatalUsage("Not enough arguments, need at least " + min, 1);
97 } else if (args.length > max && max > min) {
98 fatalUsage("Too many arguments, need at most " + max, 1);
99 }
100 }
101
102 public static void main(final String[] args) throws Exception {
103 ensureArguments(args, 3, -1);

Callers 9

mainMethod · 0.95
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80

Calls 1

fatalUsageMethod · 0.95

Tested by

no test coverage detected