java.lang
Class Boolean
java.lang.Object
java.lang.Boolean
- All Implemented Interfaces:
- Serializable
- public final class Boolean
- extends Object
- implements Serializable
JML's specification of java.lang.Boolean.
- Version:
- $Revision: 1.16 $
- Author:
- Brandon Shilling, Gary T. Leavens, Patrice Chalin
Class Specifications |
represents theBoolean <- this.booleanValue(); |
Specifications inherited from class Object |
represents objectState <- org.jmlspecs.lang.JMLDataGroup.IT;
public represents _getClass <- \typeof(this); |
theBoolean
public boolean theBoolean
TRUE
public static final Boolean TRUE
- Specifications: non_null
FALSE
public static final Boolean FALSE
- Specifications: non_null
TYPE
public static final Class TYPE
- Specifications: non_null
Boolean
public Boolean(boolean value)
- Specifications: (class)pure
-
public normal_behavior
assignable theBoolean;
ensures this.theBoolean == value;
Boolean
public Boolean(String s)
- Specifications: (class)pure
-
public normal_behavior
assignable theBoolean;
ensures this.theBoolean == "true".equalsIgnoreCase(s);
booleanValue
public boolean booleanValue()
- Specifications: (class)pure
-
public normal_behavior
assignable \nothing;
ensures \result == this.theBoolean;
valueOf
public static Boolean valueOf(boolean b)
- Specifications: pure non_null
-
public normal_behavior
assignable \nothing;
ensures \result .booleanValue() == b;
valueOf
public static Boolean valueOf(String s)
- Specifications: pure non_null
-
public normal_behavior
assignable \nothing;
ensures \result .booleanValue() == "true".equalsIgnoreCase(s);
toString
public static String toString(boolean b)
- Specifications: pure non_null
-
public normal_behavior
assignable \nothing;
ensures valueOf(\result ).booleanValue() == b;
toString
public String toString()
- Overrides:
toString
in class Object
- Specifications: non_null (class)pure
- also
-
public normal_behavior
assignable \nothing;
ensures valueOf(\result ).booleanValue() == this.theBoolean;
- Specifications inherited from overridden method in class Object:
non_null -
public normal_behavior
assignable objectState;
ensures \result != null&&\result .equals(this.theString);
ensures (* \result is a string representation of this object *);
- also
-
public code normal_behavior
assignable \nothing;
ensures \result != null&&(* \result is the instance's class name, followed by an @, followed by the instance's hashcode in hex *);
- also
-
public code model_program { ... }
- implies_that
-
assignable objectState;
ensures \result != null;
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
- Specifications: (class)pure
- Specifications inherited from overridden method in class Object:
-
public behavior
assignable objectState;
ensures (* \result is a hash code for this object *);
- also
-
public code normal_behavior
assignable \nothing;
equals
public boolean equals(nullable Object obj)
- Overrides:
equals
in class Object
- Specifications: pure
- also
-
public normal_behavior
{|-
requires obj != null&&(obj instanceof java.lang.Boolean);
assignable \nothing;
ensures \result == (this.theBoolean == ((java.lang.Boolean)obj).booleanValue());
- also
-
requires obj == null||!(obj instanceof java.lang.Boolean);
assignable \nothing;
ensures !\result ;
- |}
- Specifications inherited from overridden method equals(Object obj) in class Object:
pure -
public normal_behavior
requires obj != null;
ensures (* \result is true when obj is "equal to" this object *);
- also
-
public normal_behavior
requires this == obj;
ensures \result ;
- also
-
public code normal_behavior
requires obj != null;
ensures \result <==> this == obj;
- also
-
diverges false;
ensures obj == null ==> !\result ;
getBoolean
public static boolean getBoolean(String name)
- Specifications: pure
-
public normal_behavior
assignable \nothing;
ensures \result == (name == null||name.equals("") ? false : valueOf(java.lang.System.getProperty(name)).booleanValue());
JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.