public final class SimpleConditionEvent extends java.lang.Object implements ConditionEvent
ConditionEvent.Handler
Constructor and Description |
---|
SimpleConditionEvent(java.lang.Object correspondingObject,
boolean conditionSatisfied,
java.lang.String message) |
Modifier and Type | Method and Description |
---|---|
void |
addInvertedTo(ConditionEvents events)
Adds the 'opposite' of the event.
|
void |
describeTo(CollectsLines messages)
Adds a textual description of this event to the supplied
CollectsLines . |
void |
handleWith(ConditionEvent.Handler handler)
Supplies the corresponding objects and description to the supplied handler.
|
boolean |
isViolation() |
static ConditionEvent |
satisfied(java.lang.Object correspondingObject,
java.lang.String message) |
java.lang.String |
toString() |
static ConditionEvent |
violated(java.lang.Object correspondingObject,
java.lang.String message) |
public SimpleConditionEvent(java.lang.Object correspondingObject, boolean conditionSatisfied, java.lang.String message)
public boolean isViolation()
isViolation
in interface ConditionEvent
public void addInvertedTo(ConditionEvents events)
ConditionEvent
ConditionEvent.isViolation()
inverted.addInvertedTo
in interface ConditionEvent
events
- The events to add the 'inverted self' topublic void describeTo(CollectsLines messages)
ConditionEvent
CollectsLines
.describeTo
in interface ConditionEvent
messages
- The message lines to append the description to.public void handleWith(ConditionEvent.Handler handler)
ConditionEvent
handleWith
in interface ConditionEvent
handler
- The handler to supply the data of this event to.public java.lang.String toString()
toString
in class java.lang.Object
public static ConditionEvent violated(java.lang.Object correspondingObject, java.lang.String message)
public static ConditionEvent satisfied(java.lang.Object correspondingObject, java.lang.String message)