mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-22 15:30:09 -08:00
Switch underlying implementation to Set from List.
This commit is contained in:
parent
6200381016
commit
02141d8df0
|
@ -1,13 +1,14 @@
|
||||||
package org.nwapw.abacus.lexing.pattern;
|
package org.nwapw.abacus.lexing.pattern;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
public class PatternNode<T> {
|
public class PatternNode<T> {
|
||||||
|
|
||||||
protected ArrayList<PatternNode<T>> outputStates;
|
protected HashSet<PatternNode<T>> outputStates;
|
||||||
|
|
||||||
public PatternNode(){
|
public PatternNode(){
|
||||||
outputStates = new ArrayList<>();
|
outputStates = new HashSet<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean matches(char other){
|
public boolean matches(char other){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user