org.richfaces.component
Class ListRowKey

java.lang.Object
  extended by org.richfaces.component.TreeRowKey
      extended by org.richfaces.component.ListRowKey
All Implemented Interfaces:
java.io.Serializable

public class ListRowKey
extends TreeRowKey

Author:
Nick Belaevski - nbelaevski@exadel.com created 17.11.2006 Default TreeRowKey implementation based on ArrayList
See Also:
Serialized Form

Constructor Summary
  ListRowKey()
          Default constructor
  ListRowKey(java.util.List list)
          List constructor
protected ListRowKey(ListRowKey parentRowKey)
          Copy constructor
  ListRowKey(ListRowKey parentRowKey, java.lang.Object pathElement)
          Appending constructor
  ListRowKey(java.lang.Object path)
          Path object constructor
  ListRowKey(java.lang.String path)
          Path string constructor
 
Method Summary
 int depth()
          getter for key depth
 boolean equals(java.lang.Object obj)
           
 int getCommonPathLength(TreeRowKey otherRowKey)
          returns this row key and otherRowKey argument row key common path segments count
 java.lang.String getPath()
          getter for path string representation
 java.util.Iterator getSubPathIterator(int fromIndex)
          getter for subpath iterator
 int hashCode()
           
 boolean isSubKey(TreeRowKey rowKey)
          tests if specified rowKey is sub-key of this row key
 java.util.Iterator iterator()
          getter for path iterator
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListRowKey

public ListRowKey()
Default constructor


ListRowKey

protected ListRowKey(ListRowKey parentRowKey)
Copy constructor

Parameters:
parentRowKey - row key to clone

ListRowKey

public ListRowKey(ListRowKey parentRowKey,
                  java.lang.Object pathElement)
Appending constructor

Parameters:
parentRowKey - base row key
pathElement - path segment to append to base row key

ListRowKey

public ListRowKey(java.util.List list)
List constructor

Parameters:
list - List of strings to create corresponding row key from

ListRowKey

public ListRowKey(java.lang.Object path)
Path object constructor

Parameters:
path - first path segment

ListRowKey

public ListRowKey(java.lang.String path)
Path string constructor

Parameters:
path - path string to create corresponding row key from
Method Detail

toString

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

depth

public int depth()
Description copied from class: TreeRowKey
getter for key depth

Specified by:
depth in class TreeRowKey
Returns:
key depth

iterator

public java.util.Iterator iterator()
Description copied from class: TreeRowKey
getter for path iterator

Specified by:
iterator in class TreeRowKey
Returns:
path segments iterator

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getSubPathIterator

public java.util.Iterator getSubPathIterator(int fromIndex)
Description copied from class: TreeRowKey
getter for subpath iterator

Specified by:
getSubPathIterator in class TreeRowKey
Returns:
subpath segments iterator

isSubKey

public boolean isSubKey(TreeRowKey rowKey)
Description copied from class: TreeRowKey
tests if specified rowKey is sub-key of this row key

Overrides:
isSubKey in class TreeRowKey
Returns:

getPath

public java.lang.String getPath()
Description copied from class: TreeRowKey
getter for path string representation

Specified by:
getPath in class TreeRowKey
Returns:
path string

getCommonPathLength

public int getCommonPathLength(TreeRowKey otherRowKey)
Description copied from class: TreeRowKey
returns this row key and otherRowKey argument row key common path segments count

Specified by:
getCommonPathLength in class TreeRowKey
Parameters:
otherRowKey - TreeRowKey to count common path segments for
Returns:
common path segmments count


Copyright © 2007. All Rights Reserved.