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.SerializableA single entry in the license history.- Author:
- Christopher Mindus
- See Also:
- Serialized Form
Field Summary
Fields Modifier and Type Field Description protected longdateTimeThe date and time.protected LicensingHistoryEventeventThe event type.protected java.lang.StringtextThe 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 booleanequals(java.lang.Object o)Checks for two equal events.longgetDateTime()Gets the date and time.LicensingHistoryEventgetEvent()Gets the history event.java.lang.StringgetText()Gets the text for the event.inthashCode()Hash code.java.lang.StringtoString()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- Ifeventortextis 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- Ifeventortextis 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:
equalsin classjava.lang.Object- Parameters:
o- Other object to compare with.- Returns:
- true if both are equal.
hashCode
public int hashCode()
Hash code.- Overrides:
hashCodein classjava.lang.Object- Returns:
- Returns the hash code.
toString
public java.lang.String toString()
Prints a nice toString() output for debug.- Overrides:
toStringin classjava.lang.Object- Returns:
- The String.