Class ValueTypeValidatorAtomic

    • Constructor Detail

      • ValueTypeValidatorAtomic

        public ValueTypeValidatorAtomic()
    • Method Detail

      • checkValueSpace

        public boolean checkValueSpace​(String value)
        Description copied from interface: IValueTypeValidator
        Checks string representation of facet value for ValueType
        Specified by:
        checkValueSpace in interface IValueTypeValidator
        Parameters:
        value - checking value, can't be null
        Returns:
        true if value is valid, false otherwise
      • compare

        public int compare​(String value,
                           String otherValue)
        Description copied from interface: IValueTypeValidator
        Comparing facet values
        Specified by:
        compare in interface IValueTypeValidator
        Parameters:
        value - the first value for comparing, can't be null
        otherValue - the second value for comparing, can't be null
        Returns:
        the value 0 if arguments are equal ; a value less than 0 if the first value less that the second; and a value greater than 0 if the first value greater that the second.
      • isDigitOrPeriodOrSign

        protected boolean isDigitOrPeriodOrSign​(char ch)
        Checks that char is digit or '-', '.', '+'
        Parameters:
        ch - checking char
        Returns:
        true if char is digit or '-', '.', '+', false otherwise
      • checkTimeZone

        protected boolean checkTimeZone​(String value)
        Checks string presentation of time zone
        Parameters:
        value - string presentation of time zone
        Returns:
        true if string presentation corresponding to time zone format '[-,+]hh:mm' or 'Z'
      • maxDayInMonthFor

        protected int maxDayInMonthFor​(int mm)
        Gets number of days in month
        Parameters:
        mm - month number
        Returns:
        number of days in month
      • hexToBin

        protected int hexToBin​(char ch)
        Convert char to binary
        Parameters:
        ch - hex char
        Returns:
        binary presentation of the char
      • checkNCName

        protected boolean checkNCName​(String name)
        Checks NCName type (see xml standart for NCName)
        Parameters:
        name - checking value, can't be null
        Returns:
        true if value is valid for NCName, false otherwise