Class TimeRange

java.lang.Object
com.teamdev.jxbrowser.time.TimeRange

public final class TimeRange extends Object
A range between two points in UTC Unix Epoch time.
Since:
8.8.0
  • Field Details

    • FULL

      public static final TimeRange FULL
      The maximum allowed TimeRange between 1970-01-01T00:00:00Z and 9999-12-31T23:59:59Z.
  • Method Details

    • between

      public static TimeRange between(Timestamp start, Timestamp end)
      Creates TimeRange between two points in time.
      Parameters:
      start - the start point in time
      end - the end point in time
      Throws:
      IllegalArgumentException - if start is equal or after end.
    • startingFrom

      public static TimeRange startingFrom(Timestamp start)
      Creates TimeRange from the start point and to 9999-12-31T23:59:59Z.
      Parameters:
      start - the start point in time
    • upTo

      public static TimeRange upTo(Timestamp end)
      Creates TimeRange from 1970-01-01T00:00:00Z and to the end point.
      Parameters:
      end - the end point in time
    • start

      public Timestamp start()
      Returns the start point of the time range.
    • end

      public Timestamp end()
      Returns the end point of the time range.