package no.divvun.Analyzer.Objects;

public class Reading {
	public enum Type {ANALYSIS, HYPH, FORM, LEMMA};

	private Type type;
	private String value;
	private Reading next;
	
	public Reading() {
		type = null;
		value = null;
		next = null;
	}
	
	public Reading(Type type, String value) {
		this.type = type;
		this.value = value;
		next = null;
	}

	/**
	 * @return Returns the next.
	 */
	public Reading getNext() {
		return next;
	}

	/**
	 * @param next The next to set.
	 */
	public void setNext(Reading next) {
		this.next = next;
	}

	/**
	 * @return Returns the type.
	 */
	public Type getType() {
		return type;
	}

	/**
	 * @param type The type to set.
	 */
	public void setType(Type type) {
		this.type = type;
	}

	/**
	 * @return Returns the value.
	 */
	public String getValue() {
		return value;
	}

	/**
	 * @param value The value to set.
	 */
	public void setValue(String value) {
		this.value = value;
	}
	
	public String toString() {
		StringBuffer buffer = new StringBuffer();
		buffer.append(value + "\t");
		if (next != null)
			buffer.append(next.toString());
		return buffer.toString();
	}
}
