case class Format(color: String, language: String, aspectRatio: Option[Double], duration: Option[Int]) extends Product with Serializable
Represents the format attributes associated with a movie, such as its color, language, aspect ratio, and duration. This case class is immutable and provides a concise way to model format details.
The Format case class includes the following fields:
- color (String): The color scheme of the movie (e.g., "Color", "Black and White").
- language (String): The language in which the movie is produced (e.g., "English", "French").
- aspectRatio (Option[Double]): An optional field representing the aspect ratio of the movie's visuals,
which is expressed as a decimal (e.g., 1.85, 2.35). If not provided, this field is None.
- duration (Option[Int]): An optional field representing the length of the movie in minutes. If not provided, this field is None.
The toString method of the Format class provides a comma-separated string representation of its field values,
including Option fields, which are displayed as None when not defined.
- color
the color scheme of the movie's visuals.
- language
the primary language of the movie.
- aspectRatio
an optional aspect ratio for the movie's visuals.
- duration
an optional runtime of the movie in minutes. Usage example:
val format = Format("Color", "English", Some(1.85), Some(120)) println(format) // Outputs: Color,English,Some(1.85),Some(120) val defaultFormat = Format("", "", None, None) println(defaultFormat) // Outputs: ,,,None,None
- Annotations
- @deprecated
- Deprecated
(Since version 1.7.0) Example code: it moves out of the library, into the tests, in 2.0.0
- Alphabetic
- By Inheritance
- Format
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Format(color: String, language: String, aspectRatio: Option[Double], duration: Option[Int])
- color
the color scheme of the movie's visuals.
- language
the primary language of the movie.
- aspectRatio
an optional aspect ratio for the movie's visuals.
- duration
an optional runtime of the movie in minutes. Usage example:
val format = Format("Color", "English", Some(1.85), Some(120)) println(format) // Outputs: Color,English,Some(1.85),Some(120) val defaultFormat = Format("", "", None, None) println(defaultFormat) // Outputs: ,,,None,None
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val aspectRatio: Option[Double]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val color: String
- val duration: Option[Int]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val language: String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Format → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)