# Class SkySysConfigKey

java.lang.Object
uk.ac.starlink.ttools.plot2.config.ConfigKey<SkySys>
uk.ac.starlink.ttools.plot2.config.OptionConfigKey<SkySys>
uk.ac.starlink.ttools.plot2.config.SkySysConfigKey

public class SkySysConfigKey extends OptionConfigKey<SkySys>
ConfigKey for selecting sky coordinate systems.

Since:
  10 Sep 2014
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`SkySysConfigKey(ConfigMeta meta, boolean includeNull, boolean isViewComparison)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`String`
`getXmlDescription(SkySys sys)`
Returns a description in XML of the given option value.
`boolean`
`isViewComparison()`
Indicates whether this key is used to select a sky system that will be compared with the view system of the plot itself.
`SkySys`
`stringToValue(String str)`
Calls `valueToString` repeatedly looking for a match.
`String`
`valueToString(SkySys sys)`
Invokes the `toString` method of the supplied option.

### Methods inherited from class OptionConfigKey

`addOptionsXml, createSpecifier, getOptions, getOptionsXml, setOptionUsage`

### Methods inherited from class ConfigKey

`cast, getDefaultValue, getMeta, getValueClass, toString`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### SkySysConfigKey

public SkySysConfigKey(ConfigMeta meta, boolean includeNull, boolean isViewComparison)
Constructor.

The `isViewComparison` parameter does not affect the behaviour of this key itself, but may be used by external code that needs to know whether values configured here are resolved with reference to the sky system applying to the plot as a whole.

Parameters:
  `meta` - config key metadata
  `includeNull` - true iff null is a permitted option
  `isViewComparison` - true iff this key is used to configure a system that will be compared with the plot view system

## Method Details

### valueToString

public String valueToString(SkySys sys)
Description copied from class: `OptionConfigKey`
Invokes the `toString` method of the supplied option. May be overridden.

Overrides:
  `valueToString` in class `OptionConfigKey<SkySys>`
Parameters:
  `sys` - possible value associated with this key
Returns:
  string representation

### stringToValue

public SkySys stringToValue(String str) throws ConfigException
Description copied from class: `OptionConfigKey`
Calls `valueToString` repeatedly looking for a match. This means that if `valueToString` is overridden it is usually not necessary to override this method.

Overrides:
  `stringToValue` in class `OptionConfigKey<SkySys>`
Parameters:
  `str` - string representation of value
Returns:
  value
Throws:
  `ConfigException`

### getXmlDescription

public String getXmlDescription(SkySys sys)
Description copied from class: `OptionConfigKey`
Returns a description in XML of the given option value. This, along with `OptionConfigKey.valueToString(T)`, is used by the `OptionConfigKey.getOptionsXml()` method to assemble a described list of the options.

Specified by:
  `getXmlDescription` in class `OptionConfigKey<SkySys>`
Parameters:
  `sys` - possible value of this key
Returns:
  short snippet of XML (not wrapped in any outer element) describing the value; may be null if no description required or available

### isViewComparison

public boolean isViewComparison()
Indicates whether this key is used to select a sky system that will be compared with the view system of the plot itself.

Returns:
  true for view comparison keys