public class Message extends Object
Constructor and Description |
---|
Message(String importance,
String type,
Integer sentenceId,
Integer tokenId,
String value,
String repair)
Creates a new Message object.
|
Modifier and Type | Method and Description |
---|---|
String |
getRepair()
Returns an suggestion how to react on the error or warning.
|
Integer |
getSentenceId()
Returns the sentence number that locates the reason for the error/warning message.
|
Integer |
getTokenId()
Returns the token number that locates the reason for the error/warning message.
|
String |
getType()
Returns the type of the error/warning message.
|
String |
getValue()
Returns the value of the error/warning message.
|
boolean |
isError()
Returns true if this message is an error message, or false if it is only a warning
message.
|
String |
toString()
Returns a pretty-printed error/warning message.
|
public Message(String importance, String type, Integer sentenceId, Integer tokenId, String value, String repair)
importance
- The importance of the message, e.g. "error", "warning"type
- The type of the message, e.g. "sentence", "token"sentenceId
- The number of the problematic sentence, or null
if unknowntokenId
- The number of the problematic token, or null
if unknownvalue
- The value of the message (e.g. a misspelled word)repair
- The description that helps to resolve the error or warningpublic boolean isError()
public String getType()
public Integer getSentenceId()
public Integer getTokenId()
public String getValue()
public String getRepair()
Copyright © 2013. All Rights Reserved.