Class AbstractDigitsFacet

    • Constructor Detail

      • AbstractDigitsFacet

        protected AbstractDigitsFacet()
        No-arg constructor. By default only '0' is supported for the fractionDigits facet.
      • AbstractDigitsFacet

        protected AbstractDigitsFacet​(boolean fractionDigitsZeroOnly)
        Construct a new AbstractDigitsFacet optionally allowing the fractionDigits facet to be set to all positive values.
        Parameters:
        fractionDigitsZeroOnly - If set to true only '0' is allowed for the fractionDigits facet. If set to false all positive values are allowed for fractionDigits facet.
    • Method Detail

      • getTotalDigits

        public final int getTotalDigits()
        Returns the totalDigits facet value of this XSType.
        Returns:
        The totalDigits facet value of this XSType.
      • setTotalDigits

        public final void setTotalDigits​(int totalDigits)
        Sets the totalDigits facet for this XSType.
        Parameters:
        totalDigits - The value of totalDigits (must be >0).
      • getFractionDigits

        public final int getFractionDigits()
        Returns the fractionDigits facet value of this XSType.
        Returns:
        The fractionDigits facet value of this XSType.
      • setFractionDigits

        public final void setFractionDigits​(int fractionDigits)
        Sets the fractionDigits facet for this XSType.
        Parameters:
        fractionDigits - The value of fractionDigits (must be >=0).
      • setFacet

        protected final void setFacet​(Facet facet)
        Set the given facet for XSType if applicable.
        Overrides:
        setFacet in class AbstractRangeFacet
        Parameters:
        facet - The facet to set for XSType.
      • setDigitsFacet

        protected final void setDigitsFacet​(Facet facet)
        Transfer given facet if it is a digits facet.
        Parameters:
        facet - The facet to transfer.
      • codeDigitsFacet

        protected final void codeDigitsFacet​(JSourceCode jsc,
                                             java.lang.String validatorName)
        Generate the source code for digits facet validation.
        Parameters:
        jsc - The JSourceCode to fill in.
        validatorName - The name of the TypeValidator that the digits should be added to.