AndSortExpression.java

// FILE. . . . . /home/hak/hlt/src/hlt/osfv1/base/AndSortExpression.java
// EDIT BY . . . Hassan Ait-Kaci
// ON MACHINE. . Hak-Laptop
// STARTED ON. . Mon Sep 02 09:11:33 2013



Author:  Hassan Aït-Kaci
Copyright:  © by the author
Version:  Last modified on Sun Sep 15 12:33:07 2013 by hak



package hlt.osf.base;



This is the class of an 'and' sort expression. It consists of two sort expressions which are its arguments.


public class AndSortExpression extends BinarySortExpression
  {
    public AndSortExpression (SortExpression lhs, SortExpression rhs)
    {
      super(lhs,rhs);
      _context = lhs.context();
    }

    public byte type ()
    {
      return _context.AND();
    }

    public String displayForm ()
    {
      String form = _lhs.displayForm() + " & " + _rhs.displayForm();
      return isParenthesized() ? "("+form+")" : form;
    }

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

      AndSortExpression o = (AndSortExpression)other;
      
      return _lhs.equals(o.lhs()) && _rhs.equals(o.rhs())
          || _rhs.equals(o.rhs()) && _lhs.equals(o.lhs());
    }

  }


This file was generated on Thu Oct 03 16:37:26 CEST 2013 from file AndSortExpression.java
by the hlt.language.tools.Hilite Java tool written by Hassan Aït-Kaci