Package com.kylin.jbosscache.custom.gwt.shared

Examples of com.kylin.jbosscache.custom.gwt.shared.NodeEntity


      }
    }
   
    Collections.sort(newlist);
   
    NodeEntity entity = new NodeEntity("/");
   
    NodeEntity extCursor = entity;
    for(int i = 0 ; i < newlist.size() ; i ++) {
     
      String str = newlist.get(i);
      if(newlist.get(i).contains("/")){
        if(i > 0 && str.contains(newlist.get(i - 1))) {
          str = str.substring(newlist.get(i - 1).length());
        } else if(i > 0 && !str.contains(newlist.get(i - 1)) && isSamePre(newlist.get(i - 1), str)) {
          extCursor = updateCursor(newlist.get(i - 1), str, entity);
          str = str.substring(getSamePre(newlist.get(i - 1), str).length());
        } else if(i > 0 && !str.contains(newlist.get(i - 1)) && !isSamePre(newlist.get(i - 1), str)) {
          extCursor = entity;
        }
        if(str.startsWith("/")){
          str = str.substring(1);
        }
        String[] array = str.split("/");
        NodeEntity cursor = extCursor;
        for(int j = 0 ; j < array.length ; j ++) {
          NodeEntity tmp = new NodeEntity(array[j]);
          cursor.add(tmp);
          cursor = tmp;
        }
        extCursor = cursor;
      } else {
        NodeEntity tmp = new NodeEntity(str);
        entity.add(tmp);
        extCursor = tmp;
      }

    }
View Full Code Here


    int a = preArray.length;
    if(curArray.length < a){
      a = curArray.length;
    }
   
    NodeEntity result = null;
    NodeEntity cursor = entity;
    for(int i = 0 ; i < a ; i ++) {
      if(preArray[i].compareTo(curArray[i]) == 0){
        Iterator<NodeEntity> iterator = cursor.getChilds().iterator();
        while(iterator.hasNext()) {
          NodeEntity tmp = iterator.next();
          if(tmp.getName().compareTo(preArray[i]) == 0){
            cursor = tmp;
            break;
          }
        }
        result = cursor;
View Full Code Here

      }
    }
   
    Collections.sort(newlist);
   
    NodeEntity entity = new NodeEntity("/");
   
    NodeEntity extCursor = entity;
    for(int i = 0 ; i < newlist.size() ; i ++) {
     
      String str = newlist.get(i);
      if(newlist.get(i).contains("/")){
        if(i > 0 && str.contains(newlist.get(i - 1))) {
          str = str.substring(newlist.get(i - 1).length());
        } else if(i > 0 && !str.contains(newlist.get(i - 1)) && isSamePre(newlist.get(i - 1), str)) {
          extCursor = updateCursor(newlist.get(i - 1), str, entity);
          str = str.substring(getSamePre(newlist.get(i - 1), str).length());
        } else if(i > 0 && !str.contains(newlist.get(i - 1)) && !isSamePre(newlist.get(i - 1), str)) {
          extCursor = entity;
        }
        if(str.startsWith("/")){
          str = str.substring(1);
        }
        String[] array = str.split("/");
        NodeEntity cursor = extCursor;
        for(int j = 0 ; j < array.length ; j ++) {
          NodeEntity tmp = new NodeEntity(array[j]);
          cursor.add(tmp);
          cursor = tmp;
        }
        extCursor = cursor;
      } else {
        NodeEntity tmp = new NodeEntity(str);
        entity.add(tmp);
        extCursor = tmp;
      }

    }
View Full Code Here

    int a = preArray.length;
    if (curArray.length < a) {
      a = curArray.length;
    }

    NodeEntity result = null;
    NodeEntity cursor = entity;
    for (int i = 0; i < a; i++) {
      if (preArray[i].compareTo(curArray[i]) == 0) {
        Iterator<NodeEntity> iterator = cursor.getChilds().iterator();
        while (iterator.hasNext()) {
          NodeEntity tmp = iterator.next();
          if (tmp.getName().compareTo(preArray[i]) == 0) {
            cursor = tmp;
            break;
          }
        }
        result = cursor;
View Full Code Here

TOP

Related Classes of com.kylin.jbosscache.custom.gwt.shared.NodeEntity

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.