org.terracotta.toolkit.config
Class AbstractConfiguration

java.lang.Object
  extended by org.terracotta.toolkit.config.AbstractConfiguration
All Implemented Interfaces:
Configuration

public abstract class AbstractConfiguration
extends Object
implements Configuration


Constructor Summary
AbstractConfiguration()
           
 
Method Summary
 boolean getBoolean(String name)
          Get a config for the name parameter.
 int getInt(String name)
          Get a config for the name parameter.
 long getLong(String name)
          Get a config for the name parameter.
protected  Object getMappingChecked(String name)
           
 String getString(String name)
          Get a config for the name parameter.
 boolean hasField(String name)
          Returns true if the config contains a mapping for specified name
protected abstract  void internalSetConfigMapping(String key, Serializable value)
           
 Configuration setBoolean(String name, boolean newValue)
           
 Configuration setInt(String name, int newValue)
           
 Configuration setLong(String name, long newValue)
           
 Configuration setObject(String name, Serializable newValue)
           
 Configuration setString(String name, String newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.terracotta.toolkit.config.Configuration
getKeys, getObjectOrNull
 

Constructor Detail

AbstractConfiguration

public AbstractConfiguration()
Method Detail

setObject

public Configuration setObject(String name,
                               Serializable newValue)

setInt

public Configuration setInt(String name,
                            int newValue)

setLong

public Configuration setLong(String name,
                             long newValue)

setBoolean

public Configuration setBoolean(String name,
                                boolean newValue)

setString

public Configuration setString(String name,
                               String newValue)

hasField

public boolean hasField(String name)
Description copied from interface: Configuration
Returns true if the config contains a mapping for specified name

Specified by:
hasField in interface Configuration
Returns:
true if the config contains a mapping for specified name, otherwise false

getMappingChecked

protected Object getMappingChecked(String name)

getInt

public int getInt(String name)
Description copied from interface: Configuration
Get a config for the name parameter.

Specified by:
getInt in interface Configuration
Returns:
an int value if and only if name is mapped to an int value

getLong

public long getLong(String name)
Description copied from interface: Configuration
Get a config for the name parameter.

Specified by:
getLong in interface Configuration
Returns:
a long value if and only if name is mapped to a long value

getBoolean

public boolean getBoolean(String name)
Description copied from interface: Configuration
Get a config for the name parameter.

Specified by:
getBoolean in interface Configuration
Returns:
a boolean value if and only if name is mapped to a boolean value

getString

public String getString(String name)
Description copied from interface: Configuration
Get a config for the name parameter.

Specified by:
getString in interface Configuration
Returns:
a string value if and only if name is mapped to a string value

internalSetConfigMapping

protected abstract void internalSetConfigMapping(String key,
                                                 Serializable value)


Copyright © 2014 Terracotta, Inc.. All Rights Reserved.