sbrt.shell.text.math
Interface CoeffFormat

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

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

This interface is used to represent the format of coefficients of mathematical expressions.

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

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

Method Detail

format

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

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

format

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

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

parse

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

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

parsePrimitive

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

Parameters:
coefficient - the string to be parsed.
Returns:
the coefficient corresponding to the provided string.