001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.test.xml.choice;
023:
024: /**
025: * @author <a href="mailto:alex@jboss.org">Alexey Loubyansky</a>
026: * @version <tt>$Revision: 57211 $</tt>
027: */
028: public class Choice2 {
029: private String a;
030: private String b;
031: private String c;
032:
033: public Choice2() {
034: }
035:
036: public Choice2(String a, String b, String c) {
037: this .a = a;
038: this .b = b;
039: this .c = c;
040: }
041:
042: public String getA() {
043: return a;
044: }
045:
046: public void setA(String a) {
047: this .a = a;
048: }
049:
050: public String getB() {
051: return b;
052: }
053:
054: public void setB(String b) {
055: this .b = b;
056: }
057:
058: public String getC() {
059: return c;
060: }
061:
062: public void setC(String c) {
063: this .c = c;
064: }
065:
066: public String toString() {
067: return "[a=" + a + ", b=" + b + ", c=" + c + "]";
068: }
069:
070: public boolean equals(Object o) {
071: if (this == o) {
072: return true;
073: }
074: if (!(o instanceof Choice2)) {
075: return false;
076: }
077:
078: final Choice2 choice2 = (Choice2) o;
079:
080: if (a != null ? !a.equals(choice2.a) : choice2.a != null) {
081: return false;
082: }
083: if (b != null ? !b.equals(choice2.b) : choice2.b != null) {
084: return false;
085: }
086: if (c != null ? !c.equals(choice2.c) : choice2.c != null) {
087: return false;
088: }
089:
090: return true;
091: }
092:
093: public int hashCode() {
094: int result;
095: result = (a != null ? a.hashCode() : 0);
096: result = 29 * result + (b != null ? b.hashCode() : 0);
097: result = 29 * result + (c != null ? c.hashCode() : 0);
098: return result;
099: }
100: }
|