Class AbstractArg<T>

  • All Implemented Interfaces:
    Arg<T>
    Direct Known Subclasses:
    AbstractArrayArg, AbstractEntityArg, ExpLevelConsolidationArg, FilterArg, LimitArg, OffsetArg, SortArg

    public abstract class AbstractArg<T>
    extends Object
    implements Arg<T>
    Base class for non Object-specific functionality argument types, that can be malformed on input (E.g an argument representing a number was a non-numeric string in the request). The Schema annotation used in sub-classes ensures that custom args are represented by a string in the OpenAPI specification.
    Author:
    tesarst
    • Constructor Detail

      • AbstractArg

        protected AbstractArg​(@Nonnull
                              T value)
        Constructor for well-formed value. Note that well-formed values can never be null. Although, the argument itself can be null to represent a value that is omitted by the request.
        Parameters:
        value - a well-formed value which cannot be null
    • Method Detail

      • getValue

        @Nonnull
        public T getValue()
        Obtain the value represented by this argument.
        Specified by:
        getValue in interface Arg<T>
        Returns:
        the value represented by this argument, which can never be null
        Throws:
        MalformedArgException - if this arg is malformed