Package org.olat.core.util.traversal

Examples of org.olat.core.util.traversal.TreeWalker


  /**
   *
   */
  private TreeWalker getTreeWalker() {
    if (tw == null) {
      tw = new TreeWalker(new MessageTreeComparator(), null); // no visitor,
                                                              // since we just
                                                              // need the
                                                              // traversal order
                                                              // after sorting
      Iterator mit = messages.iterator();
View Full Code Here


  public int compareTo(int rowa, int rowb) {
    // we take the treewalker which we built previously and use the visitednr
    // attribute to specify sort order
    Object a = messages.get(rowa);
    Object b = messages.get(rowb); // both are messages; to be compared
    TreeWalker treeWalker = getTreeWalker();
    GenericTraversalNode gtna = treeWalker.getGenericTraversalNode(a);
    GenericTraversalNode gtnb = treeWalker.getGenericTraversalNode(b);
    int sortedposa = gtna.getVisitNumber(); // the visitednumber was determined
                                            // by the sorting algorithm,
                                            // therefore it is the sorted
                                            // position
    int sortedposb = gtnb.getVisitNumber();
View Full Code Here

TOP

Related Classes of org.olat.core.util.traversal.TreeWalker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.