Interface Immutable

All Known Subinterfaces:
AnnotationSchemaNodeAwareSchemaContext, CanonicalValue<T>, CanonicalValueSupport<T>, CanonicalValueValidator<T,V>, DeclarationInFile, DeclarationInText, DeclarationReference, EffectiveModelContext, EffectiveStatementInference, EffectiveStmtCtx, EffectiveStmtCtx.Current<A,D>, EffectiveStmtCtx.Parent, EffectiveStmtCtx.UndeclaredCurrent<A,D>, GeneratedFile, HierarchicalIdentifier<T>, Identifier, MetadataNormalizedAnydata, Module, ModuleLike, NormalizedAnydata, NormalizedMetadata, NormalizedMountPoint, NormalizedMountpoints, NormalizedTuple, PathExpression, QNameReferent, ResolvedQNameReferent, SchemaContext, SchemaSourceRepresentation, SchemaTreeInference, StatementDefinition, Submodule, UnmodifiableMapPhase<K,V>, UnresolvedQNameReferent, WritableIdentifier, YangConstantExpr<T>, YangExpr, YangNamespaceContext, YangSchemaSourceRepresentation, YangXPathExpression, YangXPathExpression.QualifiedBound, YangXPathExpression.UnqualifiedBound, YinSchemaSourceRepresentation, YinXmlSchemaSource
All Known Implementing Classes:
AbstractCanonicalValueSupport, AbstractCanonicalValueValidator, AbstractEffectiveModule, AbstractEffectiveStatementInference, AbstractEffectiveStatementInference.WithPath, AbstractGeneratedFile, AbstractGeneratedTextFile, AbstractIdentifier, AbstractImmutableDataContainerNode, AbstractImmutableNormalizedSimpleValueNode, AbstractImmutableNormalizedValueNode, AbstractMountPointContextFactory.MountPointDefinition, AbstractNormalizedNode, AbstractPathExpression, AbstractQName, AbstractSchemaContext, AbstractStatementDefinition, AbstractStringIdentifier, AbstractUUIDIdentifier, AnnotationName, ArgumentDefinition, BiMapYangNamespaceContext, CachingDerivedString, CanonicalValueViolation, CanonicalValueViolation.Regular, CanonicalValueViolation.WithException, CheckedValue, DatastoreIdentifier, DataTreeConfiguration, Decimal64, Decimal64.Support, DeclaredStatementFormatter, DefaultSchemaTreeInference, DefaultStatementDefinition, DerivedString, EffectiveSchemaContext, EffectiveStatementState, Either, Empty, EmptyDeque, ExplicitStatement, FeatureSet, FilteringSchemaContextProxy, IetfYangSmiv2ExtensionsMapping, IfFeatureExpr, ImmutableContainerNodeBuilder.ImmutableContainerNode, ImmutableLeafSetNodeBuilder.ImmutableLeafSetNode, ImmutableMapNodeBuilder.ImmutableMapNode, ImmutableMapTemplate, ImmutableNormalizedMetadata, ImmutableNormalizedMountPoint, ImmutableNormalizedMountpoints, ImmutableOffsetMap, ImmutableOffsetMapTemplate, ImmutableUnkeyedListEntryNodeBuilder.ImmutableUnkeyedListEntryNode, ImmutableUnkeyedListNodeBuilder.EmptyImmutableUnkeyedListNode, ImmutableUnkeyedListNodeBuilder.ImmutableUnkeyedListNode, ImmutableUserLeafSetNodeBuilder.ImmutableUserLeafSetNode, ImmutableUserMapNodeBuilder.ImmutableUserMapNode, ImplicitSubstatement, IRArgument, IRArgument.Concatenation, IRArgument.Single, IRKeyword, IRKeyword.Qualified, IRKeyword.Unqualified, IRStatement, LeafRefPath, MetadataStatements, ModuleNameNamespaceContext, ModuleTagStatements, MountPointLabel, NACMStatements, NetconfStatements, NoOpListenerRegistration, NoOpObjectRegistration, NormalizationResult, NormalizedNodePrettyTree, ObjectIdentifier, OpenConfigStatements, OpenDaylightExtensionsStatements, ParserNamespace, PatternExpression, QName, QNameModule, QNameWithFlagsEffectiveStatementState, ReactorDeclaredModel, Revision, SchemaContextFactoryConfiguration, SchemaInferenceStack.Inference, SchemaMountStatements, SchemaNodeIdentifier, SchemaNodeIdentifier.Absolute, SchemaNodeIdentifier.Descendant, SharedSingletonMap, SharedSingletonMapTemplate, SimpleQNameWithPredicate, SimpleSchemaContext, SingletonSet, SourceIdentifier, StatementSourceReference, StatementSupport.StatementPolicy, StatementSupportBundle, StringYangTextSchemaSource, SubscribedNotificationsStatements, Uint16, Uint16.Support, Uint32, Uint32.Support, Uint64, Uint64.Support, Uint8, Uint8.Support, UnmodifiableMap, UnresolvedNumber, UnresolvedQName, UnresolvedQName.Qualified, UnresolvedQName.Unqualified, Version, XMLNamespace, YangBinaryExpr, YangBooleanConstantExpr, YangDataName, YangDataStatements, YangFilterExpr, YangFunctionCallExpr, YangInstanceIdentifier, YangInstanceIdentifier.NodeIdentifier, YangInstanceIdentifier.NodeIdentifierWithPredicates, YangInstanceIdentifier.NodeIdentifierWithPredicates.Singleton, YangInstanceIdentifier.NodeWithValue, YangInstanceIdentifier.PathArgument, YangIRSchemaSource, YangLiteralExpr, YangLocationPath, YangLocationPath.Absolute, YangLocationPath.QNameStep, YangLocationPath.Relative, YangLocationPath.ResolvedQNameStep, YangLocationPath.UnresolvedQNameStep, YangNaryExpr, YangNegateExpr, YangNumberExpr, YangParserConfiguration, YangPathExpr, YangQNameExpr, YangQNameExpr.Resolved, YangQNameExpr.Unresolved, YangStmtMapping, YangTextSchemaSource, YangTextSnippet, YangVariableReferenceExpr, YinDomSchemaSource, YinTextSchemaSource

public non-sealed interface Immutable
Immutable Object - object does not change its externally-observable state during its lifetime.

Marker interface for objects which are immutable. This interface should be used directly on objects, preferably final, which are eligible for the JSR-305 javax.annotation.concurrent.Immutable annotation and objects implementing this interface are required to abide to interface contract specified by @Immutable.

The reason for the existence of this interface is twofold: unlike @Immutable, it is visible at runtime and objects can be quickly checked for compliance using an 'instanceof' check. This is useful for code which needs to capture a point-in-time snapshot of otherwise unknown objects -- a typical example being logging/tracing systems. Such systems would normally have to rely on serializing the object to get a stable checkpoint. Objects marked with this interface are guaranteed to remain stable, thus already being a checkpoint for all intents and purposes, so aside from retaining a reference no further action on them is necessary.

Implementations of this interface must not change any public state during their entire lifetime.

This interface is mutually exclusive with Mutable and other MutationBehaviours.

Author:
Robert Varga, Tony Tkacik