org.benchmark.plugin.LibraryPlugin

/* $Id: LibraryPlugin.java.html 241 2004-12-15 16:22:42Z bkarak $ */ 
package org.benchmark.plugin; 
 
public interface LibraryPlugin { 
    /** 
     * Error constant, defines the generic error result  
     */ 
    public static int MATCH_ERROR = -1; 
 
    /** 
     * Perform a full match attempt for a given set of regular expression and data. 
     * 
     * @param regularExpression 
     * @param data 
     * @return True upon sucess, false otherwise. 
     */ 
    public boolean match(String regularExpression, String data); 
 
    /** 
     * Performs an iteration benchmark for a given regular expression / data. 
     * 
     * @param regularExpression 
     * @param data 
     * @param iterations 
     * @return The time ellapsed for the iterations (in miliseconds), on error the method returns MATCH_ERROR 
     * @see System.currentTimeMillis() 
     */ 
    public long iterationBenchmark(String regularExpression, String data, int iterations); 
}