Class BitStringSyntaxChecker

  • All Implemented Interfaces:
    Serializable, SchemaObject

    public final class BitStringSyntaxChecker
    extends SyntaxChecker
    A SyntaxChecker which verifies that a value is a Boolean according to RFC 4517.
    From RFC 4512 & RFC 4517 :
     BitString    = SQUOTE *binary-digit SQUOTE "B"
     binary-digit = "0" / "1"
     SQUOTE       = %x27                           ; hyphen ("'")
     
    Author:
    Apache Directory Project
    See Also:
    Serialized Form
    • Field Detail

    • Method Detail

      • isValid

        public static boolean isValid​(String strValue)
        A shared and static method used to check that the string is a BitString. A BitString is a string of bits, between quotes and followed by a 'B' : '01010110'B for instance
        Parameters:
        strValue - The string to check
        Returns:
        true if the string is a BitString
      • isValidSyntax

        public boolean isValidSyntax​(Object value)
        Determines if the attribute's value conforms to the attribute syntax.
        Overrides:
        isValidSyntax in class SyntaxChecker
        Parameters:
        value - the value of some attribute with the syntax
        Returns:
        true if the value is in the valid syntax, false otherwise