DESY ACOP Beans Home

de.desy.acop.displayers.tools
Class AcopUtilities

java.lang.Object
  extended by de.desy.acop.displayers.tools.AcopUtilities

public class AcopUtilities
extends java.lang.Object


Constructor Summary
AcopUtilities()
           
 
Method Summary
static java.lang.String formatHex(long value)
          Formats the value to hex string (0xValue).
static java.lang.String formatValue(double value, boolean extraDigits)
          Formats a value according to the given extra digits parameter.
static java.lang.String formatValue(double value, boolean extraDigits, boolean superExtraDigits)
          Formats the value according the given extra digits parameter.
static java.lang.String formatValueInPowerOf3(double value, boolean extraDigits)
          Formats the value that its exponential part is always in the power of 3
static boolean isValueScientific(double val)
          Checks if the value is in the range to be displayed in a scientific format (exponential).
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcopUtilities

public AcopUtilities()
Method Detail

main

public static void main(java.lang.String[] args)

formatValueInPowerOf3

public static java.lang.String formatValueInPowerOf3(double value,
                                                     boolean extraDigits)
Formats the value that its exponential part is always in the power of 3

Parameters:
value - the value to be formatted
extraDigits -
Returns:

formatValue

public static java.lang.String formatValue(double value,
                                           boolean extraDigits)
Formats a value according to the given extra digits parameter.

Parameters:
value -
extraDigits -
Returns:

formatValue

public static java.lang.String formatValue(double value,
                                           boolean extraDigits,
                                           boolean superExtraDigits)
Formats the value according the given extra digits parameter. Value is also checked if it should be displayed in scientific format.

Parameters:
value - the value to format
extraDigits - if extra decimal digits should be used
superExtraDigits - if even more digits should be used
Returns:

formatHex

public static java.lang.String formatHex(long value)
Formats the value to hex string (0xValue).

Parameters:
value - the value
Returns:
the hex string

isValueScientific

public static boolean isValueScientific(double val)
Checks if the value is in the range to be displayed in a scientific format (exponential).

Parameters:
val -
Returns:


Copyright © 2010. All Rights Reserved.