Class RangeImpl<T extends java.time.temporal.Temporal>

  • All Implemented Interfaces:
    Range<T>

    public class RangeImpl<T extends java.time.temporal.Temporal>
    extends java.lang.Object
    implements Range<T>
    • Constructor Summary

      Constructors 
      Constructor Description
      RangeImpl​(T from, java.time.temporal.ChronoUnit range)  
      RangeImpl​(T from, T until)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      T from()
      The from part for this temporal range.
      int hashCode()  
      Range<T> next()
      Returns the range exactly after this range.
      Range<T> previous()
      Returns the range exactly before this range.
      java.util.stream.Stream<Range<T>> slice​(java.time.temporal.ChronoUnit slicing)
      Slice the temporal range into smaller sections, where each slice is at least the indicated ChronoUnit in size.
      java.lang.String toString()  
      T until()
      The until part for this temporal range.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RangeImpl

        public RangeImpl​(T from,
                         T until)
      • RangeImpl

        public RangeImpl​(T from,
                         java.time.temporal.ChronoUnit range)
    • Method Detail

      • from

        public T from()
        Description copied from interface: Range
        The from part for this temporal range.
        Specified by:
        from in interface Range<T extends java.time.temporal.Temporal>
        Returns:
        the inclusive from part
      • until

        public T until()
        Description copied from interface: Range
        The until part for this temporal range.
        Specified by:
        until in interface Range<T extends java.time.temporal.Temporal>
        Returns:
        the exclusive until part
      • slice

        public java.util.stream.Stream<Range<T>> slice​(java.time.temporal.ChronoUnit slicing)
        Description copied from interface: Range
        Slice the temporal range into smaller sections, where each slice is at least the indicated ChronoUnit in size.
        Specified by:
        slice in interface Range<T extends java.time.temporal.Temporal>
        Parameters:
        slicing - the slicing range
        Returns:
        the sliced ranges
      • previous

        public Range<T> previous()
        Description copied from interface: Range
        Returns the range exactly before this range. If the range was created using a ChronoUnit then the window will shift exactly one ChronoUnit back. If it was created using a from and until it will shift exactly the same size back.
        Specified by:
        previous in interface Range<T extends java.time.temporal.Temporal>
        Returns:
        the previous window
      • next

        public Range<T> next()
        Description copied from interface: Range
        Returns the range exactly after this range. If the range was created using a ChronoUnit then the window will shift exactly one ChronoUnit forward. If it was created using a from and until it will shift exactly the same size forward.
        Specified by:
        next in interface Range<T extends java.time.temporal.Temporal>
        Returns:
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object