Package com.attribyte.parser.model
Class Audio
java.lang.Object
com.attribyte.parser.model.Audio
An immutable audio stream.
- Author:
- Matt Hamer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringText that describes the audio, or an empty string if none.final StringA unique id, or an empty string if none.final StringA link to the audio stream.final StringThe audio type or an empty string if none.final StringA title for the audio, or an empty string if none. -
Method Summary
Modifier and TypeMethodDescriptionstatic Audio.BuilderCreates a builder from an existing audio stream.static Audio.BuilderCreates a builder.booleaninthashCode()toString()withNewLink(String link) Creates a copy of this audio stream with a new link.withNewLink(String link, String mediaType) Creates a copy of this audio stream with a new link and type.
-
Field Details
-
id
A unique id, or an empty string if none. -
link
A link to the audio stream. Nevernullor empty. -
altText
Text that describes the audio, or an empty string if none. -
title
A title for the audio, or an empty string if none. -
mediaType
The audio type or an empty string if none.
-
-
Method Details
-
builder
Creates a builder.- Parameters:
link- The required link.- Returns:
- The builder.
- Throws:
UnsupportedOperationException- If the specified link isnullor empty.
-
builder
Creates a builder from an existing audio stream.- Parameters:
audio- The audio.- Returns:
- The builder initialized from the existing audio.
-
withNewLink
Creates a copy of this audio stream with a new link.- Parameters:
link- The new link.- Returns:
- The new audio.
- Throws:
UnsupportedOperationException- If the specified link isnullor empty.
-
withNewLink
Creates a copy of this audio stream with a new link and type.- Parameters:
link- The new link.mediaType- The new media type.- Returns:
- The new audio.
- Throws:
UnsupportedOperationException- If the specified link isnullor empty.
-
toString
-
hashCode
public int hashCode() -
equals
-