Class ActivationChange

java.lang.Object
com.iizix.license.history.ActivationChange
All Implemented Interfaces:
Serializable, Comparable<ActivationChange>

public final class ActivationChange extends Object implements Serializable, Comparable<ActivationChange>
Class handling a single activation change event.
Author:
Christopher Mindus
See Also:
  • Field Details

    • time

      protected long time
      The creation time in milliseconds since epoch.
    • event

      protected LicensingHistoryEvent event
      The history event that caused the change.
    • msg

      protected String msg
      The message.
    • hashCode

      protected int hashCode
      The hash code cache, zero for none.
  • Constructor Details

  • Method Details

    • getTime

      public long getTime()
      Gets the time in milliseconds since the epoch when the change occurred.
      Returns:
      Time in milliseconds since the epoch
    • getEvent

      public LicensingHistoryEvent getEvent()
      Gets the history event.
      Returns:
      The history event.
    • getMessage

      public String getMessage()
      Gets the message.
      Returns:
      The message string, never null.
    • getUnparsedString

      public String getUnparsedString()
      Produces an internal string representation of this change in a String that can be parsed by the constructor ActivationChange(String).
      Returns:
      A string formatted as "epochTimeInMillis,eventValue,message".
    • toString

      public String toString()
      Produces a textual entry for the event.
      Overrides:
      toString in class Object
      Returns:
      A string formatted as "31 jan 2014 23:59:59.123 [Event] Message".
    • equals

      public boolean equals(Object o)
      Checks for equality.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Gets the hash code.
      Overrides:
      hashCode in class Object
      Returns:
      A hash code of this entry.
    • compareTo

      public int compareTo(ActivationChange o)
      Compares two entries.
      Specified by:
      compareTo in interface Comparable<ActivationChange>
      Parameters:
      o - The other entry.
      Returns:
      a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.