case class Production(country: String, budget: Option[Int], gross: Option[Int], titleYear: Option[Int]) extends Product with Serializable
The Production case class represents the metadata associated with a creative production,
such as a film, including its country of origin, budget, gross revenue, and release year.
Fields
- country
the country where the production originated, as a non-null
String.- budget
an optional
Intrepresenting the production's budget. If unavailable, it isNone.- gross
an optional
Intrepresenting the total gross revenue of the production. If unavailable, it isNone.- titleYear
an optional
Intrepresenting the year the production was released or titled. If unavailable, it isNone.Methods
isKiwi: Determines if the production originates from New Zealand.
Usage Example
val production1 = Production("New Zealand", Some(1500000), Some(5000000), Some(2022)) val production2 = Production("USA", None, None, None) println(production1.isKiwi) // Output: true println(production2.isKiwi) // Output: false
- 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
- Production
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Production(country: String, budget: Option[Int], gross: Option[Int], titleYear: Option[Int])
- country
the country where the production originated, as a non-null
String.- budget
an optional
Intrepresenting the production's budget. If unavailable, it isNone.- gross
an optional
Intrepresenting the total gross revenue of the production. If unavailable, it isNone.- titleYear
an optional
Intrepresenting the year the production was released or titled. If unavailable, it isNone.Methods
isKiwi: Determines if the production originates from New Zealand.
Usage Example
val production1 = Production("New Zealand", Some(1500000), Some(5000000), Some(2022)) val production2 = Production("USA", None, None, None) println(production1.isKiwi) // Output: true println(production2.isKiwi) // Output: false
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 budget: Option[Int]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val country: String
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val gross: Option[Int]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isKiwi: Boolean
- 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
- val titleYear: Option[Int]
- 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)