Interface Instant

All Superinterfaces:
Time
All Known Subinterfaces:
AbsoluteInstant, EditableRelativeInstant, RelativeInstant

public interface Instant extends Time

An Instant represents a position in a time scale. In practice, an instant is an interval whose duration is less than the resolution of the time scale.

All the Instant subclasses have to be immutable and have to provide a Chronology as well. All standard Chronology classes are also immutable.

A huge part of the documentation of this class has been retrieved from the joda-time library.

Version:
$Id$
Author:
gvSIG Team
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isAfter(Instant instant)
    Is this instant after the instant passed in comparing solely by millisecond.
    boolean
    isBefore(Instant instant)
    Is this instant before the instant passed in comparing solely by millisecond.
    boolean
    isEqual(Instant instant)
    Is this instant equal to the instant passed in comparing solely by millisecond.
    toString(String pattern)
    Output the instant using the specified format pattern.

    Methods inherited from interface org.gvsig.timesupport.Time

    getChronology, intersects, isAbsolute, isInstant, isInterval, isRelative
  • Method Details

    • isEqual

      boolean isEqual(Instant instant)
      Is this instant equal to the instant passed in comparing solely by millisecond.
      Parameters:
      instant - an instant to check against, null means now
      Returns:
      true if the instant is equal to the instant passed in
    • isAfter

      boolean isAfter(Instant instant)
      Is this instant after the instant passed in comparing solely by millisecond.
      Parameters:
      instant - an instant to check against, null means now
      Returns:
      true if the instant is after the instant passed in
    • isBefore

      boolean isBefore(Instant instant)
      Is this instant before the instant passed in comparing solely by millisecond.
      Parameters:
      instant - an instant to check against, null means now
      Returns:
      true if the instant is before the instant passed in
    • toString

      String toString(String pattern)
      Output the instant using the specified format pattern.
      Parameters:
      pattern - the pattern specification, null means use toString