/* Copyright (c) 2002 Oracle Corporation. All Rights Reserved. */
package oracle.portal.utils;

/**
 * Utility class for storing and retrieving a name-value pair. The
 * <code>name</code> and the <code>value</code> are stored as
 * <code>String</code> objects. Users of this utility class are expected to
 * carry out any validation they require.
 */
public class NameValue
{

    private String mName;
    private String mValue;

    public NameValue()
    {
        // do nothing
    }


    public NameValue(String name, String value)
    {
        mName = name;
        mValue = value;
    }

    
    /**
     * Sets the name of this <code>NameValue</code> object.
     *
     * @param name - a name.
     */
    public void setName(String name)
    {
        mName = name;
    }

    /**
     * Gets the name of this <code>NameValue</code> object.
     *
     * @return the name of this <code>NameValue</code> object.
     */
    public String getName()
    {
        return mName;
    }

    /**
     * Sets the value of this <code>NameValue</code> object.
     *
     * @param value - a value.
     */
    public void setValue(String value)
    {
        mValue = value;
    }

    /**
     * Gets the vaule of this <code>NameValue</code> object.
     *
     * @return the value of this <code>NameValue</code> object.
     */
    public String getValue()
    {
        return mValue;
    }

}
