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

import org.etsi.its.codec.TestAdapterMessageTypeEnum;

/**
 * This class provides a representation in TLV format of each Cam/denm PDU elements
 */
public class PduItem {

	/**
	 * Cam/Denm PDU element identifier
	 * 
	 * @see TestAdapterMessageTypeEnum
	 */
	private String _type;

	/**
	 * The value of this Cam/Denm PDU element
	 */
	private Object _value;

	/**
	 * Accessor to the Cam/Denm PDU element identifier
	 * @return The Cam/Denm PDU element identifier
	 * 
	 * @see TestAdapterMessageTypeEnum
	 */
	public String getType() {
		return _type;
	}

	/**
	 * Accessor to the value of this Cam/Denm PDU element
	 * @return The value of this Cam/Denm PDU element
	 */
	public Object getValue() {
		return _value;
	}

	/**
	 * Constructor
	 * @param type A Cam/Denm PDU element identifier
	 * @param value The value of this Cam/Denm PDU element
	 * 
	 * @see TestAdapterMessageTypeEnum
	 */
	public PduItem(final String type, final Object value) {
		// Sanity check
		if ((type == null) || type.isEmpty()) {
			throw new IllegalArgumentException("Type identifier shall not be null or empty");
		}
		_type = type;
		_value = value;
	} // End of Constructor

} // End of class CamPduItem
