# Class MultiConfigger

java.lang.Object
uk.ac.starlink.topcat.plot2.MultiConfigger

public class MultiConfigger extends Object
Configger implementation that aggregates config entries from a number of subordinate configgers. The subordinate configgers can be either global (applying to all zones) or per-zone (applying to only a requested zone id).

Since:
  12 Mar 2013
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`MultiConfigger()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`addGlobalConfigger(Configger configger)`
Adds a global subordinate configger to the list.
`void`
`addZoneConfigger(ZoneId zid, Configger configger)`
Adds a subordinate configger that contributes configuration specific to a given zone.
`uk.ac.starlink.ttools.plot2.config.ConfigMap`
`getGlobalConfig()`
Acquires that part of the configuration from subordinate configgers that applies to all zones.
`uk.ac.starlink.ttools.plot2.config.ConfigMap`
`getZoneConfig(ZoneId zid)`
Acquires all the configuration from subordinate configgers that applies to a given zone.
`Configger`
`layerConfigger(uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel)`
Convenience method to return a dynamic configger whose configuration returns depend on the state at getConfig-time of a given zone selector.

### Methods inherited from class Object

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

## Constructor Details

### MultiConfigger

public MultiConfigger()
Constructor.

## Method Details

### addGlobalConfigger

public void addGlobalConfigger(Configger configger)
Adds a global subordinate configger to the list.

Parameters:
  `configger` - item whose config values will be gathered for the result of this one

### addZoneConfigger

public void addZoneConfigger(ZoneId zid, Configger configger)
Adds a subordinate configger that contributes configuration specific to a given zone.

Parameters:
  `zid` - zone id
  `configger` - per-zone configger

### getGlobalConfig

public uk.ac.starlink.ttools.plot2.config.ConfigMap getGlobalConfig()
Acquires that part of the configuration from subordinate configgers that applies to all zones.

Returns:
  global config

### getZoneConfig

public uk.ac.starlink.ttools.plot2.config.ConfigMap getZoneConfig(ZoneId zid)
Acquires all the configuration from subordinate configgers that applies to a given zone. This includes the global config.

Parameters:
  `zid` - zone of interest
Returns:
  configuration for zone

### layerConfigger

public Configger layerConfigger(uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel)
Convenience method to return a dynamic configger whose configuration returns depend on the state at getConfig-time of a given zone selector.

Parameters:
  `zsel` - zone specifier
Returns:
  configger