From 7d0aad767ed0479c8aa7fe5e347db3a70d4150b2 Mon Sep 17 00:00:00 2001 From: Marcel Otte Date: Tue, 9 Dec 2014 20:55:57 +0100 Subject: [PATCH] made example current --- .../mmo/cmdlineoptions/examples/Example.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/java/src/to/mmo/cmdlineoptions/examples/Example.java b/java/src/to/mmo/cmdlineoptions/examples/Example.java index c0308e2..33c58c7 100644 --- a/java/src/to/mmo/cmdlineoptions/examples/Example.java +++ b/java/src/to/mmo/cmdlineoptions/examples/Example.java @@ -8,26 +8,27 @@ public class Example { CmdOptions.i().createOption("name").// give the option a name which you // can // remember within your project - addCommand("--name") // it's always good to define a long - // commandline parameter with a - // describing name + addLongCommand("--name"). // it's always good to define a + // long + // commandline parameter with a + // describing name - .addCommand("-n") // of course, programmer are always lazy so - // give them an possibility to shortcut your - // option - .addDefaultParameter("whatever")// a default parameter is good + addCommand("-n"). // of course, programmer are always lazy so + // give them an possibility to shortcut your + // option + addDefaultParameter("whatever").// a default parameter is good // if you need the option within // your program, but don't care // when it's omitted on // execution - .setDescription("an example option.");// And of course a + setDescription("an example option.");// And of course a // description... for // the help readers, the // few among us... CmdOptions .i() .createOption("complex") - .addCommand("--complex") + .addLongCommand("--complex") // see above // yes you can omit a default parameter, but you have to // check later in your project if that option is set. @@ -42,7 +43,7 @@ public class Example { // here you are able to add some more alternatives for that // option, so here you can use "--complex", "-c", "-i" and // "--ccp" to trigger this option. - .addCommand("-i").addCommand("--ccp"); + .addCommand("-i").addLongCommand("--ccp"); }