home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VPage / Java.bin / CLASSES.ZIP / sun / tools / tree / FloatExpression.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  1.4 KB  |  36 lines

  1. package sun.tools.tree;
  2.  
  3. import java.io.PrintStream;
  4. import sun.tools.asm.Assembler;
  5. import sun.tools.java.Environment;
  6. import sun.tools.java.Type;
  7.  
  8. public class FloatExpression extends ConstantExpression {
  9.    float value;
  10.  
  11.    public FloatExpression(int var1, float var2) {
  12.       super(67, var1, Type.tFloat);
  13.       this.value = var2;
  14.    }
  15.  
  16.    public Object getValue() {
  17.       return new Float(this.value);
  18.    }
  19.  
  20.    public boolean equals(int var1) {
  21.       return this.value == (float)var1;
  22.    }
  23.  
  24.    public boolean equalsDefault() {
  25.       return Float.floatToIntBits(this.value) == 0;
  26.    }
  27.  
  28.    public void codeValue(Environment var1, Context var2, Assembler var3) {
  29.       var3.add(super.where, 18, new Float(this.value));
  30.    }
  31.  
  32.    public void print(PrintStream var1) {
  33.       var1.print(this.value + "F");
  34.    }
  35. }
  36.