sbrt.shell.text.math
Class SenseFormat

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

public final class SenseFormat
extends java.lang.Object
implements SimpleFormat<OptSense>

This class is used to represent formats of optimization senses. The strings "Maximize" and "Minimize" are used to represent optimization senses.

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

Constructor Summary
SenseFormat()
           
 
Method Summary
 java.lang.String format(OptSense obj)
          Returns a formatted string representation of the provided optimization sense.
 OptSense parse(java.lang.String source)
          Parses the provided string and returns its corresponding object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SenseFormat

public SenseFormat()
Method Detail

format

public java.lang.String format(OptSense obj)
Returns a formatted string representation of the provided optimization sense.

Specified by:
format in interface Formatter<OptSense>
Parameters:
obj - the optimization sense to be formatted.
Returns:
a formatted string representation of the provided optimization sense.

parse

public OptSense parse(java.lang.String source)
Parses the provided string and returns its corresponding object.

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