Class EventSequenceUtils

java.lang.Object
com.topologi.diffx.sequence.EventSequenceUtils

public final class EventSequenceUtils extends Object
A utility class for event sequences.
Since:
0.6
Version:
3 April 2005
  • Constructor Details

    • EventSequenceUtils

      private EventSequenceUtils()
      Prevent creation of instances.
  • Method Details

    • isWellFormed

      public static boolean isWellFormed(EventSequence sequence)
      Indicates whether the sequence corresponds to well-formed XML.
      Parameters:
      sequence - The sequence.
      Returns:
      true if the sequence is "well-formed"; false otherwise.
    • getMaxDepth

      public static int getMaxDepth(EventSequence sequence)
      Returns the maximum depth of the sequence.

      This method assumes that the sequence is well-formed, and counts the maximum number of open element events.

      Parameters:
      sequence - The sequence
      Returns:
      The maximum depth.
    • getMaxElementContent

      public static int getMaxElementContent(EventSequence sequence)
      Returns the maximum number of token inside an element tag.

      This method assumes that the sequence is well-formed.

      Parameters:
      sequence - The sequence.
      Returns:
      The maximum number of tokens.