Source code: joelib/desc/types/NumberOfB.java
1 ///////////////////////////////////////////////////////////////////////////////
2 // Filename: $RCSfile: NumberOfB.java,v $
3 // Purpose: Number of bor atoms.
4 // Language: Java
5 // Compiler: JDK 1.4
6 // Authors: Joerg K. Wegner
7 // Version: $Revision: 1.6 $
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 bor atoms.
43 *
44 * @author wegnerj
45 * @license GPL
46 * @cvsversion $Revision: 1.6 $, $Date: 2003/08/19 13:11:25 $
47 */
48 public class NumberOfB 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.NumberOfB");
61 private static int[] DEFAULT = new int[]
62 {
63 JOEElementTable.instance().getAtomicNum("B")
64 };
65 public static final String DESC_KEY = "Number_of_B_atoms";
66
67 //~ Constructors ///////////////////////////////////////////////////////////
68
69 /*-------------------------------------------------------------------------*
70 * constructor
71 *------------------------------------------------------------------------- */
72 public NumberOfB()
73 {
74 if (logger.isDebugEnabled())
75 {
76 logger.debug("Initialize " + this.getClass().getName());
77 }
78
79 descInfo = DescriptorHelper.generateDescInfo(DESC_KEY, this.getClass(),
80 DescriptorInfo.TYPE_NO_COORDINATES, null,
81 "joelib.desc.result.IntResult");
82 }
83
84 //~ Methods ////////////////////////////////////////////////////////////////
85
86 /*-------------------------------------------------------------------------*
87 * public methods
88 *------------------------------------------------------------------------- */
89
90 /**
91 * Gets the defaultAtoms attribute of the NumberOfC object
92 *
93 * @return The defaultAtoms value
94 */
95 public int[] getDefaultAtoms()
96 {
97 return DEFAULT;
98 }
99 }
100 ///////////////////////////////////////////////////////////////////////////////
101 // END OF FILE.
102 ///////////////////////////////////////////////////////////////////////////////