Class RegexParser

    • Constructor Detail

      • RegexParser

        public RegexParser​(String pattern,
                           com.google.common.base.Optional<String> listDelimiter)
      • RegexParser

        public RegexParser​(String pattern,
                           com.google.common.base.Optional<String> listDelimiter,
                           Iterable<String> fieldNames)
    • Method Detail

      • parseToMap

        public Map<String,​Object> parseToMap​(String input)
        Description copied from interface: Parser
        Parse a String into a Map. The result can be null which means the given input string will be ignored.
        Specified by:
        parseToMap in interface Parser<String,​Object>
      • setFieldNames

        public void setFieldNames​(Iterable<String> fieldNames)
        Description copied from interface: Parser
        Set the fieldNames that you expect to see in parsed Maps. Deprecated; Parsers should not, in general, be expected to know what fields they will return. Some individual types of parsers do need to know (like a TSV parser) and those parsers have their own way of setting field names.
        Specified by:
        setFieldNames in interface Parser<String,​Object>
      • getFieldNames

        public List<String> getFieldNames()
        Description copied from interface: Parser
        Returns the fieldNames that we expect to see in parsed Maps, if known, or null otherwise. Deprecated; Parsers should not, in general, be expected to know what fields they will return.
        Specified by:
        getFieldNames in interface Parser<String,​Object>