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 Expression integerRange​(int from, int to)
    Creates a ranged integer based on from and to values inclusively.
    static Expression leadingZero​(Expression another)
    Appends a optional zero to any expression where usually this is used with digits/ranges.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • leadingZero

      public static Expression leadingZero​(Expression another)
      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

      public static Expression integerRange​(int from, int to)
      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 = 0
      to - ending integer MAX_INT = 10^9 - 1
      Returns:
      range expression