Class NodeBase
java.lang.Object
org.locationtech.jts.index.bintree.NodeBase
The base class for nodes in a
Bintree
.- Version:
- 1.7
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllItems
(List items) void
addAllItemsFromOverlapping
(Interval interval, Collection resultItems) Adds items in the tree which potentially overlap the query interval to the given collection.(package private) int
depth()
getItems()
static int
getSubnodeIndex
(Interval interval, double centre) Returns the index of the subnode that wholely contains the given interval.boolean
boolean
hasItems()
boolean
protected abstract boolean
isSearchMatch
(Interval interval) (package private) int
nodeSize()
boolean
Removes a single item from this subtree.(package private) int
size()
-
Field Details
-
items
-
subnode
subnodes are numbered as follows: 0 | 1
-
-
Constructor Details
-
NodeBase
public NodeBase()
-
-
Method Details
-
getSubnodeIndex
Returns the index of the subnode that wholely contains the given interval. If none does, returns -1. -
getItems
-
add
-
addAllItems
-
isSearchMatch
-
addAllItemsFromOverlapping
Adds items in the tree which potentially overlap the query interval to the given collection. If the query interval is null, add all items in the tree.- Parameters:
interval
- a query interval, or nullresultItems
- the candidate items found
-
remove
Removes a single item from this subtree.- Parameters:
itemInterval
- the envelope containing the itemitem
- the item to remove- Returns:
true
if the item was found and removed
-
isPrunable
public boolean isPrunable() -
hasChildren
public boolean hasChildren() -
hasItems
public boolean hasItems() -
depth
int depth() -
size
int size() -
nodeSize
int nodeSize()
-