Clean up comments, update maven, require Java 8 for building

This commit is contained in:
Dave Jarvis 2020-06-11 18:22:13 -07:00
parent 26268ae012
commit 00a6a3a9f3
11 changed files with 42 additions and 31 deletions

21
pom.xml
View File

@ -1,4 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@ -9,7 +11,7 @@
<name>Aho-CoraSick algorithm for efficient string matching</name>
<description>Java library for efficient string matching against a large set of keywords</description>
<inceptionYear>2014</inceptionYear>
<url>http://ahocorasick.org</url>
<url>https://github.com/robert-bor/aho-corasick</url>
<distributionManagement>
<snapshotRepository>
@ -46,12 +48,17 @@
<organization>42</organization>
</developer>
<developer>
<name></name>
<name>Daniel Beck</name>
<organization>neoSearch UG (haftungsbeschränkt)</organization>
</developer>
<developer>
<name>Dave Jarvis</name>
<organization>White Magic Software, Ltd.</organization>
</developer>
</developers>
<properties>
<java.version>1.7</java.version>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>4.10</junit.version>
@ -111,6 +118,9 @@
<goals>
<goal>jar</goal>
</goals>
<configuration>
<source>8</source>
</configuration>
</execution>
</executions>
</plugin>
@ -147,7 +157,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.7.201606060606</version>
<version>0.8.5</version>
<executions>
<execution>
<goals>
@ -166,5 +176,4 @@
</plugins>
</build>
</project>

View File

@ -2,10 +2,10 @@ package org.ahocorasick.interval;
public interface Intervalable extends Comparable {
public int getStart();
int getStart();
public int getEnd();
int getEnd();
public int size();
int size();
}

View File

@ -1,10 +1,9 @@
package org.ahocorasick.trie;
/**
* Payload holds the matched keyword and some payload-data.
* Contains the matched keyword and some payload data.
*
* @author Daniel Beck
*
* @param <T> The type of the wrapped payload data.
*/
public class Payload<T> implements Comparable<Payload<T>> {

View File

@ -4,11 +4,10 @@ import org.ahocorasick.interval.Interval;
import org.ahocorasick.interval.Intervalable;
/**
* PayloadEmit contains a matched term and its associated payload data.
* Contains a matched term and its associated payload data.
*
* @param <T> Type of the wrapped payload-data.
* @author Daniel Beck
*
*/
public class PayloadEmit<T> extends Interval implements Intervalable {

View File

@ -1,10 +1,11 @@
package org.ahocorasick.trie;
/***
* PayloadFragmentToken holds a text ("the fragment").
* Container for a token ("the fragment") that can emit a type of payload.
* <p>
* It does not matches a search term - so its <code>isMatch</code>-method
* returns always false. <code>getEmits</code> returns not Emits.
* This token indicates a matching search term was not found, so
* {@link #isMatch()} always returns {@code false}.
* </p>
*
* @author Daniel Beck
*

View File

@ -1,10 +1,11 @@
package org.ahocorasick.trie;
/**
* PayloadMatchToken holds a text ("the fragment") an emits some output.
* Container for a token ("the fragment") that can emit a type of payload.
* <p>
* It matches a search term - so its <code>isMatch</code>-method returns always
* true..
* This token indicates a matching search term was found, so {@link #isMatch()}
* always returns {@code true}.
* </p>
*
* @author Daniel Beck
*

View File

@ -2,8 +2,8 @@ package org.ahocorasick.trie;
/***
* PayloadToken holds a text ("the fragment") an emits some output. If
* <code>isMatch</code> returns true, the token matched a search term.
*
* {@link #isMatch()} returns {@code true}, the token matched a search term.
*
* @author Daniel Beck
*
* @param <T> The Type of the emitted payloads.
@ -20,8 +20,8 @@ public abstract class PayloadToken<T> {
}
/**
* Return true if a search term matched.
* @return true if this is a match
* Return {@code true} if a search term matched.
* @return {@code true} if this is a match
*/
public abstract boolean isMatch();

View File

@ -17,15 +17,16 @@ import org.ahocorasick.util.ListElementRemoval;
import org.ahocorasick.util.ListElementRemoval.RemoveElementPredicate;
/**
* A trie implementation, based on the Aho-Corasick white paper, Bell
* technologies: http://cr.yp.to/bib/1975/aho.pdf
* <p>
* A trie implementation that carries a payload. See {@link Trie} for
* details on usage.
*
* <p>
* The payload trie adds the possibility to specify emitted payloads for each
* added keyword.
* </p>
*
* @author Daniel Beck
* @param <T> The type of the supplied of the payload
* @param <T> The type of the supplied of the payload.
*/
public class PayloadTrie<T> {

View File

@ -10,8 +10,8 @@ import org.ahocorasick.trie.handler.PayloadEmitDelegateHandler;
import org.ahocorasick.trie.handler.StatefulEmitHandler;
/**
* Based on the Aho-Corasick white paper, Bell technologies:
* http://cr.yp.to/bib/1975/aho.pdf
* Based on the <a href="http://cr.yp.to/bib/1975/aho.pdf">Aho-Corasick white
* paper</a>, from Bell technologies.
*
* @author Robert Bor
*/

View File

@ -4,7 +4,8 @@ import org.ahocorasick.trie.Emit;
import org.ahocorasick.trie.PayloadEmit;
/**
* Convenience wrapper class that delegates every method to a EmitHandler.
* Convenience wrapper class that delegates every method to an
* instance of {@link EmitHandler}.
*/
public class PayloadEmitDelegateHandler implements PayloadEmitHandler<String> {

View File

@ -9,7 +9,7 @@ import org.ahocorasick.trie.PayloadEmit;
/**
* Convenience wrapper class that delegates every method to a
* StatefullPayloadEmitHandler.
* {@link StatefulPayloadEmitHandler}.
*/
public class StatefulPayloadEmitDelegateHandler implements StatefulPayloadEmitHandler<String> {