public final class ConditionMessage
extends java.lang.Object
ConditionOutcome. Provides a fluent builder style
API to encourage consistency across all condition messages.| Modifier and Type | Class and Description |
|---|---|
class |
ConditionMessage.Builder
Builder used to create a
ConditionMessage for a condition. |
class |
ConditionMessage.ItemsBuilder
Builder used to create an
ConditionMessage.ItemsBuilder for a condition. |
static class |
ConditionMessage.Style
Render styles.
|
| Modifier and Type | Method and Description |
|---|---|
ConditionMessage.Builder |
andCondition(java.lang.Class<? extends java.lang.annotation.Annotation> condition,
java.lang.Object... details)
Return a new builder to construct a new
ConditionMessage based on the
instance and a new condition outcome. |
ConditionMessage.Builder |
andCondition(java.lang.String condition,
java.lang.Object... details)
Return a new builder to construct a new
ConditionMessage based on the
instance and a new condition outcome. |
ConditionMessage |
append(java.lang.String message)
Return a new
ConditionMessage based on the instance and an appended
message. |
static ConditionMessage |
empty()
Factory method to return a new empty
ConditionMessage. |
boolean |
equals(java.lang.Object obj) |
static ConditionMessage.Builder |
forCondition(java.lang.Class<? extends java.lang.annotation.Annotation> condition,
java.lang.Object... details)
Factory method for a builder to construct a new
ConditionMessage for a
condition. |
static ConditionMessage.Builder |
forCondition(java.lang.String condition,
java.lang.Object... details)
Factory method for a builder to construct a new
ConditionMessage for a
condition. |
int |
hashCode() |
boolean |
isEmpty()
Return
true if the message is empty. |
static ConditionMessage |
of(java.util.Collection<? extends ConditionMessage> messages)
Factory method to create a new
ConditionMessage comprised of the specified
messages. |
static ConditionMessage |
of(java.lang.String message,
java.lang.Object... args)
Factory method to create a new
ConditionMessage with a specific message. |
java.lang.String |
toString() |
public boolean isEmpty()
true if the message is empty.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic ConditionMessage append(java.lang.String message)
ConditionMessage based on the instance and an appended
message.message - the message to appendConditionMessage instancepublic ConditionMessage.Builder andCondition(java.lang.Class<? extends java.lang.annotation.Annotation> condition, java.lang.Object... details)
ConditionMessage based on the
instance and a new condition outcome.condition - the conditiondetails - details of the conditionConditionMessage.Builder builderandCondition(String, Object...),
forCondition(Class, Object...)public ConditionMessage.Builder andCondition(java.lang.String condition, java.lang.Object... details)
ConditionMessage based on the
instance and a new condition outcome.condition - the conditiondetails - details of the conditionConditionMessage.Builder builderandCondition(Class, Object...),
forCondition(String, Object...)public static ConditionMessage empty()
ConditionMessage.ConditionMessagepublic static ConditionMessage of(java.lang.String message, java.lang.Object... args)
ConditionMessage with a specific message.message - the source message (may be a format string if args are
specified)args - format arguments for the messageConditionMessage instancepublic static ConditionMessage of(java.util.Collection<? extends ConditionMessage> messages)
ConditionMessage comprised of the specified
messages.messages - the source messages (may be null)ConditionMessage instancepublic static ConditionMessage.Builder forCondition(java.lang.Class<? extends java.lang.annotation.Annotation> condition, java.lang.Object... details)
ConditionMessage for a
condition.condition - the conditiondetails - details of the conditionConditionMessage.Builder builderforCondition(String, Object...),
andCondition(String, Object...)public static ConditionMessage.Builder forCondition(java.lang.String condition, java.lang.Object... details)
ConditionMessage for a
condition.condition - the conditiondetails - details of the conditionConditionMessage.Builder builderforCondition(Class, Object...),
andCondition(String, Object...)