de.caff.util.args

## Class UnexpectedArgumentException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - de.caff.util.args.UnexpectedArgumentException

- All Implemented Interfaces:
    java.io.Serializable

      public class UnexpectedArgumentException
      extends java.lang.Exception

  Exception thrown if a long switch comes with an appended argument, although it does not expect one.
  Since:
    January 27, 2019
  Author:
    Rammi
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UnexpectedArgumentException(java.lang.String longSwitch, java.lang.String argument)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getArgument()` Get the unexpected argument of the long switch.
    `java.lang.String` | `getLongSwitch()` Get the long switch for which an unexpected argument was defined.

    - ### Methods inherited from class java.lang.Throwable

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

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### UnexpectedArgumentException

          public UnexpectedArgumentException(@NotNull
                                             java.lang.String longSwitch,
                                             @NotNull
                                             java.lang.String argument)

      Constructor.
      Parameters:
        `longSwitch` - long switch (including `--` prefix)
        `argument` - argument appended to switch

  - ### Method Detail

    - #### getLongSwitch

          @NotNull
          public java.lang.String getLongSwitch()

      Get the long switch for which an unexpected argument was defined.
      Returns:
        long switch

    - #### getArgument

          @NotNull
          public java.lang.String getArgument()

      Get the unexpected argument of the long switch.
      Returns:
        argument