Class Violation

java.lang.Object
io.github.sergeloie.languagecheck.check.Violation

public final class Violation extends Object
One disallowed character occurrence in a checked file.

Immutable. Carries the 1-based line the character was found on and the offending Unicode code point. display() renders a single-line human-readable form for report files.

  • Constructor Details

    • Violation

      public Violation(int line, int codePoint)
  • Method Details

    • line

      public int line()
      1-based line number the violation occurred on.
    • codePoint

      public int codePoint()
      The offending Unicode code point.
    • display

      public String display()
      Human-readable form, e.g. U+041F 'П' (line 3). Control characters are rendered without the quoted glyph.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object