Class DefaultPeriodDuration

java.lang.Object
org.apache.sis.internal.temporal.DefaultPeriodDuration
All Implemented Interfaces:
PeriodDuration, org.opengis.temporal.PeriodDuration

final class DefaultPeriodDuration extends Object implements PeriodDuration
Default implementation of GeoAPI period duration. 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 Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.opengis.util.InternationalString
    Components of this period duration.
    private final org.opengis.util.InternationalString
    Components of this period duration.
    private final org.opengis.util.InternationalString
    Components of this period duration.
    private final org.opengis.util.InternationalString
    Components of this period duration.
    private final org.opengis.util.InternationalString
    Components of this period duration.
    private final org.opengis.util.InternationalString
    Components of this period duration.
    private final org.opengis.util.InternationalString
    Components of this period duration.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultPeriodDuration(org.opengis.util.InternationalString years, org.opengis.util.InternationalString months, org.opengis.util.InternationalString week, org.opengis.util.InternationalString days, org.opengis.util.InternationalString hours, org.opengis.util.InternationalString minutes, org.opengis.util.InternationalString seconds)
    Creates a new duration.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Compares with given object for equality.
    org.opengis.util.InternationalString
    A positive integer, followed by the character "D", which indicated the number of days in the period.
    org.opengis.util.InternationalString
    A positive integer, followed by the character "H", which indicated the number of hours in the period.
    org.opengis.util.InternationalString
    A positive integer, followed by the character "M", which indicated the number of minutes in the period.
    org.opengis.util.InternationalString
    A positive integer, followed by the character "M", which indicated the number of months in the period.
    org.opengis.util.InternationalString
    A positive integer, followed by the character "S", which indicated the number of seconds in the period.
    org.opengis.util.InternationalString
    A positive integer, followed by the character "Y", which indicated the number of years in the period.
    int
    Hash code value of the time position.
    String representation.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • years

      private final org.opengis.util.InternationalString years
      Components of this period duration.
    • months

      private final org.opengis.util.InternationalString months
      Components of this period duration.
    • week

      private final org.opengis.util.InternationalString week
      Components of this period duration.
    • days

      private final org.opengis.util.InternationalString days
      Components of this period duration.
    • hours

      private final org.opengis.util.InternationalString hours
      Components of this period duration.
    • minutes

      private final org.opengis.util.InternationalString minutes
      Components of this period duration.
    • seconds

      private final org.opengis.util.InternationalString seconds
      Components of this period duration.
  • Constructor Details

    • DefaultPeriodDuration

      DefaultPeriodDuration(org.opengis.util.InternationalString years, org.opengis.util.InternationalString months, org.opengis.util.InternationalString week, org.opengis.util.InternationalString days, org.opengis.util.InternationalString hours, org.opengis.util.InternationalString minutes, org.opengis.util.InternationalString seconds)
      Creates a new duration.
  • Method Details

    • getYears

      public org.opengis.util.InternationalString getYears()
      Description copied from interface: PeriodDuration
      A positive integer, followed by the character "Y", which indicated the number of years in the period.
      Specified by:
      getYears in interface PeriodDuration
    • getMonths

      public org.opengis.util.InternationalString getMonths()
      Description copied from interface: PeriodDuration
      A positive integer, followed by the character "M", which indicated the number of months in the period.
      Specified by:
      getMonths in interface PeriodDuration
    • getDays

      public org.opengis.util.InternationalString getDays()
      Description copied from interface: PeriodDuration
      A positive integer, followed by the character "D", which indicated the number of days in the period.
      Specified by:
      getDays in interface PeriodDuration
    • getHours

      public org.opengis.util.InternationalString getHours()
      Description copied from interface: PeriodDuration
      A positive integer, followed by the character "H", which indicated the number of hours in the period.
      Specified by:
      getHours in interface PeriodDuration
    • getMinutes

      public org.opengis.util.InternationalString getMinutes()
      Description copied from interface: PeriodDuration
      A positive integer, followed by the character "M", which indicated the number of minutes in the period.
      Specified by:
      getMinutes in interface PeriodDuration
    • getSeconds

      public org.opengis.util.InternationalString getSeconds()
      Description copied from interface: PeriodDuration
      A positive integer, followed by the character "S", which indicated the number of seconds in the period.
      Specified by:
      getSeconds in interface PeriodDuration
    • 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