public class SpareSpan extends Object
Constructor and Description |
---|
SpareSpan() |
Modifier and Type | Method and Description |
---|---|
void |
addSpan(int start,
int length) |
void |
clear() |
void |
deleteSpan(int start,
int length) |
Span |
deleteSpanAt(int sj) |
void |
extend(int index,
int size)
Split the span at index and extends the index with the size.
|
void |
extendAndMerge(int index,
int size)
Split the span at index and extends the index with the size.
|
int |
getEnd() |
Span |
getSpan(int index) |
Span |
getSpanAt(int sj) |
int |
getStart() |
boolean |
isEmpty() |
List<Integer> |
removeSpans(int startIdx,
int size) |
void |
shrink(int startIdx,
int size)
Shrink spans that is covered from [startIdx] to [startIdx] + [size] - 1
|
int |
size() |
Stream<Span> |
stream() |
public boolean isEmpty()
public int size()
public void clear()
public Span getSpan(int index)
public int getStart()
public int getEnd()
public void extend(int index, int size)
public void extendAndMerge(int index, int size)
public void shrink(int startIdx, int size)
public Span getSpanAt(int sj)
public Span deleteSpanAt(int sj)
public void addSpan(int start, int length)
public void deleteSpan(int start, int length)
Copyright © 2020. All rights reserved.