class Member extends AnyRef
Each instance of class Member
represents an individual person, recorded by an
(imaginary) society-membership app. A member has a number of basic attributes such
as a name and a year of birth.
Once created, a Member
object is immutable; to represent changes in a person,
one should create a new instance of the class.
- Alphabetic
- By Inheritance
- Member
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Member(id: Int, name: String, yearOfBirth: Int, yearOfDeath: Option[Int])
- id
a number that uniquely identifies the member from other members of the society
- name
the member's name
- yearOfBirth
the year the member was born
- yearOfDeath
the year the member died (wrapped in an
Option
;None
if the member is alive)
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 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
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val id: Int
- def isAlive: Boolean
Returns a boolean value indicating whether the member is alive or not.
Returns a boolean value indicating whether the member is alive or not. That is, returns
true
if the member does not have a year of death,* andfalse
if they do. - 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
Returns a compact string description of the member.
Returns a compact string description of the member. The description of a dead person has the form
"Name(YoB-YoD)"; e.g.
"Elvis(1935-1977)". The description of a living person is the same but with no year of death; e.g.,
"Madonna(1958-)".
- Definition Classes
- Member → AnyRef → Any
- 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])
- val yearOfBirth: Int
- val yearOfDeath: Option[Int]
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.