All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.helipy.text.ahocorasick.MatchHandler Maven / Gradle / Ivy

package com.helipy.text.ahocorasick;

/**
 * @param  The related object type
 * @author nuclear-sun
 */
public interface MatchHandler {

    /**
     * Callback on matching a keyword
     *
     * @param start start index in query text
     * @param end   end index in query text, exclusive
     * @param key   matched keyword
     * @param value attached object to the keyword
     * @return a boolean value indicating if continuing or stopping parsing,
     * true indicates continue, false indicates stop.
     */
    boolean onMatch(int start, int end, String key, V value);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy