Class DefaultPeriod

java.lang.Object
org.apache.sis.internal.temporal.DefaultPeriod
All Implemented Interfaces:
Period, org.opengis.temporal.TemporalPrimitive

final class DefaultPeriod extends Object implements Period
Default implementation of GeoAPI period. This is a temporary class; GeoAPI temporal interfaces are expected to change a lot in a future revision.
Since:
1.2
Version:
1.2
  • Field Details

    • beginning

      private final Instant beginning
      Bounds making this period.
    • ending

      private final Instant ending
      Bounds making this period.
  • Constructor Details

    • DefaultPeriod

      DefaultPeriod(Instant beginning, Instant ending)
      Creates a new period with the given bounds.
  • Method Details

    • getBeginning

      public Instant getBeginning()
      The beginning instant at which this period starts.
      Specified by:
      getBeginning in interface Period
      Returns:
      The beginning instant.
    • getEnding

      public Instant getEnding()
      The ending instant at which this period ends.
      Specified by:
      getEnding in interface Period
      Returns:
      The end instant.
    • toString

      public String toString()
      String representation.
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Hash code value of the time position.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Compares with given object for equality.
      Overrides:
      equals in class Object