|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.myJava.util.history.DefaultHistory
public class DefaultHistory
Nested Class Summary | |
---|---|
protected static class |
DefaultHistory.GregorianCalendarComparator
|
Field Summary | |
---|---|
protected java.util.HashMap |
content
|
protected java.io.File |
file
|
protected FileTool |
tool
|
Constructor Summary | |
---|---|
DefaultHistory(java.io.File file)
|
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()
Close the history and writes its content. |
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 h)
Imports the content of the source history |
boolean |
isEmpty()
Tells whether the history is empty or not |
void |
load()
Load the history from disk |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.File file
protected java.util.HashMap content
protected FileTool tool
Constructor Detail |
---|
public DefaultHistory(java.io.File file) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public boolean isEmpty()
History
isEmpty
in interface History
public void importHistory(History h) throws java.io.IOException
History
importHistory
in interface History
java.io.IOException
public void addEntry(HistoryEntry entry) throws java.io.IOException
History
addEntry
in interface History
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface History
java.io.IOException
public void clearData()
History
clearData
in interface History
public java.util.HashMap getContent()
History
getContent
in interface History
History.getContent()
public java.util.GregorianCalendar[] getOrderedKeys()
History
getOrderedKeys
in interface History
public HistoryEntry getEntry(java.util.GregorianCalendar date)
History
getEntry
in interface History
public void clear()
History
clear
in interface History
public void load() throws java.io.IOException
History
load
in interface History
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |