org.nuiton.util.config
Class SimpleConfig<E extends Enum<E>>
java.lang.Object
org.nuiton.util.config.SimpleConfig<E>
- All Implemented Interfaces:
- Config<E>
- Direct Known Subclasses:
- SimpleIdentityConfig
public class SimpleConfig<E extends Enum<E>>
- extends Object
- implements Config<E>
simple config implementation based on a Enum to obtain properties
- Author:
- chemit
log
protected static final org.apache.commons.logging.Log log
properties
protected EnumMap<E extends Enum<E>,Object> properties
universe
protected final EnumSet<E extends Enum<E>> universe
klass
protected final Class<E extends Enum<E>> klass
SimpleConfig
public SimpleConfig(Class<E> klass)
SimpleConfig
public SimpleConfig(Class<E> klass,
EnumMap<E,Object> properties)
getProperties
public EnumMap<E,Object> getProperties()
- Specified by:
getProperties in interface Config<E extends Enum<E>>
getProperty
public Object getProperty(E key)
- Specified by:
getProperty in interface Config<E extends Enum<E>>
getUniverse
public EnumSet<E> getUniverse()
- Specified by:
getUniverse in interface Config<E extends Enum<E>>
setProperties
public void setProperties(EnumMap<E,Object> properties)
- Specified by:
setProperties in interface Config<E extends Enum<E>>
setProperty
public void setProperty(E key,
Object value)
- Specified by:
setProperty in interface Config<E extends Enum<E>>
copyFrom
public void copyFrom(Object src)
- Specified by:
copyFrom in interface Config<E extends Enum<E>>
copyFrom
public void copyFrom(Object src,
EnumSet<E> keys)
- Specified by:
copyFrom in interface Config<E extends Enum<E>>
copyTo
public void copyTo(Object dst)
- Specified by:
copyTo in interface Config<E extends Enum<E>>
copyTo
public void copyTo(Object dst,
EnumSet<E> keys)
- Specified by:
copyTo in interface Config<E extends Enum<E>>
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2004-2009 CodeLutin. All Rights Reserved.