BooleanConstant.java

// FILE. . . . . /home/hak/hlt/src/hlt/osfv3/base/BooleanConstant.java
// EDIT BY . . . Hassan Ait-Kaci
// ON MACHINE. . Hak-Laptop
// STARTED ON. . Mon Sep 02 16:47:11 2013



Copyright:  © by the author
Author:  Hassan Aït-Kaci
Version:  Last modified on Fri Aug 23 12:06:24 2019 by hak



package hlt.osf.base;

import hlt.osf.exec.Taxonomy;



This is the class for boolean constants.


public class BooleanConstant extends Constant
  {
    

Constructs a new BooleanConstant with the given value.


    public BooleanConstant (boolean value)
    {
      _sort = Taxonomy.BOOLEAN;
      _value = value;
    }

    

The value if this constant.


    private boolean _value;

    

Return the value of this BooleanConstant.


    public boolean value ()
    {
      return _value;
    }

    

Returns true iff the specified object is a BooleanConstant carrying the same value as this one.


    public boolean equals (Object other)
    {
      if (!(other instanceof BooleanConstant))
	return false;

      return _value == ((BooleanConstant)other).value();
    }

    

Returns a String representation of this BooleanConstant.


    public String toString ()
    {
      return Boolean.toString(_value);
    }

    public String displayForm ()
    {
      return toString();
    }

  }


This file was generated on Mon Sep 09 09:17:59 PDT 2019 from file BooleanConstant.java
by the hlt.language.tools.Hilite Java tool written by Hassan Aït-Kaci