jetbrains.buildServer.serverSide
Interface TimeInterval


public interface TimeInterval

Represents a time interval defined by two TimePoint objects. Both time points objects have the same time base for counting relative time. This means that getDurationSeconds() is always equal to (getEndPoint().getRelativeSeconds() - getStartPoint().getRelativeSeconds()) if the second timepoint isn't null. The time base for time points is specific to a partucular service that returns such an interval.

The start timepoint may be infinite (see TimePoint.NEVER). In this case the end timepoint is always null.

Author:
Sergey.Anchipolevsky Date: 20.06.2007
See Also:
TimePoint

Method Summary
 java.lang.Long getDurationSeconds()
          Returns the difference between the starting and ending points in seconds.
 TimePoint getEndPoint()
          Returns the ending point for the interval.
 TimePoint getStartPoint()
          Returns the starting point for the interval.
 

Method Detail

getStartPoint

@NotNull
TimePoint getStartPoint()
Returns the starting point for the interval.

Returns:
see above

getEndPoint

@Nullable
TimePoint getEndPoint()
Returns the ending point for the interval. May be null if the interval is open.

Returns:
see above

getDurationSeconds

@Nullable
java.lang.Long getDurationSeconds()
Returns the difference between the starting and ending points in seconds. May be null when the interval is open (no end point).

Returns:
see above