Class Statement.Builder
java.lang.Object
security.whisper.javastix.datamarkings.objects.Statement.Builder
- Enclosing class:
Statement
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newStatement.final Statement.BuildercustomProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.final Statement.Builderfrom(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.final Statement.Builderfrom(StatementMarkingObject instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.datamarkings.objects.StatementMarkingObjectinstance.final Statement.BuilderputAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.final Statement.BuilderputCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.final Statement.BuilderputCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.final Statement.BuilderInitializes the value for thestatementattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedsecurity.whisper.javastix.datamarkings.objects.StatementMarkingObjectinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
statement
Initializes the value for thestatementattribute.- Parameters:
statement- The value for statement (can benull)- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
Put one entry to thecustomPropertiesmap.- Parameters:
key- The key in the customProperties mapvalue- The associated value in the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
@CanIgnoreReturnValue public final Statement.Builder putCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
customProperties
@CanIgnoreReturnValue public final Statement.Builder customProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
putAllCustomProperties
@CanIgnoreReturnValue public final Statement.Builder putAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newStatement.- Returns:
- An immutable instance of StatementMarkingObject
- Throws:
IllegalStateException- if any required attributes are missing
-