Class CharEvent

java.lang.Object
com.topologi.diffx.event.impl.DiffXEventBase
com.topologi.diffx.event.impl.CharEvent
All Implemented Interfaces:
DiffXEvent, XMLFormattable, XMLWritable

public final class CharEvent extends DiffXEventBase
Event corresponding to a single character.
Version:
28 March 2010
  • Field Details

    • c

      public final char c
      The 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:
      hashCode in class DiffXEventBase
    • equals

      public boolean equals(DiffXEvent e)
      Description copied from class: DiffXEventBase
      Indicates whether the specified event is equal to this event.
      Specified by:
      equals in interface DiffXEvent
      Specified by:
      equals in class DiffXEventBase
      Parameters:
      e - The event to compare it with thsi one.
      Returns:
      true if considered equals; false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toXML

      public void toXML(XMLWriter xml) throws IOException
      Description copied from interface: XMLWritable
      Writes the XML representation of the implementing instance using the specified XMLWriter.
      Parameters:
      xml - The XMLWriter to use.
      Throws:
      IOException - IF an I/O exception occurs whilst writing.
    • toXML

      public StringBuffer toXML(StringBuffer xml) throws NullPointerException
      Description copied from interface: XMLFormattable
      Appends 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 is null.