Package dev.yasint.regexsynth.dsl
Class Numeric
java.lang.Object
dev.yasint.regexsynth.dsl.Numeric
public final class Numeric
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description Numeric() -
Method Summary
Modifier and Type Method Description static ExpressionintegerRange(int from, int to)Creates a ranged integer based on from and to values inclusively.static ExpressionleadingZero(Expression another)Appends a optional zero to any expression where usually this is used with digits/ranges.
-
Constructor Details
-
Numeric
public Numeric()
-
-
Method Details
-
leadingZero
Appends a optional zero to any expression where usually this is used with digits/ranges.- Parameters:
another- expression- Returns:
- expression with optional leading zero
-
integerRange
Creates a ranged integer based on from and to values inclusively. The resulting expression is wrapped around a non-capturing group to avoid condition collisions.- Parameters:
from- starting integer MIN_INT = 0to- ending integer MAX_INT = 10^9 - 1- Returns:
- range expression
-