@@ -0,0 +1,522 @@
+package com.github.davidmoten.rtree;%0A%0Aimport rx.Observable.OnSubscribe;%0Aimport rx.Subscriber;%0A%0Afinal class OnSubscribeNearest implements OnSubscribe%3CEntry%3E %7B%0A%0A%09private final Node node;%0A%09private final int k;%0A%09private final Rectangle r;%0A%0A%09public OnSubscribeNearest(Node node, Rectangle r, int k) %7B%0A%09%09this.node = node;%0A%09%09this.r = r;%0A%09%09this.k = k;%0A%09%7D%0A%0A%09@Override%0A%09public void call(Subscriber%3C? super Entry%3E subscriber) %7B%0A%09%09node.nearest(r, k, subscriber);%0A%09%09if (!subscriber.isUnsubscribed())%0A%09%09%09subscriber.onCompleted();%0A%09%7D%0A%0A%7D%0A

add nearest shell