01: /*
02: * Copyright 2006 Dan Shellman
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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.iscreen.impl.xml;
17:
18: /**
19: *
20: * @author Shellman, Dan
21: */
22: public class XmlConfigMapping {
23: private String from;
24: private String to;
25:
26: /**
27: * Default constructor.
28: */
29: public XmlConfigMapping() {
30: } //end XmlConfigMapping()
31:
32: public void setFrom(String fromMapping) {
33: from = fromMapping;
34: } //end setFrom()
35:
36: public String getFrom() {
37: return from;
38: } //end getFrom()
39:
40: public void setTo(String toMapping) {
41: to = toMapping;
42: } //end setTo()
43:
44: public String getTo() {
45: return to;
46: } //end getTo()
47:
48: public boolean equals(Object obj) {
49: XmlConfigMapping mapping;
50:
51: mapping = (XmlConfigMapping) obj;
52: if (((mapping.from == from) || (mapping.from != null
53: && from != null && mapping.from.equals(from)))
54: && ((mapping.to == to) || (mapping.to != null
55: && to != null && mapping.to.equals(to)))) {
56: return true;
57: }
58:
59: return false;
60: } //end equals()
61: } //end XmlConfigMapping
|