Interface IPersister<T>

    • Method Detail

      • validate

        boolean validate​(T value)
        Description copied from interface: IConstraint
        Fundamentally, check that value satisfies this constraint and throw an exception otherwise. As long as the method returns normally, value is a valid value, regardless of the return value. However, when wrapping a persister in a constraint, it is possible that the persister treats some magic values differently. If the constraint isn't aware of these magical values it should typically not try to validate them. This is signaled by the persister by returning true from this method.
        Specified by:
        validate in interface IConstraint<T>
        Returns:
        true if this value is considered magical and further validation should be skipped, false otherwise. Any return value mean that the value is valid.