/** * Gets the normalized (canonical) representation for the wrapped value. * If the wrapped value is null, null is returned, otherwise the normalized * form is returned. If the normalized Value is null, then the wrapped * value is returned * * @return gets the normalized value */ public T getNormalizedValue() { if ( isNull() ) { return null; } if ( normalizedValue == null ) { return get(); } return getNormalizedValueCopy(); }
/** * Uses the syntaxChecker associated with the attributeType to check if the * value is valid. Repeated calls to this method do not attempt to re-check * the syntax of the wrapped value every time if the wrapped value does not * change. Syntax checks only result on the first check, and when the wrapped * value changes. * * @see Value#isValid() */ public final boolean isValid() { if ( valid != null ) { return valid; } if ( attributeType != null ) { valid = attributeType.getSyntax().getSyntaxChecker().isValidSyntax( get() ); } else { valid = false; } return valid; }