Package com.adobe.xfa

Class Bool


  • public final class Bool
    extends Object
    A convenience class that returns the frequently-used EnumAttr types BOOL_TRUE and BOOL_FALSE. This will save applications from needing to use "new" to reference these values.
    • Constructor Detail

      • Bool

        public Bool()
    • Method Detail

      • falseValue

        public static EnumAttr falseValue()
        Static function for returning Off/false/0
      • getBool

        public static EnumAttr getBool​(boolean bValue)
        Construct an instance from a boolean
        Parameters:
        bValue - the input boolean
      • getBool

        public static EnumAttr getBool​(String sValue)
        Get the boolean instance from a string
        Parameters:
        sValue - "1" for true, "0" or "" for false
        Returns:
        The EnumAttr attribute representing this boolean value.
        Throws:
        InvalidPropertyValueException
      • getValue

        public static boolean getValue​(EnumAttr e)
        Return the boolean value of an enumerated value
        Parameters:
        e - the enumerated value
        Returns:
        true or false
      • getValue

        public static boolean getValue​(EnumValue e)
        Return the boolean value of an enumerated attribute
        Parameters:
        e - the enumerated attribute
        Returns:
        true or false
      • toString

        public static String toString​(boolean b)
        Convenience method to return a string for a boolean value.
        Parameters:
        b - the boolean value
        Returns:
        the String representation
      • trueValue

        public static EnumAttr trueValue()
        Static function for returning On/true/1