Class GeckoSession.ReviewAnalysis.Builder

Object
org.mozilla.geckoview.GeckoSession.ReviewAnalysis.Builder
Enclosing class:
GeckoSession.ReviewAnalysis

public static class GeckoSession.ReviewAnalysis.Builder extends Object
This is a Builder used by ReviewAnalysis class
  • Constructor Details

    • Builder

      public Builder(@Nullable String productId)
      Construct a Builder instance with the specified product ID.
      Parameters:
      productId - A String with the product ID.
  • Method Details

    • analysisUrl

      @AnyThread @NonNull public GeckoSession.ReviewAnalysis.Builder analysisUrl(@Nullable String analysisUrl)
      Set the analysis URL
      Parameters:
      analysisUrl - A URI String
      Returns:
      This Builder instance.
    • productId

      @AnyThread @NonNull public GeckoSession.ReviewAnalysis.Builder productId(@Nullable String productId)
      Set the product identifier
      Parameters:
      productId - A product ID String
      Returns:
      This Builder instance.
    • grade

      @AnyThread @NonNull public GeckoSession.ReviewAnalysis.Builder grade(@Nullable String grade)
      Set the grade of the product
      Parameters:
      grade - A grade String
      Returns:
      This Builder instance.
    • adjustedRating

      @AnyThread @NonNull public GeckoSession.ReviewAnalysis.Builder adjustedRating(@NonNull Double adjustedRating)
      Set the adjusted rating
      Parameters:
      adjustedRating - the adjusted rating of the product
      Returns:
      This Builder instance.
    • needsAnalysis

      @AnyThread @NonNull public GeckoSession.ReviewAnalysis.Builder needsAnalysis(@NonNull Boolean needsAnalysis)
      Set the flag that indicates whether this product needs analysis
      Parameters:
      needsAnalysis - indicates whether this product needs analysis
      Returns:
      This Builder instance.
    • pageNotSupported

      @AnyThread @NonNull public GeckoSession.ReviewAnalysis.Builder pageNotSupported(@NonNull Boolean pageNotSupported)
      Set the flag that indicates whether this product page is supported
      Parameters:
      pageNotSupported - indicates whether this product page is supported
      Returns:
      This Builder instance.
    • notEnoughReviews

      @AnyThread @NonNull public GeckoSession.ReviewAnalysis.Builder notEnoughReviews(@NonNull Boolean notEnoughReviews)
      Set the flag that indicates whether there are not enough reviews
      Parameters:
      notEnoughReviews - indicates whether there are not enough reviews
      Returns:
      This Builder instance.
    • highlights

      @AnyThread @NonNull public GeckoSession.ReviewAnalysis.Builder highlights(@Nullable GeckoSession.ReviewAnalysis.Highlight highlight)
      Set an empty highlights object for the product
      Parameters:
      highlight - A Highlight object (can be null) to overwrite the default empty Highlight
      Returns:
      This Builder instance.
    • lastAnalysisTime

      @AnyThread @NonNull public GeckoSession.ReviewAnalysis.Builder lastAnalysisTime(long lastAnalysisTime)
      Set the time of the analysis
      Parameters:
      lastAnalysisTime - The time of the analysis
      Returns:
      This Builder instance.
    • deletedProductReported

      @AnyThread @NonNull public GeckoSession.ReviewAnalysis.Builder deletedProductReported(@NonNull Boolean deletedProductReported)
      Set the flag that indicates whether this deleted product was reported
      Parameters:
      deletedProductReported - Boolean to indicate whether this deleted product was reported
      Returns:
      This Builder instance.
    • deletedProduct

      @AnyThread @NonNull public GeckoSession.ReviewAnalysis.Builder deletedProduct(@NonNull Boolean deletedProduct)
      Set the flag that indicates whether the product is deleted
      Parameters:
      deletedProduct - Boolean to indicate whether the product is deleted
      Returns:
      This Builder instance.
    • build

      @AnyThread @NonNull public GeckoSession.ReviewAnalysis build()
      Returns:
      A GeckoSession.ReviewAnalysis constructed with the values from this Builder instance.