Class SettableInstance<T>

  • Type Parameters:
    T - type for the setting

    public final class SettableInstance<T>
    extends java.lang.Object
    Instance based on aggregated options used for spec test settings which may contain other such settings which can be accessed through other data keys directly

    For example: Rendering profile contains HTML, Parser and CSS settings. Rendering profile and its contained settings can be set by spec options. In order to handle this properly rendering profile settable instance is defined with HTML, Parser and CSS extracted settable instances. thus allowing setting options on contained instances directly or through the rendering profile container, while keeping the results consistent.

    • Field Detail

      • myConsumerKey

        @NotNull
        private final @NotNull DataKey<java.util.function.Consumer<T>> myConsumerKey
      • myExtractedInstanceSetters

        @Nullable
        private final @Nullable java.util.Collection<SettableExtractedInstance<T,​?>> myExtractedInstanceSetters
    • Constructor Detail

      • SettableInstance

        public SettableInstance​(@NotNull
                                @NotNull DataKey<java.util.function.Consumer<T>> consumerKey,
                                @NotNull
                                @NotNull java.util.Collection<SettableExtractedInstance<T,​?>> extractedInstanceSetters)
      • SettableInstance

        public SettableInstance​(@NotNull
                                @NotNull DataKey<java.util.function.Consumer<T>> consumerKey)
    • Method Detail

      • setInstanceData

        @NotNull
        public T setInstanceData​(@NotNull
                                 T instance,
                                 @Nullable
                                 @Nullable DataHolder dataHolder)