StringConstant.java

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



This is the class for string constants.

Author:  Hassan Aït-Kaci
Copyright:  © by the author
Version:  Last modified on Tue Jan 21 08:06:00 2014 by hak



package hlt.osf.base;

import hlt.osf.exec.Taxonomy;

public class StringConstant extends Constant
  {
    

Constructs a new StringConstant with the given value.


    public StringConstant (String value)
    {
      _sort = Taxonomy.STRING;
      _value = value.intern();
    }

    

The value if this constant.


    private String _value;

    

Return the string value of this StringConstant.


    public String value ()
    {
      return _value;
    }

    

Returns true iff the specified object is an StringConstant carrying the same value as this one.


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

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

    

Returns a String representation of this StringConstant.


    public String toString ()
    {
      return _value;
    }

    

Returns a String representation of this StringConstant between double quotes.


    public String toQuotedString ()
    {
      return "\""+_value+"\"";
    }

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

  }


This file was generated on Sun Mar 29 11:34:23 CEST 2015 from file StringConstant.java
by the hlt.language.tools.Hilite Java tool written by Hassan Aït-Kaci