Interface Hit


public interface Hit
Hit
Example to create an instance using the builder pattern

     Hit hit = Hit.builder()
             .id("{id}")
             .version(0.3)
             .build()
 
  • Method Summary

    Modifier and Type
    Method
    Description
    static HitBuilder
    builder factory method for Hit
    static HitBuilder
    builder(Hit template)
    create builder for Hit instance
    static Hit
    deepCopy(Hit template)
    factory method to create a deep copy of Hit
    @NotNull String
    Unique identifier of the Order.
    The higher the value is, the more relevant the hit is for the search request.
    @NotNull Long
    Current version of the Order.
    static Hit
    of()
    factory method
    static Hit
    of(Hit template)
    factory method to create a shallow copy Hit
    void
    Unique identifier of the Order.
    void
    setRelevance(Double relevance)
    The higher the value is, the more relevant the hit is for the search request.
    void
    setVersion(Long version)
    Current version of the Order.
    static com.fasterxml.jackson.core.type.TypeReference<Hit>
    gives a TypeReference for usage with Jackson DataBind
    default <T> T
    withHit(Function<Hit,T> helper)
    accessor map function
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Order.

      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the Order.

      Returns:
      version
    • getRelevance

      Double getRelevance()

      The higher the value is, the more relevant the hit is for the search request.

      Returns:
      relevance
    • setId

      void setId(String id)

      Unique identifier of the Order.

      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the Order.

      Parameters:
      version - value to be set
    • setRelevance

      void setRelevance(Double relevance)

      The higher the value is, the more relevant the hit is for the search request.

      Parameters:
      relevance - value to be set
    • of

      static Hit of()
      factory method
      Returns:
      instance of Hit
    • of

      static Hit of(Hit template)
      factory method to create a shallow copy Hit
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static Hit deepCopy(@Nullable Hit template)
      factory method to create a deep copy of Hit
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static HitBuilder builder()
      builder factory method for Hit
      Returns:
      builder
    • builder

      static HitBuilder builder(Hit template)
      create builder for Hit instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withHit

      default <T> T withHit(Function<Hit,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<Hit> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference