/**
 * @author	STF 424_ITS_Test_Platform
 * @version    $URL$
 *             $Id$
 */
package org.etsi.its.codec.adapter;

import java.io.IOException;

import org.etsi.its.codec.IEnumConverter;

/**
 * This interface provides the mandatory methods to implement a list of TLV elements
 */
public interface IValue {

	/**
	 * This method provides a reference to the list of the TLV elements
	 * @return A reference to the list of the TLV elements
	 */
	public Object getValue();

	/**
	 * This methods provides the first element from the list
	 * @return The first element from the list, null if the list is empty
	 */
	public IType getFirstType();

	/**
	 * This methods provides the next element from the list if it is available
	 * @return The next element from the list, null if the end of the list was reached
	 */
	public IType getNextType();

	/**
	 * This methods provides the previous element from the list if it is available
	 * @return The previous element from the list, null if the end of the list was reached
	 */
	public IType getPrevType();

	/**
	 * This method provides the value of the specified type identifier
	 * @param typeId The type identifier to be retrieved
	 * @return The type value
	 */
	public IType getType(IEnumConverter typeId);

	/**
	 * This method is used to add a new TLV element in the list
	 * @param typeId The type identifier of the TLV element
	 * @param value The type value of the TLV element
	 * @throws IOException Signals that an I/O exception of some sort has occurred
	 */
	public void AddTLV(IEnumConverter typeId, byte [] value) throws IOException;
	
} // End of interface IValue
