1 /* Copyright (C) 2004-2007 The Chemistry Development Kit (CDK) project 2 * 3 * Contact: cdk-devel@lists.sourceforge.net 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public License 7 * as published by the Free Software Foundation; either version 2.1 8 * of the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 */ 19 package org.openscience.cdk.isomorphism.matchers.smarts; 20 21 import org.openscience.cdk.interfaces.IBond; 22 import org.openscience.cdk.interfaces.IChemObjectBuilder; 23 import org.openscience.cdk.isomorphism.matchers.IQueryAtom; 24 25 /** 26 * This matches a bond of any order. 27 * 28 * @cdk.module smarts 29 * @cdk.githash 30 * @cdk.keyword SMARTS 31 */ 32 @Deprecated 33 public class AnyOrderQueryBond extends SMARTSBond { 34 35 private static final long serialVersionUID = -826100570208878645L; 36 AnyOrderQueryBond(IChemObjectBuilder builder)37 public AnyOrderQueryBond(IChemObjectBuilder builder) { 38 super(builder); 39 } 40 41 /** 42 * Creates a new instance. 43 * 44 * @param atom1 45 * @param atom2 46 */ AnyOrderQueryBond(IQueryAtom atom1, IQueryAtom atom2, IBond.Order order, IChemObjectBuilder builder)47 public AnyOrderQueryBond(IQueryAtom atom1, IQueryAtom atom2, IBond.Order order, IChemObjectBuilder builder) { 48 super(atom1, atom2, order, builder); 49 } 50 51 /* 52 * (non-Javadoc) 53 * @see 54 * org.openscience.cdk.isomorphism.matchers.smarts.SMARTSBond#matches(org 55 * .openscience.cdk.interfaces.IBond) 56 */ 57 @Override matches(IBond bond)58 public boolean matches(IBond bond) { 59 return bond != null; // any bond order is fine 60 } 61 62 /* 63 * (non-Javadoc) 64 * @see org.openscience.cdk.Bond#toString() 65 */ 66 @Override toString()67 public String toString() { 68 return "AnyOrderQueryBond()"; 69 } 70 } 71