//----------------------------BEGIN LICENSE----------------------------
/* 
 * Willow : the Open Source WorkFlow Project
 * Distributable under GNU LGPL license by gun.org
 *
 * Copyright (C) 2004-2010  huihoo.org 
 * Copyright (C) 2004-2010  ZosaTapo <dertyang@hotmail.com> 
 * 
 * ====================================================================
 * Project Homepage : http://www.huihoo.org/willow
 * Source Forge     : http://sourceforge.net/projects/huihoo
 * Mailing list     : willow@lists.sourceforge.net 
 */
//----------------------------END  LICENSE-----------------------------

package org.huihoo.willow.naming;

public class NamingEntry
{

	// -------------------------------------------------------------- Constants

	public static final int ENTRY = 0;
	public static final int LINK_REF = 1;
	public static final int REFERENCE = 2;

	public static final int CONTEXT = 10;

	// ----------------------------------------------------------- Constructors

	public NamingEntry(String name, Object value, int type)
	{
		this.name = name;
		this.value = value;
		this.type = type;
	}

	// ----------------------------------------------------- Instance Variables

	/**
	 * The type instance variable is used to avoid unsing RTTI when doing
	 * lookups.
	 */
	public int type;
	public String name;
	public Object value;

	// --------------------------------------------------------- Object Methods

	public boolean equals(Object obj)
	{
		if ((obj != null) && (obj instanceof NamingEntry))
		{
			return name.equals(((NamingEntry) obj).name);
		}
		else
		{
			return false;
		}
	}

	public int hashCode()
	{
		return name.hashCode();
	}

}
