com.myJava.util.history
Interface History

All Known Implementing Classes:
DefaultHistory

public interface History

Interface that defines an history on events

Author:
Olivier PETRUCCI

Areca Build ID : 7299034069467778562

Method Summary
 void addEntry(HistoryEntry entry)
          Add an entry
 void clear()
          Removes all entries from the history
 void clearData()
          Does not clear the internal data; destroys only the data stored on disk.
 void flush()
          Write data on disk
 java.util.HashMap getContent()
          Return the internal content of the history as a Map
Key = GregorianCalendar
Value = HistoryEntry
 HistoryEntry getEntry(java.util.GregorianCalendar date)
          Return the entry for the given date
 java.util.GregorianCalendar[] getOrderedKeys()
          Return the keys (dates) as an ordered array
 void importHistory(History source)
          Imports the content of the source history
 boolean isEmpty()
          Tells whether the history is empty or not
 void load()
          Load the history from disk
 

Method Detail

isEmpty

boolean isEmpty()
Tells whether the history is empty or not


addEntry

void addEntry(HistoryEntry entry)
              throws java.io.IOException
Add an entry

Throws:
java.io.IOException

getContent

java.util.HashMap getContent()
Return the internal content of the history as a Map
Key = GregorianCalendar
Value = HistoryEntry


getOrderedKeys

java.util.GregorianCalendar[] getOrderedKeys()
Return the keys (dates) as an ordered array


getEntry

HistoryEntry getEntry(java.util.GregorianCalendar date)
Return the entry for the given date


flush

void flush()
           throws java.io.IOException
Write data on disk

Throws:
java.io.IOException

clear

void clear()
Removes all entries from the history


clearData

void clearData()
Does not clear the internal data; destroys only the data stored on disk.
The internal data can be written on disk using the "flush" method.


load

void load()
          throws java.io.IOException
Load the history from disk

Throws:
java.io.IOException

importHistory

void importHistory(History source)
                   throws java.io.IOException
Imports the content of the source history

Throws:
java.io.IOException