blob: a9efe9b9abafa40e15ad8b74bebee97b33fef19c (
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 precedence
* The precedence of the object to handle
* @return A new object with set precedence
*/
public static IPrecedent newSimplePrecedent(int precedence) {
return () -> precedence;
}
/**
* Get the precedence of the attached object
*
* @return The precedence of the attached object
*/
public int getPrecedence();
}
|