Class UniDerivedAttributeLoaderBuilder.BuiltDerivedLoader<T,D>

All Implemented Interfaces:
AttributeLoader<T>, DerivedAttributeLoader<T>
Enclosing class:
UniDerivedAttributeLoaderBuilder<T,D>

public static class UniDerivedAttributeLoaderBuilder.BuiltDerivedLoader<T,D> extends SimpleDerivedAttributeLoader<T,D>
  • Constructor Details

  • Method Details

    • getValue

      @Nullable protected T getValue(@NotNull D value, DerivedAttributeContext context)
      Specified by:
      getValue in class SimpleDerivedAttributeLoader<T,D>
      Returns:
      null if the result should be undefined (or yielded to other loaders)
    • getContextDependencies

      @Nullable public Set<AttributeContextDependency> getContextDependencies()
      Description copied from interface: AttributeLoader

      Indicates which context values are used to calculate the value of the attribute.

      For example, if the calculated value depends on the current user, the return value from this method must include AttributeContextDependency.USER.

      The returned value must be the same throughout the lifetime of the object.

      Returns:
      the set of context dependencies or null if there are none
    • getCachingStrategy

      @Nullable public AttributeCachingStrategy getCachingStrategy()
      Description copied from interface: AttributeLoader

      Indicates how the values provided by this loader should be cached.

      The returned value must be the same throughout the lifetime of the object.

      Returns:
      caching strategy, null has the same effect as AttributeCachingStrategy.MAY
    • getGlobalTrail

      @Nullable public TrailItemSet getGlobalTrail()
      Description copied from interface: AttributeLoader

      Returns global trail. When an item from a global trail changes, all values calculated for this attribute will be invalidated and will need to be recalculated.

      The returned value must be the same throughout the lifetime of the object.

      Returns:
      global trail set, or null if none