Interface PrimitiveTypeRule

All Superinterfaces:
Rule<String>, Serializable
All Known Implementing Classes:
AbstractPrimitiveTypeRule, PredicatePrimitiveTypeRule, RegexPrimitiveRule, SizeRule, TrimLeadingWhitespace, TrimTrailingWhitespace, WithdrawnDatatypeRule

public interface PrimitiveTypeRule extends Rule<String>
A rule that applies to a primitive datatype.
Author:
Bryan Tripp
  • Method Details

    • correct

      Optionally performs an automatic correction on given data to make it conform (eg trims leading whitespace). This is to be called prior to test(). If no corrections are performed, the original value is returned.
      Parameters:
      value - an original value to be corrected
      Returns:
      a corrected version of the given value
    • test

      boolean test(String value)
      Deprecated.
      Tests the given string against the criteria defined by this rule -- returns true if it passes the test, false otherwise.