Ignore:
Timestamp:
2012-06-16T15:55:24+02:00 (12 years ago)
Author:
bastiK
Message:

use gnu getopt for command line processing

improvements:

  • long options can be separated by space from the argument (currently

only "=" works as seperator)

  • short options can be grouped (there aren't many short options at the moment, this is for later)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java

    r5239 r5279  
    55
    66import java.util.ArrayList;
    7 import java.util.Arrays;
    87import java.util.HashMap;
    9 import java.util.HashSet;
    108import java.util.List;
    119import java.util.Map;
    12 import java.util.Set;
    1310import java.util.regex.Matcher;
    1411import java.util.regex.Pattern;
     
    340337    }
    341338
    342     public Bounds parseBounds(String boundsStr) throws ProjectionConfigurationException {
     339    public static Bounds parseBounds(String boundsStr) throws ProjectionConfigurationException {
    343340        String[] numStr = boundsStr.split(",");
    344341        if (numStr.length != 4)
     
    350347    }
    351348
    352     public double parseDouble(Map<String, String> parameters, String parameterName) throws ProjectionConfigurationException {
     349    public static double parseDouble(Map<String, String> parameters, String parameterName) throws ProjectionConfigurationException {
    353350        String doubleStr = parameters.get(parameterName);
    354351        if (doubleStr == null && parameters.containsKey(parameterName))
     
    358355    }
    359356
    360     public double parseDouble(String doubleStr, String parameterName) throws ProjectionConfigurationException {
     357    public static double parseDouble(String doubleStr, String parameterName) throws ProjectionConfigurationException {
    361358        try {
    362359            return Double.parseDouble(doubleStr);
     
    367364    }
    368365
    369     public double parseAngle(String angleStr, String parameterName) throws ProjectionConfigurationException {
     366    public static double parseAngle(String angleStr, String parameterName) throws ProjectionConfigurationException {
    370367        String s = angleStr;
    371368        double value = 0;
Note: See TracChangeset for help on using the changeset viewer.