class Category extends AnyRef
The class Category
represents categories of experiences in the GoodStuff diary
application. A single category contains zero or more experiences that are similar
in some way and are purchased in units of the same kind. A category object could
be used represent hotel experiences, for instance, or wines the diarist has tasted.
A category object has a mutable state: A newly created category has no experiences
yet; experiences must be added to it using the addExperience
method.
- Alphabetic
- By Inheritance
- Category
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Category(name: String, unit: String)
- name
the name of the category, such as "Hotel" or "Wine"
- unit
the name of the pricing unit associated with the experiences in this category, such as "night" or "bottle"
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
- def addExperience(newExperience: Experience): Unit
Adds a new experience to this category.
- def allExperiences: Vector[Experience]
Returns a collection containing all the experiences recorded in this category.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def favorite: Option[Experience]
Returns the experience that the user has rated the highest in this category.
Returns the experience that the user has rated the highest in this category. That is, of all the experiences added into this category so far, returns the one with the highest rating. If there is a tie for first place, the experience recorded first is returned.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString: String
- Definition Classes
- AnyRef → Any
- val unit: String
- 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.