Package Name: java.lang.boolean

Return to: Package List

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

package java.lang.Boolean is
    type Boolean_Obj is tagged limited null record;

    type Boolean_Ptr is access all Boolean_Obj;

    subtype Boolean is Standard.Boolean;  -- so not hidden by pkg name
    TRUE : constant Boolean_Ptr;

    pragma Import(Java, TRUE);
    FALSE : constant Boolean_Ptr;

    pragma Import(Java, FALSE);
    MIN_VALUE : constant Wide_Character;

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

    pragma Import(Java, MAX_VALUE);
    function new_Boolean(
        value : Boolean)

      return Boolean_Ptr;
    function new_Boolean(
        s : String_Ptr)

      return Boolean_Ptr;

    function booleanValue(Obj : access Boolean_Obj) return Boolean;
    function valueOf(
        s : String_Ptr)

      return Boolean_Ptr;

    function toString(Obj : access Boolean_Obj) return String_Ptr;

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

    pragma Import(Ada, "=", "equals");
    function getBoolean(
        name : String_Ptr)

      return Boolean;
    pragma Import(Java, valueOf);
    pragma Import(Java, booleanValue);
    pragma Import(Java, hashCode);
    pragma Import(Java, toString);

    pragma Import(Java, getBoolean);

    pragma Import(Java_Constructor, new_Boolean);
end java.lang.Boolean;