|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<Integer,List<AbstractErrorLogData>>
pl.edu.agh.cast.importer.base.stat.ErrorsLog
public class ErrorsLog
Errors log, which extends a HashMap, mapping row numbers to errors that had occurred within the rows. It
contains a List of AbstractErrorLogData for every row number.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
| Constructor Summary | |
|---|---|
ErrorsLog()
The default constructor. |
|
| Method Summary | |
|---|---|
List<AbstractErrorLogData> |
allValues()
Retrieves all error log data held within the errors log, regardless of the keys (row numbers) they are associated with. |
List<AbstractErrorLogData> |
append(Integer key,
AbstractErrorLogData value)
Associates the specified error value with the specified key (row number) in this map. |
List<AbstractErrorLogData> |
append(Integer key,
List<AbstractErrorLogData> values)
Associates the specified error values with the specified key (row number) in this map. |
void |
clear()
|
int |
getErroneousRowsCount()
Retrieves the number of all errant data rows. |
List<AbstractErrorLogData> |
getErrorsByType(ErrorType type)
Retrieves errors that are of specified error type. |
int |
getErrorsCount()
Retrieves the number of errors of type ERROR. |
Map<ErrorType,Integer> |
getErrorTypesWithOccurrences()
Retrieves error types mapped to the number of its occurrences. |
int |
getWarningsCount()
Retrieves the number of errors of type WARNING. |
boolean |
isRedoAvailable()
Checks whether the redo operation is available. |
boolean |
isUndoAvailable()
Checks whether the undo operation is available. |
Set<Integer> |
keySet()
|
Map<Integer,List<AbstractErrorLogData>> |
redoOperation()
Redoes row index to errors map removal operation by removing again the map that had previously been removed and restored with use of an undo operation. |
List<AbstractErrorLogData> |
remove(Object obj)
|
void |
removeErrors(Map<Integer,List<AbstractErrorLogData>> errorsMap)
Delegate method with default ignored flag set to true. |
void |
removeErrors(Map<Integer,List<AbstractErrorLogData>> errorsMap,
boolean ignored)
Removes row index to errors map and saves it to an undo cache in order for an undo operation to be available (if the ignored flag is not set), or saves the errors to the ignored errors cache in order for them to be available if the ignored option is turned off. |
void |
restoreIgnoredError(int rowIndex)
Restores the errors for a row of specified index. |
void |
setHeaderRowIdx(int headerRowIdx)
|
Map<Integer,List<AbstractErrorLogData>> |
undoOperation()
Undoes row index to errors map removal operation by restoring the row index to errors map, which was removed last. |
| Methods inherited from class java.util.HashMap |
|---|
clone, containsKey, containsValue, entrySet, get, isEmpty, put, putAll, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public ErrorsLog()
| Method Detail |
|---|
public List<AbstractErrorLogData> append(Integer key,
AbstractErrorLogData value)
key - the key being a row numbervalue - the value being an error information
public List<AbstractErrorLogData> append(Integer key,
List<AbstractErrorLogData> values)
key - the key being a row numbervalues - the values the being error informations
public List<AbstractErrorLogData> allValues()
public Map<Integer,List<AbstractErrorLogData>> undoOperation()
public Map<Integer,List<AbstractErrorLogData>> redoOperation()
public void removeErrors(Map<Integer,List<AbstractErrorLogData>> errorsMap,
boolean ignored)
errorsMap - the row index to errors mapignored - flag indicating whether the removed errors should be ignored (or deleted)public void removeErrors(Map<Integer,List<AbstractErrorLogData>> errorsMap)
ignored flag set to true.
removeErrors(Map, boolean)public void restoreIgnoredError(int rowIndex)
rowIndex - the row index whose errors are to be restoredpublic Set<Integer> keySet()
keySet in interface Map<Integer,List<AbstractErrorLogData>>keySet in class HashMap<Integer,List<AbstractErrorLogData>>HashMap.keySet()public List<AbstractErrorLogData> remove(Object obj)
remove in interface Map<Integer,List<AbstractErrorLogData>>remove in class HashMap<Integer,List<AbstractErrorLogData>>HashMap.remove(java.lang.Object)public void clear()
clear in interface Map<Integer,List<AbstractErrorLogData>>clear in class HashMap<Integer,List<AbstractErrorLogData>>HashMap.clear()public int getErroneousRowsCount()
public int getWarningsCount()
WARNING.
public int getErrorsCount()
ERROR.
public Map<ErrorType,Integer> getErrorTypesWithOccurrences()
public List<AbstractErrorLogData> getErrorsByType(ErrorType type)
type - the error type
public boolean isUndoAvailable()
true if undo available, false otherwisepublic boolean isRedoAvailable()
true if redo available, false otherwisepublic void setHeaderRowIdx(int headerRowIdx)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||