org.richfaces.model
Class TreeRowKey<T>

java.lang.Object
  extended by org.richfaces.model.TreeRowKey<T>
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ListRowKey

public abstract class TreeRowKey<T>
extends java.lang.Object
implements java.io.Serializable

Base abstract clas for all tree row keys

Author:
Nick Belaevski - nbelaevski@exadel.com created 06.12.2006
See Also:
Serialized Form

Field Summary
static char SEPARATOR_ESCAPE_CHAR
           
 
Constructor Summary
TreeRowKey()
           
 
Method Summary
abstract  int depth()
          getter for key depth
abstract  int getCommonPathLength(TreeRowKey<T> otherRowKey)
          returns this row key and otherRowKey argument row key common path segments count
abstract  TreeRowKey<T> getParentKey()
           
abstract  java.lang.String getPath()
          getter for path string representation
 TreeRowKey<T> getSubKey(int fromIndex)
           
abstract  java.util.Iterator<T> getSubPathIterator(int fromIndex)
          getter for subpath iterator
 boolean isSubKey(TreeRowKey<T> rowKey)
          tests if specified rowKey is sub-key of this row key
abstract  java.util.Iterator<T> iterator()
          getter for path iterator
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SEPARATOR_ESCAPE_CHAR

public static final char SEPARATOR_ESCAPE_CHAR
See Also:
Constant Field Values
Constructor Detail

TreeRowKey

public TreeRowKey()
Method Detail

depth

public abstract int depth()
getter for key depth

Returns:
key depth

getSubPathIterator

public abstract java.util.Iterator<T> getSubPathIterator(int fromIndex)
getter for subpath iterator

Parameters:
fromIndex -
Returns:
subpath segments iterator

getPath

public abstract java.lang.String getPath()
getter for path string representation

Returns:
path string

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isSubKey

public boolean isSubKey(TreeRowKey<T> rowKey)
tests if specified rowKey is sub-key of this row key

Parameters:
rowKey -
Returns:

iterator

public abstract java.util.Iterator<T> iterator()
getter for path iterator

Returns:
path segments iterator

getCommonPathLength

public abstract int getCommonPathLength(TreeRowKey<T> otherRowKey)
returns this row key and otherRowKey argument row key common path segments count

Parameters:
otherRowKey - TreeRowKey to count common path segments for
Returns:
common path segmments count

getParentKey

public abstract TreeRowKey<T> getParentKey()

getSubKey

public TreeRowKey<T> getSubKey(int fromIndex)


Copyright © 2010. All Rights Reserved.