FileDocCategorySizeDatePackage
ExtendedType.javaAPI DocJava SE 5 API4072Fri Aug 26 14:56:00 BST 2005com.sun.org.apache.xml.internal.dtm.ref

ExtendedType

public final class ExtendedType extends Object
The class ExtendedType represents an extended type object used by ExpandedNameTable.

Fields Summary
private int
nodetype
private String
namespace
private String
localName
private int
hash
Constructors Summary
public ExtendedType(int nodetype, String namespace, String localName)
Create an ExtendedType object from node type, namespace and local name. The hash code is calculated from the node type, namespace and local name.

param
nodetype Type of the node
param
namespace Namespace of the node
param
localName Local name of the node

      this.nodetype = nodetype;
      this.namespace = namespace;
      this.localName = localName;
      this.hash = nodetype + namespace.hashCode() + localName.hashCode();
    
public ExtendedType(int nodetype, String namespace, String localName, int hash)
Create an ExtendedType object from node type, namespace, local name and a given hash code.

param
nodetype Type of the node
param
namespace Namespace of the node
param
localName Local name of the node
param
hash The given hash code

      this.nodetype = nodetype;
      this.namespace = namespace;
      this.localName = localName;
      this.hash = hash;
    
Methods Summary
public booleanequals(com.sun.org.apache.xml.internal.dtm.ref.ExtendedType other)
Test if this ExtendedType object is equal to the given ExtendedType.

param
other The other ExtendedType object to test for equality
return
true if the two ExtendedType objects are equal.

      try
      {
        return other.nodetype == this.nodetype &&
                other.localName.equals(this.localName) &&
                other.namespace.equals(this.namespace);
      }
      catch(NullPointerException e)
      {
        return false;
      }
    
public java.lang.StringgetLocalName()
Return the local name

      return localName;
    
public java.lang.StringgetNamespace()
Return the namespace

      return namespace;
    
public intgetNodeType()
Return the node type

      return nodetype;
    
public inthashCode()
Override the hashCode() method in the Object class

      return hash;
    
protected voidredefine(int nodetype, java.lang.String namespace, java.lang.String localName)
Redefine this ExtendedType object to represent a different extended type. This is intended to be used ONLY on the hashET object. Using it elsewhere will mess up existing hashtable entries!

      this.nodetype = nodetype;
      this.namespace = namespace;
      this.localName = localName;
      this.hash = nodetype + namespace.hashCode() + localName.hashCode();
    
protected voidredefine(int nodetype, java.lang.String namespace, java.lang.String localName, int hash)
Redefine this ExtendedType object to represent a different extended type. This is intended to be used ONLY on the hashET object. Using it elsewhere will mess up existing hashtable entries!

      this.nodetype = nodetype;
      this.namespace = namespace;
      this.localName = localName;
      this.hash = hash;