org.jboss.jca.common.api.metadata.ra
Class XsdString

java.lang.Object
  extended by org.jboss.jca.common.api.metadata.ra.XsdString
All Implemented Interfaces:
Serializable, Cloneable, CopyableMetaData, JCAMetadata, IdDecoratedMetadata
Direct Known Subclasses:
LocalizedXsdString

public class XsdString
extends Object
implements IdDecoratedMetadata, CopyableMetaData

Author:
Stefano Maestri
See Also:
Serialized Form

Field Summary
protected  String id
          XML ID
static XsdString NULL_XSDSTRING
          A NULL immutable instance
protected  String value
          the actual String value
 
Constructor Summary
XsdString(String value, String id)
           
 
Method Summary
 CopyableMetaData copy()
          Creates and returns a copy of this object.
 boolean equals(Object obj)
          
 String getId()
          Return the String representing xml ID
 String getValue()
           
 int hashCode()
          
static boolean isNull(XsdString xsdString)
          convenient method to test if an XsdString is null NULLXsdString instance
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_XSDSTRING

public static final XsdString NULL_XSDSTRING
A NULL immutable instance


value

protected final String value
the actual String value


id

protected final String id
XML ID

Constructor Detail

XsdString

public XsdString(String value,
                 String id)
Parameters:
value - the actual String value
id - XML ID
Method Detail

getValue

public String getValue()
Returns:
value

getId

public String getId()
Return the String representing xml ID

Specified by:
getId in interface IdDecoratedMetadata
Returns:
the XML ID
See Also:
IdDecoratedMetadata.getId()

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

isNull

public static boolean isNull(XsdString xsdString)
convenient method to test if an XsdString is null NULLXsdString instance

Parameters:
xsdString - the xsdString to test
Returns:
ture if passes xsdString is null or equals to NULLXsdString instance

copy

public CopyableMetaData copy()
Description copied from interface: CopyableMetaData
Creates and returns a copy of this object. Ther copy is done in deep of all elements. It isn't formally a clone of the instance since it does not respect the assumption for which returned clone of cloneMethod are instance of Object

Specified by:
copy in interface CopyableMetaData
Returns:
a copy of this instance.


Copyright © 2008 Red Hat Middleware LLC (http://www.jboss.com/)