deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.model.csct.resources
Class Utilities

java.lang.Object
  extended by org.deegree.model.csct.resources.Utilities

public final class Utilities
extends Object

A set of miscellaneous methods.

Version:
1.0
Author:
Martin Desruisseaux

Method Summary
static boolean equals(Object object1, Object object2)
          Convenience method for testing two objects for equality.
static String getShortClassName(Object object)
          Returns a short class name for the specified object.
static String getShortName(Class classe)
          Returns a short class name for the specified class.
static boolean isSubScript(char c)
          Determines whether the character is a subscript.
static boolean isSuperScript(char c)
          Determines whether the character is a superscript.
static String spaces(int length)
          Returns a string of the specified length filled with white spaces.
static char toNormalScript(char c)
          Converts the character argument to normal script.
static char toSubScript(char c)
          Converts the character argument to subscript.
static char toSuperScript(char c)
          Converts the character argument to superscript.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isSuperScript

public static boolean isSuperScript(char c)
Determines whether the character is a superscript. Most superscripts have unicode value from \\u2070 to \\u207F inclusive. Superscripts are the following symbols:
 ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁺ ⁻ ⁼ ⁽ ⁾ ⁿ
 


isSubScript

public static boolean isSubScript(char c)
Determines whether the character is a subscript. Most subscripts have unicode value from \\u2080 ti \\u208E inclusive. Subscripts are the following symbols:
 ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₊ ₋ ₌ ₍ ₎
 


toSuperScript

public static char toSuperScript(char c)
Converts the character argument to superscript. Only the following characters can be converted (other characters are left unchanged):
 0 1 2 3 4 5 6 7 8 9 + - = ( ) n
 


toSubScript

public static char toSubScript(char c)
Converts the character argument to subscript. Only the following characters can be converted (other characters are left unchanged):
 0 1 2 3 4 5 6 7 8 9 + - = ( ) n
 


toNormalScript

public static char toNormalScript(char c)
Converts the character argument to normal script.


spaces

public static String spaces(int length)
Returns a string of the specified length filled with white spaces. This method try to returns a pre-allocated string if possible.

Parameters:
length - The string length. Negative values are clamp to 0.
Returns:
A string of length length filled with with spaces.

getShortName

public static String getShortName(Class classe)
Returns a short class name for the specified class. This method will ommit the package name. For exemple, it will returns "String" instead of "java.lang.String" for a String object.

Parameters:
classe - The object (may be null).
Returns:
A short class name for the specified object.

getShortClassName

public static String getShortClassName(Object object)
Returns a short class name for the specified object. This method will ommit the package name. For exemple, it will returns "String" instead of "java.lang.String" for a String object.

Parameters:
object - The object (may be null).
Returns:
A short class name for the specified object.

equals

public static boolean equals(Object object1,
                             Object object2)
Convenience method for testing two objects for equality. One or both objects may be null.


deegree 2.1 (2007/11/08 09:57 build-328-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net