org.jdom.contrib.schema
Class Schema.Type

java.lang.Object
  extended by org.jdom.contrib.schema.Schema.Type
Enclosing class:
Schema

public static final class Schema.Type
extends java.lang.Object

Class to support type-safe enumeration design pattern to represent schema types


Constructor Summary
protected Schema.Type(java.lang.String name, java.lang.String language)
          Type constructor, private on purpose.
 
Method Summary
 boolean equals(java.lang.Object o)
          Tests for type equality.
 java.lang.String getLanguage()
          Returns the URI that uniquemy identifies this schema type.
 java.lang.String getName()
          Returns the printable name of this schema type.
 int hashCode()
          Returns a unique identifier for this type.
 java.lang.String toString()
          Returns a string representation of this type suitable for debugging and diagnosis.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Schema.Type

protected Schema.Type(java.lang.String name,
                      java.lang.String language)
Type constructor, private on purpose.

Parameters:
name - the schema type printable name.
language - the unique identifier for the schema type (URI).
Method Detail

getName

public java.lang.String getName()
Returns the printable name of this schema type.

Returns:
the schema type name.

getLanguage

public java.lang.String getLanguage()
Returns the URI that uniquemy identifies this schema type.

Returns:
the schema type identifier.

hashCode

public int hashCode()
Returns a unique identifier for this type.

Overrides:
hashCode in class java.lang.Object
Returns:
a unique identifier for this type.
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Returns a string representation of this type suitable for debugging and diagnosis.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this type.
See Also:
Object.toString()

equals

public boolean equals(java.lang.Object o)
Tests for type equality. This is only necessary to handle cases where two Type objects are loaded by different class loaders.

Overrides:
equals in class java.lang.Object
Parameters:
o - the object compared for equality to this type.
Returns:
true if and only if o represents the same type as this object.
See Also:
Object.equals(Object)


Copyright © 2011 Jason Hunter, Brett McLaughlin. All Rights Reserved.