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
1 changed files with 3 additions and 2 deletions

View File

@ -1,13 +1,14 @@
package org.nwapw.abacus.lexing.pattern;
import java.util.ArrayList;
import java.util.HashSet;
public class PatternNode<T> {
protected ArrayList<PatternNode<T>> outputStates;
protected HashSet<PatternNode<T>> outputStates;
public PatternNode(){
outputStates = new ArrayList<>();
outputStates = new HashSet<>();
}
public boolean matches(char other){