Class Tlp
java.lang.Object
security.whisper.javastix.datamarkings.objects.Tlp
- All Implemented Interfaces:
Serializable,StixCustomProperties,TlpMarkingObject,StixMarkingObject,GenericValidation,SdoDefaultValidator
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
@Redactable(useMask=false,
redactionMask="\u2588\u2588REDACTED\u2588\u2588")
public final class Tlp
extends Object
implements TlpMarkingObject
Immutable implementation of
TlpMarkingObject.
Use the builder to create immutable instances:
Tlp.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 Tlp.Builderbuilder()Creates a builder forTlp.static TlpcopyOf(TlpMarkingObject instance) Creates an immutable copy of aTlpMarkingObjectvalue.booleanThis instance is equal to all instances ofTlpthat have equal attribute values.Custom Properties for STIX Objects.getTlp()inthashCode()Computes a hash code from attributes:tlp,customProperties.toString()Prints the immutable valueTlpMarkingObjectwith attribute values.final TlpwithCustomProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thecustomPropertiesmap with the specified map.final TlpCopy the current immutable object by setting a value for thetlpattribute.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
-
getTlp
- Specified by:
getTlpin interfaceTlpMarkingObject- Returns:
- The value of the
tlpattribute
-
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>
-
withTlp
Copy the current immutable object by setting a value for thetlpattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tlp (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 ofTlpthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:tlp,customProperties. -
toString
Prints the immutable valueTlpMarkingObjectwith attribute values. -
copyOf
Creates an immutable copy of aTlpMarkingObjectvalue. 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 TlpMarkingObject instance
-
builder
Creates a builder forTlp.- Returns:
- A new Tlp builder
-