T
- value type@PublicApi
public interface LoadedValue<T>
Represents a value loaded from the attribute system. Contains the AttributeValue
and a boolean outdated
flag.
Note that the object is immutable with regards to the attribute value only. Outdated flag may change from false
to true
once during the lifespan of a loaded value.
LoadedValues
,
StructureAttributeService.getAttributeValues(com.almworks.jira.structure.api.forest.ForestSpec, boolean, com.almworks.integers.LongList, java.util.Collection<? extends com.almworks.jira.structure.api.attribute.AttributeSpec<?>>, java.util.function.Consumer<com.almworks.jira.structure.api.attribute.ValuesMeta>)
Modifier and Type | Method and Description |
---|---|
AttributeValue<T> |
getValue()
Returns the loaded attribute value.
|
boolean |
isOutdated()
Returns
true if this value has been outdated. |
static <T> LoadedValue<T> |
of(AttributeValue<T> attributeValue)
Creates an instance of
LoadedValue based on attribute value. |
static <T> LoadedValue<T> |
of(T value)
Creates an instance of
LoadedValue based on a value itself. |
@NotNull AttributeValue<T> getValue()
boolean isOutdated()
Returns true
if this value has been outdated. An outdated value will be recalculated next time it is requested.
A value may be outdated right away, or it may become outdated later.
static <T> LoadedValue<T> of(@NotNull AttributeValue<T> attributeValue)
LoadedValue
based on attribute value. This loaded value will never be outdated.T
- value typeattributeValue
- attribute valuestatic <T> LoadedValue<T> of(@Nullable T value)
LoadedValue
based on a value itself. This loaded value will never be outdated.T
- value typevalue
- valueCopyright © 2024 Tempo Software. All Rights Reserved.