Class NewsResult.Builder
java.lang.Object
net.ygbstudio.jbrave.core.domain.dto.result.Result.Builder
net.ygbstudio.jbrave.core.domain.dto.result.NewsResult.Builder
- Enclosing class:
NewsResult
Builder for
NewsResult instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the age of the news.Sets whether the news is breaking.@NotNull NewsResultbuild()Builds a newNewsResultfrom the current builder state.extraSnippets(List<String> extraSnippets) Sets the extra snippets.Sets whether the news is live.Sets the meta URL.Sets the source.Sets the thumbnail.Methods inherited from class net.ygbstudio.jbrave.core.domain.dto.result.Result.Builder
description, familyFriendly, fetchedContentTimestamp, isSourceBoth, isSourceLocal, language, pageAge, pageFetched, profile, title, url
-
Constructor Details
-
Builder
public Builder()Creates a new builder with all fields unset.
-
-
Method Details
-
metaUrl
Sets the meta URL.- Parameters:
metaUrl- the meta URL- Returns:
- this builder
-
source
Sets the source.- Parameters:
source- the source- Returns:
- this builder
-
breaking
Sets whether the news is breaking.- Parameters:
breaking-trueif breaking- Returns:
- this builder
-
isLive
Sets whether the news is live.- Parameters:
isLive-trueif live- Returns:
- this builder
-
thumbnail
Sets the thumbnail.- Parameters:
thumbnail- the thumbnail- Returns:
- this builder
-
age
Sets the age of the news.- Parameters:
age- the age- Returns:
- this builder
-
extraSnippets
Sets the extra snippets.- Parameters:
extraSnippets- the extra snippets- Returns:
- this builder
-
build
Builds a newNewsResultfrom the current builder state.- Overrides:
buildin classResult.Builder- Returns:
- a new
NewsResultinstance
-