Enum CalendarDateUnit

    • Field Detail

      • myChronoUnit

        private final java.time.temporal.ChronoUnit myChronoUnit
      • myDurationInMillis

        private final long myDurationInMillis
      • myDurationInNanos

        private final long myDurationInNanos
      • myHalf

        private final long myHalf
      • myLabel

        private final java.lang.String myLabel
      • myTimeUnit

        private final java.util.concurrent.TimeUnit myTimeUnit
    • Constructor Detail

      • CalendarDateUnit

        private CalendarDateUnit​(java.time.temporal.ChronoUnit chronoUnit,
                                 long millis,
                                 java.lang.String label)
      • CalendarDateUnit

        private CalendarDateUnit​(java.time.temporal.ChronoUnit chronoUnit,
                                 java.util.concurrent.TimeUnit timeUnit,
                                 java.lang.String label)
    • Method Detail

      • values

        public static CalendarDateUnit[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (CalendarDateUnit c : CalendarDateUnit.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CalendarDateUnit valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • addTo

        public <R extends java.time.temporal.Temporal> R addTo​(R temporal,
                                                               long amount)
        Specified by:
        addTo in interface java.time.temporal.TemporalUnit
      • adjustInto

        public java.time.temporal.Temporal adjustInto​(java.time.temporal.Temporal temporal)
        Specified by:
        adjustInto in interface java.time.temporal.TemporalAdjuster
      • between

        public long between​(java.time.temporal.Temporal temporal1Inclusive,
                            java.time.temporal.Temporal temporal2Exclusive)
        Specified by:
        between in interface java.time.temporal.TemporalUnit
      • convert

        public double convert​(double sourceDurationMeasure,
                              CalendarDateUnit sourceDurationUnit)
      • convert

        public long convert​(long sourceMeassure,
                            CalendarDateUnit sourceUnit)
      • count

        public long count​(long aFromValue,
                          long aToValue)
      • get

        public long get​(java.time.temporal.TemporalUnit unit)
      • getChronoUnit

        public java.util.Optional<java.time.temporal.ChronoUnit> getChronoUnit()
      • getDuration

        public java.time.Duration getDuration()
        Specified by:
        getDuration in interface java.time.temporal.TemporalUnit
      • getLabel

        public java.lang.String getLabel()
      • getTimeUnit

        public java.util.Optional<java.util.concurrent.TimeUnit> getTimeUnit()
      • getUnits

        public java.util.List<java.time.temporal.TemporalUnit> getUnits()
      • isCalendarUnit

        public boolean isCalendarUnit()
      • isDateBased

        public boolean isDateBased()
        Specified by:
        isDateBased in interface java.time.temporal.TemporalUnit
      • isDurationEstimated

        public boolean isDurationEstimated()
        Specified by:
        isDurationEstimated in interface java.time.temporal.TemporalUnit
      • isTimeBased

        public boolean isTimeBased()
        Specified by:
        isTimeBased in interface java.time.temporal.TemporalUnit