Class Interval

java.lang.Object
org.openstreetmap.josm.tools.date.Interval

public final class Interval extends Object
A timespan defined by a start and end instant.
  • Field Details

  • Constructor Details

    • Interval

      public Interval(Instant start, Instant end)
      Constructs a new Interval
      Parameters:
      start - start instant
      end - end instant
  • Method Details

    • toString

      public String toString()
      Returns an ISO 8601 compatible string
      Overrides:
      toString in class Object
      Returns:
      an ISO 8601 compatible string
    • format

      public String format()
      Formats the interval of the given track as a human readable string
      Returns:
      The interval as a string
    • getStart

      public Instant getStart()
      Returns start instant.
      Returns:
      start instant
    • getEnd

      public Instant getEnd()
      Returns end instant.
      Returns:
      end instant
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object