Codota Logo
MultipleArgumentsForOptionException.<init>
Code IndexAdd Codota to your IDE (free)

How to use
joptsimple.MultipleArgumentsForOptionException
constructor

Best Java code snippets using joptsimple.MultipleArgumentsForOptionException.<init> (Showing top 7 results out of 315)

  • Common ways to obtain MultipleArgumentsForOptionException
private void myMethod () {
MultipleArgumentsForOptionException m =
  • Codota IconOptionSpec optionSpec;new MultipleArgumentsForOptionException(optionSpec.options())
  • Smart code suggestions by Codota
}
origin: net.sf.jopt-simple/jopt-simple

/**
 * Gives the argument associated with the given option.
 *
 * <p>This method recognizes only instances of options returned from the fluent interface methods.</p>
 *
 * @param <V> represents the type of the arguments the given option accepts
 * @param option the option to search for
 * @return the argument of the given option; {@code null} if no argument is present, or that option was not
 * detected
 * @throws OptionException if more than one argument was detected for the option
 * @throws NullPointerException if {@code option} is {@code null}
 * @throws ClassCastException if the arguments of this option are not of the expected type
 */
public <V> V valueOf( OptionSpec<V> option ) {
  requireNonNull( option );
  List<V> values = valuesOf( option );
  switch ( values.size() ) {
    case 0:
      return null;
    case 1:
      return values.get( 0 );
    default:
      throw new MultipleArgumentsForOptionException( option );
  }
}
origin: jopt-simple/jopt-simple

/**
 * Gives the argument associated with the given option.
 *
 * <p>This method recognizes only instances of options returned from the fluent interface methods.</p>
 *
 * @param <V> represents the type of the arguments the given option accepts
 * @param option the option to search for
 * @return the argument of the given option; {@code null} if no argument is present, or that option was not
 * detected
 * @throws OptionException if more than one argument was detected for the option
 * @throws NullPointerException if {@code option} is {@code null}
 * @throws ClassCastException if the arguments of this option are not of the expected type
 */
public <V> V valueOf( OptionSpec<V> option ) {
  requireNonNull( option );
  List<V> values = valuesOf( option );
  switch ( values.size() ) {
    case 0:
      return null;
    case 1:
      return values.get( 0 );
    default:
      throw new MultipleArgumentsForOptionException( option );
  }
}
origin: org.apache.geode/geode-joptsimple

/**
 * Gives the argument associated with the given option.
 *
 * <p>This method recognizes only instances of options returned from the fluent interface methods.</p>
 *
 * @param <V> represents the type of the arguments the given option accepts
 * @param option the option to search for
 * @return the argument of the given option; {@code null} if no argument is present, or that option was not
 * detected
 * @throws OptionException if more than one argument was detected for the option
 * @throws NullPointerException if {@code option} is {@code null}
 * @throws ClassCastException if the arguments of this option are not of the expected type
 */
public <V> V valueOf( OptionSpec<V> option ) {
  ensureNotNull( option );
  List<V> values = valuesOf( option );
  switch ( values.size() ) {
    case 0:
      return null;
    case 1:
      return values.get( 0 );
    default:
      throw new MultipleArgumentsForOptionException( option.options() );
  }
}
origin: io.snappydata/gemfire-joptsimple

/**
 * Gives the argument associated with the given option.
 *
 * <p>This method recognizes only instances of options returned from the fluent interface methods.</p>
 *
 * @param <V> represents the type of the arguments the given option accepts
 * @param option the option to search for
 * @return the argument of the given option; {@code null} if no argument is present, or that option was not
 * detected
 * @throws OptionException if more than one argument was detected for the option
 * @throws NullPointerException if {@code option} is {@code null}
 * @throws ClassCastException if the arguments of this option are not of the expected type
 */
public <V> V valueOf( OptionSpec<V> option ) {
  ensureNotNull( option );
  List<V> values = valuesOf( option );
  switch ( values.size() ) {
    case 0:
      return null;
    case 1:
      return values.get( 0 );
    default:
      throw new MultipleArgumentsForOptionException( option.options() );
  }
}
origin: io.snappydata/gemfire-util

/**
 * Gives the argument associated with the given option.
 *
 * <p>This method recognizes only instances of options returned from the fluent interface methods.</p>
 *
 * @param <V> represents the type of the arguments the given option accepts
 * @param option the option to search for
 * @return the argument of the given option; {@code null} if no argument is present, or that option was not
 * detected
 * @throws OptionException if more than one argument was detected for the option
 * @throws NullPointerException if {@code option} is {@code null}
 * @throws ClassCastException if the arguments of this option are not of the expected type
 */
public <V> V valueOf( OptionSpec<V> option ) {
  ensureNotNull( option );
  List<V> values = valuesOf( option );
  switch ( values.size() ) {
    case 0:
      return null;
    case 1:
      return values.get( 0 );
    default:
      throw new MultipleArgumentsForOptionException( option.options() );
  }
}
origin: org.apache.geode/gemfire-core

 List<String> optionList = new ArrayList<String>(1);
 optionList.add(string);
 ce = processException(new MultipleArgumentsForOptionException(optionList, joptOptionSet));
} else if ((arguments.size() == 1 && !(option.getConverter() instanceof MultipleValueConverter)) || option.getValueSeparator() == null) {
 optionSet.put(option, arguments.get(0).toString().trim());
origin: io.snappydata/gemfire-core

 List<String> optionList = new ArrayList<String>(1);
 optionList.add(string);
 ce = processException(new MultipleArgumentsForOptionException(optionList, joptOptionSet));
} else if ((arguments.size() == 1 && !(option.getConverter() instanceof MultipleValueConverter)) || option.getValueSeparator() == null) {
 optionSet.put(option, arguments.get(0).toString().trim());
joptsimpleMultipleArgumentsForOptionException<init>

Popular methods of MultipleArgumentsForOptionException

  • multipleOptionMessage
  • singleOptionString

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now