org.crosswire.jsword.passage
Class KeyUtil

java.lang.Object
  extended by org.crosswire.jsword.passage.KeyUtil

public final class KeyUtil
extends Object

.

Author:
Joe Walker [joe at eireneh dot com]
See Also:
for license details. The copyright to this program is held by it's authors.

Field Summary
private static KeyFactory keyf
          How we create Passages
private static Logger log
          The log stream
 
Constructor Summary
private KeyUtil()
          Prevent instansiation
 
Method Summary
static Passage getPassage(Key key)
          Not all keys represent passages, but we ought to be able to get something close to a passage from anything that does passage like work.
static Verse getVerse(Key key)
          Not all keys represent verses, but we ought to be able to get something close to a verse from anything that does verse like work.
static void visit(Key key, KeyVisitor visitor)
          Walk through a tree visiting the nodes and branches in the tree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keyf

private static KeyFactory keyf
How we create Passages


log

private static final Logger log
The log stream

Constructor Detail

KeyUtil

private KeyUtil()
Prevent instansiation

Method Detail

visit

public static void visit(Key key,
                         KeyVisitor visitor)
Walk through a tree visiting the nodes and branches in the tree

Parameters:
key - The node tree to walk through
visitor - The visitor to notify whenever a node is found

getVerse

public static Verse getVerse(Key key)
Not all keys represent verses, but we ought to be able to get something close to a verse from anything that does verse like work.


getPassage

public static Passage getPassage(Key key)
Not all keys represent passages, but we ought to be able to get something close to a passage from anything that does passage like work. If you pass a null key into this method, you get a null Passage out.


Copyright ยจ 2003-2007