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
Builder for
Result instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newResultfrom the current builder state.description(String description) Sets the result description.familyFriendly(Boolean familyFriendly) Sets whether the result is family friendly.fetchedContentTimestamp(Integer fetchedContentTimestamp) Sets the fetched content timestamp.isSourceBoth(Boolean isSourceBoth) Sets whether the source is both.isSourceLocal(Boolean isSourceLocal) Sets whether the source is local.Sets the result language.Sets the page age.pageFetched(String pageFetched) Sets the page fetched timestamp string.Sets the profile.Sets the result title.Sets the result URL.
-
Constructor Details
-
Builder
public Builder()Creates a new builder with all fields unset.
-
-
Method Details
-
title
Sets the result title.- Parameters:
title- the title- Returns:
- this builder
-
url
Sets the result URL.- Parameters:
url- the URL- Returns:
- this builder
-
isSourceLocal
Sets whether the source is local.- Parameters:
isSourceLocal- whether the source is local- Returns:
- this builder
-
isSourceBoth
Sets whether the source is both.- Parameters:
isSourceBoth- whether the source is both- Returns:
- this builder
-
description
Sets the result description.- Parameters:
description- the description- Returns:
- this builder
-
pageAge
Sets the page age.- Parameters:
pageAge- the page age- Returns:
- this builder
-
pageFetched
Sets the page fetched timestamp string.- Parameters:
pageFetched- the page fetched timestamp- Returns:
- this builder
-
fetchedContentTimestamp
Sets the fetched content timestamp.- Parameters:
fetchedContentTimestamp- the fetched content timestamp- Returns:
- this builder
-
profile
Sets the profile.- Parameters:
profile- the profile- Returns:
- this builder
-
language
Sets the result language.- Parameters:
language- the language- Returns:
- this builder
-
familyFriendly
Sets whether the result is family friendly.- Parameters:
familyFriendly- whether the result is family friendly- Returns:
- this builder
-
build
Builds a newResultfrom the current builder state.- Returns:
- a new
Resultinstance
-