FileDocCategorySizeDatePackage
SingleValueConstant.javaAPI DocphoneME MR2 API (J2ME)2208Wed May 02 17:59:48 BST 2007components

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 );