com.jmatio.types
Class MLChar

java.lang.Object
  extended by com.jmatio.types.MLArray
      extended by com.jmatio.types.MLChar
All Implemented Interfaces:
GenericArrayCreator<Character>

public class MLChar
extends MLArray
implements GenericArrayCreator<Character>


Field Summary
 
Fields inherited from class com.jmatio.types.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 Summary
MLChar(String name, int[] dims, int type, int attributes)
           
MLChar(String name, String value)
          Creates the 1 x String.length() MLChar from the given String.
MLChar(String name, String[] values)
          Create the MLChar from array of Strings.
MLChar(String name, String[] values, int maxlen)
          Added method to allow initialization of a char array representing an array of strings.
 
Method Summary
 String contentToString()
           
 Character[] createArray(int m, int n)
           
 boolean equals(Object o)
           
 Character[] exportChar()
           
 Character getChar(int m, int n)
           
 String getString(int m)
          Gets the m-th character matrix's row as String.
 void set(String value)
          Populates the MLChar with the String value.
 void set(String value, int idx)
          Set one row, specifying the row.
 void setChar(char ch, int index)
           
 
Methods inherited from class com.jmatio.types.MLArray
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MLChar

public MLChar(String name,
              String value)
Creates the 1 x String.length() MLChar from the given String.

Parameters:
name - the MLArray name
value - the String

MLChar

public MLChar(String name,
              String[] values)
Create the MLChar from array of Strings.

Parameters:
name - the MLArray name
values - the array of Strings

MLChar

public MLChar(String name,
              String[] values,
              int maxlen)
Added method to allow initialization of a char array representing an array of strings.

Parameters:
name -
values -
maxlen -

MLChar

public MLChar(String name,
              int[] dims,
              int type,
              int attributes)
Method Detail

createArray

public Character[] createArray(int m,
                               int n)
Specified by:
createArray in interface GenericArrayCreator<Character>

setChar

public void setChar(char ch,
                    int index)

set

public void set(String value)
Populates the MLChar with the String value.

Parameters:
value - the String value

set

public void set(String value,
                int idx)
Set one row, specifying the row.

Parameters:
value -
idx -

getChar

public Character getChar(int m,
                         int n)

exportChar

public Character[] exportChar()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getString

public String getString(int m)
Gets the m-th character matrix's row as String.

Parameters:
m - - row number
Returns:
- String

contentToString

public String contentToString()
Overrides:
contentToString in class MLArray


Copyright © 2006–2014 GeoSolutions. All rights reserved.