Interface TextMatchItem.Builder

  • Method Details

    • attribute

      TextMatchItem.Builder attribute(String attribute)

      The name of the attribute.

      Parameters:
      attribute - The name of the attribute.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • matchOffsets

      TextMatchItem.Builder matchOffsets(Collection<MatchOffset> matchOffsets)

      List of offsets indicating matching terms in the TextMatchItem text.

      Parameters:
      matchOffsets - List of offsets indicating matching terms in the TextMatchItem text.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • matchOffsets

      TextMatchItem.Builder matchOffsets(MatchOffset... matchOffsets)

      List of offsets indicating matching terms in the TextMatchItem text.

      Parameters:
      matchOffsets - List of offsets indicating matching terms in the TextMatchItem text.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • matchOffsets

      TextMatchItem.Builder matchOffsets(Consumer<MatchOffset.Builder>... matchOffsets)

      List of offsets indicating matching terms in the TextMatchItem text.

      This is a convenience method that creates an instance of the MatchOffset.Builder avoiding the need to create one manually via MatchOffset.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to matchOffsets(List<MatchOffset>).

      Parameters:
      matchOffsets - a consumer that will call methods on MatchOffset.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • text

      Snippet of attribute text containing highlighted content.

      Parameters:
      text - Snippet of attribute text containing highlighted content.
      Returns:
      Returns a reference to this object so that method calls can be chained together.