Interface Versioned
-
- All Known Subinterfaces:
IRenderingScope,Renderable,RenderedContent,Renderer,TemplateView
- All Known Implementing Classes:
ExceptionContent,MarkdownProcessor.MarkdownRenderer,MustacheProcessor.MustacheRenderer,RenderingScope,SourcePathTemplate,StringContent,ViewModel
public interface VersionedVersioned objects have a long property that can be used as a version. A versioned object is considered valid for a version if and only if it has the same version.
-
-
Method Summary
Modifier and Type Method Description longgetVersion()Get the version for this element.default booleanisValidFor(long version)A versioned object is only valid for the specific version it has.default booleanisValidFor(Versioned other)A versioned object is valid for another versioned object if they have the same version number.
-
-
-
Method Detail
-
getVersion
long getVersion()
Get the version for this element. An element is considered valid only for other elements of the same version.
-
isValidFor
default boolean isValidFor(Versioned other)
A versioned object is valid for another versioned object if they have the same version number.- Parameters:
other- Another version object to check validity against- Returns:
- true, if the versions match
-
isValidFor
default boolean isValidFor(long version)
A versioned object is only valid for the specific version it has.- Parameters:
version- The version number to check validity against- Returns:
- true, if the version matches the provided version
-
-