1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-12 01:55:19 +00:00

Switch all uses of *List, *Map to just List and Map.

This commit is contained in:
2017-07-27 18:19:12 -07:00
parent bc23b8dbda
commit d9df565a42
8 changed files with 27 additions and 22 deletions

View File

@@ -2,6 +2,7 @@ package org.nwapw.abacus.lexing.pattern;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Stack;
import java.util.function.Function;
@@ -32,7 +33,7 @@ public class Pattern<T> {
* A map of regex operator to functions that modify a PatternChain
* with the appropriate operation.
*/
private HashMap<Character, Function<PatternChain<T>, PatternChain<T>>> operations =
private Map<Character, Function<PatternChain<T>, PatternChain<T>>> operations =
new HashMap<Character, Function<PatternChain<T>, PatternChain<T>>>() {{
put('+', Pattern.this::transformPlus);
put('*', Pattern.this::transformStar);

View File

@@ -3,6 +3,7 @@ package org.nwapw.abacus.lexing.pattern;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
/**
* A base class for a pattern node. Provides all functions
@@ -16,7 +17,7 @@ public class PatternNode<T> {
* The set of states to which the lexer should continue
* should this node be correctly matched.
*/
protected HashSet<PatternNode<T>> outputStates;
protected Set<PatternNode<T>> outputStates;
/**
* Creates a new pattern node.