Logo Search packages:      
Sourcecode: cdk version File versions  Download package

NoNotificationChemObjectBuilder.java
/* $RCSfile$
 * $Author$
 * $Date$
 * $Revision$
 *
 * Copyright (C) 2006-2007  Egon Willighagen <egonw@users.sf.net>
 *
 * Contact: cdk-devel@lists.sourceforge.net
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package org.openscience.cdk.nonotify;

import org.openscience.cdk.interfaces.*;
import org.openscience.cdk.interfaces.IBond.Order;

import javax.vecmath.Point2d;
import javax.vecmath.Point3d;

/**
 * A helper class to instantiate a IChemObject for a specific implementation.
 * The only difference with the default implementation is that the NoNotification 
 * set does not throw change events. For situations where content is not
 * modified, or where no listeners are required, using this set might give a
 * speed up of up to 10%.
 *
 * @author        egonw
 * @cdk.module    nonotify
 * @cdk.githash
 */
00043 public class NoNotificationChemObjectBuilder implements IChemObjectBuilder {

      private static NoNotificationChemObjectBuilder instance = null;
      
      private NoNotificationChemObjectBuilder() {}

      public static NoNotificationChemObjectBuilder getInstance() {
            if (instance == null) {
                  instance = new NoNotificationChemObjectBuilder();
            }
            return instance;
      }
      
00056       public IAminoAcid newAminoAcid() {
        return new NNAminoAcid();
      }
      
00060       public IAtom newAtom() {
        return new NNAtom();
      }
      
00064     public IAtom newAtom(String elementSymbol) {
        return new NNAtom(elementSymbol);
    }
    
00068     public IAtom newAtom(String elementSymbol, javax.vecmath.Point2d point2d) {

        return new NNAtom(elementSymbol, point2d);
    }

00073     public IAtom newAtom(String elementSymbol, javax.vecmath.Point3d point3d) {
        return new NNAtom(elementSymbol, point3d);
    }
            
00077       public IAtomContainer newAtomContainer() {
        return new NNAtomContainer();
      }
    
00081       public IAtomContainer newAtomContainer(int atomCount, int electronContainerCount, int lonePairCount, int singleElectronCount) {
        return new NNAtomContainer(atomCount, electronContainerCount, lonePairCount, singleElectronCount);
      }
    
00085       public IAtomContainer newAtomContainer(IAtomContainer container) {
        return new NNAtomContainer(container);
      }
      
00089     public IAtomParity newAtomParity(
            IAtom centralAtom, 
            IAtom first, 
            IAtom second, 
            IAtom third, 
            IAtom fourth,
            int parity) {
        return new NNAtomParity(centralAtom, first, second, third, fourth, parity);
    }

00099       public IAtomType newAtomType(String elementSymbol) {
        return new NNAtomType(elementSymbol);
      }

00103       public IAtomType newAtomType(String identifier, String elementSymbol) {
        return new NNAtomType(identifier, elementSymbol);
      }

00107       public IBioPolymer newBioPolymer(){
        return new NNBioPolymer();
      }

00111       public IPDBPolymer newPDBPolymer() {
        return new NNPDBPolymer();
      }
      
00115       public IPDBAtom newPDBAtom(IElement element) {
        return new NNPDBAtom(element);
    }
      
00119     public IPDBAtom newPDBAtom(String elementSymbol) {
        return new NNPDBAtom(elementSymbol);
    }
    
    public IPDBAtom newPDBAtom(String elementSymbol, javax.vecmath.Point3d point3d) {
        return new NNPDBAtom(elementSymbol, point3d);
    }
    
00127       public IPDBStructure newPDBStructure() {
        return new NNPDBStructure();
      }
      
00131       public IPDBMonomer newPDBMonomer() {
        return new NNPDBMonomer();
      }
      
00135       public IBond newBond() {
        return new NNBond();
      }
      
00139       public IBond newBond(IAtom atom1, IAtom atom2) {
        return new NNBond(atom1, atom2);
      }
      
00143       public IBond newBond(IAtom atom1, IAtom atom2, Order order) {
        return new NNBond(atom1, atom2, order);
      }
      
00147       public IBond newBond(IAtom atom1, IAtom atom2, Order order, int stereo) {
        return new NNBond(atom1, atom2, order, stereo);
      }

00151     public IBond newBond(IAtom[] atoms) {
        return new NNBond(atoms);
    }

00155     public IBond newBond(IAtom[] atoms, Order order) {
        return new NNBond(atoms, order);
    }

00159     public IChemFile newChemFile() {
        return new NNChemFile();
      }

00163       public IChemModel newChemModel() {
        return new NNChemModel();
      }
      
00167       public IChemObject newChemObject() {
        return new NNChemObject();
      }
      
00171       public IChemSequence newChemSequence() {
        return new NNChemSequence();
      }
      
00175     public ICrystal newCrystal() {
        return new NNCrystal();
    }
    
00179     public ICrystal newCrystal(IAtomContainer container) {
        return new NNCrystal(container);
    }
    
00183     public IElectronContainer newElectronContainer() {
        return new NNElectronContainer();
    }
    
00187     public IElement newElement() {
        return new NNElement();
    }

00191     public IElement newElement(String symbol) {
        return new NNElement(symbol);
    }

00195     public IElement newElement(String symbol, int atomicNumber) {
        return new NNElement(symbol, atomicNumber);
    }

00199       public IIsotope newIsotope(String elementSymbol) {
        return new NNIsotope(elementSymbol);
      }
      
00203       public IIsotope newIsotope(int atomicNumber, String elementSymbol, 
                  int massNumber, double exactMass, double abundance) {
        return new NNIsotope(atomicNumber, elementSymbol, massNumber, exactMass, abundance);
      }

00208       public IIsotope newIsotope(int atomicNumber, String elementSymbol, 
                  double exactMass, double abundance) {
        return new NNIsotope(atomicNumber, elementSymbol, exactMass, abundance);
      }

00213       public IIsotope newIsotope(String elementSymbol, int massNumber) {

        return new NNIsotope(elementSymbol, massNumber);
      }

00218     public ILonePair newLonePair() {
        return new NNLonePair();
    }

00222     public ILonePair newLonePair(IAtom atom) {
        return new NNLonePair(atom);
    }

00226     public IMapping newMapping(IChemObject objectOne, 
            IChemObject objectTwo) {
        return new NNMapping(objectOne, objectTwo);
      }
    
00231       public IMolecule newMolecule() {
        return new NNMolecule();
      }

00235       public IMolecule newMolecule(int atomCount, int electronContainerCount, int lonePairCount, int singleElectronCount) {
        return new NNMolecule(atomCount, electronContainerCount, lonePairCount, singleElectronCount);
      }

00239       public IMolecule newMolecule(IAtomContainer container) {
        return new NNMolecule(container);
      }

00243       public IMonomer newMonomer () {

        return new NNMonomer();
      }
      
00248       public IPolymer newPolymer() {
        return new NNPolymer();
      }

00252     public IReaction newReaction() {
        return new NNReaction();
    }
      
00256       public IRing newRing() {
        return new NNRing();
      }
      
00260       public IRing newRing(IAtomContainer container) {
        return new NNRing(container);
      }
      
00264       public IRing newRing(int ringSize, String elementSymbol) {
        return new NNRing(ringSize, elementSymbol);
      }

00268       public IRing newRing(int ringSize) {
        return new NNRing(ringSize);
      }

00272       public IRingSet newRingSet() {
        return new NNRingSet();
      }

00276       public IAtomContainerSet newAtomContainerSet() {
        return new NNAtomContainerSet();
      }

00280       public IMoleculeSet newMoleculeSet() {
        return new NNMoleculeSet();
      }

00284       public IReactionSet newReactionSet() {
        return new NNReactionSet();
      }
      
00288       public IReactionScheme newReactionScheme() {
        return new NNReactionScheme();
      }
      
00292     public ISingleElectron newSingleElectron() {
        return new NNSingleElectron();
    }
    
00296     public ISingleElectron newSingleElectron(IAtom atom) {
        return new NNSingleElectron(atom);
    }

00300       public IStrand newStrand() {
        return new NNStrand();
      }

00304       public IPseudoAtom newPseudoAtom() {
        return new NNPseudoAtom();
      }

00308       public IPseudoAtom newPseudoAtom(String label) {
        return new NNPseudoAtom(label);
      }

      public IPseudoAtom newPseudoAtom(IAtom atom) {
            return new NNPseudoAtom(atom);
      }

      public IPseudoAtom newPseudoAtom(String label, Point3d point3d) {
            return new NNPseudoAtom(label, point3d);
      }

      public IPseudoAtom newPseudoAtom(String label, Point2d point2d) {
        return new NNPseudoAtom(label, point2d);
      }

00324       public IAtom newAtom(IElement element) {
            return new NNAtom(element);
      }

00328       public IAtomType newAtomType(IElement element) {
            return new NNAtomType(element);
      }

00332       public IChemObject newChemObject(IChemObject object) {
            return new NNChemObject(object);
      }

00336       public IElement newElement(IElement element) {
            return new NNElement(element);
      }

00340       public IIsotope newIsotope(IElement element) {
            return new NNIsotope(element);
      }

00344       public IPseudoAtom newPseudoAtom(IElement element) {
            return new NNPseudoAtom(element);
      }

00348       public IFragmentAtom newFragmentAtom() {
            return new NNFragmentAtom();
      }

      public IAdductFormula newAdductFormula() {
          return new NNAdductFormula();
    }

      public IAdductFormula newAdductFormula(IMolecularFormula formula) {
          return new NNAdductFormula(formula);
    }

      public IMolecularFormula newMolecularFormula() {
          return new NNMolecularFormula();
    }

      public IMolecularFormulaSet newMolecularFormulaSet() {
          return new NNMolecularFormulaSet();
    }

      public IMolecularFormulaSet newMolecularFormulaSet(IMolecularFormula formula) {
          return new NNMolecularFormulaSet(formula);
    }
}



Generated by  Doxygen 1.6.0   Back to index