org.apache.commons.betwixt.schema
Class Attribute

java.lang.Object
  extended byorg.apache.commons.betwixt.schema.Attribute

public class Attribute
extends java.lang.Object

Models the attribute element in an XML schema.

Version:
$Revision: 438373 $
Author:
Jakarta Commons Team

Field Summary
private  java.lang.String name
           
private  java.lang.String type
           
 
Constructor Summary
Attribute()
           
Attribute(AttributeDescriptor attributeDescriptor)
           
Attribute(java.lang.String name, java.lang.String type)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getName()
          Gets the attribute name
 java.lang.String getType()
          Gets the attribute type
 int hashCode()
           
private  boolean isEqual(java.lang.String one, java.lang.String two)
          Null safe equals method
 void setName(java.lang.String string)
          Sets the attribute name
 void setType(java.lang.String string)
          Sets the attribute type
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private java.lang.String name

type

private java.lang.String type
Constructor Detail

Attribute

public Attribute()

Attribute

public Attribute(java.lang.String name,
                 java.lang.String type)

Attribute

public Attribute(AttributeDescriptor attributeDescriptor)
Method Detail

getName

public java.lang.String getName()
Gets the attribute name

Returns:
name of this attribute, not null

setName

public void setName(java.lang.String string)
Sets the attribute name

Parameters:
string - the name for this attribute, not null

getType

public java.lang.String getType()
Gets the attribute type

Returns:
the type of this attribute

setType

public void setType(java.lang.String string)
Sets the attribute type

Parameters:
string - the attribute type

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object obj)

isEqual

private boolean isEqual(java.lang.String one,
                        java.lang.String two)
Null safe equals method

Parameters:
one -
two -
Returns:

toString

public java.lang.String toString()