Class Problem

java.lang.Object
com.jk.core.validation.Problem
All Implemented Interfaces:
Comparable<Problem>

public final class Problem extends Object implements Comparable<Problem>
The Class Problem.
  • Constructor Details

    • Problem

      public Problem(String message, Severity severity)
      Instantiates a new problem.
      Parameters:
      message - the message
      severity - the severity
  • Method Details

    • compareTo

      public int compareTo(Problem o)
      Compare to.
      Specified by:
      compareTo in interface Comparable<Problem>
      Parameters:
      o - the o
      Returns:
      the int
    • equals

      public boolean equals(Object o)
      Equals.
      Overrides:
      equals in class Object
      Parameters:
      o - the o
      Returns:
      true, if successful
    • getMessage

      public String getMessage()
      Gets the message.
      Returns:
      the message
    • hashCode

      public int hashCode()
      Hash code.
      Overrides:
      hashCode in class Object
      Returns:
      the int
    • isFatal

      public boolean isFatal()
      Checks if is fatal.
      Returns:
      true, if is fatal
    • isWorseThan

      public boolean isWorseThan(Problem other)
      Checks if is worse than.
      Parameters:
      other - the other
      Returns:
      true, if is worse than
    • severity

      public Severity severity()
      Severity.
      Returns:
      the severity
    • toString

      public String toString()
      To string.
      Overrides:
      toString in class Object
      Returns:
      the string