Package org.mozilla.geckoview
Class GeckoSession.Recommendation.Builder
Object
org.mozilla.geckoview.GeckoSession.Recommendation.Builder
- Enclosing class:
- GeckoSession.Recommendation
This is a Builder used by Recommendation class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadjustedRating
(Double adjustedRating) Set the adjusted ratingSet the ad identifieranalysisUrl
(String analysisUrl) Set the analysis URLbuild()
Set the currency of the price of the recommended productSet the grade of the recommended productSet the image URLSet the name of the recommended productSet the price of the recommended productSet the flag that indicates whether this recommendation is sponsored or notSet the recommendation URL
-
Constructor Details
-
Builder
Construct a Builder instance with the specified recommendation URL.- Parameters:
recommendationUrl
- A URI String.
-
-
Method Details
-
analysisUrl
@AnyThread @NonNull public GeckoSession.Recommendation.Builder analysisUrl(@NonNull String analysisUrl) Set the analysis URL- Parameters:
analysisUrl
- A URI String- Returns:
- This Builder instance.
-
adjustedRating
@AnyThread @NonNull public GeckoSession.Recommendation.Builder adjustedRating(@NonNull Double adjustedRating) Set the adjusted rating- Parameters:
adjustedRating
- the adjusted rating of the product- Returns:
- This Builder instance.
-
sponsored
@AnyThread @NonNull public GeckoSession.Recommendation.Builder sponsored(@NonNull Boolean sponsored) Set the flag that indicates whether this recommendation is sponsored or not- Parameters:
sponsored
- indicates whether this recommendation is sponsored- Returns:
- This Builder instance.
-
imageUrl
Set the image URL- Parameters:
imageUrl
- An image URL String- Returns:
- This Builder instance.
-
aid
Set the ad identifier- Parameters:
aid
- The id String- Returns:
- This Builder instance.
-
url
Set the recommendation URL- Parameters:
url
- A URI String- Returns:
- This Builder instance.
-
name
Set the name of the recommended product- Parameters:
name
- A name String- Returns:
- This Builder instance.
-
grade
Set the grade of the recommended product- Parameters:
grade
- A grade String- Returns:
- This Builder instance.
-
price
Set the price of the recommended product- Parameters:
price
- A price String- Returns:
- This Builder instance.
-
currency
Set the currency of the price of the recommended product- Parameters:
currency
- A currency String- Returns:
- This Builder instance.
-
build
- Returns:
- A
GeckoSession.Recommendation
constructed with the values from this Builder instance.
-