Package PamUtils
Class FrequencyFormat
java.lang.Object
PamUtils.FrequencyFormat
A set of static functions for formatting frequency values in a common way, 
 i.e. if it's relatively low, do it in Hz, it it's high, do it in kHz;
- Author:
 - Doug Gillespie
 
- 
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatFrequency(double frequency, boolean includeUnits) Format a frequency value.static StringformatFrequencyRange(double[] frequency, boolean includeUnits) Format a frequency range.static FrequencyFormatgetFrequencyFormat(double frequency) Get everything you need to format a frequency string in a standard way.doublegetScale() 
- 
Method Details
- 
formatFrequency
Format a frequency value.- Parameters:
 frequency- frequency in HzincludeUnits- flag to include units (Hz or kHz)- Returns:
 - formatted string
 
 - 
formatFrequencyRange
Format a frequency range.- Parameters:
 frequency- array of frequency values in Hz.includeUnits- flag to include units (Hz or kHz)- Returns:
 - formatted string
 
 - 
getFrequencyFormat
Get everything you need to format a frequency string in a standard way.- Parameters:
 frequency-- Returns:
 - Frequency format object containing a format string for the number, a unit (Hz or kHz) and a scale factor to divide the raw Hz value down by (1 or 1000).
 
 - 
getNumberFormat
- Returns:
 - the numberFormat
 
 - 
getUnitText
- Returns:
 - the unitText
 
 - 
getScale
public double getScale()- Returns:
 - the scale
 
 
 -