org.mentalog.config
Class ConfigParam<E>

java.lang.Object
  extended by org.mentalog.config.ConfigParam<E>
Direct Known Subclasses:
BooleanConfigParam, ByteArrayConfigParam, BytesConfigParam, FloatConfigParam, IntegerConfigParam, ListConfigParam, LogConfigParam, StringConfigParam, StringsConfigParam

public class ConfigParam<E>
extends Object


Constructor Summary
ConfigParam(String name, E defValue)
           
 
Method Summary
static void checkAndLog(String name, Object attemptedValue, Object currentValue)
           
protected  void force()
           
 E getDefault()
           
 String getName()
           
protected static String getString(String name, String def)
           
protected  void init(String name)
           
 boolean isForced()
           
protected  boolean isForceMode()
           
 boolean isSet()
           
protected  E parseString(String s)
           
 void set(E value)
           
 void set(E value, boolean force)
           
static void setForceMode(boolean flag)
           
 E value()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigParam

public ConfigParam(String name,
                   E defValue)
Method Detail

init

protected void init(String name)

parseString

protected E parseString(String s)

getDefault

public E getDefault()

setForceMode

public static void setForceMode(boolean flag)

force

protected void force()

checkAndLog

public static void checkAndLog(String name,
                               Object attemptedValue,
                               Object currentValue)

set

public void set(E value,
                boolean force)

set

public final void set(E value)

isSet

public final boolean isSet()

isForced

public final boolean isForced()

isForceMode

protected final boolean isForceMode()

getName

public final String getName()

value

public final E value()

getString

protected static String getString(String name,
                                  String def)


Copyright © 2013. All Rights Reserved.