MCPcopy
hub / github.com/google/guava / split

Method split

guava/src/com/google/common/collect/TreeRangeMap.java:261–278  ·  view source on GitHub ↗
(Cut<K> cut)

Source from the content-addressed store, hash-verified

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

Callers 2

mergeMethod · 0.95
parseMethod · 0.45

Calls 6

putRangeMapEntryMethod · 0.95
getValueMethod · 0.65
lowerEntryMethod · 0.45
compareToMethod · 0.45
getUpperBoundMethod · 0.45
getLowerBoundMethod · 0.45

Tested by

no test coverage detected