com.topologi.diffx.sequence
Class EventSequenceUtils

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

public final class EventSequenceUtils
extends Object

A utility class for event sequences.

Since:
0.6
Version:
3 April 2005
Author:
Christophe Lauret

Method Summary
static int getMaxDepth(EventSequence sequence)
          Returns the maximum depth of the sequence.
static int getMaxElementContent(EventSequence sequence)
          Returns the maximum number of token inside an element tag.
static boolean isWellFormed(EventSequence sequence)
          Indicates whether the sequence corresponds to well-formed XML.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.