# Class AmbiguousOptionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.commons.cli.ParseException
org.apache.commons.cli.UnrecognizedOptionException
org.apache.commons.cli.AmbiguousOptionException

All Implemented Interfaces:
  `Serializable`

public class AmbiguousOptionException extends UnrecognizedOptionException
Exception thrown when an option can't be identified from a partial name.

Since:
  1.3
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AmbiguousOptionException(String option, Collection<String> matchingOptions)`
  Constructs a new AmbiguousOptionException.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Collection<String>`
  `getMatchingOptions()`
  Gets the options matching the partial name.

  ### Methods inherited from class UnrecognizedOptionException

  `getOption`

  ### Methods inherited from class ParseException

  `wrap`

  ### Methods inherited from class Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### AmbiguousOptionException

    public AmbiguousOptionException(String option, Collection<String> matchingOptions)
    Constructs a new AmbiguousOptionException.
    Parameters:
      `option` - the partial option name.
      `matchingOptions` - the options matching the name.

- ## Method Details

  - ### getMatchingOptions

    public Collection<String> getMatchingOptions()
    Gets the options matching the partial name.
    Returns:
      a collection of options matching the name.