public abstract class AbstractSlice<InputType,ValueType> extends java.lang.Object implements Slice<InputType,ValueType>
Slice.Fixed, Slice.Flexible, Slice.Type| Modifier and Type | Field and Description |
|---|---|
private long |
tEnd |
private long |
tFirst |
private long |
tLast |
private long |
tStart |
private Slice.Type |
type |
| Constructor and Description |
|---|
AbstractSlice(long startTs,
long endTs,
Slice.Type type) |
| Modifier and Type | Method and Description |
|---|---|
void |
addElement(InputType element,
long ts)
Add a element to the slice.
|
long |
getTEnd() |
long |
getTFirst()
timestamp of the first record in the slice
|
long |
getTLast()
timestamp of the last record in the slice
|
long |
getTStart() |
Slice.Type |
getType()
The measure of the slice end.
|
void |
merge(Slice otherSlice) |
void |
setTEnd(long tEnd) |
void |
setTStart(long tStart) |
void |
setType(Slice.Type type)
Set the end of the slice
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAggStateprivate long tStart
private long tEnd
private Slice.Type type
private long tLast
private long tFirst
public AbstractSlice(long startTs,
long endTs,
Slice.Type type)
public void addElement(InputType element, long ts)
SliceaddElement in interface Slice<InputType,ValueType>element - the element which is addedts - timestamp of the elementpublic void merge(Slice otherSlice)
public long getTLast()
Slicepublic long getTFirst()
Slicepublic long getTStart()
public void setTStart(long tStart)
public long getTEnd()
public void setTEnd(long tEnd)
public Slice.Type getType()
Slicepublic void setType(Slice.Type type)
Slicepublic java.lang.String toString()
toString in class java.lang.Object