package org.postgresforest.vm;

public class ParamValue  {

	protected int m_paramIndex = -1;
	protected StringBuffer m_value;
	
	public ParamValue() {
		super();
		m_value = new StringBuffer();
	}

	public ParamValue(int index) {
		this();
		m_paramIndex = index;
	}


	public int getParamIndex() {
		return m_paramIndex;
	}


	public String getValue() {
		if (m_value.length() == 0)
			return null;
		
		return m_value.toString();
	}


	public void setValue(String value) {
		m_value = new StringBuffer(value);
	}


	public StringBuffer append(char c) {
		return m_value.append(c);
	}


	public StringBuffer append(String str) {
		return m_value.append(str);
	}

	public int length() {
		return m_value.length();
	}

//	public String substring(int start, int end) {
//		return m_value.substring(start, end);
//	}

	public String substring(int start) {
		return m_value.substring(start);
	}





}
