File: Test.java

package info (click to toggle)
castor 1.3.2-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 44,976 kB
  • sloc: java: 206,032; xml: 95,088; sql: 14,460; sh: 365; makefile: 10
file content (263 lines) | stat: -rw-r--r-- 7,639 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
/*
 * This class was automatically generated with 
 * <a href="http://www.castor.org">Castor 0.9.5.2</a>, using an XML
 * Schema.
 * $Id: Test.java 7504 2008-03-21 09:48:10Z wguttmn $
 */

  //---------------------------------/
 //- Imported classes and packages -/
//---------------------------------/

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.IOException;
import java.io.Reader;
import java.io.Serializable;
import java.io.Writer;
import java.util.Vector;
import org.exolab.castor.xml.MarshalException;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.ValidationException;
import org.xml.sax.ContentHandler;

/**
 * Class Test.
 * 
 * @version $Revision$ $Date$
 */
public class Test implements java.io.Serializable {


      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * Field _firstInteger
     */
    private int _firstInteger;

    /**
     * keeps track of state for field: _firstInteger
     */
    private boolean _has_firstInteger;

    /**
     * Field _secondInteger
     */
    private int _secondInteger;

    /**
     * keeps track of state for field: _secondInteger
     */
    private boolean _has_secondInteger;

    /**
     * Field propertyChangeListeners
     */
    private java.util.Vector propertyChangeListeners;


      //----------------/
     //- Constructors -/
    //----------------/

    public Test() {
        super();
        propertyChangeListeners = new Vector();
    } //-- generated.castor1948.castor-version0952.Test()


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method addPropertyChangeListenerRegisters a
     * PropertyChangeListener with this class.
     * 
     * @param pcl The PropertyChangeListener to register.
     */
    public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
    {
        propertyChangeListeners.addElement(pcl);
    } //-- void addPropertyChangeListener(java.beans.PropertyChangeListener) 

    /**
     * Note: hashCode() has not been overriden
     * 
     * @param obj
     */
    public boolean equals(java.lang.Object obj)
    {
        if ( this == obj )
            return true;
        
        if (obj instanceof Test) {
        
            Test temp = (Test)obj;
            if (this._firstInteger != temp._firstInteger)
                return false;
            if (this._has_firstInteger != temp._has_firstInteger)
                return false;
            if (this._secondInteger != temp._secondInteger)
                return false;
            if (this._has_secondInteger != temp._has_secondInteger)
                return false;
            return true;
        }
        return false;
    } //-- boolean equals(java.lang.Object) 

    /**
     * Returns the value of field 'firstInteger'.
     * 
     * @return the value of field 'firstInteger'.
     */
    public int getFirstInteger()
    {
        return this._firstInteger;
    } //-- int getFirstInteger() 

    /**
     * Returns the value of field 'secondInteger'.
     * 
     * @return the value of field 'secondInteger'.
     */
    public int getSecondInteger()
    {
        return this._secondInteger;
    } //-- int getSecondInteger() 

    /**
     * Method hasFirstInteger
     */
    public boolean hasFirstInteger()
    {
        return this._has_firstInteger;
    } //-- boolean hasFirstInteger() 

    /**
     * Method hasSecondInteger
     */
    public boolean hasSecondInteger()
    {
        return this._has_secondInteger;
    } //-- boolean hasSecondInteger() 

    /**
     * Method isValid
     */
    public boolean isValid()
    {
        try {
            validate();
        }
        catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    } //-- boolean isValid() 

    /**
     * Method marshal
     * 
     * @param out
     */
    public void marshal(java.io.Writer out)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        
        Marshaller.marshal(this, out);
    } //-- void marshal(java.io.Writer) 

    /**
     * Method marshal
     * 
     * @param handler
     */
    public void marshal(org.xml.sax.ContentHandler handler)
        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        
        Marshaller.marshal(this, handler);
    } //-- void marshal(org.xml.sax.ContentHandler) 

    /**
     * Method notifyPropertyChangeListenersNotifies all registered
     * PropertyChangeListeners when a bound property's value
     * changes.
     * 
     * @param fieldName the name of the property that has changed.
     * @param newValue the new value of the property.
     * @param oldValue the old value of the property.
     */
    protected void notifyPropertyChangeListeners(java.lang.String fieldName, java.lang.Object oldValue, java.lang.Object newValue)
    {
        if (propertyChangeListeners == null) return;
        java.beans.PropertyChangeEvent event = new java.beans.PropertyChangeEvent(this, fieldName, oldValue, newValue);
        
        for (int i = 0; i < propertyChangeListeners.size(); i++) {
            ((java.beans.PropertyChangeListener) propertyChangeListeners.elementAt(i)).propertyChange(event);
        }
    } //-- void notifyPropertyChangeListeners(java.lang.String, java.lang.Object, java.lang.Object) 

    /**
     * Method removePropertyChangeListenerRemoves the given
     * PropertyChangeListener from this classes list of
     * ProperyChangeListeners.
     * 
     * @param pcl The PropertyChangeListener to remove.
     * @return true if the given PropertyChangeListener was removed.
     */
    public boolean removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
    {
        return propertyChangeListeners.removeElement(pcl);
    } //-- boolean removePropertyChangeListener(java.beans.PropertyChangeListener) 

    /**
     * Sets the value of field 'firstInteger'.
     * 
     * @param firstInteger the value of field 'firstInteger'.
     */
    public void setFirstInteger(int firstInteger)
    {
        this._firstInteger = firstInteger;
        this._has_firstInteger = true;
    } //-- void setFirstInteger(int) 

    /**
     * Sets the value of field 'secondInteger'.
     * 
     * @param secondInteger the value of field 'secondInteger'.
     */
    public void setSecondInteger(int secondInteger)
    {
        this._secondInteger = secondInteger;
        this._has_secondInteger = true;
    } //-- void setSecondInteger(int) 

    /**
     * Method unmarshalTest
     * 
     * @param reader
     */
    public static java.lang.Object unmarshalTest(java.io.Reader reader)
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
    {
        return (Test) Unmarshaller.unmarshal(Test.class, reader);
    } //-- java.lang.Object unmarshalTest(java.io.Reader) 

    /**
     * Method validate
     */
    public void validate()
        throws org.exolab.castor.xml.ValidationException
    {
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
        validator.validate(this);
    } //-- void validate() 

}