de.agilecoders.wicket.jquery
Class CombinableConfig

java.lang.Object
  extended by de.agilecoders.wicket.jquery.CombinableConfig
All Implemented Interfaces:
Config, Serializable, org.apache.wicket.util.io.IClusterable
Direct Known Subclasses:
AbstractConfig, ConfigWithFallback

public abstract class CombinableConfig
extends Object
implements Config

Author:
Michael Haitz
See Also:
Serialized Form

Constructor Summary
protected CombinableConfig()
          Construct.
 
Method Summary
 CombinableConfig combine(Config... fallbackConfigs)
          combines this configuration with given ones.
 CombinableConfig withFallback(Config fallback)
          uses given config as fallback if a key isn't set in this config.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.agilecoders.wicket.jquery.Config
all, contains, get, isEmpty, put, remove, toJsonString
 

Constructor Detail

CombinableConfig

protected CombinableConfig()
Construct.

Method Detail

withFallback

public CombinableConfig withFallback(Config fallback)
uses given config as fallback if a key isn't set in this config.

Parameters:
fallback - the fallback configuration
Returns:
this instance for chaining

combine

public CombinableConfig combine(Config... fallbackConfigs)
combines this configuration with given ones. Given configuration doesn't override existing one.

Parameters:
fallbackConfigs - the configurations to combine
Returns:
this instance for chaining


Copyright © 2017. All Rights Reserved.