jsky.util
Class FormatUtilities

java.lang.Object
  extended by jsky.util.FormatUtilities

public class FormatUtilities
extends java.lang.Object

MathUtilities class is a static class that contains methods are generic in value and related to format objects.

This code was developed by NASA, Goddard Space Flight Center, Code 588 for the Scientist's Expert Assistant (SEA) project for Next Generation Space Telescope (NGST).

Version:
5.25.00
Author:
Sandy Grosvenor

Constructor Summary
FormatUtilities()
           
 
Method Summary
static java.lang.String formatDouble(double inVal, int inDecs)
          Formats a double value to specified number of decimal places handles need (or not) for scientific notation assumes default max lenth of 10, for no particular reason
static java.lang.String formatDouble(double inVal, int inDecs, int inLeftOfDec)
          Formats a double value to specified number of decimal places handles need (or not) for scientific notation
static java.lang.String formatDouble(double inVal, int inDecs, int inLeftOfDec, boolean recursing)
          Formats a double value to specified number of decimal places handles need (or not) for scientific notation
static void writeError(java.lang.Object source, java.lang.Object message)
          very simple error message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatUtilities

public FormatUtilities()
Method Detail

writeError

public static void writeError(java.lang.Object source,
                              java.lang.Object message)
very simple error message


formatDouble

public static java.lang.String formatDouble(double inVal,
                                            int inDecs)
Formats a double value to specified number of decimal places handles need (or not) for scientific notation assumes default max lenth of 10, for no particular reason


formatDouble

public static java.lang.String formatDouble(double inVal,
                                            int inDecs,
                                            int inLeftOfDec)
Formats a double value to specified number of decimal places handles need (or not) for scientific notation

Parameters:
inVal - double number to be formatted
inDecs - integer of number of decimal places
inLeftOfDec - integer of max number of places to left of decimal

formatDouble

public static java.lang.String formatDouble(double inVal,
                                            int inDecs,
                                            int inLeftOfDec,
                                            boolean recursing)
Formats a double value to specified number of decimal places handles need (or not) for scientific notation

Parameters:
inVal - double number to be formatted
inDecs - integer of number of decimal places
inLeftOfDec - integer of max number of places to left of decimal