Streamablepublic abstract class Rounding extends java.lang.Object implements Streamable
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Rounding.Builder |
|
static class |
Rounding.Streams |
| Constructor | Description |
|---|---|
Rounding() |
| Modifier and Type | Method | Description |
|---|---|---|
static Rounding.Builder |
builder(DateTimeUnit unit) |
|
static Rounding.Builder |
builder(TimeValue interval) |
|
abstract boolean |
equals(java.lang.Object obj) |
|
abstract int |
hashCode() |
|
abstract byte |
id() |
|
abstract long |
nextRoundingValue(long value) |
Given the rounded value (which was potentially generated by
round(long), returns the next rounding value. |
abstract long |
round(long value) |
Rounds the given value.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitnewWriteableReader, readFrom, writeTopublic abstract byte id()
public abstract long round(long value)
public abstract long nextRoundingValue(long value)
round(long), returns the next rounding value. For example, with
interval based rounding, if the interval is 3, nextRoundValue(6) = 9 .value - The current rounding valuepublic abstract boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic abstract int hashCode()
hashCode in class java.lang.Objectpublic static Rounding.Builder builder(DateTimeUnit unit)
public static Rounding.Builder builder(TimeValue interval)