Package ninja.params

Class ParamParsers.CsvParamParser<T>

  • All Implemented Interfaces:
    ParamParser<T[]>
    Enclosing class:
    ParamParsers

    public static class ParamParsers.CsvParamParser<T>
    extends Object
    implements ParamParser<T[]>
    Parses a single string value as a CSV array of registered types.
    • Constructor Detail

    • Method Detail

      • parseParameter

        public T[] parseParameter​(String field,
                                  String parameterValue,
                                  Validation validation)
        Description copied from interface: ParamParser
        Parse the given parameter value
        Specified by:
        parseParameter in interface ParamParser<T>
        Parameters:
        field - The field that is being parsed
        parameterValue - The value to parse. May be null.
        validation - The validation context.
        Returns:
        The parsed parameter value. May be null.
      • getParsedType

        public Class<T[]> getParsedType()
        Description copied from interface: ParamParser
        Get the type that this parser parses to
        Specified by:
        getParsedType in interface ParamParser<T>
        Returns:
        The type