FileDocCategorySizeDatePackage
CstFloat.javaAPI DocAndroid 1.5 API2619Wed May 06 22:41:02 BST 2009com.android.dx.rop.cst

CstFloat

public final class CstFloat extends CstLiteral32
Constants of type CONSTANT_Float_info.

Fields Summary
public static final CstFloat
VALUE_0
non-null; instance representing 0
public static final CstFloat
VALUE_1
non-null; instance representing 1
public static final CstFloat
VALUE_2
non-null; instance representing 2
Constructors Summary
private CstFloat(int bits)
Constructs an instance. This constructor is private; use {@link #make}.

param
bits the float value as int bits

        super(bits);
    
Methods Summary
public com.android.dx.rop.type.TypegetType()
{@inheritDoc}

        return Type.FLOAT;
    
public floatgetValue()
Gets the float value.

return
the value

        return Float.intBitsToFloat(getIntBits());
    
public static com.android.dx.rop.cst.CstFloatmake(int bits)
Makes an instance for the given value. This may (but does not necessarily) return an already-allocated instance.

param
bits the float value as int bits


                                   
         
        /*
         * Note: Javadoc notwithstanding, this implementation always
         * allocates.
         */
        return new CstFloat(bits);
    
public java.lang.StringtoHuman()
{@inheritDoc}

        return Float.toString(Float.intBitsToFloat(getIntBits()));
    
public java.lang.StringtoString()
{@inheritDoc}

        int bits = getIntBits();
        return "float{0x" + Hex.u4(bits) + " / " +
            Float.intBitsToFloat(bits) + '}";
    
public java.lang.StringtypeName()
{@inheritDoc}

        return "float";