Class Statement
java.lang.Object
security.whisper.javastix.datamarkings.objects.Statement
- All Implemented Interfaces:
Serializable,StixCustomProperties,StatementMarkingObject,StixMarkingObject,GenericValidation,SdoDefaultValidator
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
@Redactable(useMask=false,
redactionMask="\u2588\u2588REDACTED\u2588\u2588")
public final class Statement
extends Object
implements StatementMarkingObject
Immutable implementation of
StatementMarkingObject.
Use the builder to create immutable instances:
Statement.builder().
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
VALIDATOR -
Method Summary
Modifier and TypeMethodDescriptionstatic Statement.Builderbuilder()Creates a builder forStatement.static StatementcopyOf(StatementMarkingObject instance) Creates an immutable copy of aStatementMarkingObjectvalue.booleanThis instance is equal to all instances ofStatementthat have equal attribute values.Custom Properties for STIX Objects.inthashCode()Computes a hash code from attributes:statement,customProperties.toString()Prints the immutable valueStatementMarkingObjectwith attribute values.final StatementwithCustomProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thecustomPropertiesmap with the specified map.final StatementwithStatement(String value) Copy the current immutable object by setting a value for thestatementattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface security.whisper.javastix.validation.GenericValidation
validateEntityMethods inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
validate, validateOnlyId
-
Method Details
-
getStatement
@Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getStatement()- Specified by:
getStatementin interfaceStatementMarkingObject- Returns:
- The value of the
statementattribute
-
getCustomProperties
@Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableMap<String,Object> getCustomProperties()Custom Properties for STIX Objects. Any object that supports custom properties will have a validation of the custom property prefix (typically "x_"). If the additional property in the JSON does not meet the StartsWith condition, then the JSON will be rejected.- Specified by:
getCustomPropertiesin interfaceStixCustomProperties- Returns:
- Map of custom properties
Map<String, Object>
-
withStatement
Copy the current immutable object by setting a value for thestatementattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for statement (can benull)- Returns:
- A modified copy of the
thisobject
-
withCustomProperties
Copy the current immutable object by replacing thecustomPropertiesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the customProperties map- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofStatementthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:statement,customProperties. -
toString
Prints the immutable valueStatementMarkingObjectwith attribute values. -
copyOf
Creates an immutable copy of aStatementMarkingObjectvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable StatementMarkingObject instance
-
builder
Creates a builder forStatement.- Returns:
- A new Statement builder
-