Package com.attribyte.parser.model
Class Video.Builder
java.lang.Object
com.attribyte.parser.model.Video.Builder
- Enclosing class:
Video
Builds an immutable video.
-
Method Summary
Modifier and TypeMethodDescriptionaddVariant(Video variant) Adds a variant.build()Builds an immutable video.Gets the alternate text.Gets the aspect.intGets the bitrate.longGets the duration in milliseconds.intGets the height.getId()Gets the id.getImage()Gets the image.getLink()Gets the link.Gets the media type.getTitle()Gets the title.com.google.common.collect.ImmutableList<Video> Gets the variants.intgetWidth()Gets the width.setAltText(String altText) Sets the alternate text.Sets the aspect.setBitrate(int bitrate) Sets the bitrate.setDurationMillis(long durationMillis) Sets the duration in milliseconds.setHeight(int height) Sets the height.Sets the id.Sets the image.setMediaType(String mediaType) Sets the type.Sets the title.setVariants(Collection<Video> variants) Sets/replaces all the variants.setWidth(int width) Sets the width.
-
Method Details
-
getId
Gets the id.- Returns:
- The id.
-
setId
Sets the id.- Parameters:
id- The id.- Returns:
- A self-reference.
-
getLink
Gets the link.- Returns:
- The link.
-
getAltText
Gets the alternate text.- Returns:
- The alternate text.
-
setAltText
Sets the alternate text.- Parameters:
altText- The alternate text.- Returns:
- A self-reference.
-
getTitle
Gets the title.- Returns:
- The title.
-
setTitle
Sets the title.- Parameters:
title- The title.- Returns:
- A self-reference.
-
getWidth
public int getWidth()Gets the width.- Returns:
- The width.
-
setWidth
Sets the width.- Parameters:
width- The width.- Returns:
- A self-reference.
-
getHeight
public int getHeight()Gets the height.- Returns:
- The height.
-
setHeight
Sets the height.- Parameters:
height- The height.- Returns:
- A self-reference.
-
getMediaType
Gets the media type.- Returns:
- The type.
-
setMediaType
Sets the type.- Parameters:
mediaType- The media type.- Returns:
- A self-reference.
-
getBitrate
public int getBitrate()Gets the bitrate.- Returns:
- The bitrate.
-
setBitrate
Sets the bitrate.- Parameters:
bitrate- The bitrate.- Returns:
- A self-reference.
-
getDurationMillis
public long getDurationMillis()Gets the duration in milliseconds.- Returns:
- The duration in milliseconds.
-
setDurationMillis
Sets the duration in milliseconds.- Parameters:
durationMillis- The duration in milliseconds.- Returns:
- A self-reference.
-
getAspect
Gets the aspect.- Returns:
- The aspect or
null.
-
setAspect
Sets the aspect.- Parameters:
aspect- The aspect.- Returns:
- A self-reference.
-
getVariants
Gets the variants.- Returns:
- The variants.
-
addVariant
Adds a variant.- Parameters:
variant- The variant.- Returns:
- A self-reference.
-
setVariants
Sets/replaces all the variants.- Parameters:
variants- The variants.- Returns:
- A self-reference.
-
getImage
Gets the image.- Returns:
- The image.
-
setImage
Sets the image.- Parameters:
image- The image.- Returns:
- A self-reference.
-
build
Builds an immutable video.- Returns:
- The video.
-