Source: Person.js

/**
 * メンバーに関する情報を管理します。
 * @author Yoshihiro Yamada
 * @version 1.0.0
 */
class Person {
  /**
  * @param {string} name 名前
  * @param {date} birth 誕生日
  * @throws {InvalidArgumentsException} birthが日付型ではありません。
  */
  constructor(name, birth) {
    this.name = name;
    this.birth = birth;
  }

  /**
   * Personクラスの内容を文字列化します。
   * @param {Boolean} isDetails 詳細な情報を表示するか
   * @returns {String} Personクラスの詳細情報
   * @deprecated {@link Person#toString}メソッドを代わりに利用してください。
   */
  show(isDetails) {
    return `${this.name}(${this.birth} 生まれ)です。`;
  }

  /**
   * Personクラスに関する詳細情報を表示します。
   * @returns {String} メンバーの詳細情報
   */
  toString() {
    return `${this.name}(${this.birth})`;
  }
}