Class WindowsPeSection.Builder
java.lang.Object
security.whisper.javastix.coo.types.WindowsPeSection.Builder
- Enclosing class:
WindowsPeSection
Builds instances of type
WindowsPeSection.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newWindowsPeSection.final WindowsPeSection.BuildercustomProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.final WindowsPeSection.Builderentropy(float entropy) Initializes the optional valueentropyto entropy.final WindowsPeSection.BuilderInitializes the optional valueentropyto entropy.final WindowsPeSection.Builderfrom(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.final WindowsPeSection.Builderfrom(WindowsPeSectionObj instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.types.WindowsPeSectionObjinstance.final WindowsPeSection.BuilderSets or replaces all mappings from the specified map as entries for thehashesmap.final WindowsPeSection.BuilderInitializes the optional valuenameto name.final WindowsPeSection.BuilderInitializes the optional valuenameto name.final WindowsPeSection.BuilderputAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.final WindowsPeSection.BuilderputAllHashes(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tohashesmap.final WindowsPeSection.BuilderputCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.final WindowsPeSection.BuilderputCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.final WindowsPeSection.BuilderPut one entry to thehashesmap.final WindowsPeSection.BuilderPut one entry to thehashesmap.final WindowsPeSection.Buildersize(long size) Initializes the optional valuesizeto size.final WindowsPeSection.BuilderInitializes the optional valuesizeto size.
-
Method Details
-
from
Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.types.WindowsPeSectionObjinstance.- 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.common.StixCustomPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the optional valuenameto name.- Parameters:
name- The value for name- Returns:
thisbuilder for chained invocation
-
name
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the name of the section.") public final WindowsPeSection.Builder name(Optional<String> name) Initializes the optional valuenameto name.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
size
Initializes the optional valuesizeto size.- Parameters:
size- The value for size- Returns:
thisbuilder for chained invocation
-
size
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the size of the section, in bytes.") public final WindowsPeSection.Builder size(Optional<Long> size) Initializes the optional valuesizeto size.- Parameters:
size- The value for size- Returns:
thisbuilder for use in a chained invocation
-
entropy
Initializes the optional valueentropyto entropy.- Parameters:
entropy- The value for entropy- Returns:
thisbuilder for chained invocation
-
entropy
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the calculated entropy for the section, as calculated using the Shannon algorithm.") public final WindowsPeSection.Builder entropy(Optional<Float> entropy) Initializes the optional valueentropyto entropy.- Parameters:
entropy- The value for entropy- Returns:
thisbuilder for use in a chained invocation
-
putHash
Put one entry to thehashesmap.- Parameters:
key- The key in the hashes mapvalue- The associated value in the hashes map- Returns:
thisbuilder for use in a chained invocation
-
putHash
@CanIgnoreReturnValue public final WindowsPeSection.Builder putHash(Map.Entry<String, ? extends String> entry) Put one entry to thehashesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
hashes
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies any hashes computed over the section.") public final WindowsPeSection.Builder hashes(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for thehashesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the hashes map- Returns:
thisbuilder for use in a chained invocation
-
putAllHashes
@CanIgnoreReturnValue public final WindowsPeSection.Builder putAllHashes(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tohashesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the hashes map- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
@CanIgnoreReturnValue public final WindowsPeSection.Builder putCustomProperty(String key, Object value) 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 WindowsPeSection.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 WindowsPeSection.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 WindowsPeSection.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 newWindowsPeSection.- Returns:
- An immutable instance of WindowsPeSection
- Throws:
IllegalStateException- if any required attributes are missing
-