Пример #1
0
  /** @see prefuse.data.util.Index#rows(int, int, int) */
  public IntIterator rows(int lo, int hi, int type) {
    if (!(m_index instanceof IntIntSortedMap)) throw new IllegalStateException();

    boolean reverse = (type & Index.TYPE_DESCENDING) > 0;
    boolean linc = (type & Index.TYPE_LEFT_INCLUSIVE) > 0;
    boolean hinc = (type & Index.TYPE_RIGHT_INCLUSIVE) > 0;

    IntIntSortedMap index = (IntIntSortedMap) m_index;
    if (reverse) {
      return index.valueRangeIterator(hi, hinc, lo, linc);
    } else {
      return index.valueRangeIterator(lo, linc, hi, hinc);
    }
  }