public final class ConditionMessage extends 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 a
ConditionMessage.ItemsBuilder for a condition. |
static class |
ConditionMessage.Style
Render styles.
|
Modifier and Type | Method and Description |
---|---|
ConditionMessage.Builder |
andCondition(Class<? extends Annotation> condition,
Object... details)
Return a new builder to construct a new
ConditionMessage based on the
instance and a new condition outcome. |
ConditionMessage.Builder |
andCondition(String condition,
Object... details)
Return a new builder to construct a new
ConditionMessage based on the
instance and a new condition outcome. |
ConditionMessage |
append(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(Object obj) |
static ConditionMessage.Builder |
forCondition(Class<? extends Annotation> condition,
Object... details)
Factory method for a builder to construct a new
ConditionMessage for a
condition. |
static ConditionMessage.Builder |
forCondition(String condition,
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(Collection<? extends ConditionMessage> messages)
Factory method to create a new
ConditionMessage comprised of the specified
messages. |
static ConditionMessage |
of(String message,
Object... args)
Factory method to create a new
ConditionMessage with a specific message. |
String |
toString() |
public boolean isEmpty()
true
if the message is empty.public ConditionMessage append(String message)
ConditionMessage
based on the instance and an appended
message.message
- the message to appendConditionMessage
instancepublic ConditionMessage.Builder andCondition(Class<? extends Annotation> condition, 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(String condition, 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
.ConditionMessage
public static ConditionMessage of(String message, Object... args)
ConditionMessage
with a specific message.message
- the source message (may be a format string if args
are
specifiedargs
- format arguments for the messageConditionMessage
instancepublic static ConditionMessage of(Collection<? extends ConditionMessage> messages)
ConditionMessage
comprised of the specified
messages.messages
- the source messages (may be null
ConditionMessage
instancepublic static ConditionMessage.Builder forCondition(Class<? extends Annotation> condition, 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(String condition, Object... details)
ConditionMessage
for a
condition.condition
- the conditiondetails
- details of the conditionConditionMessage.Builder
builderforCondition(Class, Object...)
,
andCondition(String, Object...)
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.