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.smiles.smarts.parser; 19 20 /** 21 * An AST node. It represents atomic number (#) in smarts 22 * 23 * @author Dazhi Jiao 24 * @cdk.created 2007-04-24 25 * @cdk.module smarts 26 * @cdk.githash 27 * @cdk.keyword SMARTS AST 28 */ 29 @Deprecated 30 class ASTAtomicNumber extends SimpleNode { 31 32 /** 33 * The atomic number 34 */ 35 private int number; 36 37 /** 38 * Creates a new instance. 39 */ ASTAtomicNumber(int id)40 public ASTAtomicNumber(int id) { 41 super(id); 42 } 43 44 /** 45 * Creates a new instance. 46 */ ASTAtomicNumber(SMARTSParser p, int id)47 public ASTAtomicNumber(SMARTSParser p, int id) { 48 super(p, id); 49 } 50 51 /** 52 * Returns the atomic number. 53 */ getNumber()54 public int getNumber() { 55 return number; 56 } 57 58 /* 59 * (non-Javadoc) 60 * @see 61 * org.openscience.cdk.smiles.smarts.parser.SimpleNode#jjtAccept(org.openscience 62 * .cdk.smiles.smarts.parser.SMARTSParserVisitor, java.lang.Object) 63 */ 64 @Override jjtAccept(SMARTSParserVisitor visitor, Object data)65 public Object jjtAccept(SMARTSParserVisitor visitor, Object data) { 66 return visitor.visit(this, data); 67 } 68 69 /** 70 * Sets the atomic number. 71 */ setNumber(int number)72 public void setNumber(int number) { 73 this.number = number; 74 } 75 } 76