Package com.iizix.license.history
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 SummaryFields
- Constructor SummaryConstructorsConstructorDescription- ActivationChange- (LicensingHistoryEvent event, String msg) Constructor from a history event and a message.- ActivationChange- (String string) Constructor from a String.
- Method SummaryModifier and TypeMethodDescription- intCompares two entries.- booleanChecks for equality.- getEvent()Gets the history event.Gets the message.- long- getTime()Gets the time in milliseconds since the epoch when the change occurred.Produces an internal string representation of this change in a String that can be parsed by the constructor- ActivationChange(String).- int- hashCode()Gets the hash code.- toString()Produces a textual entry for the event.
- Field Details- timeprotected long timeThe creation time in milliseconds since epoch.
- eventThe history event that caused the change.
- msgThe message.
- hashCodeprotected int hashCodeThe hash code cache, zero for none.
 
- Constructor Details- ActivationChangeConstructor from a String.- Parameters:
- string- The string of changes.
- Throws:
- NullPointerException- If string is null.
- NumberFormatException- If numbers cannot be parsed.
- IllegalArgumentException- If the string event is wrong.
 
- ActivationChangeConstructor from a history event and a message.- Parameters:
- event- The history event.
- msg- The message.
- Throws:
- NullPointerException- If event or msg is null.
 
 
- Method Details- getTimepublic long getTime()Gets the time in milliseconds since the epoch when the change occurred.- Returns:
- Time in milliseconds since the epoch
 
- getEventGets the history event.- Returns:
- The history event.
 
- getMessageGets the message.- Returns:
- The message string, never null.
 
- getUnparsedStringProduces 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".
 
- toStringProduces a textual entry for the event.
- equalsChecks for equality.
- hashCodepublic int hashCode()Gets the hash code.
- compareToCompares two entries.- Specified by:
- compareToin 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.