All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JObserve.PictureFormat

java.lang.Object
   |
   +----JObserve.PictureFormat

public class PictureFormat
extends Object
Implement PictureFormat from a now dead language (PL/I) This class consists solely of static functions. Result character arrays are the same size as the Pattern array and each character in the pattern controls the corresponding value in the output. E.g. "1234.56" with pattern "ZZ,ZZ,ZZ.ZZZ" => "00,12,34.560". Special characters in pattern:


Constructor Index

 o PictureFormat()

Method Index

 o PictureFormat(String, String)
Format a numeric string from a given pattern.
 o StringLeft(String, int)
Reformat a string in a left justified, blank filled character array.
 o StringRight(String, int)
Reformat a string in a right justified, blank filled character array.

Constructors

 o PictureFormat
 public PictureFormat()

Methods

 o PictureFormat
 public static char[] PictureFormat(String Digits,
                                    String Pattern)
Format a numeric string from a given pattern. Since Java string handling is so weak the string is returned in a character array.

Parameters:
String - The digits string (to be reformatted)
String - The pattern, each character defines the contents of the corresponding position in the output,
Returns:
char[] The formatted string in a character array.
 o StringLeft
 public static char[] StringLeft(String Digits,
                                 int size)
Reformat a string in a left justified, blank filled character array. In the input string is longer than the output string, truncate on the right

Parameters:
String - The digits string (to be reformatted)
int - The size of the output character array.
Returns:
char[] The formatted string in a character array.
 o StringRight
 public static char[] StringRight(String Digits,
                                  int size)
Reformat a string in a right justified, blank filled character array. In the input string is longer than the output string, truncate on the right

Parameters:
String - The digits string (to be reformatted)
int - The size of the output character array.
Returns:
char[] The formatted string in a character array.

All Packages  Class Hierarchy  This Package  Previous  Next  Index