Class TimeStamp

java.lang.Object
com.mooltiverse.oss.nyx.entities.git.TimeStamp
All Implemented Interfaces:
Serializable, Cloneable, Comparable<TimeStamp>

public class TimeStamp extends Object implements Comparable<TimeStamp>, Cloneable, Serializable
This object is a Git timestamp value holder independent from the underlying Git implementation.
See Also:
  • Constructor Details

    • TimeStamp

      public TimeStamp(Date timeStamp, Integer offset)
      Constructor.
      Parameters:
      timeStamp - the time stamp. Cannot be null
      offset - the time zone offset in minutes relative to UTC. May be null
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(TimeStamp t)
      Specified by:
      compareTo in interface Comparable<TimeStamp>
    • getTimeStamp

      public Date getTimeStamp()
      Returns the time stamp.
      Returns:
      the time stamp. Never null.
    • getOffset

      public Integer getOffset()
      Returns the time zone offset in minutes relative to UTC.
      Returns:
      the time zone offset in minutes relative to UTC. May be null.
    • toString

      public String toString()
      Overrides:
      toString in class Object