edu.rice.cs.drjava.config
Class ColorOption
java.lang.Object
edu.rice.cs.drjava.config.OptionParser<T>
edu.rice.cs.drjava.config.Option<Color>
edu.rice.cs.drjava.config.ColorOption
- All Implemented Interfaces:
- FormatStrategy<Color>, ParseStrategy<Color>
public class ColorOption
- extends Option<Color>
Class defining all configuration options with values of type Color.
- Version:
- $Id: ColorOption.java 4674 2008-11-05 18:37:06Z rcartwright $
ColorOption
public ColorOption(String key,
Color def)
parse
public Color parse(String s)
- Description copied from class:
OptionParser
- The ability to parse a string to an object of type T. All concrete versions of this class must override this
method to provide some sort of parser implementation.
- Specified by:
parse
in interface ParseStrategy<Color>
- Specified by:
parse
in class OptionParser<Color>
- Parameters:
s
- a String to parse
- Returns:
- the statically-typed representation of the string value.
format
public String format(Color c)
- Description copied from class:
Option
- Formats a statically typed T value as a String. The default implementation uses the toString() method.
- Specified by:
format
in interface FormatStrategy<Color>
- Overrides:
format
in class Option<Color>
- Parameters:
c
- the statically-typed value to format into a String