Class MatrixDictComponents
java.lang.Object
com.singularsys.jep.misc.OneShotComponent
com.singularsys.jep.misc.dictionary.DictionaryComponents
com.singularsys.extensions.matrix.dictionary.MatrixDictComponents
- All Implemented Interfaces:
JepComponent,Serializable
Provides a set of components for using
dictionaries compatible with the
com.singularsys.extensions.matrix package.
See DictionaryComponents for the main documentation.
It can be set up in three ways
MatrixDictComponents.Type.ALLOW_NULL_VALUESuses asHashMapand allows null values so can function as a set{'x', 'y', 'z'}.MatrixDictComponents.Type.REQUIRE_VALUESuses asHashMapand require values for each key. as a set{'x', 'y', 'z'}.MatrixDictComponents.Type.MATRIX_NO_NULLuses asMatrixIand require values for each key. as a set{'x', 'y', 'z'}.
When set with the MatrixDictComponents.Type.MATRIX_NO_NULL option
dictionaries are represent as N by 2 MatrixI.
As matrices have fixed sizes, methods that modify the size,
clear(dict), remove(dict,'x') will throw exceptions,
as will put(dict,'unknown',5).
The keys(map) and value(map) functions return
results in as a VectorI.
The entries(map) functions return
results in as a MatrixI.
Three components
MatrixDictEntriesIterable,
MatrixDictKeysIterable and
MatrixDictValuesIterable, are not included
by default, as they are intended to be used by the
com.singularsys.extensions.stream package. These can be added manually or by editing the properties file.
- Since:
- Jep 4.1 extensions 2.2
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumConfiguration type, one of MAP_NULL_VALUES, MAP_NO_NULL, MATRIX_NO_NULL.Nested classes/interfaces inherited from class com.singularsys.jep.misc.dictionary.DictionaryComponents
DictionaryComponents.DictionaryKeys -
Field Summary
Fields inherited from class com.singularsys.jep.misc.dictionary.DictionaryComponents
nullValue -
Constructor Summary
ConstructorsConstructorDescriptionMatrixDictComponents(MatrixDictComponents.Type type, MatrixFactoryI mfact, MatrixFieldI mfield) MatrixDictComponents(MatrixDictComponents.Type type, Object nullValue, MatrixFactoryI mfact, MatrixFieldI mfield) -
Method Summary
Methods inherited from class com.singularsys.jep.misc.dictionary.DictionaryComponents
firstInit, getNullValue, getType, putIfSetMethods inherited from class com.singularsys.jep.misc.OneShotComponent
getLightWeightInstance, init
-
Constructor Details
-
MatrixDictComponents
public MatrixDictComponents(MatrixDictComponents.Type type, Object nullValue, MatrixFactoryI mfact, MatrixFieldI mfield) -
MatrixDictComponents
public MatrixDictComponents(MatrixDictComponents.Type type, MatrixFactoryI mfact, MatrixFieldI mfield)
-
-
Method Details
-
addFunctions
- Overrides:
addFunctionsin classDictionaryComponents
-