View Javadoc

    1   /**
    2    * Copyright (c) 2008-2011, http://www.snakeyaml.org
    3    *
    4    * Licensed under the Apache License, Version 2.0 (the "License");
    5    * you may not use this file except in compliance with the License.
    6    * You may obtain a copy of the License at
    7    *
    8    *     http://www.apache.org/licenses/LICENSE-2.0
    9    *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16
    17  package org.yaml.snakeyaml.recursive.generics;
    18
    19  import java.util.Date;
    20
    21  public abstract class AbstractHumanGen<T, K extends AbstractHumanGen<T, ?>> {
    22      private String name;
    23      private Date birthday;
    24      private String birthPlace;
    25      private K father;
    26      private K mother;
    27      private K partner;
    28      private K bankAccountOwner;
    29      protected T children;
    30
    31      public String getName() {
    32          return name;
    33      }
    34
    35      public void setName(String name) {
    36          this.name = name;
    37      }
    38
    39      public Date getBirthday() {
    40          return birthday;
    41      }
    42
    43      public void setBirthday(Date birthday) {
    44          this.birthday = birthday;
    45      }
    46
    47      public String getBirthPlace() {
    48          return birthPlace;
    49      }
    50
    51      public K getFather() {
    52          return father;
    53      }
    54
    55      public void setFather(K father) {
    56          this.father = father;
    57      }
    58
    59      public K getMother() {
    60          return mother;
    61      }
    62
    63      public void setMother(K mother) {
    64          this.mother = mother;
    65      }
    66
    67      public void setBirthPlace(String birthPlace) {
    68          this.birthPlace = birthPlace;
    69      }
    70
    71      public T getChildren() {
    72          return children;
    73      }
    74
    75      public void setChildren(T children) {
    76          this.children = children;
    77      }
    78
    79      public K getPartner() {
    80          return partner;
    81      }
    82
    83      public void setPartner(K partner) {
    84          this.partner = partner;
    85      }
    86
    87      public K getBankAccountOwner() {
    88          return bankAccountOwner;
    89      }
    90
    91      public void setBankAccountOwner(K bankAccountOwner) {
    92          this.bankAccountOwner = bankAccountOwner;
    93      }
    94
    95  }