Package org.apache.poi.hwpf.model

Examples of org.apache.poi.hwpf.model.PropertyNode$StartComparator


   * @return An int array of length 2. The first int is the start index and
   *         the second int is the end index.
   */
  private int[] findRange(List rpl, int min, int start, int end) {
    int x = min;
    PropertyNode node = (PropertyNode) rpl.get(x);

    while (node==null || (node.getEnd() <= start && x < rpl.size() - 1)) {
      x++;
      node = (PropertyNode) rpl.get(x);
    }

        if (node.getStart()>end) {
            return new int[] {0, 0};
        }

    if (node.getEnd() <= start) {
      return new int[] { rpl.size(), rpl.size() };
    }

    int y = x;
    node = (PropertyNode) rpl.get(y);
    while (node==null || (node.getEnd() < end && y < rpl.size() - 1)) {
      y++;
      node = (PropertyNode) rpl.get(y);
    }
    return new int[] { x, y + 1 };
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.hwpf.model.PropertyNode$StartComparator

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.