Packages

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

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Format
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val aspectRatio: Option[Double]
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. val color: String
  8. val duration: Option[Int]
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. val language: String
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. def productElementNames: Iterator[String]
    Definition Classes
    Product
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    Format → AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped