01: /*
02: * JFolder, Copyright 2001-2006 Gary Steinmetz
03: *
04: * Distributable under LGPL license.
05: * See terms of license at gnu.org.
06: */
07:
08: package org.jfolder.common.tagging;
09:
10: //base classes
11:
12: //project specific classes
13:
14: //other classes
15:
16: public abstract class BaseConceptTagCallContext implements
17: ConceptTagCallContext {
18: //
19:
20: //
21: private ConceptTagFlags ctf = null;
22:
23: protected BaseConceptTagCallContext(ConceptTagPreferences inCtp,
24: ConceptTagFlags inCtf) {
25: //
26: this .ctf = new ConceptTagFlags();
27: //
28: if (inCtp != null) {
29: this .ctf.copyFlagsFrom(inCtp.getFlags());
30: }
31: //
32: if (inCtf != null) {
33: this .ctf.copyFlagsFrom(inCtf);
34: }
35: }
36:
37: //
38: public int hashCode() {
39:
40: int outValue = 0;
41:
42: outValue += this .ctf.hashCode();
43:
44: return outValue;
45: }
46:
47: public boolean equals(Object inObject) {
48:
49: boolean outValue = true;
50:
51: if (inObject instanceof BaseConceptTagCallContext) {
52: BaseConceptTagCallContext bctcc1 = ((BaseConceptTagCallContext) inObject);
53: outValue &= this .ctf.equals(bctcc1.ctf);
54: } else {
55: outValue &= false;
56: }
57:
58: return outValue;
59: }
60:
61: //
62: public ConceptTagFlags getFlags() {
63: return this.ctf;
64: }
65: }
|