java.util
Class Locale
java.lang.Object
java.util.Locale
- All Implemented Interfaces:
- Cloneable, Serializable
- public final class Locale
- extends Object
- implements Cloneable, Serializable
Specifications inherited from class Object |
represents objectState <- org.jmlspecs.lang.JMLDataGroup.IT;
public represents _getClass <- \typeof(this); |
ENGLISH
public static final Locale ENGLISH
- Specifications: non_null
FRENCH
public static final Locale FRENCH
- Specifications: non_null
GERMAN
public static final Locale GERMAN
- Specifications: non_null
ITALIAN
public static final Locale ITALIAN
- Specifications: non_null
JAPANESE
public static final Locale JAPANESE
- Specifications: non_null
KOREAN
public static final Locale KOREAN
- Specifications: non_null
CHINESE
public static final Locale CHINESE
- Specifications: non_null
SIMPLIFIED_CHINESE
public static final Locale SIMPLIFIED_CHINESE
- Specifications: non_null
TRADITIONAL_CHINESE
public static final Locale TRADITIONAL_CHINESE
- Specifications: non_null
FRANCE
public static final Locale FRANCE
- Specifications: non_null
GERMANY
public static final Locale GERMANY
- Specifications: non_null
ITALY
public static final Locale ITALY
- Specifications: non_null
JAPAN
public static final Locale JAPAN
- Specifications: non_null
KOREA
public static final Locale KOREA
- Specifications: non_null
CHINA
public static final Locale CHINA
- Specifications: non_null
PRC
public static final Locale PRC
- Specifications: non_null
TAIWAN
public static final Locale TAIWAN
- Specifications: non_null
UK
public static final Locale UK
- Specifications: non_null
US
public static final Locale US
- Specifications: non_null
CANADA
public static final Locale CANADA
- Specifications: non_null
CANADA_FRENCH
public static final Locale CANADA_FRENCH
- Specifications: non_null
serialVersionUID
static final long serialVersionUID
Locale
public Locale(non_null String language,
non_null String country,
non_null String variant)
Locale
public Locale(non_null String language,
non_null String country)
Locale
public Locale(non_null String language)
getDefault
public static Locale getDefault()
- Specifications: pure non_null
setDefault
public static void setDefault(non_null Locale newLocale)
- Specifications:
-
public normal_behavior
requires newLocale != null;
assignable \everything;
ensures getDefault() == newLocale;
getAvailableLocales
public static Locale[] getAvailableLocales()
- Specifications: pure non_null
-
ensures \result != null;
getISOCountries
public static String[] getISOCountries()
- Specifications: pure non_null
-
ensures \result != null;
getISOLanguages
public static String[] getISOLanguages()
- Specifications: pure non_null
-
ensures \result != null;
getLanguage
public String getLanguage()
- Specifications: pure non_null
-
ensures \result != null;
getCountry
public String getCountry()
- Specifications: pure non_null
-
ensures \result != null;
getVariant
public String getVariant()
- Specifications: pure non_null
-
ensures \result != null;
toString
public final String toString()
- Overrides:
toString
in class Object
- Specifications: pure non_null
- also
-
ensures \result != null;
- Specifications inherited from overridden method in class Object:
non_null -
public normal_behavior
assignable objectState;
ensures \result != null;
ensures \result == 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;
getISO3Language
public String getISO3Language()
throws MissingResourceException
- Throws:
MissingResourceException
- Specifications: pure non_null
-
ensures \result != null;
getISO3Country
public String getISO3Country()
throws MissingResourceException
- Throws:
MissingResourceException
- Specifications: pure non_null
-
ensures \result != null;
getDisplayLanguage
public final String getDisplayLanguage()
- Specifications: pure non_null
-
ensures \result != null;
getDisplayLanguage
public String getDisplayLanguage(non_null Locale inLocale)
- Specifications: pure non_null
-
public normal_behavior
requires inLocale != null;
ensures \result != null;
getDisplayCountry
public final String getDisplayCountry()
- Specifications: pure non_null
-
ensures \result != null;
getDisplayCountry
public String getDisplayCountry(non_null Locale inLocale)
- Specifications: pure non_null
-
public normal_behavior
requires inLocale != null;
ensures \result != null;
getDisplayVariant
public final String getDisplayVariant()
- Specifications: pure non_null
-
ensures \result != null;
getDisplayVariant
public String getDisplayVariant(non_null Locale inLocale)
- Specifications: pure non_null
-
public normal_behavior
requires inLocale != null;
ensures \result != null;
getDisplayName
public final String getDisplayName()
- Specifications: pure non_null
-
ensures \result != null;
getDisplayName
public String getDisplayName(non_null Locale inLocale)
- Specifications: pure non_null
-
public normal_behavior
requires inLocale != null;
ensures \result != null;
clone
public Object clone()
- Overrides:
clone
in class Object
- Specifications: non_null
- also
-
ensures \result != null;
- Specifications inherited from overridden method in class Object:
non_null -
protected normal_behavior
requires this instanceof java.lang.Cloneable;
assignable \nothing;
ensures \result != null;
ensures \typeof(\result ) == \typeof(this);
ensures (* \result is a clone of this *);
- also
-
protected normal_behavior
requires this.getClass().isArray();
assignable \nothing;
ensures \elemtype(\typeof(\result )) == \elemtype(\typeof(this));
ensures ((java.lang.Object[])\result ).length == ((java.lang.Object[])this).length;
ensures ( \forall int i; 0 <= i&&i < ((java.lang.Object[])this).length; ((java.lang.Object[])\result )[i] == ((java.lang.Object[])this)[i]);
- also
-
requires this.getClass().isArray();
assignable \nothing;
ensures \elemtype(\typeof(\result )) == \elemtype(\typeof(this));
ensures java.lang.reflect.Array.getLength(\result ) == java.lang.reflect.Array.getLength(this);
ensures ( \forall int i; 0 <= i&&i < java.lang.reflect.Array.getLength(this); java.lang.reflect.Array.get(\result ,i).equals(java.lang.reflect.Array.get(this,i)));
- also
-
protected exceptional_behavior
requires !(this instanceof java.lang.Cloneable);
assignable \nothing;
signals_only java.lang.CloneNotSupportedException;
- also
-
protected normal_behavior
requires \elemtype(\typeof(this)) <: \type(java.lang.Object);
assignable \nothing;
ensures \elemtype(\typeof(\result )) == \elemtype(\typeof(this));
ensures ((java.lang.Object[])\result ).length == ((java.lang.Object[])this).length;
ensures ( \forall int i; 0 <= i&&i < ((java.lang.Object[])this).length; ((java.lang.Object[])\result )[i] == ((java.lang.Object[])this)[i]);
- also
-
protected normal_behavior
requires \elemtype(\typeof(this)) == \type(int);
assignable \nothing;
ensures \elemtype(\typeof(\result )) == \elemtype(\typeof(this));
ensures ((int[])\result ).length == ((int[])this).length;
ensures ( \forall int i; 0 <= i&&i < ((int[])this).length; ((int[])\result )[i] == ((int[])this)[i]);
- also
-
protected normal_behavior
requires \elemtype(\typeof(this)) == \type(byte);
assignable \nothing;
ensures \elemtype(\typeof(\result )) == \elemtype(\typeof(this));
ensures ((byte[])\result ).length == ((byte[])this).length;
ensures ( \forall int i; 0 <= i&&i < ((byte[])this).length; ((byte[])\result )[i] == ((byte[])this)[i]);
- also
-
protected normal_behavior
requires \elemtype(\typeof(this)) == \type(char);
assignable \nothing;
ensures \elemtype(\typeof(\result )) == \elemtype(\typeof(this));
ensures ((char[])\result ).length == ((char[])this).length;
ensures ( \forall int i; 0 <= i&&i < ((char[])this).length; ((char[])\result )[i] == ((char[])this)[i]);
- also
-
protected normal_behavior
requires \elemtype(\typeof(this)) == \type(long);
assignable \nothing;
ensures \elemtype(\typeof(\result )) == \elemtype(\typeof(this));
ensures ((long[])\result ).length == ((long[])this).length;
ensures ( \forall int i; 0 <= i&&i < ((long[])this).length; ((long[])\result )[i] == ((long[])this)[i]);
- also
-
protected normal_behavior
requires \elemtype(\typeof(this)) == \type(short);
assignable \nothing;
ensures \elemtype(\typeof(\result )) == \elemtype(\typeof(this));
ensures ((short[])\result ).length == ((short[])this).length;
ensures ( \forall int i; 0 <= i&&i < ((short[])this).length; ((short[])\result )[i] == ((short[])this)[i]);
- also
-
protected normal_behavior
requires \elemtype(\typeof(this)) == \type(boolean);
assignable \nothing;
ensures \elemtype(\typeof(\result )) == \elemtype(\typeof(this));
ensures ((boolean[])\result ).length == ((boolean[])this).length;
ensures ( \forall int i; 0 <= i&&i < ((boolean[])this).length; ((boolean[])\result )[i] == ((boolean[])this)[i]);
- also
-
protected normal_behavior
requires \elemtype(\typeof(this)) == \type(float);
assignable \nothing;
ensures \elemtype(\typeof(\result )) == \elemtype(\typeof(this));
ensures ((float[])\result ).length == ((float[])this).length;
ensures ( \forall int i; 0 <= i&&i < ((float[])this).length; (java.lang.Float.isNaN(((float[])\result )[i])&&java.lang.Float.isNaN(((float[])this)[i]))||((float[])\result )[i] == ((float[])this)[i]);
- also
-
protected normal_behavior
requires \elemtype(\typeof(this)) == \type(double);
assignable \nothing;
ensures \elemtype(\typeof(\result )) == \elemtype(\typeof(this));
ensures ((double[])\result ).length == ((double[])this).length;
ensures ( \forall int i; 0 <= i&&i < ((double[])this).length; (java.lang.Double.isNaN(((double[])\result )[i])&&java.lang.Double.isNaN(((double[])this)[i]))||((double[])\result )[i] == ((double[])this)[i]);
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
- 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
- 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 ;
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.