Class IntegerRange

java.lang.Object
dev.yasint.regexsynth.ast.IntegerRange
All Implemented Interfaces:
Expression

public final class IntegerRange
extends java.lang.Object
implements Expression
Synthesis :: Regular Expression Integer Range

This generates a regular expression number range given inclusive start and end integers. This implementation's running time is O(log n).

This code is originally based on a StackOverflow post answer. However, the code has some optimizations and changes to match our use-case. `https://bit.ly/3bIXZBy`

  • Method Summary

    Modifier and Type Method Description
    java.lang.StringBuilder toRegex()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface dev.yasint.regexsynth.core.Expression

    debug
  • Method Details

    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • toRegex

      public java.lang.StringBuilder toRegex()
      Specified by:
      toRegex in interface Expression