public class ConfigSupplier<M extends PMessage<M,F>,F extends PField> extends Object implements Supplier<M>
supplier.set(config)) that will cause a config
change call to each listener regardless of if the config values actually
did change.| Constructor and Description |
|---|
ConfigSupplier()
Initialize supplier with empty config.
|
ConfigSupplier(M initialConfig)
Initialize with an initial config instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ConfigListener<M,F> listener)
Add a listener to changes to this config.
|
M |
get() |
void |
removeListener(ConfigListener<M,F> listener)
Remove a config change listener.
|
protected void |
set(M config)
Set a new config value to the supplier.
|
public void addListener(ConfigListener<M,F> listener)
listener - The config change listener to be added.public void removeListener(ConfigListener<M,F> listener)
listener - The config change listener to be removed.protected final void set(M config)
config - The new config instance.Copyright © 2015–2017 morimekta.net. All rights reserved.