package mfl;

public class Boolean
extends mfl.Value
{
  boolean java_value;

  Boolean(boolean v){
    java_value = v;
  }

  static public Boolean False = new Boolean(false);
  static public Boolean True = new Boolean(true);

  public mfl.Value and_op(mfl.Value x)
    {if (!(x instanceof Boolean)) return super.and_op(x);
    return java_value && ((Boolean)x).java_value ? True : False;}

  public boolean equals(Object x)
    {return this == x ? true : false;}

  public int hashCode()
    {return java_value?1:0;}

  public mfl.Value not_op()
    {return java_value ? False : True;}

  public mfl.Value or_op(mfl.Value x)
    {if (!(x instanceof Boolean)) return super.or_op(x);
    return java_value || ((Boolean)x).java_value ? True : False;}

  public java.lang.String toString()
    {return java_value ? "True" : "False";}

}

