ca.odell.glazedlists
Interface TreeList.Format<E>

Enclosing class:
TreeList<E>

public static interface TreeList.Format<E>

Define the tree structure of an node by expressing the path from the element itself to the tree's root.


Method Summary
 boolean allowsChildren(E element)
          Whether an element can have children.
 Comparator<? super E> getComparator(int depth)
          Returns the comparator used to order path elements of the specified depth.
 void getPath(List<E> path, E element)
          Populate path with a list describing the path from a root node to this element.
 

Method Detail

getPath

void getPath(List<E> path,
             E element)
Populate path with a list describing the path from a root node to this element. Upon returning, the list must have size >= 1, where the provided element identical to the list's last element.

Parameters:
path - a list that the implementor shall add their path elements to via path.add(). This may be a non-empty List and it is an error to call any method other than add().

allowsChildren

boolean allowsChildren(E element)
Whether an element can have children.

Returns:
true if this element can have child elements, or false if it is always a leaf node.

getComparator

Comparator<? super E> getComparator(int depth)
Returns the comparator used to order path elements of the specified depth. If enforcing order at this level is not intended, this method should return null.



Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2015-02-16 14:02