blob: 95ced43d3da372e7db05bf275e26a522a6295c42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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();
}
|