1 /* Copyright (C) 2004-2007  The Chemistry Development Kit (CDK) project
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
16  * (or see http://www.gnu.org/copyleft/lesser.html)
17  */
18 package org.openscience.cdk.isomorphism.matchers.smarts;
19 
20 import org.openscience.cdk.CDKConstants;
21 import org.openscience.cdk.interfaces.IBond;
22 import org.openscience.cdk.interfaces.IChemObjectBuilder;
23 
24 /**
25  * This smarts bond matches any bond that is in a ring.
26  *
27  * @cdk.module  smarts
28  * @cdk.githash
29  * @cdk.keyword SMARTS
30  */
31 @Deprecated
32 public class RingBond extends SMARTSBond {
33 
34     private static final long serialVersionUID = -8670609649648985629L;
35 
36     /**
37      * Creates a new instance
38      *
39      */
RingBond(IChemObjectBuilder builder)40     public RingBond(IChemObjectBuilder builder) {
41         super(builder);
42         this.setFlag(CDKConstants.ISINRING, true);
43     }
44 
45     /*
46      * (non-Javadoc)
47      * @see
48      * org.openscience.cdk.isomorphism.matchers.smarts.SMARTSBond#matches(org
49      * .openscience.cdk.interfaces.IBond)
50      */
51     @Override
matches(IBond bond)52     public boolean matches(IBond bond) {
53         return bond.getFlag(CDKConstants.ISINRING);
54     }
55 }
56