1 /** 2 * Copyright (c) 2008, 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 package org.yaml.snakeyaml.recursive; 17 18 import java.util.HashSet; 19 import java.util.Set; 20 21 public class Human extends AbstractHuman { 22 23 private Human father; 24 private Human mother; 25 private Human partner; 26 private Human bankAccountOwner; 27 protected Set<Human> children; 28 Human()29 public Human() { 30 children = new HashSet<Human>(); 31 } 32 getFather()33 public Human getFather() { 34 return father; 35 } 36 setFather(Human father)37 public void setFather(Human father) { 38 this.father = father; 39 } 40 getMother()41 public Human getMother() { 42 return mother; 43 } 44 setMother(Human mother)45 public void setMother(Human mother) { 46 this.mother = mother; 47 } 48 getPartner()49 public Human getPartner() { 50 return partner; 51 } 52 setPartner(Human partner)53 public void setPartner(Human partner) { 54 this.partner = partner; 55 } 56 getBankAccountOwner()57 public Human getBankAccountOwner() { 58 return bankAccountOwner; 59 } 60 setBankAccountOwner(Human bankAccountOwner)61 public void setBankAccountOwner(Human bankAccountOwner) { 62 this.bankAccountOwner = bankAccountOwner; 63 } 64 getChildren()65 public Set<Human> getChildren() { 66 return children; 67 } 68 setChildren(Set<Human> children)69 public void setChildren(Set<Human> children) { 70 this.children = children; 71 } 72 73 } 74