org.diyefi.openlogviewer.genericlog
Class GenericLog
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<String,GenericDataElement>
org.diyefi.openlogviewer.genericlog.GenericLog
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,GenericDataElement>
public class GenericLog
- extends LinkedHashMap<String,GenericDataElement>
- See Also:
- Serialized Form
Constructor Summary |
GenericLog(String[] headers,
int initialCapacity,
int ourLoadFactor)
provide a String array of headers
each header will be used as a HashMap key, the data related to each header will be added to an ArrayList . |
Methods inherited from interface java.util.Map |
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
recordCountKey
public static final String recordCountKey
- See Also:
- Constant Field Values
tempResetKey
public static final String tempResetKey
- See Also:
- Constant Field Values
elapsedTimeKey
public static final String elapsedTimeKey
- See Also:
- Constant Field Values
PCS
protected final PropertyChangeSupport PCS
GenericLog
public GenericLog(String[] headers,
int initialCapacity,
int ourLoadFactor)
- provide a
String
array of headers
each header will be used as a HashMap key, the data related to each header will be added to an ArrayList
.
- Parameters:
headers
- - of the data to be converted
addValue
public final void addValue(String key,
double value)
- Add a piece of data to the
ArrayList
associated with the key
- Parameters:
key
- - headervalue
- - data to be added
incrementPosition
public final void incrementPosition()
setLogStatus
public final void setLogStatus(GenericLog.LogState newLogStatus)
- Set the state of the log
- Parameters:
newLogStatus
- GenericLog.LOG_NOT_LOADED / GenericLog.LOG_LOADING / GenericLog.LOG_LOADED
getLogStatus
public final GenericLog.LogState getLogStatus()
- Returns:
- -1 if log not loaded 0 if loading or 1 if log is loaded
setMetaData
public final void setMetaData(String md)
- Add metadata This is information about the log being converted such as the location it was from or the date
This method does not add to its self so in order to add more info you must VAR.addMetaData(VAR.getMetaData() + NEWINFO)
- Parameters:
md
- meta data to be added
getMetadata
public final String getMetadata()
- Returns:
- String containing the current meta data
addPropertyChangeListener
public final void addPropertyChangeListener(String name,
PropertyChangeListener listener)
- Add a property change listener to the generic log, REQUIRED!!
GenericLog.LOG_STATUS is the name of the status property
- Parameters:
name
- listener
- new OBJECT.addPropertyChangeListener("LogLoaded", new PropertyChangeListener() {
public void propertyChange( final PropertyChangeEvent propertyChangeEvent) {
OpenLogViewerApp.getInstance().setLog((GenericLog) propertyChangeEvent.getSource());
...Insert code here...
}
});
removePropertyChangeListener
public final void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
- Remove a PropertyChangeListener
- Parameters:
propertyName
- name of listenerlistener
- listener
getLogStatusMessage
public final String getLogStatusMessage()
setLogStatusMessage
public final void setLogStatusMessage(String message)
getRecordCount
public final int getRecordCount()
clearOut
public final void clearOut()
Copyright © 2011 DIYEFI.org. All Rights Reserved.