public class MLChar 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 |
---|
MLChar(java.lang.String name,
int[] dims,
int type,
int attributes) |
MLChar(java.lang.String name,
java.lang.String value)
Creates the 1 x
String.length() MLChar from the given
String. |
MLChar(java.lang.String name,
java.lang.String[] values)
Create the
MLChar from array of String s. |
MLChar(java.lang.String name,
java.lang.String[] values,
int maxlen)
Added method to allow initialization of a char array representing
an array of strings.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
contentToString() |
protected java.lang.Character[] |
createArray(int m,
int n) |
boolean |
equals(java.lang.Object o) |
java.lang.Character[] |
exportChar() |
java.lang.Character |
getChar(int m,
int n) |
java.lang.String |
getString(int m)
Gets the m-th character matrix's row as
String . |
void |
set(java.lang.String value)
Populates the
MLChar with the String value. |
void |
set(java.lang.String value,
int idx)
Set one row, specifying the row.
|
void |
setChar(char ch,
int index) |
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 MLChar(java.lang.String name, java.lang.String value)
String.length()
MLChar
from the given
String.name
- the MLArray
namevalue
- the Stringpublic MLChar(java.lang.String name, java.lang.String[] values)
MLChar
from array of String
s.name
- the MLArray
namevalues
- the array of String
spublic MLChar(java.lang.String name, java.lang.String[] values, int maxlen)
name
- values
- maxlen
- public MLChar(java.lang.String name, int[] dims, int type, int attributes)
protected java.lang.Character[] createArray(int m, int n)
public void setChar(char ch, int index)
public void set(java.lang.String value)
MLChar
with the String
value.value
- the String valuepublic void set(java.lang.String value, int idx)
value
- idx
- public java.lang.Character getChar(int m, int n)
public java.lang.Character[] exportChar()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String getString(int m)
String
.m
- - row numberString
public java.lang.String contentToString()
contentToString
in class MLArray