Skip to content
Sebastian Hasait edited this page Dec 29, 2013 · 2 revisions

Welcome to the CLAP wiki!

Example 1:

	CLAP clap = new CLAP(nls);

	CLAPValue<Boolean> verboseOption = clap.addFlag('v', "verbose", false, "vdkey", "vukey");
	CLAPValue<Boolean> helpOption = clap.addFlag('h', "help", false, "hdkey", "hukey");
	CLAPValue<Integer> portOption = clap.addOption1(Integer.class, 'p', "port", false, "pdkey", "pukey");

	CLAPResult result = clap.parse("-vvp22", "-h");

	assertEquals(2, result.getCount(verboseOption));
	assertTrue(result.contains(helpOption));
	assertTrue(result.contains(portOption));
	assertEquals(Integer.valueOf(22), result.getValue(portOption));
Clone this wiki locally