Class NotImplementedCaseException

  • All Implemented Interfaces:
    Serializable

    public class NotImplementedCaseException
    extends NotImplementedException
    This exception indicates that a case (typical in a switch statement) is not implemented.

    A typical use case is a switch statement for an enumg. In such a switch statement throw this exception in the default case

    
     switch(demoEnum) {
        case A: return somethingBecauseA();
        case B: return somethingBecauseA();
        default: throw new NotImplementedCaseException(demoEnum);
     }
     
    See Also:
    Serialized Form
    • Constructor Detail

      • NotImplementedCaseException

        public NotImplementedCaseException()
        Instantiates a new not implmented case execption.
      • NotImplementedCaseException

        public NotImplementedCaseException​(String message,
                                           Throwable cause)
        The Constructor.
        Parameters:
        message - the message
        cause - the cause
      • NotImplementedCaseException

        public NotImplementedCaseException​(String message)
        The Constructor.
        Parameters:
        message - the message
      • NotImplementedCaseException

        public NotImplementedCaseException​(Throwable cause)
        The Constructor.
        Parameters:
        cause - the cause
      • NotImplementedCaseException

        public NotImplementedCaseException​(Enum<?> enumCase)
        The Constructor.
        Parameters:
        enumCase - the enum case