(Cut<K> cut)
| 259 | } |
| 260 | |
| 261 | private void split(Cut<K> cut) { |
| 262 | /* |
| 263 | * The comments for this method will use | to indicate the cut point and ( ) to indicate the |
| 264 | * bounds of ranges in the range map. |
| 265 | */ |
| 266 | Entry<Cut<K>, RangeMapEntry<K, V>> mapEntryToSplit = entriesByLowerBound.lowerEntry(cut); |
| 267 | if (mapEntryToSplit == null) { |
| 268 | return; |
| 269 | } |
| 270 | // we know ( | |
| 271 | RangeMapEntry<K, V> rangeMapEntry = mapEntryToSplit.getValue(); |
| 272 | if (rangeMapEntry.getUpperBound().compareTo(cut) <= 0) { |
| 273 | return; |
| 274 | } |
| 275 | // we know ( | ) |
| 276 | putRangeMapEntry(rangeMapEntry.getLowerBound(), cut, rangeMapEntry.getValue()); |
| 277 | putRangeMapEntry(cut, rangeMapEntry.getUpperBound(), rangeMapEntry.getValue()); |
| 278 | } |
| 279 | |
| 280 | /** |
| 281 | * @since 28.1 |
no test coverage detected