sbrt.shell.text.math
Class IntervalFormatV1

java.lang.Object
  extended by sbrt.shell.text.math.IntervalFormatV1
All Implemented Interfaces:
Format, Formatter<Interval>, IntervalFormat, Parser<Interval>, SimpleFormat<Interval>

public final class IntervalFormatV1
extends java.lang.Object
implements IntervalFormat

This class is a concrete implementation of IntervalFormat. The string representation of intervals used by this class is: [LowerBound; UpperBound].

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

Constructor Summary
IntervalFormatV1()
          Constructs a new interval format.
 
Method Summary
 java.lang.String format(Interval interval)
          Returns a formatted string representation of the provided interval.
 DoubleFormatV1 getDoubleFormat()
          Returns the double format used for bounds.
 Interval parse(java.lang.String interval)
          Parses the provided string and returns its corresponding interval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntervalFormatV1

public IntervalFormatV1()
Constructs a new interval format.

Method Detail

getDoubleFormat

public DoubleFormatV1 getDoubleFormat()
Returns the double format used for bounds.

Returns:
the double format used for bounds.

format

public java.lang.String format(Interval interval)
Returns a formatted string representation of the provided interval.

Specified by:
format in interface Formatter<Interval>
Parameters:
interval - the interval to be formatted.
Returns:
a formatted string representation of the provided interval.

parse

public Interval parse(java.lang.String interval)
Parses the provided string and returns its corresponding interval.

Specified by:
parse in interface Parser<Interval>
Parameters:
interval - the string to be parsed.
Returns:
the interval corresponding to the provided string.