|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjitas.core.SimpleFeedback
public class SimpleFeedback
A simple implementation of the Feedback class. Messages are stored in a Map, of String-Map pairs. Messages are keys to additional data maps, which contain key-value pairs. This gives a format of: <(message, <(key, value), (key2, value2)>), (message2, <(key, value), (key2, value2)>)>
| Constructor Summary | |
|---|---|
SimpleFeedback()
Constructor - initialises globals. |
|
| Method Summary | |
|---|---|
void |
addAdditionalData(java.lang.String s,
java.lang.String key,
java.lang.String value)
Adds additional data to a message. |
void |
addMessage(java.lang.String s)
Add a message to the Errors, with no additional data. |
void |
addMessage(java.lang.String s,
java.util.Map<java.lang.String,java.lang.String> map)
Add a message to the Errors, with a Map of additional data. |
void |
addSatisfiedConstraint(java.lang.String name)
Add the name of a satisfied constraint to the collection of violated constraints. |
void |
addViolatedConstraint(java.lang.String name)
Add the name of a violated constraint to the collection of violated constraints. |
java.util.Map<java.lang.String,java.lang.String> |
getAdditionalData(java.lang.String message)
Get any additional data associated with a given message. |
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
getErrors()
Get all the errors, including all additional data |
java.util.Set<java.lang.String> |
getMessages()
Get the feedback messages, ignoring any additional data |
java.util.Set<java.lang.String> |
getRelevantConstraints()
Get all the relevant constraints of a problem |
java.util.Collection<java.lang.String> |
getSatisfiedConstraints()
Get the collection of satisfied constraint names |
java.util.Collection<java.lang.String> |
getViolatedConstraints()
Get the collection of violated constraint names |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleFeedback()
| Method Detail |
|---|
public void addMessage(java.lang.String s)
addMessage in interface Feedbacks - The message to add
public void addMessage(java.lang.String s,
java.util.Map<java.lang.String,java.lang.String> map)
addMessage in interface Feedbacks - The message to addmap - The map of additional data
public void addAdditionalData(java.lang.String s,
java.lang.String key,
java.lang.String value)
addAdditionalData in interface Feedbacks - The existing messagekey - The key for the additional datavalue - The value for the additional datapublic java.util.Set<java.lang.String> getMessages()
getMessages in interface Feedbackpublic java.util.Map<java.lang.String,java.lang.String> getAdditionalData(java.lang.String message)
getAdditionalData in interface Feedbackmessage - The message you want the additional data of
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getErrors()
getErrors in interface Feedbackpublic void addViolatedConstraint(java.lang.String name)
addViolatedConstraint in interface Feedbackname - The name of the constraint to addpublic java.util.Collection<java.lang.String> getViolatedConstraints()
getViolatedConstraints in interface Feedbackpublic java.util.Collection<java.lang.String> getSatisfiedConstraints()
getSatisfiedConstraints in interface Feedbackpublic void addSatisfiedConstraint(java.lang.String name)
addSatisfiedConstraint in interface Feedbackname - The name of the constraint to addpublic java.util.Set<java.lang.String> getRelevantConstraints()
getRelevantConstraints in interface Feedback
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||