|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.mit.jmwe.harness.result.ErrorResult<T>
T
- the type of tokens that form the multi-word expressions stored in
this resultpublic class ErrorResult<T extends IToken>
Default implementation of IErrorResult
interface.
Nested Class Summary | |
---|---|
static class |
ErrorResult.ErrorResultBuilder<T extends IToken>
An object that builds an error result. |
Constructor Summary | |
---|---|
ErrorResult(Map<String,List<IMWE<T>>> details)
Constructs the error result from a map that stores MWEs under the ID of the error class that they belong to. |
|
ErrorResult(Map<String,List<IMWE<T>>> details,
boolean reallocate)
Constructs the error result from a Map that stores multi-word
expressions under the ID of the error class that they belong to.This
constructor may or may not allocate a new internal map, depending on the
value of the reallocation flag. |
|
ErrorResult(String errorID,
List<IMWE<T>> errors)
Constructs the error result that stores the given multi-word expressions under the given ID of the error class that they belong to. |
Method Summary | ||
---|---|---|
Map<String,List<IMWE<T>>> |
getDetails()
Returns a Map that stores multi-word expressions under the ID of
the error class they belong to. |
|
int |
getNumErrors(String errorID)
Gets the number of MWEs that fall under the given error class. |
|
int |
getTotalErrors()
Returns the total number of errors for the result. |
|
String |
toString()
|
|
static
|
toString(IErrorResult<T> result)
Creates a table displaying the number of instances of each error class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ErrorResult(String errorID, List<IMWE<T>> errors)
errors
- a non-null list of error multi-word expressionserrorID
- the ID of the error class that the multi-word expressions
belong to
NullPointerException
- if the multi-word expression list is null
.public ErrorResult(Map<String,List<IMWE<T>>> details)
details
- a non-null map that stores multi-word expressions under the ID
of the error class that they belong to.
NullPointerException
- if the map is null
.public ErrorResult(Map<String,List<IMWE<T>>> details, boolean reallocate)
Map
that stores multi-word
expressions under the ID of the error class that they belong to.This
constructor may or may not allocate a new internal map, depending on the
value of the reallocation flag. If no reallocation is requested, this
constructor reuses the given map, and so subsequent changes to the source
list will affect this object.
details
- a non-null map that stores multi-word expressions under the ID
of the error class that they belong to.reallocate
- If true, will allocate a new internal map for details
NullPointerException
- if the map is null
.Method Detail |
---|
public Map<String,List<IMWE<T>>> getDetails()
IErrorResult
Map
that stores multi-word expressions under the ID of
the error class they belong to. Should never be null
.
getDetails
in interface IErrorResult<T extends IToken>
Map
that stores multi-word expressions under
the ID of the error class they belong to.public int getTotalErrors()
IErrorResult
getTotalErrors
in interface IErrorResult<T extends IToken>
public int getNumErrors(String errorID)
IErrorResult
getNumErrors
in interface IErrorResult<T extends IToken>
errorID
- the ID of the error class.
public String toString()
toString
in class Object
public static <T extends IToken> String toString(IErrorResult<T> result)
result
- a non-null error result
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |