File tree Expand file tree Collapse file tree
src/main/java/cz/jirutka/rsql/parser/ast Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 */
3131public interface Arity {
3232
33+ /**
34+ * Creates arity with given {@code min} and {@code max}.
35+ *
36+ * @param min The minimum number of arguments. Must be zero or positive.
37+ * @param max The maximum number of arguments. Must be zero or positive and greater than or equal to {@code min}.
38+ * @return the created arity
39+ */
40+ static Arity of (int min , int max ) {
41+ return min == max ? nary (min ) : new DynamicArity (min , max );
42+ }
43+
44+ /**
45+ * Creates N-ary object.
46+ *
47+ * @param n The N.
48+ * @return the created arity
49+ */
50+ static Arity nary (int n ) {
51+ return new NAry (n );
52+ }
53+
3354 /**
3455 * The minimum number of arguments operator can receive.
3556 *
@@ -65,25 +86,4 @@ public interface Arity {
6586 */
6687 @ Override
6788 int hashCode ();
68-
69- /**
70- * Creates arity with given {@code min} and {@code max}.
71- *
72- * @param min The minimum number of arguments. Must be zero or positive.
73- * @param max The maximum number of arguments. Must be zero or positive and greater than or equal to {@code min}.
74- * @return the created arity
75- */
76- static Arity of (int min , int max ) {
77- return min == max ? nary (min ) : new DynamicArity (min , max );
78- }
79-
80- /**
81- * Creates N-ary object.
82- *
83- * @param n The N.
84- * @return the created arity
85- */
86- static Arity nary (int n ) {
87- return new NAry (n );
88- }
8989}
You can’t perform that action at this time.
0 commit comments