Package com.topologi.diffx.event.impl
Class CharEvent
java.lang.Object
com.topologi.diffx.event.impl.DiffXEventBase
com.topologi.diffx.event.impl.CharEvent
- All Implemented Interfaces:
DiffXEvent,XMLFormattable,XMLWritable
Event corresponding to a single character.
- Version:
- 28 March 2010
-
Field Summary
FieldsFields inherited from class com.topologi.diffx.event.impl.DiffXEventBase
ESC, weight -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(DiffXEvent e) Indicates whether the specified event is equal to this event.inthashCode()toString()voidWrites the XML representation of the implementing instance using the specifiedXMLWriter.toXML(StringBuffer xml) Appends the XML representation of the object of the implementing class.Methods inherited from class com.topologi.diffx.event.impl.DiffXEventBase
equals, getWeight, setWeight, toXML
-
Field Details
-
c
public final char cThe character associated with this event.
-
-
Constructor Details
-
CharEvent
public CharEvent(char c) Creates a new character event.- Parameters:
c- The character to wrap.
-
-
Method Details
-
hashCode
public int hashCode()Description copied from class:DiffXEventBase- Specified by:
hashCodein classDiffXEventBase
-
equals
Description copied from class:DiffXEventBaseIndicates whether the specified event is equal to this event.- Specified by:
equalsin interfaceDiffXEvent- Specified by:
equalsin classDiffXEventBase- Parameters:
e- The event to compare it with thsi one.- Returns:
trueif considered equals;falseotherwise.
-
toString
-
toXML
Description copied from interface:XMLWritableWrites the XML representation of the implementing instance using the specifiedXMLWriter.- Parameters:
xml- The XMLWriter to use.- Throws:
IOException- IF an I/O exception occurs whilst writing.
-
toXML
Description copied from interface:XMLFormattableAppends the XML representation of the object of the implementing class.Implementations must ensure that the returned string buffer is the same object as the specified string buffer.
- Parameters:
xml- The string buffer to which the XML representation is appended to.- Returns:
- The modified string buffer.
- Throws:
NullPointerException- if the specified character sequence isnull.
-