Class TemporalUnitLessThanOffset

    • Constructor Summary

      Constructors 
      Constructor Description
      TemporalUnitLessThanOffset​(long value, java.time.temporal.TemporalUnit unit)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getBeyondOffsetDifferenceDescription​(java.time.temporal.Temporal temporal1, java.time.temporal.Temporal temporal2)
      Returns description of the difference between temporal values and expected offset details.
      boolean isBeyondOffset​(java.time.temporal.Temporal temporal1, java.time.temporal.Temporal temporal2)
      Checks if difference between temporal values is less then offset.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TemporalUnitLessThanOffset

        public TemporalUnitLessThanOffset​(long value,
                                          java.time.temporal.TemporalUnit unit)
    • Method Detail

      • isBeyondOffset

        public boolean isBeyondOffset​(java.time.temporal.Temporal temporal1,
                                      java.time.temporal.Temporal temporal2)
        Checks if difference between temporal values is less then offset.
        Parameters:
        temporal1 - first temporal value to be validated against second temporal value.
        temporal2 - second temporal value.
        Returns:
        true if difference between temporal values is more or equal to offset value.
      • getBeyondOffsetDifferenceDescription

        public java.lang.String getBeyondOffsetDifferenceDescription​(java.time.temporal.Temporal temporal1,
                                                                     java.time.temporal.Temporal temporal2)
        Returns description of the difference between temporal values and expected offset details. Is designed for the case when difference is beyond offset.
        Specified by:
        getBeyondOffsetDifferenceDescription in interface TemporalOffset<java.time.temporal.Temporal>
        Overrides:
        getBeyondOffsetDifferenceDescription in class TemporalUnitOffset
        Parameters:
        temporal1 - first temporal value which is being validated against second temporal value.
        temporal2 - second temporal value.
        Returns:
        difference description.