Source code: joelib/desc/types/NumberOfHal.java
1 ///////////////////////////////////////////////////////////////////////////////
2 // Filename: $RCSfile: NumberOfHal.java,v $
3 // Purpose: Number of halogen atoms.
4 // Language: Java
5 // Compiler: JDK 1.4
6 // Authors: Joerg K. Wegner
7 // Version: $Revision: 1.10 $
8 // $Date: 2003/08/19 13:11:25 $
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.desc.types;
23
24
25 /*==========================================================================*
26 * IMPORTS
27 *==========================================================================*/
28 import joelib.data.JOEElementTable;
29
30 import joelib.desc.AtomsCounter;
31 import joelib.desc.DescriptorHelper;
32 import joelib.desc.DescriptorInfo;
33
34 import org.apache.log4j.Category;
35
36
37 /*==========================================================================*
38 * CLASS DECLARATION
39 *==========================================================================*/
40
41 /**
42 * Number of halogen atoms.
43 *
44 * @author wegnerj
45 * @license GPL
46 * @cvsversion $Revision: 1.10 $, $Date: 2003/08/19 13:11:25 $
47 */
48 public class NumberOfHal extends AtomsCounter
49 {
50 //~ Static fields/initializers /////////////////////////////////////////////
51
52 /*-------------------------------------------------------------------------*
53 * public static member variables
54 *------------------------------------------------------------------------- */
55
56 /**
57 * Obtain a suitable logger.
58 */
59 private static Category logger = Category.getInstance(
60 "joelib.desc.types.NumberOfHal");
61 private static int[] DEFAULT = new int[]
62 {
63 JOEElementTable.instance().getAtomicNum("F"),
64 JOEElementTable.instance().getAtomicNum("Cl"),
65 JOEElementTable.instance().getAtomicNum("Br"),
66 JOEElementTable.instance().getAtomicNum("I"),
67 JOEElementTable.instance().getAtomicNum("At")
68 };
69 public static final String DESC_KEY = "Number_of_halogen_atoms";
70
71 //~ Constructors ///////////////////////////////////////////////////////////
72
73 /*-------------------------------------------------------------------------*
74 * constructor
75 *------------------------------------------------------------------------- */
76 public NumberOfHal()
77 {
78 if (logger.isDebugEnabled())
79 {
80 logger.debug("Initialize " + this.getClass().getName());
81 }
82
83 descInfo = DescriptorHelper.generateDescInfo(DESC_KEY, this.getClass(),
84 DescriptorInfo.TYPE_NO_COORDINATES, null,
85 "joelib.desc.result.IntResult");
86 }
87
88 //~ Methods ////////////////////////////////////////////////////////////////
89
90 /*-------------------------------------------------------------------------*
91 * public methods
92 *------------------------------------------------------------------------- */
93
94 /**
95 * Gets the defaultAtoms attribute of the NumberOfC object
96 *
97 * @return The defaultAtoms value
98 */
99 public int[] getDefaultAtoms()
100 {
101 return DEFAULT;
102 }
103 }
104 ///////////////////////////////////////////////////////////////////////////////
105 // END OF FILE.
106 ///////////////////////////////////////////////////////////////////////////////