com.parabon.common
Class NamedParameterMap

java.lang.Object
  extended by com.parabon.common.NamedParameterMap
All Implemented Interfaces:
ParameterValue, com.parabon.util.ObjectPool.Destroyable, com.parabon.util.ObjectPool.Reclaimable, java.io.Externalizable, java.io.Serializable

public class NamedParameterMap
extends java.lang.Object
implements ParameterValue, java.io.Serializable

Contains an unordered collection of names (arbitrary Strings) associated with values (of type ParameterValue).

See Also:
Serialized Form

Nested Class Summary
protected  class NamedParameterMap.NamedParameterMapIterator
           
 
Field Summary
protected  boolean destroyed
           
protected  java.util.Map<java.lang.String,NamedParameter> elements
           
static NamedParameterMap EMPTY_MAP
           
protected  com.parabon.util.ObjectPool pool
           
 
Constructor Summary
NamedParameterMap()
           
NamedParameterMap(NamedParameterMap o)
           
NamedParameterMap(com.parabon.util.ObjectPool pool)
           
NamedParameterMap(com.parabon.util.ObjectPool pool_, NamedParameterMap o)
           
 
Method Summary
 void clear()
           
 java.lang.Object clone()
           
 NamedParameterMap cloneNamedParameterMap()
           
 NamedParameterMap cloneNamedParameterMap(com.parabon.util.ObjectPool primePool)
           
 ParameterValue cloneParameterValue(com.parabon.util.ObjectPool primePool)
           Creates a functional copy of the ParameterValue, using the specified ObjectPool for instantiation.
 boolean contains(java.lang.String name)
           
 void destroy()
           
 void dumpNamedParameterMap(org.apache.log4j.Logger log, org.apache.log4j.Level level, java.lang.String prefix)
           
 void dumpNamedParameterMap(java.lang.String prefix)
           
static NamedParameterMap fromStringMap(java.util.Map<java.lang.String,java.lang.String> map)
           
 byte[] getBinaryValue()
           
 byte[] getBinaryValue(java.lang.String name)
           
 boolean getBooleanValue()
           
 boolean getBooleanValue(java.lang.String name)
           
 java.util.Date getDateValue()
           
 java.util.Date getDateValue(java.lang.String name)
           
 double getDoubleValue()
           
 double getDoubleValue(java.lang.String name)
           
 float getFloatValue()
           
 float getFloatValue(java.lang.String name)
           
 int getIntValue()
           
 int getIntValue(java.lang.String name)
           
 long getLongValue()
           
 long getLongValue(java.lang.String name)
           
 java.util.Set<java.lang.String> getNameSet()
           
 java.lang.String getStringValue()
           
 java.lang.String getStringValue(java.lang.String name)
           
 ParameterValue getValue(java.lang.String name)
           
 java.util.Iterator<NamedParameter> iterator()
           
 void put(NamedParameter namedParameter)
           
 void put(java.lang.String name, boolean value)
           
 void put(java.lang.String name, byte[] value)
           
 void put(java.lang.String name, java.util.Date value)
           
 void put(java.lang.String name, double value)
           
 void put(java.lang.String name, long value)
           
 void put(java.lang.String name, ParameterValue value)
           
 void put(java.lang.String name, java.lang.String value)
           
 void putAll(NamedParameterMap o)
           
protected  void putNoCopy(java.lang.String name, ParameterValue value)
           
 void readExternal(java.io.ObjectInput in)
           
 void reclaim()
           
 void remove(java.lang.String name)
           
 void set(NamedParameterMap o)
           
 int size()
           
static java.util.Map<java.lang.String,java.lang.String> toStringMap(NamedParameterMap map)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.parabon.common.ParameterValue
getBinaryValue, getBooleanValue, getDateValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getStringValue
 

Field Detail

EMPTY_MAP

public static final NamedParameterMap EMPTY_MAP

elements

protected java.util.Map<java.lang.String,NamedParameter> elements

pool

protected com.parabon.util.ObjectPool pool

destroyed

protected boolean destroyed
Constructor Detail

NamedParameterMap

public NamedParameterMap()

NamedParameterMap

public NamedParameterMap(com.parabon.util.ObjectPool pool)

NamedParameterMap

public NamedParameterMap(com.parabon.util.ObjectPool pool_,
                         NamedParameterMap o)

NamedParameterMap

public NamedParameterMap(NamedParameterMap o)
Method Detail

reclaim

public void reclaim()
Specified by:
reclaim in interface com.parabon.util.ObjectPool.Reclaimable

destroy

public void destroy()
Specified by:
destroy in interface com.parabon.util.ObjectPool.Destroyable

put

public void put(java.lang.String name,
                ParameterValue value)

putNoCopy

protected void putNoCopy(java.lang.String name,
                         ParameterValue value)

putAll

public void putAll(NamedParameterMap o)

put

public void put(NamedParameter namedParameter)

remove

public void remove(java.lang.String name)

getValue

public ParameterValue getValue(java.lang.String name)

contains

public boolean contains(java.lang.String name)

getNameSet

public java.util.Set<java.lang.String> getNameSet()

clear

public void clear()

iterator

public java.util.Iterator<NamedParameter> iterator()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

cloneParameterValue

public ParameterValue cloneParameterValue(com.parabon.util.ObjectPool primePool)
Description copied from interface: ParameterValue

Creates a functional copy of the ParameterValue, using the specified ObjectPool for instantiation. A null value for the pool is acceptable.

Specified by:
cloneParameterValue in interface ParameterValue

cloneNamedParameterMap

public NamedParameterMap cloneNamedParameterMap()

cloneNamedParameterMap

public NamedParameterMap cloneNamedParameterMap(com.parabon.util.ObjectPool primePool)

set

public void set(NamedParameterMap o)

size

public int size()

dumpNamedParameterMap

public void dumpNamedParameterMap(java.lang.String prefix)

dumpNamedParameterMap

public void dumpNamedParameterMap(org.apache.log4j.Logger log,
                                  org.apache.log4j.Level level,
                                  java.lang.String prefix)

put

public void put(java.lang.String name,
                double value)

put

public void put(java.lang.String name,
                long value)

put

public void put(java.lang.String name,
                boolean value)

put

public void put(java.lang.String name,
                byte[] value)

put

public void put(java.lang.String name,
                java.util.Date value)

put

public void put(java.lang.String name,
                java.lang.String value)

getBooleanValue

public boolean getBooleanValue(java.lang.String name)

getLongValue

public long getLongValue(java.lang.String name)

getIntValue

public int getIntValue(java.lang.String name)

getDoubleValue

public double getDoubleValue(java.lang.String name)

getFloatValue

public float getFloatValue(java.lang.String name)

getStringValue

public java.lang.String getStringValue(java.lang.String name)

getDateValue

public java.util.Date getDateValue(java.lang.String name)

getBinaryValue

public byte[] getBinaryValue(java.lang.String name)

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

toStringMap

public static java.util.Map<java.lang.String,java.lang.String> toStringMap(NamedParameterMap map)

fromStringMap

public static NamedParameterMap fromStringMap(java.util.Map<java.lang.String,java.lang.String> map)

getBooleanValue

public boolean getBooleanValue()

getLongValue

public long getLongValue()

getIntValue

public int getIntValue()

getDoubleValue

public double getDoubleValue()

getFloatValue

public float getFloatValue()

getStringValue

public java.lang.String getStringValue()

getDateValue

public java.util.Date getDateValue()

getBinaryValue

public byte[] getBinaryValue()