Class StreamMatrixDictComponents

All Implemented Interfaces:
JepComponent, Serializable

public class StreamMatrixDictComponents extends DictionaryComponents
Provides a set of components for using dictionaries compatible with the com.singularsys.extensions.stream package and converting to and from VectorI vectors and MatrixI matrices. Most functions are as in DictionaryComponents apart from keys(dict) and values(dict) which return streams of Objects and entries(dict) that returns a stream of VectorI. The functions in this package will also work with MatrixI and VectorI values created by the parser or other matrix operations.
mat = [['x',2], ['y',3], ['z',4]];
set = [['x'], ['y'], ['z']];
vec = ['x', 'y', 'z'];
get(mat,'y');
keys(set) . count();
numEntries(vec);
As matrices have fixed sizes, methods that modify the size, clear(mat), remove(mat,'x') will throw exceptions, as will put(mat,'unknown',5). The FieldI.eq(Object, Object) method is used to compare keys in the get(dict,'x'), getOr(dict,'x'), put(dict,'x'), remove(dict,'x'), and containsKey(dict,'x') functions. The treeSet() is setup to use FieldComparator for ordering elements.

See DictionaryComponents for the main documentation. Three components EntriesIterable, KeysIterable and ValuesIterable, 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: