@Override public TypedOption<T> setMultiValued(boolean acceptMultipleValues) { super.setMultiValued(acceptMultipleValues); return this; }
case "multiValued": if (member.getValue() instanceof Boolean) { obj.setMultiValued((Boolean)member.getValue());
@Test public void testWithMultipleValues() throws CLIException { Option[] options = new Option[]{ new Option().setShortName("f").setLongName("file") .setMultiValued(true) }; cli.addOptions(Arrays.asList(options)); CommandLine evaluated = cli.parse(Arrays.asList("-f=hello.txt", "--file=hello2.txt")); assertThat(evaluated.cli().getOptions()).hasSize(1); assertThat((String) evaluated.getOptionValue("file")).isEqualTo("hello.txt"); assertThat(evaluated.getOptionValues("f")) .containsExactly("hello.txt", "hello2.txt"); }
@Override public TypedOption<T> setMultiValued(boolean acceptMultipleValues) { super.setMultiValued(acceptMultipleValues); return this; }
case "multiValued": if (member.getValue() instanceof Boolean) { obj.setMultiValued((Boolean)member.getValue());
@Test public void testWithMultipleValues() throws CLIException { Option[] options = new Option[]{ new Option().setShortName("f").setLongName("file") .setMultiValued(true) }; cli.addOptions(Arrays.asList(options)); CommandLine evaluated = cli.parse(Arrays.asList("-f=hello.txt", "--file=hello2.txt")); assertThat(evaluated.cli().getOptions()).hasSize(1); assertThat((String) evaluated.getOptionValue("file")).isEqualTo("hello.txt"); assertThat(evaluated.getOptionValues("f")) .containsExactly("hello.txt", "hello2.txt"); }
.setHidden(TestUtils.randomBoolean()) .setLongName(TestUtils.randomAlphaString(100)) .setMultiValued(TestUtils.randomBoolean()) .setRequired(TestUtils.randomBoolean()) .setShortName(TestUtils.randomAlphaString(100))
.setDescription("vert.x hazelcast list of tcp-ip members to add (es. -hm 10.0.0.1 10.0.0.2 10.0.0.3)") .setRequired(false) .setMultiValued(true)
.setHidden(TestUtils.randomBoolean()) .setLongName(TestUtils.randomAlphaString(100)) .setMultiValued(TestUtils.randomBoolean()) .setRequired(TestUtils.randomBoolean()) .setShortName(TestUtils.randomAlphaString(100))