01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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:
35: public AddressBean getAddress() {
36: return address;
37: }
38:
39: public void setAddress(AddressBean address) {
40: this .address = address;
41: }
42:
43: public PersonBean getHouseholder() {
44: return householder;
45: }
46:
47: public void setHouseholder(PersonBean householder) {
48: this .householder = householder;
49: }
50:
51: public boolean isTenant() {
52: return isTenant;
53: }
54:
55: public void setTenant(boolean isTenant) {
56: this .isTenant = isTenant;
57: }
58:
59: public CompassPoint getFacing() {
60: return facing;
61: }
62:
63: public void setFacing(CompassPoint facing) {
64: this .facing = facing;
65: }
66:
67: public String toString() {
68: return "[" + this .getClass().getName() + ": address=" + address
69: + " householder=" + householder + " facing=" + facing
70: + " tenant=" + isTenant + "]";
71: }
72:
73: public boolean equals(Object obj) {
74: if (obj == null)
75: return false;
76: return this .hashCode() == obj.hashCode();
77: }
78:
79: public int hashCode() {
80: return toString().hashCode();
81: }
82: }
|