Class SimpleDuration

java.lang.Object
org.apache.sis.internal.simple.SimpleDuration
All Implemented Interfaces:
Duration

public class SimpleDuration extends Object implements Duration
A temporary implementation of Duration. Will probably be deleted in some future version.
Since:
1.0
Version:
1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    Duration in days.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SimpleDuration(double duration)
    Creates a new duration.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
    Compares this duration with the given object for equality.
    int
    Returns a hash code value for this duration.
    Returns a string representation of this duration.

    Methods inherited from class java.lang.Object

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

    • duration

      public final double duration
      Duration in days.
  • Constructor Details

    • SimpleDuration

      public SimpleDuration(double duration)
      Creates a new duration.
      Parameters:
      duration - the duration in days.
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this duration.
      Overrides:
      toString in class Object
      Returns:
      the duration with its unit of measurement.
    • hashCode

      public int hashCode()
      Returns a hash code value for this duration.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Compares this duration with the given object for equality.
      Overrides:
      equals in class Object
      Parameters:
      other - the object to compare with this duration.