Tabnine Logo
AlreadySelectedException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.commons.cli.AlreadySelectedException
constructor

Best Java code snippets using org.apache.commons.cli.AlreadySelectedException.<init> (Showing top 7 results out of 315)

origin: commons-cli/commons-cli

/**
 * Set the selected option of this group to <code>name</code>.
 *
 * @param option the option that is selected
 * @throws AlreadySelectedException if an option from this group has 
 * already been selected.
 */
public void setSelected(Option option) throws AlreadySelectedException
{
  if (option == null)
  {
    // reset the option previously selected
    selected = null;
    return;
  }
  
  // if no option has already been selected or the 
  // same option is being reselected then set the
  // selected member variable
  if (selected == null || selected.equals(option.getKey()))
  {
    selected = option.getKey();
  }
  else
  {
    throw new AlreadySelectedException(this, option);
  }
}
origin: cytoscape.corelibs/commons-cli-1-x-cytocape-custom

/**
 * set the selected option of this group to <code>name</code>.
 * @param opt the option that is selected
 * @throws AlreadySelectedException if an option from this group has
 * already been selected.
 */
public void setSelected(Option opt) throws AlreadySelectedException {
  // if no option has already been selected or the 
  // same option is being reselected then set the
  // selected member variable
  if ((this.selected == null) || this.selected.equals(opt.getOpt())) {
    this.selected = opt.getOpt();
  } else {
    throw new AlreadySelectedException("an option from this group has "
                      + "already been selected: '" + selected + "'");
  }
}
origin: org.cytoscape/cy-commons-cli

/**
 * set the selected option of this group to <code>name</code>.
 * @param opt the option that is selected
 * @throws AlreadySelectedException if an option from this group has
 * already been selected.
 */
public void setSelected(Option opt) throws AlreadySelectedException {
  // if no option has already been selected or the 
  // same option is being reselected then set the
  // selected member variable
  if ((this.selected == null) || this.selected.equals(opt.getOpt())) {
    this.selected = opt.getOpt();
  } else {
    throw new AlreadySelectedException("an option from this group has "
                      + "already been selected: '" + selected + "'");
  }
}
origin: sdedit/sdedit

/**
 * Set the selected option of this group to <code>name</code>.
 *
 * @param option the option that is selected
 * @throws AlreadySelectedException if an option from this group has 
 * already been selected.
 */
public void setSelected(Option option) throws AlreadySelectedException
{
  // if no option has already been selected or the 
  // same option is being reselected then set the
  // selected member variable
  if (selected == null || selected.equals(option.getOpt()))
  {
    selected = option.getOpt();
  }
  else
  {
    throw new AlreadySelectedException(this, option);
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.cli

/**
 * Set the selected option of this group to <code>name</code>.
 *
 * @param option the option that is selected
 * @throws AlreadySelectedException if an option from this group has 
 * already been selected.
 */
public void setSelected(Option option) throws AlreadySelectedException
{
  // if no option has already been selected or the 
  // same option is being reselected then set the
  // selected member variable
  if (selected == null || selected.equals(option.getOpt()))
  {
    selected = option.getOpt();
  }
  else
  {
    throw new AlreadySelectedException(this, option);
  }
}
origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Set the selected option of this group to <code>name</code>.
 *
 * @param option the option that is selected
 * @throws AlreadySelectedException if an option from this group has 
 * already been selected.
 */
public void setSelected(Option option) throws AlreadySelectedException
{
  if (option == null)
  {
    // reset the option previously selected
    selected = null;
    return;
  }
  
  // if no option has already been selected or the 
  // same option is being reselected then set the
  // selected member variable
  if (selected == null || selected.equals(option.getKey()))
  {
    selected = option.getKey();
  }
  else
  {
    throw new AlreadySelectedException(this, option);
  }
}
origin: EvoSuite/evosuite

  public void foo(){
    //here, at compile time we use the one in EvoSuite dependency, but not at runtime
    AlreadySelectedException e = new AlreadySelectedException(null);
    if(e.toString().equals("foo")){
      System.out.println("Only executed if SUT version is used, and not the one in EvoSuite's dependencies");
    }
  }
}
org.apache.commons.cliAlreadySelectedException<init>

Javadoc

Construct a new AlreadySelectedException with the specified detail message.

Popular methods of AlreadySelectedException

  • getMessage
  • getOption
    Returns the option that was added to the group and triggered the exception.
  • getOptionGroup
    Returns the option group where another option has been selected.
  • toString

Popular in Java

  • Start an intent from android
  • onCreateOptionsMenu (Activity)
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Socket (java.net)
    Provides a client-side TCP socket.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Github Copilot alternatives
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