edu.uci.isr.yancees.util
Class PathOperations

java.lang.Object
  extended by edu.uci.isr.yancees.util.PathOperations

public class PathOperations
extends java.lang.Object

Title: Yancees Notification Server

Description: Yet ANother Configurable Extensible Event Service

Copyright: Copyright (c) 2003

Company: School of Information and Computer Science - University of California, Irvine

Version:
1.0
Author:
Roberto Silveira Silva Filho

Constructor Summary
PathOperations()
           
 
Method Summary
static int getMaxPathDepth(java.lang.String[] paths)
          Given a set of path names, separated by DOMNodeAdapter.CONTEXT_SEPARATOR, we return the max path depth (the number of subcontexts in that path).
static int getPathDepth(java.lang.String path)
          For example: /a/b/c/d has depth = 4 / has depth = 0 /c has depth = 1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathOperations

public PathOperations()
Method Detail

getMaxPathDepth

public static int getMaxPathDepth(java.lang.String[] paths)
Given a set of path names, separated by DOMNodeAdapter.CONTEXT_SEPARATOR, we return the max path depth (the number of subcontexts in that path).

Parameters:
paths - a list of full path names to be compared.
Returns:
the maximum number of subcontexts in the path list

getPathDepth

public static int getPathDepth(java.lang.String path)
For example: /a/b/c/d has depth = 4 / has depth = 0 /c has depth = 1

Parameters:
path - a full path name whose depth will be computed
Returns:
the depth of the path