1
0
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:
Danila Fedorin 2017-07-24 19:46:22 -07:00
parent 6200381016
commit 02141d8df0

View File

@ -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){