Mercurial > hg > monetdb-java
diff src/main/java/nl/cwi/monetdb/util/CmdLineOpts.java @ 70:17fbaf2635bb
Expand import java.*.* statements
Also removed trailing spaces and tabs
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 08 Dec 2016 16:23:46 +0100 (2016-12-08) |
parents | a5a898f6886c |
children | b9b35ca2eec2 |
line wrap: on
line diff
--- a/src/main/java/nl/cwi/monetdb/util/CmdLineOpts.java +++ b/src/main/java/nl/cwi/monetdb/util/CmdLineOpts.java @@ -8,26 +8,33 @@ package nl.cwi.monetdb.util; -import java.util.*; -import java.io.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; public class CmdLineOpts { /** the arguments we handle */ private Map<String, OptionContainer> opts = new HashMap<String, OptionContainer>(); /** the options themself */ private List<OptionContainer> options = new ArrayList<OptionContainer>(); - + /** no arguments */ - public static int CAR_ZERO = 0; + public static int CAR_ZERO = 0; /** always one argument */ - public static int CAR_ONE = 1; + public static int CAR_ONE = 1; /** zero or one argument */ public static int CAR_ZERO_ONE = 2; /** zero or many arguments */ public static int CAR_ZERO_MANY = 3; /** one or many arguments */ public static int CAR_ONE_MANY = 4; - + public CmdLineOpts() { } @@ -80,8 +87,8 @@ public class CmdLineOpts { for (Enumeration<?> e = prop.propertyNames(); e.hasMoreElements(); ) { String key = (String) e.nextElement(); OptionContainer option = opts.get(key); - if (option == null) throw - new OptionsException("Unknown option: " + key); + if (option == null) + throw new OptionsException("Unknown option: " + key); option.resetArguments(); option.addArgument(prop.getProperty(key)); } @@ -205,7 +212,7 @@ public class CmdLineOpts { // yes, we don't care about branch mispredictions here ;) if (maxlen < len) maxlen = len; } - + // get the individual strings StringBuilder ret = new StringBuilder(); for (OptionContainer oc : options) { @@ -320,7 +327,6 @@ public class CmdLineOpts { } name = (longa != null) ? longa : shorta; - options.add(this); }