|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.xtvdclient.xtvd.datatypes.AbstractDataType
public abstract class AbstractDataType
An abstract super-class for all XML datatypes. This class provides
default implementations for equals(Object)
and compareTo(Object)
methods. Also provides methods that will
replace special characters with their XML equivalents.
Copyright 2004, Tribune Media Services
$Id: AbstractDataType.java,v 1.1 2004/03/19 21:58:02 rakesh Exp $Field Summary | |
---|---|
static java.lang.String |
END_OF_LINE
The end of line character to be used for separating
XML elements . |
Constructor Summary | |
---|---|
AbstractDataType()
|
Method Summary | |
---|---|
int |
compareTo(java.lang.Object object)
Implementation of the Comparable interface. |
boolean |
equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one. |
protected static java.lang.String |
replaceSpecialCharacters(java.lang.String data)
Replace special characters (&, ...) in the string passed in with appropriate escape values. |
protected static java.lang.StringBuffer |
replaceSpecialCharacters(java.lang.String data,
java.lang.StringBuffer buffer)
Replace special characters (&, ...) in the string passed in with appropriate escape values and add them to the StringBuffer passed in. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String END_OF_LINE
end of line
character to be used for separating
XML elements
.
Constructor Detail |
---|
public AbstractDataType()
Method Detail |
---|
protected static java.lang.String replaceSpecialCharacters(java.lang.String data)
data
- The string that is to be processed.
String
object.protected static java.lang.StringBuffer replaceSpecialCharacters(java.lang.String data, java.lang.StringBuffer buffer)
data
- The string that is to be processed.buffer
- The buffer to which the properly
escaped string values are to be written.
StringBuffer
.public boolean equals(java.lang.Object object)
Object.hashCode()
value.
equals
in class java.lang.Object
object
- The reference object with which to compare.
true
if the match succeeds.public int compareTo(java.lang.Object object)
Comparable
interface.
Compares this object with the specified object for order. Returns
a negative integer, zero, or a positive integer as this object is
less than, equal to, or greater than the specified object.
The comparison is done by comparing the Object.hashCode()
values
of the objects.
compareTo
in interface java.lang.Comparable
object
- The object with which this class is to
be compared. No class type checking is done.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |