Class Result.Builder

java.lang.Object
net.ygbstudio.jbrave.core.domain.dto.result.Result.Builder
Direct Known Subclasses:
AbstractGraphInfobox.Builder, LocationResult.Builder, LocationWebResult.Builder, NewsResult.Builder, SearchResult.Builder, VideoResult.Builder
Enclosing class:
Result

public static class Result.Builder extends Object
Builder for Result instances.
  • Constructor Details

    • Builder

      public Builder()
      Creates a new builder with all fields unset.
  • Method Details

    • title

      public Result.Builder title(String title)
      Sets the result title.
      Parameters:
      title - the title
      Returns:
      this builder
    • url

      public Result.Builder url(String url)
      Sets the result URL.
      Parameters:
      url - the URL
      Returns:
      this builder
    • isSourceLocal

      public Result.Builder isSourceLocal(Boolean isSourceLocal)
      Sets whether the source is local.
      Parameters:
      isSourceLocal - whether the source is local
      Returns:
      this builder
    • isSourceBoth

      public Result.Builder isSourceBoth(Boolean isSourceBoth)
      Sets whether the source is both.
      Parameters:
      isSourceBoth - whether the source is both
      Returns:
      this builder
    • description

      public Result.Builder description(String description)
      Sets the result description.
      Parameters:
      description - the description
      Returns:
      this builder
    • pageAge

      public Result.Builder pageAge(String pageAge)
      Sets the page age.
      Parameters:
      pageAge - the page age
      Returns:
      this builder
    • pageFetched

      public Result.Builder pageFetched(String pageFetched)
      Sets the page fetched timestamp string.
      Parameters:
      pageFetched - the page fetched timestamp
      Returns:
      this builder
    • fetchedContentTimestamp

      public Result.Builder fetchedContentTimestamp(Integer fetchedContentTimestamp)
      Sets the fetched content timestamp.
      Parameters:
      fetchedContentTimestamp - the fetched content timestamp
      Returns:
      this builder
    • profile

      public Result.Builder profile(Profile profile)
      Sets the profile.
      Parameters:
      profile - the profile
      Returns:
      this builder
    • language

      public Result.Builder language(String language)
      Sets the result language.
      Parameters:
      language - the language
      Returns:
      this builder
    • familyFriendly

      public Result.Builder familyFriendly(Boolean familyFriendly)
      Sets whether the result is family friendly.
      Parameters:
      familyFriendly - whether the result is family friendly
      Returns:
      this builder
    • build

      public Result build()
      Builds a new Result from the current builder state.
      Returns:
      a new Result instance