waba.sys
Class Convert

java.lang.Object
  |
  +--waba.sys.Convert

public class Convert
extends java.lang.Object

Convert is used to convert between objects and basic types.


Method Summary
static int abs(int i)
          returns the abs of the number
static java.lang.String add(java.lang.String d1, java.lang.String d2)
          adds two "doubles". for better precision, this method use the representation of the string as doubles, compute and then returns an String.
static java.lang.String div(java.lang.String d1, java.lang.String d2)
          divides two "doubles". for better precision, this method use the representation of the string as doubles, compute and then returns an String.
static int max(int i, int j)
          returns the maximum of the 2 arguments
static int min(int i, int j)
          returns the minimum of the 2 arguments
static java.lang.String mul(java.lang.String d1, java.lang.String d2)
          multiplies two "doubles". for better precision, this method use the representation of the string as doubles, compute and then returns an String.
static java.lang.String sub(java.lang.String d1, java.lang.String d2)
          subtracts two "doubles". for better precision, this method use the representation of the string as doubles, compute and then returns an String.
static float toFloat(java.lang.String s)
          Converts the given String to an float.
static float toFloatBitwise(int i)
          Converts the given IEEE 754 bit representation of a float to a float.
static int toInt(java.lang.String s)
          Converts the given String to an int.
static int toIntBitwise(float f)
          Converts the given float to its bit representation in IEEE 754 format.
static char toLowerCase(char c)
          converts the char to lower case letter
static java.lang.String toLowerCase(java.lang.String s)
          converts the string to lower case letters
static java.lang.String toString(boolean b)
          Converts the given boolean to a String.
static java.lang.String toString(char c)
          Converts the given char to a String.
static java.lang.String toString(float f)
          Converts the given float to a String.
static java.lang.String toString(float f, int d)
          Converts the given float to a String, formatting it with d decimal places. added by guich
static java.lang.String toString(int i)
          Converts the given int to a String.
static java.lang.String toString(java.lang.String doubleValue, int n)
          formats an String as a double, with n decimal places. if the number is invalid, "0" is returned.
static char toUpperCase(char c)
          converts the char to upper case letter
static java.lang.String toUpperCase(java.lang.String s)
          converts the string to upper case letters
static java.lang.String zeroPad(java.lang.String s, int size)
          pads the string with zeroes at left
 
Methods inherited from class java.lang.Object
hashCode, toString
 

Method Detail

toInt

public static int toInt(java.lang.String s)
Converts the given String to an int. If the string passed is not a valid integer, 0 is returned.

toString

public static java.lang.String toString(boolean b)
Converts the given boolean to a String.

toString

public static java.lang.String toString(char c)
Converts the given char to a String.

toIntBitwise

public static int toIntBitwise(float f)
Converts the given float to its bit representation in IEEE 754 format.

toFloatBitwise

public static float toFloatBitwise(int i)
Converts the given IEEE 754 bit representation of a float to a float.

toString

public static java.lang.String toString(float f)
Converts the given float to a String.

toString

public static java.lang.String toString(int i)
Converts the given int to a String.

toString

public static java.lang.String toString(float f,
                                        int d)
Converts the given float to a String, formatting it with d decimal places. added by guich

toFloat

public static float toFloat(java.lang.String s)
Converts the given String to an float. If the string passed is not a valid float, 0 is returned.

add

public static java.lang.String add(java.lang.String d1,
                                   java.lang.String d2)
adds two "doubles". for better precision, this method use the representation of the string as doubles, compute and then returns an String. Added by guich

sub

public static java.lang.String sub(java.lang.String d1,
                                   java.lang.String d2)
subtracts two "doubles". for better precision, this method use the representation of the string as doubles, compute and then returns an String. Added by guich

mul

public static java.lang.String mul(java.lang.String d1,
                                   java.lang.String d2)
multiplies two "doubles". for better precision, this method use the representation of the string as doubles, compute and then returns an String. Added by guich

div

public static java.lang.String div(java.lang.String d1,
                                   java.lang.String d2)
divides two "doubles". for better precision, this method use the representation of the string as doubles, compute and then returns an String. Added by guich

toString

public static java.lang.String toString(java.lang.String doubleValue,
                                        int n)
formats an String as a double, with n decimal places. if the number is invalid, "0" is returned.

toUpperCase

public static java.lang.String toUpperCase(java.lang.String s)
converts the string to upper case letters

toLowerCase

public static java.lang.String toLowerCase(java.lang.String s)
converts the string to lower case letters

toLowerCase

public static char toLowerCase(char c)
converts the char to lower case letter

toUpperCase

public static char toUpperCase(char c)
converts the char to upper case letter

zeroPad

public static java.lang.String zeroPad(java.lang.String s,
                                       int size)
pads the string with zeroes at left

max

public static int max(int i,
                      int j)
returns the maximum of the 2 arguments

min

public static int min(int i,
                      int j)
returns the minimum of the 2 arguments

abs

public static int abs(int i)
returns the abs of the number