Tabnine Logo
Option
Code IndexAdd Tabnine to your IDE (free)

How to use
Option
in
org.apache.commons.cli2

Best Java code snippets using org.apache.commons.cli2.Option (Showing top 9 results out of 315)

origin: org.apache.mahout/mahout-mrlegacy

/**
 * @param name The name of the option
 * @return the {@link org.apache.commons.cli2.Option} with the name, else null
 */
protected Option getCLIOption(String name) {
 for (Option option : options) {
  if (option.getPreferredName().equals(name)) {
   return option;
  }
 }
 return null;
}
origin: org.apache.jackrabbit.vault/vault-cli

public boolean hasName(String name) {
  return getCommand().getTriggers().contains(name);
}
origin: org.apache.jackrabbit.vault/vault-cli

final List helpLines = option.helpLines(
    skipToplevel ? -1 : 0, getDisplaySettings(), getComparator());
if (skipToplevel) {
origin: org.apache.mahout/mahout-mr

/**
 * @param name The name of the option
 * @return the {@link org.apache.commons.cli2.Option} with the name, else null
 */
protected Option getCLIOption(String name) {
 for (Option option : options) {
  if (option.getPreferredName().equals(name)) {
   return option;
  }
 }
 return null;
}
origin: org.apache.mahout/mahout-core

/**
 * @param name The name of the option
 * @return the {@link org.apache.commons.cli2.Option} with the name, else null
 */
protected Option getCLIOption(String name) {
 for (Option option : options) {
  if (option.getPreferredName().equals(name)) {
   return option;
  }
 }
 return null;
}
origin: org.apache.jackrabbit.vault/vault-cli

public String getName() {
  return getCommand().getPreferredName();
}
origin: org.apache.mahout/mahout-core

protected static void maybePut(Map<String, List<String>> args, CommandLine cmdLine, Option... opt) {
 for (Option o : opt) {
  // the option appeared on the command-line, or it has a value
  // (which is likely a default value). 
  if (cmdLine.hasOption(o) || cmdLine.getValue(o) != null
    || (cmdLine.getValues(o) != null && !cmdLine.getValues(o).isEmpty())) {
   // nulls are ok, for cases where options are simple flags.
   List<?> vo = cmdLine.getValues(o);
   if (vo != null && !vo.isEmpty()) {
    List<String> vals = Lists.newArrayList();
    for (Object o1 : vo) {
     vals.add(o1.toString());
    }
    args.put(o.getPreferredName(), vals);
   } else {
    args.put(o.getPreferredName(), null);
   }
  }
 }
}
origin: org.apache.mahout/mahout-mrlegacy

protected static void maybePut(Map<String, List<String>> args, CommandLine cmdLine, Option... opt) {
 for (Option o : opt) {
  // the option appeared on the command-line, or it has a value
  // (which is likely a default value). 
  if (cmdLine.hasOption(o) || cmdLine.getValue(o) != null
    || (cmdLine.getValues(o) != null && !cmdLine.getValues(o).isEmpty())) {
   // nulls are ok, for cases where options are simple flags.
   List<?> vo = cmdLine.getValues(o);
   if (vo != null && !vo.isEmpty()) {
    List<String> vals = Lists.newArrayList();
    for (Object o1 : vo) {
     vals.add(o1.toString());
    }
    args.put(o.getPreferredName(), vals);
   } else {
    args.put(o.getPreferredName(), null);
   }
  }
 }
}
origin: org.apache.mahout/mahout-mr

protected static void maybePut(Map<String, List<String>> args, CommandLine cmdLine, Option... opt) {
 for (Option o : opt) {
  // the option appeared on the command-line, or it has a value
  // (which is likely a default value). 
  if (cmdLine.hasOption(o) || cmdLine.getValue(o) != null
    || (cmdLine.getValues(o) != null && !cmdLine.getValues(o).isEmpty())) {
   // nulls are ok, for cases where options are simple flags.
   List<?> vo = cmdLine.getValues(o);
   if (vo != null && !vo.isEmpty()) {
    List<String> vals = new ArrayList<>();
    for (Object o1 : vo) {
     vals.add(o1.toString());
    }
    args.put(o.getPreferredName(), vals);
   } else {
    args.put(o.getPreferredName(), null);
   }
  }
 }
}
org.apache.commons.cli2Option

Most used methods

  • getPreferredName
  • getTriggers
  • helpLines

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • getContentResolver (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now