Class Tlp.Builder
java.lang.Object
security.whisper.javastix.datamarkings.objects.Tlp.Builder
- Enclosing class:
Tlp
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newTlp.final Tlp.BuildercustomProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.final Tlp.Builderfrom(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.final Tlp.Builderfrom(TlpMarkingObject instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.datamarkings.objects.TlpMarkingObjectinstance.final Tlp.BuilderputAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.final Tlp.BuilderputCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.final Tlp.BuilderputCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.final Tlp.BuilderInitializes the value for thetlpattribute.
-
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.TlpMarkingObjectinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
tlp
Initializes the value for thetlpattribute.- Parameters:
tlp- The value for tlp (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 Tlp.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 Tlp.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 Tlp.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 newTlp.- Returns:
- An immutable instance of TlpMarkingObject
- Throws:
IllegalStateException- if any required attributes are missing
-