Class COM.ibm.jaws.motk.KeyPath
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.ibm.jaws.motk.KeyPath

java.lang.Object
   |
   +----COM.ibm.jaws.motk.KeyPath

public class KeyPath
extends Object
Usefull class work for working with MOFW key path strings. Key path strings may contain any Java characters, but the slash character "/" is reserved for separating parts of the key string. There is no provision for "escapeing" the slash character. Key path strings that begin with a slash are treated like they began with two slashes and the first one was "escaped". I.e., the head of a key path string that begins with slash is that slash.

Key path strings may not have two consectutive slashes.


Variable Index

 o d
 o firstPop
 o keyPathString

Constructor Index

 o KeyPath()
 o KeyPath(String)

Method Index

 o append(String)
Appends the specified string to the end of this KeyPath with a separating slash unless the KeyPath is empty in which case no slash is added.
 o atEnd()
 o convert(InputEDStream)
 o convert(String)
Converts a string in URL KeyPath form (slash separated names) to a KeyPath path stream.
 o getKeyPathString()
Returns the key path string.
 o head()
Returns the first KeyPath from this KeyPathPath without removing it.
 o isAbsolute()
Returns true if this KeyPath starts with slash and false otherwise.
 o parse(boolean)
 o popHead()
Returns the first key from this KeyPath and removes it from the KeyPath.
 o tail()
Returns the rest of the key path string after removing the first KeyPath.
 o toString()
Returns a String that represents the value of this Object.

Variables

 o d
  public static Debug d
 o keyPathString
  protected String keyPathString
 o firstPop
  protected boolean firstPop

Constructors

 o KeyPath
  public KeyPath()
 o KeyPath
  public KeyPath(String keyPathString)

Methods

 o toString
  public String toString()
Returns a String that represents the value of this Object.
Overrides:
toString in class Object
 o getKeyPathString
  public String getKeyPathString()
Returns the key path string.
 o append
  public void append(String KeyPathPartString)
Appends the specified string to the end of this KeyPath with a separating slash unless the KeyPath is empty in which case no slash is added.
 o parse
  protected String parse(boolean pop)
 o head
  public String head()
Returns the first KeyPath from this KeyPathPath without removing it. Repeated calls to this method will return the same result. If this is an absolute KeyPathPath then slash will be returned.
 o popHead
  public String popHead()
Returns the first key from this KeyPath and removes it from the KeyPath. If this is an absolute KeyPath then slash will be returned.
 o tail
  public String tail()
Returns the rest of the key path string after removing the first KeyPath.
 o atEnd
  public boolean atEnd()
 o isAbsolute
  public boolean isAbsolute()
Returns true if this KeyPath starts with slash and false otherwise. Note that once the head of a KeyPathPath has been poped it cannot begin with a slash and therefore cannot be absolute.
 o convert
  public static InputEDStream convert(String keyPathString)
Converts a string in URL KeyPath form (slash separated names) to a KeyPath path stream.
 o convert
  public static String convert(InputEDStream in)

All Packages  Class Hierarchy  This Package  Previous  Next  Index