Interface Request.Param<T>

  • All Known Subinterfaces:
    Request.StringParam
    Enclosing class:
    Request

    public static interface Request.Param<T>
    Represents a Request parameter, provides information whether is was specified or not (check isPresent()) and utility method to nicely handles cases where the parameter is not present.
    • Method Detail

      • isPresent

        boolean isPresent()
      • getValue

        @CheckForNull
        T getValue()
        Returns:
        the value of the parameter
        Throws:
        java.lang.IllegalStateException - if param is not present.
      • or

        @CheckForNull
        T or​(java.util.function.Supplier<T> defaultValueSupplier)