class Experience extends AnyRef
The class Experience
represents entries in a user's experience diary.
Each entry represents an experience as evaluated by the diarist.
An experience object is immutable once created; there are no methods to change any of its attributes.
- Alphabetic
- By Inheritance
- Experience
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Experience(name: String, description: String, price: Double, rating: Int)
- name
a name that identifies the experience, such as "Hotel Anna, Helsinki" or "Sangre de Toro 2007"
- description
the diarist's description of the experience, such as "Nice but unremarkable"
- price
the price (per unit) in euros
- rating
a rating given by the diarist to the experience (from 1 to 10 or on some other scale)
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
- def chooseBetter(another: Experience): Experience
Compares two experiences --- this one and the one given as a parameter --- and returns the one with the higher rating.
Compares two experiences --- this one and the one given as a parameter --- and returns the one with the higher rating. If both have the same rating, arbitrarily returns one of the two.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- val description: String
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def isBetterThan(another: Experience): Boolean
Returns
true
if the experience has a higher rating than the experience given as a parameter, andfalse
otherwise. - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val name: String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val price: Double
- val rating: Int
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString: String
- Definition Classes
- AnyRef → Any
- def valueForMoney: Double
Returns the "value for money" for the experience.
Returns the "value for money" for the experience. Value for money equals the experience's rating divided by its price.
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.