Class BasicLineMapParser<K,​T>

    • Field Detail

      • log

        protected final org.apache.commons.logging.Log log
    • Constructor Detail

      • BasicLineMapParser

        public BasicLineMapParser()
    • Method Detail

      • containsKey

        public abstract boolean containsKey​(K key)
      • get

        public abstract T get​(K key)
      • getKeySet

        public abstract Collection<K> getKeySet()
      • getResults

        public abstract Collection<T> getResults()
        Specified by:
        getResults in interface Parser<K>
        Returns:
        the results of the parse.
      • parse

        public void parse​(File file)
                   throws IOException
        Description copied from interface: Parser
        Parse a File
        Specified by:
        parse in interface Parser<K>
        Parameters:
        file - file
        Throws:
        IOException - if there is a problem while manipulating the file
      • parse

        public void parse​(String filename)
                   throws IOException
        Description copied from interface: Parser
        Parse a file identified by its path.
        Specified by:
        parse in interface Parser<K>
        Parameters:
        filename - Absolute path to the file
        Throws:
        IOException - if there is a problem while manipulating the file
      • parseOneLine

        public abstract T parseOneLine​(String line)
        Description copied from interface: LineParser
        Handle the parsing of a single line from the input.
        Specified by:
        parseOneLine in interface LineParser<K>
        Parameters:
        line - line to parse
        Returns:
        parsed object
      • getKey

        protected abstract K getKey​(T newItem)
      • put

        protected abstract void put​(K key,
                                    T value)