package daruma.xml;

public class  XMLTag
{
	private	String	uri;
	private	String	localName;

	public	XMLTag( String  uri ,  String  localName )
	{
		this.uri       = uri;
		this.localName = localName;
	}

	public	String	getURI()
	{
		return( uri );
	}

	public	String	getLocalName()
	{
		return( localName );
	}

	public	boolean	equals( XMLTag  t )
	{
		if ( t == null )
		{
			return( false );
		}

		return( this.localName.equals( t.localName )
		     && this.uri      .equals( t.uri ) );
	}

	public	boolean	equals( Object  t )
		/* t should be an instance of XMLTag */
	{
		assert( t instanceof XMLTag );

		return( this.equals( (XMLTag)t ) );
	}

	public	int	hashCode()
	{
		return( this.localName.hashCode() ^ this.uri.hashCode() );
	}
}
