-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from davidmoten/strong-typing
strong typing of RTree entry geometry
- Loading branch information
Showing
25 changed files
with
468 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 8 additions & 6 deletions
14
src/main/java/com/github/davidmoten/rtree/NodePosition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
package com.github.davidmoten.rtree; | ||
|
||
final class NodePosition<T> { | ||
import com.github.davidmoten.rtree.geometry.Geometry; | ||
|
||
private final Node<T> node; | ||
final class NodePosition<T, S extends Geometry> { | ||
|
||
private final Node<T, S> node; | ||
private final int position; | ||
|
||
NodePosition(Node<T> node, int position) { | ||
NodePosition(Node<T, S> node, int position) { | ||
this.node = node; | ||
this.position = position; | ||
} | ||
|
||
Node<T> node() { | ||
Node<T, S> node() { | ||
return node; | ||
} | ||
|
||
int position() { | ||
return position; | ||
} | ||
|
||
NodePosition<T> nextPosition() { | ||
return new NodePosition<T>(node, position + 1); | ||
NodePosition<T, S> nextPosition() { | ||
return new NodePosition<T, S>(node, position + 1); | ||
} | ||
|
||
} |
Oops, something went wrong.