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

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

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

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import com.xxdb.io.ExtendedDataInput;
import com.xxdb.io.ExtendedDataOutput;

public class SymbolBase {
	private ArrayList syms = new ArrayList();
	private Map symMap = null;
	private int id;
	
	
	public SymbolBase(int id) {
		this.id = id;
	}
	
	public SymbolBase(ExtendedDataInput in) throws IOException{
		this(in.readInt(), in);
	}
	
	public SymbolBase(int id, ExtendedDataInput in) throws IOException{
		this.id = id;
		int size = in.readInt();
		for(int i=0; i();
			if(syms.size() > 0 && !syms.get(0).isEmpty()) 
				throw new RuntimeException("A symbol base's first key must be empty string.");
			if(syms.size() == 0){
				symMap.put("", 0);
				syms.add("");
			}
			else{
				int count = syms.size();
				for(int i=0; i();
			if(syms.size() > 0 && !syms.get(0).isEmpty()) 
				throw new RuntimeException("A symbol base's first key must be empty string.");
			if(syms.size() == 0){
				symMap.put("", 0);
				syms.add("");
			}
			else{
				int count = syms.size();
				for(int i=0; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy