1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17 package org.apache.commons.betwixt.io.read;
18
19 /**
20 * Example enum
21 *
22 * @author Robert Burrell Donkin
23 * @version $Id: HouseBean.java 438373 2006-08-30 05:17:21Z bayard $
24 */
25 public class HouseBean {
26
27 private CompassPoint facing;
28 private AddressBean address;
29 private PersonBean householder;
30 private boolean isTenant;
31
32 public HouseBean() {}
33
34 public AddressBean getAddress() {
35 return address;
36 }
37
38 public void setAddress(AddressBean address) {
39 this.address = address;
40 }
41
42 public PersonBean getHouseholder() {
43 return householder;
44 }
45
46 public void setHouseholder(PersonBean householder) {
47 this.householder = householder;
48 }
49
50 public boolean isTenant() {
51 return isTenant;
52 }
53
54 public void setTenant(boolean isTenant) {
55 this.isTenant = isTenant;
56 }
57
58 public CompassPoint getFacing() {
59 return facing;
60 }
61
62 public void setFacing(CompassPoint facing) {
63 this.facing = facing;
64 }
65
66 public String toString() {
67 return "[" + this.getClass().getName() + ": address=" + address + " householder=" + householder
68 + " facing=" + facing + " tenant=" + isTenant + "]";
69 }
70
71 public boolean equals( Object obj ) {
72 if ( obj == null ) return false;
73 return this.hashCode() == obj.hashCode();
74 }
75
76 public int hashCode() {
77 return toString().hashCode();
78 }
79 }