Class RelativeDate.Precision

java.lang.Object
org.fastnate.util.RelativeDate.Precision
Enclosing class:
RelativeDate

public static final class RelativeDate.Precision extends Object
The precision of a difference between a reference date and a date property.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final long
    The precision of the unit in milliseconds.
    private final String
    The name of the unit of this precision.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Precision(String unit, long millis)
    Creates a new Precision instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    The precision of the unit in milliseconds.
    The name of the unit of this precision.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • unit

      private final String unit
      The name of the unit of this precision.
    • millis

      private final long millis
      The precision of the unit in milliseconds.
  • Constructor Details

    • Precision

      Precision(String unit, long millis)
      Creates a new Precision instance.
      Parameters:
      unit - The name of the unit of this precision.
      millis - The precision of the unit in milliseconds.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getUnit

      public String getUnit()
      The name of the unit of this precision.
    • getMillis

      public long getMillis()
      The precision of the unit in milliseconds.