Package com.adobe.xfa

Class Bool


  • public final class Bool
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      Bool()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static EnumAttr falseValue()
      Static function for returning Off/false/0
      static EnumAttr getBool​(boolean bValue)
      Construct an instance from a boolean
      static EnumAttr getBool​(java.lang.String sValue)
      Get the boolean instance from a string
      static boolean getValue​(EnumAttr e)
      Return the boolean value of an enumerated value
      static boolean getValue​(EnumValue e)
      Return the boolean value of an enumerated attribute
      static java.lang.String toString​(boolean b)
      Convenience method to return a string for a boolean value.
      static EnumAttr trueValue()
      Static function for returning On/true/1
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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​(java.lang.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 java.lang.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