Package com.iizix.license.history
Class LicensingHistory
java.lang.Object
com.iizix.license.history.LicensingHistory
- All Implemented Interfaces:
- Serializable
Class used to hold information about licensing history, i.e. what has been done and when in regards to the license.
- Author:
- Christopher Mindus
- See Also:
- Field SummaryFields
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- void- addEntries- (LicensingHistoryEntry[] entries, int startIndex) Removes all history entries before the specified index.- void- addEntry- (LicensingHistoryEntry entry) Adds a new history entry.- void- addEntry- (LicensingHistoryEvent event, String text) Adds a new history entry.Gets all the entries.- void- list- (StringBuilder sb, String indent) Lists the history with an indent string to a StringBuilder.- int- removeAllEntriesAtAndAfter- (int index) Removes all history entries before the specified index.- toString()Produces a String representation.
- Field Details- historyList of entries.
 
- Constructor Details- LicensingHistorypublic LicensingHistory()Public constructor to create an empty history.
 
- Method Details- addEntryAdds a new history entry.- Parameters:
- event- The event.
- text- The text.
- Throws:
- NullPointerException- If- eventor- textis null.
 
- addEntryAdds a new history entry.- Parameters:
- entry- The entry to add.
- Throws:
- NullPointerException- If- eventor- textis null.
 
- removeAllEntriesAtAndAfterpublic int removeAllEntriesAtAndAfter- (int index) Removes all history entries before the specified index. In other words, this call will keep all history entries with index values less than the- indexparameter.- Parameters:
- index- The index.
- Returns:
- Number of entries removed.
 
- addEntriesRemoves all history entries before the specified index. In other words, this call will keep all history entries with index values less than the- indexparameter.- Parameters:
- entries- The entries to add.
- startIndex- The starting index.
 
- getEntriesGets all the entries.
- listLists the history with an indent string to a StringBuilder.- Parameters:
- sb- The StringBuilder.
- indent- The indent string.
 
- toStringProduces a String representation.