Class BooleanValue


  • public class BooleanValue
    extends BasisDatatypeValue
    This class holds the value for the boolean.
    Author:
    lueder, Holger Eichelberger
    • Field Detail

      • value

        private java.lang.Boolean value
    • Constructor Detail

      • BooleanValue

        protected BooleanValue​(java.lang.String value)
                        throws ValueDoesNotMatchTypeException
        Constructor. Please avoid this constructor and use the constants instead.
        Parameters:
        value - Value of the Datatype
        Throws:
        ValueDoesNotMatchTypeException - if the given value does not match this type
      • BooleanValue

        protected BooleanValue()
        Argumentless constructor representing the type itself.
      • BooleanValue

        protected BooleanValue​(java.lang.Boolean value)
        Creates a boolean value from the given boolean value.
        Parameters:
        value - the value to assign
    • Method Detail

      • getValue

        public java.lang.Boolean getValue()
        Getter for the value.
        Overrides:
        getValue in class BasisDatatypeValue
        Returns:
        the saved boolean
      • accept

        public void accept​(IValueVisitor visitor)
        Description copied from class: Value
        Abstract accept method.
        Specified by:
        accept in class Value
        Parameters:
        visitor - The visitor
      • isConfigured

        public boolean isConfigured()
        Description copied from class: Value
        Abstract Method to check whether a value is configured.
        Specified by:
        isConfigured in class Value
        Returns:
        true = it is configured / false = it is not
      • clone

        public Value clone()
        Description copied from class: Value
        Clones the this value.
        Overrides:
        clone in class Value
        Returns:
        the clone of the value
      • toBooleanValue

        public static final BooleanValue toBooleanValue​(boolean value)
        Converts a Java boolean into an IVML boolean value. To some degree, this bypasses the value factory but - as the result is obvious, but also simplifies some (evaluation) code.
        Parameters:
        value - the value to be converted
        Returns:
        the IVML value
      • toValue

        private static final java.lang.Boolean toValue​(java.lang.Object value)
        Converts a String ("true", "false") into an IVML Boolean value.
        Parameters:
        value - the value to be converted
        Returns:
        the IVML value (may be null if no match)
      • toBooleanValue

        public static final BooleanValue toBooleanValue​(java.lang.String value)
        Converts a String ("true", "false") into an IVML boolean value. To some degree, this bypasses the value factory but - as the result is obvious, but also simplifies some (evaluation) code and may save resources.
        Parameters:
        value - the value to be converted
        Returns:
        the IVML value (may be null if no match)
      • toBooleanValueEx

        public static final BooleanValue toBooleanValueEx​(java.lang.String value)
                                                   throws ValueDoesNotMatchTypeException
        Converts a String ("true", "false") into an IVML boolean value. To some degree, this bypasses the value factory but - as the result is obvious, but also simplifies some (evaluation) code and may save resources.
        Parameters:
        value - the value to be converted
        Returns:
        the IVML value
        Throws:
        ValueDoesNotMatchTypeException - in case that the value does not match
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Value
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class Value