sbrt.shell.text
Interface PercentFormat

All Superinterfaces:
Format, Formatter<java.lang.Double>, Parser<java.lang.Double>, SimpleFormat<java.lang.Double>
All Known Implementing Classes:
PercentFormatVersion1

public interface PercentFormat
extends SimpleFormat<java.lang.Double>

This interface is used to represent a format for percentages.

Author:
This interface was written and documented by Jeremiah Wright while in the Wagner lab.

Method Summary
 java.lang.String format(double percentage)
          Returns a formatted string representation of the provided percentage.
 java.lang.String format(java.lang.Double percentage)
          Returns a formatted string representation of the provided percentage.
 java.lang.Double parse(java.lang.String percentage)
          Parses the provided string and returns its corresponding percentage.
 double parsePrimitive(java.lang.String percentage)
          Parses the provided string and returns its corresponding percentage.
 

Method Detail

format

java.lang.String format(java.lang.Double percentage)
Returns a formatted string representation of the provided percentage.

Specified by:
format in interface Formatter<java.lang.Double>
Parameters:
percentage - the percentage to be formatted.
Returns:
a formatted string representation of the provided percentage.

format

java.lang.String format(double percentage)
Returns a formatted string representation of the provided percentage.

Parameters:
percentage - the percentage to be formatted.
Returns:
a formatted string representation of the provided percentage.

parse

java.lang.Double parse(java.lang.String percentage)
Parses the provided string and returns its corresponding percentage.

Specified by:
parse in interface Parser<java.lang.Double>
Parameters:
percentage - the string to be parsed.
Returns:
the double precision number corresponding to the provided string.

parsePrimitive

double parsePrimitive(java.lang.String percentage)
Parses the provided string and returns its corresponding percentage.

Parameters:
percentage - the string to be parsed.
Returns:
the double precision number corresponding to the provided string.