Packages

c

o1.classes

Employee

class Employee extends AnyRef

The class Employee represents employees (in an imaginary accounting app). Each employee has a number of attributes such as name and monthly salary. Most of these attributes are mutable.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Employee
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Employee(name: String, yearOfBirth: Int, monthlySalary: Double)

    name

    the name of the employee

    yearOfBirth

    the year the employee was born

    monthlySalary

    the monthly salary of the employee, in euros and excluding any incidental costs

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. def ageInYear(year: Int): Int

    Returns the number of years the employee turns during the given year.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def description: String

    Returns a description that contains some basic employee information.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def monthlyCost(multiplier: Double): Double

    Returns the monthly cost of the employee to the employer.

    Returns the monthly cost of the employee to the employer. This figure equals the product of the employee's monthly salary (e.g., 4000), their working time (e.g., 0.6), and a multiplier for incidental costs (e.g., 1.3).

    multiplier

    a multiplier used by the employer to estimate the additional costs of employing a person, apart from their salary

  14. var monthlySalary: Double
  15. var name: String
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def raiseSalary(multiplier: Double): Unit

    Modifies the employee's salary by multiplying it with the given factor.

    Modifies the employee's salary by multiplying it with the given factor. A parameter value of 1.2 will produce a 20% raise, for instance.

  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString: String
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. var workingTime: Double

    working time relative to a full week.

    working time relative to a full week. E.g., 1.0 means a full-time employee and 0.5 a half-timer.

  26. val yearOfBirth: Int

Deprecated Value Members

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

Inherited from AnyRef

Inherited from Any

Ungrouped