diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-03-30 09:36:55 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-03-30 09:36:55 -0400 |
| commit | 36d08163f592c573dfaa69326a4cb42178c7ddd9 (patch) | |
| tree | dc4e10cc027e0445536dd83f2979e66a60ee16e2 /BJC-Utils2/src/main/java/bjc/utils/parserutils/IPrecedent.java | |
| parent | 3a80c78e801cb6227f058db22e87dc58fd0fd7f2 (diff) | |
Moved IPrecedent into the only package that uses it
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/parserutils/IPrecedent.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/parserutils/IPrecedent.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/parserutils/IPrecedent.java b/BJC-Utils2/src/main/java/bjc/utils/parserutils/IPrecedent.java new file mode 100644 index 0000000..95ced43 --- /dev/null +++ b/BJC-Utils2/src/main/java/bjc/utils/parserutils/IPrecedent.java @@ -0,0 +1,28 @@ +package bjc.utils.parserutils; + +/** + * Represents something that has a set precedence + * + * @author ben + * + */ +@FunctionalInterface +public interface IPrecedent { + /** + * Create a new object with set precedence + * + * @param prec + * The precedence of the object to handle + * @return A new object with set precedence + */ + public static IPrecedent newSimplePrecedent(int prec) { + return () -> prec; + } + + /** + * Get the precedence of the attached object + * + * @return The precedence of the attached object + */ + public int getPrecedence(); +}
\ No newline at end of file |
