Package com.iizix.license.history
Class LicensingHistoryEntry
- java.lang.Object
- com.iizix.license.history.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 Summary
Fields Modifier and Type Field Description protected long
dateTime
The date and time.protected LicensingHistoryEvent
event
The event type.protected java.lang.String
text
The text.
Constructor Summary
Constructors Constructor Description LicensingHistoryEntry(long dateTime, LicensingHistoryEvent event, java.lang.String text)
Constructs a new entry.LicensingHistoryEntry(LicensingHistoryEvent event, java.lang.String text)
Constructs a new entry created now.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Checks for two equal events.long
getDateTime()
Gets the date and time.LicensingHistoryEvent
getEvent()
Gets the history event.java.lang.String
getText()
Gets the text for the event.int
hashCode()
Hash code.java.lang.String
toString()
Prints a nice toString() output for debug.
Field Detail
dateTime
protected long dateTime
The date and time.
event
protected LicensingHistoryEvent event
The event type.
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
- Ifevent
ortext
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
- Ifevent
ortext
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.
getEvent
public LicensingHistoryEvent getEvent()
Gets the history event.- Returns:
- The event instance.
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 classjava.lang.Object
- Parameters:
o
- Other object to compare with.- Returns:
- true if both are equal.
hashCode
public int hashCode()
Hash code.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- Returns the hash code.
toString
public java.lang.String toString()
Prints a nice toString() output for debug.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The String.