All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.xxdb.data.BasicStringMatrix Maven / Gradle / Ivy

There is a newer version: 3.00.2.2
Show newest version
package com.xxdb.data;

import java.io.IOException;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.xxdb.io.ExtendedDataInput;
import com.xxdb.io.ExtendedDataOutput;

/**
 * 
 * Corresponds to DolphinDB string matrix
 *
 */

public class BasicStringMatrix extends AbstractMatrix{
	private String[] values;
	private boolean isSymbol;
	
	public BasicStringMatrix(int rows, int columns){
		super(rows, columns);
		values = new String[rows * columns];
		isSymbol = true;
	}
	
	public BasicStringMatrix(int rows, int columns, List list) throws Exception {
		super(rows,columns);
		values = new String[rows*columns];
		if (list == null || list.size() != columns)
			throw new Exception("input list of arrays does not have " + columns + " columns");
		for (int i=0; i getElementClass(){
		return BasicString.class;
	}

	@Override
	protected void readMatrixFromInputStream(int rows, int columns,	ExtendedDataInput in)  throws IOException{
		int size = rows * columns;
		values =new String[size];
		if(extended){
			SymbolBase symbase = new SymbolBase(in);
			for(int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy