Source code: joelib/util/types/DoubleInt.java
1 ///////////////////////////////////////////////////////////////////////////////
2 // Filename: $RCSfile: DoubleInt.java,v $
3 // Purpose: Atom representation.
4 // Language: Java
5 // Compiler: JDK 1.4
6 // Authors: Joerg K. Wegner
7 // Version: $Revision: 1.7 $
8 // $Date: 2003/08/22 15:56:22 $
9 // $Author: wegner $
10 //
11 // Copyright (c) Dept. Computer Architecture, University of Tuebingen, Germany
12 //
13 // This program is free software; you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation version 2 of the License.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 ///////////////////////////////////////////////////////////////////////////////
22 package joelib.util.types;
23
24
25 /*==========================================================================*
26 * IMPORTS
27 *========================================================================== */
28 /*==========================================================================*
29 * CLASS DECLARATION
30 *========================================================================== */
31
32 /**
33 * Double and integer value.
34 *
35 * @author wegnerj
36 * @license GPL
37 * @cvsversion $Revision: 1.7 $, $Date: 2003/08/22 15:56:22 $
38 */
39 public class DoubleInt implements java.io.Serializable
40 {
41 //~ Instance fields ////////////////////////////////////////////////////////
42
43 /*-------------------------------------------------------------------------*
44 * public member variables
45 *------------------------------------------------------------------------- */
46
47 /**
48 * Description of the Field
49 */
50 public double d;
51
52 /**
53 * Description of the Field
54 */
55 public int i;
56
57 //~ Constructors ///////////////////////////////////////////////////////////
58
59 /*-------------------------------------------------------------------------*
60 * constructor
61 *------------------------------------------------------------------------- */
62
63 /**
64 * Constructor for the IntInt object
65 */
66 public DoubleInt()
67 {
68 }
69
70 /**
71 * Constructor for the IntInt object
72 *
73 * @param _i1 Description of the Parameter
74 * @param _i2 Description of the Parameter
75 */
76 public DoubleInt(double _d, int _i)
77 {
78 d = _d;
79 i = _i;
80 }
81
82 //~ Methods ////////////////////////////////////////////////////////////////
83
84 public boolean equals(Object otherObj)
85 {
86 if (otherObj instanceof DoubleInt)
87 {
88 DoubleInt di = (DoubleInt) otherObj;
89
90 if ((di.d == this.d) && (di.i == this.i))
91 {
92 return true;
93 }
94 else
95 {
96 return false;
97 }
98 }
99 else
100 {
101 return false;
102 }
103 }
104 }
105 ///////////////////////////////////////////////////////////////////////////////
106 // END OF FILE.
107 ///////////////////////////////////////////////////////////////////////////////