Class OptionalValueExtractor<T>

java.lang.Object
org.hibernate.search.mapper.pojo.extractor.builtin.impl.OptionalValueExtractor<T>
All Implemented Interfaces:
ContainerExtractor<Optional<T>,T>

public class OptionalValueExtractor<T> extends Object implements ContainerExtractor<Optional<T>,T>
  • Constructor Details

    • OptionalValueExtractor

      public OptionalValueExtractor()
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • extract

      public <T1, C2> void extract(Optional<T> container, ValueProcessor<T1,? super T,C2> perValueProcessor, T1 target, C2 context, ContainerExtractionContext extractionContext)
      Specified by:
      extract in interface ContainerExtractor<Optional<T>,T>
      Type Parameters:
      T1 - The type of the target of the perValueProcessor, i.e. whatever it is supposed to push the result of its processing to.
      C2 - The type of the context of the perValueProcessor, i.e. whatever information it needs that is independent from the target or value.
      Parameters:
      container - A container to extract values from.
      perValueProcessor - A processor for values extracted from the container.
      target - The target to pass to the perValueProcessor.
      context - The context to pass to the perValueProcessor.
      extractionContext - A context for use by the container extractor itself.
    • multiValued

      public boolean multiValued()
      Specified by:
      multiValued in interface ContainerExtractor<Optional<T>,T>
      Returns:
      true if this extractor's ContainerExtractor.extract(Object, ValueProcessor, Object, Object, ContainerExtractionContext) method may call the consumer multiple times. false if it will always call the consumer either zero or one time for a given container.