Package io.keikai.util
Class SpareSpan
java.lang.Object
io.keikai.util.SpareSpan
- Author:
- jumperchen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSpan(int start, int length) voidclear()voiddeleteSpan(int start, int length) deleteSpanAt(int sj) voidextend(int index, int size) Split the span at index and extends the index with the size.voidextendAndMerge(int index, int size) Split the span at index and extends the index with the size.intgetEnd()getSpan(int index) getSpanAt(int sj) intgetStart()booleanisEmpty()removeSpans(int startIdx, int size) voidshrink(int startIdx, int size) Shrink spans that is covered from [startIdx] to [startIdx] + [size] - 1intsize()stream()
-
Constructor Details
-
SpareSpan
public SpareSpan()
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
size
public int size() -
stream
-
clear
public void clear() -
getSpan
-
getStart
public int getStart() -
getEnd
public int getEnd() -
extend
public void extend(int index, int size) Split the span at index and extends the index with the size. -
extendAndMerge
public void extendAndMerge(int index, int size) Split the span at index and extends the index with the size. -
shrink
public void shrink(int startIdx, int size) Shrink spans that is covered from [startIdx] to [startIdx] + [size] - 1 -
removeSpans
-
getSpanAt
-
deleteSpanAt
-
addSpan
public void addSpan(int start, int length) -
deleteSpan
public void deleteSpan(int start, int length)
-