Class BooleanDataObject

  • All Implemented Interfaces:
    DataObject, Immutable, Serializable

    public final class BooleanDataObject
    extends ImmutableDataObject
    A BooleanDataObject is an ImmutableDataObject whose content is a boolean value. It is useful where you need a DataObject but the ASN.1 type is BOOLEAN, and is used if the extendible adaptation is given.
    See Also:
    Serialized Form
    • Field Detail

      • TRUE

        public static final BooleanDataObject TRUE
        A BooleanDataObject whose value is true.
      • FALSE

        public static final BooleanDataObject FALSE
        A BooleanDataObject whose value is false.
    • Method Detail

      • valueOf

        public static BooleanDataObject valueOf​(boolean bool)
        Chooses the appropriate static instance to represent the given boolean.
        Parameters:
        bool - boolean value
        Returns:
        BooleanDataObject static instance
      • booleanValue

        public boolean booleanValue()
        Gets the boolean value from this DataObject.
        Returns:
        boolean
      • toString

        public String toString()
        Returns a printable representation of this.
        Overrides:
        toString in class Object
        Returns:
        same as Boolean.toString() for this value
      • equals

        public boolean equals​(Object obj)
        Compares some other object to this one for equality by value.
        Overrides:
        equals in class Object
        Parameters:
        obj - other object
        Returns:
        same as Boolean.equals() for this value
      • hashCode

        public int hashCode()
        Gets a hash code value for this object.
        Overrides:
        hashCode in class Object
        Returns:
        same as Boolean.hashCode() for this value