Class GranularMarking
java.lang.Object
security.whisper.javastix.datamarkings.GranularMarking
- All Implemented Interfaces:
Serializable,StixCustomProperties,GranularMarkingDm,SdoDefaultValidator
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
@Redactable(useMask=false,
redactionMask="\u2588\u2588REDACTED\u2588\u2588")
public final class GranularMarking
extends Object
implements GranularMarkingDm
Immutable implementation of
GranularMarkingDm.
Use the builder to create immutable instances:
GranularMarking.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 GranularMarking.Builderbuilder()Creates a builder forGranularMarking.static GranularMarkingcopyOf(GranularMarkingDm instance) Creates an immutable copy of aGranularMarkingDmvalue.booleanThis instance is equal to all instances ofGranularMarkingthat have equal attribute values.Custom Properties for STIX Objects.inthashCode()Computes a hash code from attributes:markingRef,customProperties.toString()Prints the immutable valueGranularMarkingwith attribute values.final GranularMarkingwithCustomProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thecustomPropertiesmap with the specified map.final GranularMarkingCopy the current immutable object by setting a value for themarkingRefattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface security.whisper.javastix.datamarkings.GranularMarkingDm
getSelectorsMethods inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
validate, validateOnlyId
-
Method Details
-
getMarkingRef
@Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public MarkingDefinitionDm getMarkingRef()- Specified by:
getMarkingRefin interfaceGranularMarkingDm- Returns:
- The value of the
markingRefattribute
-
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>
-
withMarkingRef
Copy the current immutable object by setting a value for themarkingRefattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for markingRef (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 ofGranularMarkingthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:markingRef,customProperties. -
toString
Prints the immutable valueGranularMarkingwith attribute values. -
copyOf
Creates an immutable copy of aGranularMarkingDmvalue. 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 GranularMarking instance
-
builder
Creates a builder forGranularMarking.- Returns:
- A new GranularMarking builder
-