Class AbstractArrayArg<T>

  • All Implemented Interfaces:
    Arg<List<T>>
    Direct Known Subclasses:
    AbstractEntityArrayArg, ExcludeArg, StringArrayArg

    public abstract class AbstractArrayArg<T>
    extends AbstractArg<List<T>>
    Class representing an API argument that should be an array.

    If you use this alongside a QueryParam, make sure that you include a Parameter with the 'explode' attribute set to Explode.FALSE, otherwise the serialization will not be correct.

    Author:
    tesarst
    • Constructor Detail

      • AbstractArrayArg

        protected AbstractArrayArg​(List<T> values)
    • Method Detail

      • splitAndTrim

        protected static List<String> splitAndTrim​(String arg)
        Split a string by the ',' comma character and trim the resulting pieces. This is meant to be used for parsing query arguments that use a comma as a delimiter.
        Parameters:
        arg - the string to process
        Returns:
        trimmed strings exploded from the input.