Package microsim.data
Class MultiKeyCoefficientMap
- java.lang.Object
-
- org.apache.commons.collections4.map.AbstractIterableMap<K,V>
-
- org.apache.commons.collections4.map.AbstractMapDecorator<org.apache.commons.collections4.keyvalue.MultiKey<? extends K>,V>
-
- org.apache.commons.collections4.map.MultiKeyMap
-
- microsim.data.MultiKeyCoefficientMap
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map
,org.apache.commons.collections4.Get
,org.apache.commons.collections4.IterableGet
,org.apache.commons.collections4.IterableMap
,org.apache.commons.collections4.Put
public class MultiKeyCoefficientMap extends org.apache.commons.collections4.map.MultiKeyMap
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MultiKeyCoefficientMap(java.lang.String[] keys, java.lang.String[] values)
Creates an empty new MultiKeyCoefficientMap with the names of the keys and values categories specified by String[] keys and String[] values arguments.MultiKeyCoefficientMap(org.apache.commons.collections4.map.AbstractHashedMap map, java.lang.String[] keys, java.lang.String[] values)
Creates a new MultiKeyCoefficientMap with values stored in map, and with the names of the keys and values categories specified by String[] keys and String[] values arguments.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiKeyCoefficientMap
clone()
Returns a deep clone copy of the MultiKeyCoefficientMap objectjava.lang.String[]
getKeysNames()
This method allows the instance of the MultiKeyCoefficientMap to provide a clone of the names of the keys.java.lang.Object
getValue(java.lang.Object... key)
java.lang.String[]
getValuesNames()
This method allows the instance of the MultiKeyCoefficientMap to provide a clone of the names of the values.void
putValue(java.lang.Object... keyValues)
static java.lang.String
toStringKey(java.lang.Object value)
-
Methods inherited from class org.apache.commons.collections4.map.MultiKeyMap
containsKey, containsKey, containsKey, containsKey, get, get, get, get, mapIterator, multiKeyMap, put, put, put, put, put, putAll, removeAll, removeAll, removeAll, removeAll, removeMultiKey, removeMultiKey, removeMultiKey, removeMultiKey
-
-
-
-
Constructor Detail
-
MultiKeyCoefficientMap
public MultiKeyCoefficientMap(java.lang.String[] keys, java.lang.String[] values)
Creates an empty new MultiKeyCoefficientMap with the names of the keys and values categories specified by String[] keys and String[] values arguments.- Parameters:
keys
- - a String array listing the names of the categories of keysvalues
- - a String array listing the names of the categories of values
-
MultiKeyCoefficientMap
public MultiKeyCoefficientMap(org.apache.commons.collections4.map.AbstractHashedMap map, java.lang.String[] keys, java.lang.String[] values)
Creates a new MultiKeyCoefficientMap with values stored in map, and with the names of the keys and values categories specified by String[] keys and String[] values arguments.- Parameters:
map
- - contains the values of the MultiKeyCoefficientMap.keys
- - a String array listing the names of the categories of keysvalues
- - a String array listing the names of the categories of values
-
-
Method Detail
-
toStringKey
public static java.lang.String toStringKey(java.lang.Object value)
-
getValue
public java.lang.Object getValue(java.lang.Object... key)
-
putValue
public void putValue(java.lang.Object... keyValues)
-
getKeysNames
public java.lang.String[] getKeysNames()
This method allows the instance of the MultiKeyCoefficientMap to provide a clone of the names of the keys. This is especially useful for getting the name of the variables used as keys in the Regression classes (in package microsim.statistics.regression)- Returns:
- a String array clone of the names of the MultiKeyCoefficientMap's keys
-
getValuesNames
public java.lang.String[] getValuesNames()
This method allows the instance of the MultiKeyCoefficientMap to provide a clone of the names of the values. This is especially useful for cases where the size of valueColumns > 1, for instance to extract the names of the Type array (T[] events) for RegressionUtils.event(T[] events, double[] prob) method (in package microsim.statistics.regression)- Returns:
- a String array clone of the names of the MultiKeyCoefficientMap's values
-
clone
public MultiKeyCoefficientMap clone()
Returns a deep clone copy of the MultiKeyCoefficientMap object- Overrides:
clone
in classorg.apache.commons.collections4.map.MultiKeyMap
-
-