FileDocCategorySizeDatePackage
SingleValueConstant.javaAPI DocJ2ME CLDC 1.11406Wed Feb 05 15:56:02 GMT 2003components

SingleValueConstant

public class SingleValueConstant extends ConstantObject

Fields Summary
public int
value
Constructors Summary
private SingleValueConstant(int t, int v)

    tag = t;
    value = v;
    nSlots = 1;
    
public SingleValueConstant(int ival)

    this( Const.CONSTANT_INTEGER, ival );
    
Methods Summary
public booleanequals(java.lang.Object o)

    if (o instanceof SingleValueConstant) {
        SingleValueConstant s = (SingleValueConstant) o;
        return tag == s.tag && value == s.value;
    } else {
        return false;
    }
    
public inthashCode()

    return tag + value;
    
public booleanisResolved()

 return true; 
public static ConstantObjectread(int t, java.io.DataInput i)

    return new SingleValueConstant( t, i.readInt() );
    
public java.lang.StringtoString()

    return (tag==Const.CONSTANT_FLOAT)? ("Float: "+Float.intBitsToFloat(value) ):
        ("Int: "+Integer.toHexString( value ));
    
public voidwrite(java.io.DataOutput o)

    o.writeByte( tag );
    o.writeInt( value );