Package Name: java.lang.float

Return to: Package List

with java.lang.Number; use java.lang.Number;
with java.lang.String; use java.lang.String;
with java.lang; use java.lang;

package java.lang.Float is
    type Float_Obj is new Number_Obj with null record;

    type Float_Ptr is access all Float_Obj;

    subtype Float is Standard.Float;  -- so not hidden by pkg name
    POSITIVE_INFINITY : constant Float;

    pragma Import(Java, POSITIVE_INFINITY);
    NEGATIVE_INFINITY : constant Float;

    pragma Import(Java, NEGATIVE_INFINITY);
    NaN : constant Float;

    pragma Import(Java, NaN);
    MAX_VALUE : constant Float;

    pragma Import(Java, MAX_VALUE);
    MIN_VALUE : constant Float;

    pragma Import(Java, MIN_VALUE);
    function toString(
        P1 : Float)

      return String_Ptr;
    function valueOf(
        P1 : String_Ptr)

      return Float_Ptr;
    function isNaN(
        v : Float)

      return Boolean;
    function isInfinite(
        v : Float)

      return Boolean;
    function new_Float(
        value : Float)

      return Float_Ptr;
    function new_Float(
        value : Long_Float)

      return Float_Ptr;
    function new_Float(
        s : String_Ptr)

      return Float_Ptr;

    function isNaN(Obj : access Float_Obj) return Boolean;

    function isInfinite(Obj : access Float_Obj) return Boolean;

    function toString(Obj : access Float_Obj) return String_Ptr;

    function intValue(Obj : access Float_Obj) return Integer;

    function longValue(Obj : access Float_Obj) return Long_Integer;

    function floatValue(Obj : access Float_Obj) return Float;

    function doubleValue(Obj : access Float_Obj) return Long_Float;

    function hashCode(Obj : access Float_Obj) return Integer;
    function "="(Left, Right : Float_Obj) return Boolean;

    pragma Import(Ada, "=", "equals");
    function floatToIntBits(
        P1 : Float)

      return Integer;
    function intBitsToFloat(
        P1 : Integer)

      return Float;
    pragma Import(Java, longValue);
    pragma Import(Java, valueOf);
    pragma Import(Java, floatValue);
    pragma Import(Java, doubleValue);
    pragma Import(Java, isInfinite);
    pragma Import(Java, intValue);
    pragma Import(Java, hashCode);
    pragma Import(Java, floatToIntBits);
    pragma Import(Java, isNaN);
    pragma Import(Java, intBitsToFloat);

    pragma Import(Java, toString);

    pragma Import(Java_Constructor, new_Float);
end java.lang.Float;