@Test public void testSearch3a() throws IntervalTreeException , JannovarException{ IntervalTree<String> tree = new IntervalTree<String>(getIntervalList1()); List<String> qy = tree.search(20, 20); Assert.assertEquals(0, qy.size()); }
public ArrayList<T> search(int low, int high) { ArrayList<Interval<T>> result = new ArrayList<Interval<T>>(); this.leftNeighbor = null; this.rightNeighbor = null; searchInterval(root, result, low, high); ArrayList<T> obtlst = new ArrayList<T>(); for (Interval<T> it : result) { obtlst.add(it.getValue()); } if (obtlst.isEmpty()) searchInbetween(low); return obtlst; }
IntervalTree implements java.io.Serializable { public ArrayList<T> search(int low, int high) { ArrayList<Interval<T>> result = new ArrayList<Interval<T>>(); this.leftNeighbor = null; this.rightNeighbor = null; searchInterval(root, result, low, high); ArrayList<T> obtlst = new ArrayList<T>(); for (Interval<T> it : result) { obtlst.add(it.getValue()); } if (obtlst.isEmpty()) searchInbetween(low); return obtlst; } }
IntervalTree implements java.io.Serializable { public ArrayList<T> search(int low, int high) { ArrayList<Interval<T>> result = new ArrayList<Interval<T>>(); this.leftNeighbor = null; this.rightNeighbor = null; searchInterval(root, result, low, high); ArrayList<T> obtlst = new ArrayList<T>(); for (Interval<T> it : result) { obtlst.add(it.getValue()); } if (obtlst.isEmpty()) searchInbetween(low); return obtlst; } private  IntervalTree();  IntervalTree(List<Interval<T>> intervals); }
IntervalTree implements java.io.Serializable { public ArrayList<T> search(int low, int high) { ArrayList<Interval<T>> result = new ArrayList<Interval<T>>(); this.leftNeighbor = null; this.rightNeighbor = null; searchInterval(root, result, low, high); ArrayList<T> obtlst = new ArrayList<T>(); for (Interval<T> it : result) { obtlst.add(it.getValue()); } if (obtlst.isEmpty()) searchInbetween(low); return obtlst; } private  IntervalTree();  IntervalTree(List<Interval<T>> intervals); ArrayList<T> search(int low, int high); T getRightNeighbor(); T getLeftNeighbor(); void debugPrint(Node<T> n); void debugPrint(); }
IntervalTree implements java.io.Serializable { public ArrayList<T> search(int low, int high) { ArrayList<Interval<T>> result = new ArrayList<Interval<T>>(); this.leftNeighbor = null; this.rightNeighbor = null; searchInterval(root, result, low, high); ArrayList<T> obtlst = new ArrayList<T>(); for (Interval<T> it : result) { obtlst.add(it.getValue()); } if (obtlst.isEmpty()) searchInbetween(low); return obtlst; } private  IntervalTree();  IntervalTree(List<Interval<T>> intervals); ArrayList<T> search(int low, int high); T getRightNeighbor(); T getLeftNeighbor(); void debugPrint(Node<T> n); void debugPrint();  }