Interface Rounding.Prepared

Enclosing class:
Rounding

public static interface Rounding.Prepared
A strategy for rounding milliseconds since epoch.
  • Method Summary

    Modifier and Type Method Description
    long nextRoundingValue​(long utcMillis)
    Given the rounded value (which was potentially generated by round(long), returns the next rounding value.
    long round​(long utcMillis)
    Rounds the given value.
  • Method Details

    • round

      long round​(long utcMillis)
      Rounds the given value.
    • nextRoundingValue

      long nextRoundingValue​(long utcMillis)
      Given the rounded value (which was potentially generated by round(long), returns the next rounding value. For example, with interval based rounding, if the interval is 3, nextRoundValue(6) = 9.