public final class ConditionEvents extends java.lang.Object implements java.lang.Iterable<ConditionEvent>
Constructor and Description |
---|
ConditionEvents() |
Modifier and Type | Method and Description |
---|---|
void |
add(ConditionEvent event) |
boolean |
containViolation() |
void |
describeFailuresTo(CollectsLines messages) |
java.util.Collection<ConditionEvent> |
getAllowed() |
java.util.Collection<ConditionEvent> |
getViolating() |
void |
handleViolations(ViolationHandler<?> violationHandler)
Passes violations to the supplied
ViolationHandler . |
boolean |
isEmpty() |
java.util.Iterator<ConditionEvent> |
iterator() |
java.lang.String |
toString() |
public void add(ConditionEvent event)
public java.util.Collection<ConditionEvent> getViolating()
public java.util.Collection<ConditionEvent> getAllowed()
public boolean containViolation()
public boolean isEmpty()
public void describeFailuresTo(CollectsLines messages)
public void handleViolations(ViolationHandler<?> violationHandler)
ViolationHandler
. The passed violations will automatically
be filtered by the reified type of the given ViolationHandler
. That is, if a
ViolationHandler<SomeClass>
is passed, only violations by objects assignable to
SomeClass
will be reported. The term 'reified' means, that the type parameter
was not erased, i.e. ArchUnit can still determine the actual type parameter of the passed violation handler,
otherwise the upper bound, in extreme cases Object
, will be used (i.e. all violations will be passed).violationHandler
- The violation handler that is supposed to handle all violations matching the
respective type parameterpublic java.util.Iterator<ConditionEvent> iterator()
iterator
in interface java.lang.Iterable<ConditionEvent>
public java.lang.String toString()
toString
in class java.lang.Object