-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Crystark-feature/53-allowToAckEmits'
- Loading branch information
Showing
6 changed files
with
80 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/java/org/ahocorasick/trie/handler/AbstractStatefulEmitHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.ahocorasick.trie.handler; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import org.ahocorasick.trie.Emit; | ||
|
||
public abstract class AbstractStatefulEmitHandler implements StatefulEmitHandler { | ||
|
||
private final List<Emit> emits = new ArrayList<>(); | ||
|
||
public void addEmit(final Emit emit) { | ||
this.emits.add(emit); | ||
} | ||
|
||
@Override | ||
public List<Emit> getEmits() { | ||
return this.emits; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
import org.ahocorasick.trie.Emit; | ||
|
||
public interface EmitHandler { | ||
void emit(Emit emit); | ||
boolean emit(Emit emit); | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/org/ahocorasick/trie/handler/StatefulEmitHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.ahocorasick.trie.handler; | ||
|
||
import java.util.List; | ||
|
||
import org.ahocorasick.trie.Emit; | ||
|
||
public interface StatefulEmitHandler extends EmitHandler { | ||
List<Emit> getEmits(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters