public class MLStructure extends MLArray
attributes, dims, mtFLAG_COMPLEX, mtFLAG_GLOBAL, mtFLAG_LOGICAL, mtFLAG_TYPE, mxCELL_CLASS, mxCHAR_CLASS, mxDOUBLE_CLASS, mxFUNCTION_CLASS, mxINT16_CLASS, mxINT32_CLASS, mxINT64_CLASS, mxINT8_CLASS, mxOBJECT_CLASS, mxOPAQUE_CLASS, mxSINGLE_CLASS, mxSPARSE_CLASS, mxSTRUCT_CLASS, mxUINT16_CLASS, mxUINT32_CLASS, mxUINT64_CLASS, mxUINT8_CLASS, mxUNKNOWN_CLASS, name, type
Constructor and Description |
---|
MLStructure(java.lang.String name,
int[] dims) |
MLStructure(java.lang.String name,
int[] dims,
int type,
int attributes) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
contentToString() |
java.util.Collection<MLArray> |
getAllFields()
Gets all field from sruct array as flat list of fields.
|
MLArray |
getField(java.lang.String name)
Gets a value of the field described by name from current struct
in struct array or null if the field doesn't exist.
|
MLArray |
getField(java.lang.String name,
int index)
Gets a value of the field described by name from index'th struct
in struct array or null if the field doesn't exist.
|
MLArray |
getField(java.lang.String name,
int m,
int n)
Gets a value of the field described by name from (m,n)'th struct
in struct array or null if the field doesn't exist.
|
java.util.Collection<java.lang.String> |
getFieldNames()
Returns the
Collection of keys for this structure. |
byte[] |
getKeySetToByteArray()
Dumps field names to byte array.
|
int |
getMaxFieldLenth()
Gets the maximum length of field descriptor
|
void |
setField(java.lang.String name,
MLArray value)
Sets field for current structure
|
void |
setField(java.lang.String name,
MLArray value,
int index)
Sets filed for structure described by index in struct array
|
void |
setField(java.lang.String name,
MLArray value,
int m,
int n)
Sets field for (m,n)'th structure in struct array
|
dispose, getDimensions, getFlags, getIndex, getM, getN, getName, getNameToByteArray, getNDimensions, getSize, getType, isCell, isChar, isComplex, isDouble, isEmpty, isFunctionObject, isInt16, isInt32, isInt64, isInt8, isLogical, isObject, isOpaque, isSingle, isSparse, isStruct, isUint16, isUint32, isUint64, isUint8, isUnknown, toString, typeToString
public MLStructure(java.lang.String name, int[] dims)
public MLStructure(java.lang.String name, int[] dims, int type, int attributes)
public void setField(java.lang.String name, MLArray value)
name
- - name of the fieldvalue
- - MLArray
field valuepublic void setField(java.lang.String name, MLArray value, int m, int n)
name
- - name of the fieldvalue
- - MLArray
field valuem
- n
- public void setField(java.lang.String name, MLArray value, int index)
name
- - name of the fieldvalue
- - MLArray
field valueindex
- public int getMaxFieldLenth()
public byte[] getKeySetToByteArray()
public java.util.Collection<MLArray> getAllFields()
public java.util.Collection<java.lang.String> getFieldNames()
Collection
of keys for this structure.Collection
of keys for this structurepublic MLArray getField(java.lang.String name)
name
- public MLArray getField(java.lang.String name, int m, int n)
name
- m
- n
- public MLArray getField(java.lang.String name, int index)
name
- index
- public java.lang.String contentToString()
contentToString
in class MLArray