Class LicensingHistoryEntry

  • All Implemented Interfaces:
    java.io.Serializable

    public final class LicensingHistoryEntry
    extends java.lang.Object
    implements java.io.Serializable
    A single entry in the license history.
    Author:
    Christopher Mindus
    See Also:
    Serialized Form
    • Field Detail

      • dateTime

        protected long dateTime
        The date and time.
      • text

        protected java.lang.String text
        The text.
    • Constructor Detail

      • LicensingHistoryEntry

        public LicensingHistoryEntry​(LicensingHistoryEvent event,
                                     java.lang.String text)
        Constructs a new entry created now.
        Parameters:
        event - The event.
        text - The text, maximum 1000 characters.
        Throws:
        java.lang.NullPointerException - If event or text is null.
        java.lang.IllegalArgumentException - If text is longer than 1000 characters.
      • LicensingHistoryEntry

        public LicensingHistoryEntry​(long dateTime,
                                     LicensingHistoryEvent event,
                                     java.lang.String text)
        Constructs a new entry.
        Parameters:
        dateTime - The created time in milliseconds since the epoch.
        event - The event.
        text - The text, maximum 1000 characters.
        Throws:
        java.lang.NullPointerException - If event or text is null.
        java.lang.IllegalArgumentException - If text is longer than 1000 characters.
    • Method Detail

      • getDateTime

        public long getDateTime()
        Gets the date and time.
        Returns:
        Time in milliseconds since the epoch.
      • getText

        public java.lang.String getText()
        Gets the text for the event.
        Returns:
        The text string.
      • equals

        public boolean equals​(java.lang.Object o)
        Checks for two equal events.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - Other object to compare with.
        Returns:
        true if both are equal.
      • hashCode

        public int hashCode()
        Hash code.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        Returns the hash code.
      • toString

        public java.lang.String toString()
        Prints a nice toString() output for debug.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The String.