Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: joelib/desc/types/NumberOfBonds.java


1   ///////////////////////////////////////////////////////////////////////////////
2   //  Filename: $RCSfile: NumberOfBonds.java,v $
3   //  Purpose:  Number of bonds.
4   //  Language: Java
5   //  Compiler: JDK 1.4
6   //  Authors:  Joerg K. Wegner
7   //  Version:  $Revision: 1.7 $
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   *  ==========================================================================*
27   *  IMPORTS
28   *  ==========================================================================
29   */
30  import joelib.desc.DescriptorHelper;
31  import joelib.desc.DescriptorInfo;
32  import joelib.desc.SimpleIntDesc;
33  
34  import joelib.molecule.JOEMol;
35  
36  import org.apache.log4j.Category;
37  
38  
39  /*
40   *  ==========================================================================*
41   *  CLASS DECLARATION
42   *  ==========================================================================
43   */
44  
45  /**
46   * Number of bonds.
47   *
48   * @author     wegnerj
49   * @license    GPL
50   * @cvsversion    $Revision: 1.7 $, $Date: 2003/08/19 13:11:25 $
51   */
52  public class NumberOfBonds extends SimpleIntDesc
53  {
54      //~ Static fields/initializers /////////////////////////////////////////////
55  
56      /*
57       *  -------------------------------------------------------------------------*
58       *  public static member variables
59       *  -------------------------------------------------------------------------
60       */
61  
62      /**
63       *  Obtain a suitable logger.
64       */
65      private static Category logger = Category.getInstance(
66              "joelib.desc.types.NumberOfBonds");
67      public static final String DESC_KEY = "Number_of_bonds";
68  
69      //~ Constructors ///////////////////////////////////////////////////////////
70  
71      /*
72       *  -------------------------------------------------------------------------*
73       *  constructor
74       *  -------------------------------------------------------------------------
75       */
76  
77      /**
78       *  Constructor for the KierShape1 object
79       */
80      public NumberOfBonds()
81      {
82          if (logger.isDebugEnabled())
83          {
84              logger.debug("Initialize " + this.getClass().getName());
85          }
86  
87          descInfo = DescriptorHelper.generateDescInfo(DESC_KEY, this.getClass(),
88                  DescriptorInfo.TYPE_NO_COORDINATES, null,
89                  "joelib.desc.result.IntResult");
90      }
91  
92      //~ Methods ////////////////////////////////////////////////////////////////
93  
94      /*
95       *  -------------------------------------------------------------------------*
96       *  public methods
97       *  -------------------------------------------------------------------------
98       */
99  
100     /**
101      * Gets the doubleValue attribute of the KierShape1 object
102      *
103      * @param mol  Description of the Parameter
104      * @return     The doubleValue value
105      */
106     public int getIntValue(JOEMol mol)
107     {
108         int mw;
109 
110         mw = mol.numBonds();
111 
112         return mw;
113     }
114 }
115 ///////////////////////////////////////////////////////////////////////////////
116 //  END OF FILE.
117 ///////////////////////////////////////////////////////////////////////////////