public final class Sample<V> extends Object
Constructor | Description |
---|---|
Sample() |
Modifier and Type | Method | Description |
---|---|---|
Sample<V> |
copyWithInterval(Interval newInterval) |
Clone the current Sample into a new one with the same value but different interval.
|
<T> Sample<T> |
copyWithValue(T newValue) |
Clone the current Sample into a new one with the same interval but different value.
|
static <T> Sample<T> |
of(Interval interval,
T value) |
Static factory method to instance a new Sample.
|
String |
toString() |
public static <T> Sample<T> of(Interval interval, T value)
T
- Value Java typeinterval
- Sample intervalvalue
- Sample valuepublic Sample<V> copyWithInterval(Interval newInterval)
newInterval
- The interval of the new samplepublic <T> Sample<T> copyWithValue(T newValue)
T
- Target value Java typenewValue
- The value of the new sampleCopyright © 2019. All rights reserved.