Class PseudoBoolean

  • All Implemented Interfaces:
    IVilType

    public class PseudoBoolean
    extends java.lang.Object
    implements IVilType
    A class representing the Boolean type.
    Author:
    Holger Eichelberger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.Boolean DEFAULT  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PseudoBoolean()
      Prevents external instantiation.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean and​(boolean b1, boolean b2)
      Represents the Boolean "and" operation.
      static boolean equals​(boolean b1, boolean b2)
      Represents the equality operation for Booleans.
      static TypeDescriptor<?> getType​(java.lang.Boolean value)
      Returns the type of value.
      static boolean iff​(boolean b1, boolean b2)
      Represents the Boolean "iff" operation.
      static boolean implies​(boolean b1, boolean b2)
      Represents the Boolean "implies" operation.
      static boolean not​(boolean val)
      Represents the Boolean "or" operation.
      static boolean or​(boolean b1, boolean b2)
      Represents the Boolean "or" operation.
      static java.lang.String toString​(boolean b0)
      Returns the string value of b0.
      static boolean unequals​(boolean b1, boolean b2)
      Represents the unequality operation for Booleans.
      static boolean xor​(boolean b1, boolean b2)
      Represents the Boolean "xor" operation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT

        public static final java.lang.Boolean DEFAULT
    • Constructor Detail

      • PseudoBoolean

        protected PseudoBoolean()
        Prevents external instantiation.
    • Method Detail

      • and

        public static boolean and​(boolean b1,
                                  boolean b2)
        Represents the Boolean "and" operation.
        Parameters:
        b1 - the first boolean to be considered
        b2 - the second boolean to be considered
        Returns:
        b1 & b2
      • or

        public static boolean or​(boolean b1,
                                 boolean b2)
        Represents the Boolean "or" operation.
        Parameters:
        b1 - the first boolean to be considered
        b2 - the second boolean to be considered
        Returns:
        b1 | b2
      • xor

        public static boolean xor​(boolean b1,
                                  boolean b2)
        Represents the Boolean "xor" operation.
        Parameters:
        b1 - the first boolean to be considered
        b2 - the second boolean to be considered
        Returns:
        b1 ^ b2
      • not

        public static boolean not​(boolean val)
        Represents the Boolean "or" operation.
        Parameters:
        val - the boolean to be negated
        Returns:
        !val
      • equals

        public static boolean equals​(boolean b1,
                                     boolean b2)
        Represents the equality operation for Booleans.
        Parameters:
        b1 - the first boolean to be considered
        b2 - the second boolean to be considered
        Returns:
        b1 == b2
      • unequals

        public static boolean unequals​(boolean b1,
                                       boolean b2)
        Represents the unequality operation for Booleans.
        Parameters:
        b1 - the first boolean to be considered
        b2 - the second boolean to be considered
        Returns:
        b1 != b2
      • implies

        public static boolean implies​(boolean b1,
                                      boolean b2)
        Represents the Boolean "implies" operation.
        Parameters:
        b1 - the first boolean to be considered
        b2 - the second boolean to be considered
        Returns:
        b1 ^ b2
      • iff

        public static boolean iff​(boolean b1,
                                  boolean b2)
        Represents the Boolean "iff" operation.
        Parameters:
        b1 - the first boolean to be considered
        b2 - the second boolean to be considered
        Returns:
        b1 ^ b2
      • toString

        public static java.lang.String toString​(boolean b0)
        Returns the string value of b0.
        Parameters:
        b0 - the boolean to be turned into a string
        Returns:
        the string value
      • getType

        public static TypeDescriptor<?> getType​(java.lang.Boolean value)
        Returns the type of value. "Overrides" PseudoAny.getType(Object).
        Parameters:
        value - the Boolean to return the type for
        Returns:
        the type of object (null if ob is null)