Package org.apache.oodt.cas.cli.util

Examples of org.apache.oodt.cas.cli.util.ParsedArg


   public List<ParsedArg> parse(String[] args) throws CmdLineParserException {
      List<ParsedArg> parsedArgs = Lists.newArrayList();

      for (String arg : args) {
         if (isOption(arg)) {
            parsedArgs.add(new ParsedArg(getOptionName(arg),
                  ParsedArg.Type.OPTION));
         } else {
            parsedArgs.add(new ParsedArg(arg, ParsedArg.Type.VALUE));
         }
      }
      return parsedArgs;
   }
View Full Code Here


   }

   @VisibleForTesting
   /* package */static List<String> getValues(CmdLineIterable<ParsedArg> args) {
      List<String> values = new ArrayList<String>();
      ParsedArg nextValue = args.incrementAndGet();
      while (nextValue != null && nextValue.getType().equals(ParsedArg.Type.VALUE)) {
         values.add(nextValue.getName());
         nextValue = args.incrementAndGet();
      }
      args.descrementIndex();
      return values;
   }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.cli.util.ParsedArg

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.