@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Clones this <code>ReactionSet</code> and the contained <code>Reaction</code>s * too. * * @return The cloned ReactionSet */ @Override public Object clone() throws CloneNotSupportedException { ReactionSet clone = (ReactionSet) super.clone(); // clone the reactions clone.reactionCount = this.reactionCount; clone.reactions = new IReaction[clone.reactionCount]; for (int f = 0; f < clone.reactionCount; f++) { clone.reactions[f] = (IReaction) ((IReaction) reactions[f]).clone(); } return clone; }
/** * Clones this <code>ReactionSet</code> and the contained <code>Reaction</code>s * too. * * @return The cloned ReactionSet */ @Override public Object clone() throws CloneNotSupportedException { ReactionSet clone = (ReactionSet) super.clone(); // clone the reactions clone.reactionCount = this.reactionCount; clone.reactions = new IReaction[clone.reactionCount]; for (int f = 0; f < clone.reactionCount; f++) { clone.reactions[f] = (IReaction) ((IReaction) reactions[f]).clone(); } return clone; }
/** * Clones this <code>Mapping</code> and the mapped <code>IChemObject</code>s. * * @return The cloned object */ @Override public Object clone() throws CloneNotSupportedException { Mapping clone = (Mapping) super.clone(); // clone the related IChemObject's if (relation != null) { clone.relation = new IChemObject[relation.length]; for (int f = 0; f < relation.length; f++) { if (relation[f] != null) { clone.relation[f] = (IChemObject) relation[f].clone(); } } } return clone; } }
/** * Clones this <code>Mapping</code> and the mapped <code>IChemObject</code>s. * * @return The cloned object */ @Override public Object clone() throws CloneNotSupportedException { Mapping clone = (Mapping) super.clone(); // clone the related IChemObject's if (relation != null) { clone.relation = new IChemObject[relation.length]; for (int f = 0; f < relation.length; f++) { if (relation[f] != null) { clone.relation[f] = (IChemObject) relation[f].clone(); } } } return clone; } }
/** {@inheritDoc} */ @Override public Object clone() throws CloneNotSupportedException { Object clone = null; try { clone = super.clone(); } catch (Exception exception) { logger.error("Could not clone DebugAtom: " + exception.getMessage(), exception); logger.debug(exception); } return clone; }
@Override public Object clone() throws CloneNotSupportedException { ChemSequence clone = (ChemSequence) super.clone(); // clone the chemModels clone.chemModelCount = getChemModelCount(); clone.chemModels = new ChemModel[clone.chemModelCount]; for (int f = 0; f < clone.chemModelCount; f++) { clone.chemModels[f] = (ChemModel) ((ChemModel) chemModels[f]).clone(); } return clone; }
@Override public Object clone() throws CloneNotSupportedException { ChemSequence clone = (ChemSequence) super.clone(); // clone the chemModels clone.chemModelCount = getChemModelCount(); clone.chemModels = new ChemModel[clone.chemModelCount]; for (int f = 0; f < clone.chemModelCount; f++) { clone.chemModels[f] = (ChemModel) ((ChemModel) chemModels[f]).clone(); } return clone; }
/** * Allows for getting an clone of this object. * *@return a clone of this object */ @Override public Object clone() throws CloneNotSupportedException { ChemFile clone = (ChemFile) super.clone(); // clone the chemModels clone.chemSequenceCount = getChemSequenceCount(); clone.chemSequences = new ChemSequence[clone.chemSequenceCount]; for (int f = 0; f < clone.chemSequenceCount; f++) { clone.chemSequences[f] = (ChemSequence) ((ChemSequence) chemSequences[f]).clone(); } return clone; }
/** * Allows for getting an clone of this object. * *@return a clone of this object */ @Override public Object clone() throws CloneNotSupportedException { ChemFile clone = (ChemFile) super.clone(); // clone the chemModels clone.chemSequenceCount = getChemSequenceCount(); clone.chemSequences = new ChemSequence[clone.chemSequenceCount]; for (int f = 0; f < clone.chemSequenceCount; f++) { clone.chemSequences[f] = (ChemSequence) ((ChemSequence) chemSequences[f]).clone(); } return clone; }
/** * Clones this AtomContainerSet and its content. * * @return the cloned Object */ @Override public Object clone() throws CloneNotSupportedException { AtomContainerSet clone = (AtomContainerSet) super.clone(); clone.atomContainers = new IAtomContainer[atomContainerCount]; clone.atomContainerCount = 0; for (int i = 0; i < atomContainerCount; i++) { clone.addAtomContainer((IAtomContainer) atomContainers[i].clone()); clone.setMultiplier(i, getMultiplier(i)); } return clone; }
/** * Clones this AtomContainerSet and its content. * * @return the cloned Object */ @Override public Object clone() throws CloneNotSupportedException { AtomContainerSet clone = (AtomContainerSet) super.clone(); clone.atomContainers = new IAtomContainer[atomContainerCount]; clone.atomContainerCount = 0; for (int i = 0; i < atomContainerCount; i++) { clone.addAtomContainer((IAtomContainer) atomContainers[i].clone()); clone.setMultiplier(i, getMultiplier(i)); } return clone; }
ChemModel clone = (ChemModel) super.clone();
ChemModel clone = (ChemModel) super.clone();
/** * Clones this <code>Reaction</code> and its content. * * @return The cloned object */ @Override public Object clone() throws CloneNotSupportedException { Reaction clone = (Reaction) super.clone(); // clone the reactants, products and agents clone.reactants = (IAtomContainerSet) reactants.clone(); clone.agents = (IAtomContainerSet) agents.clone(); clone.products = (IAtomContainerSet) products.clone(); // create a Map of corresponding atoms for molecules (key: original Atom, // value: clone Atom) Map<IAtom, IAtom> atomatom = new Hashtable<IAtom, IAtom>(); for (int i = 0; i < reactants.getAtomContainerCount(); ++i) { IAtomContainer mol = reactants.getAtomContainer(i); IAtomContainer mol2 = clone.reactants.getAtomContainer(i); for (int j = 0; j < mol.getAtomCount(); ++j) atomatom.put(mol.getAtom(j), mol2.getAtom(j)); } // clone the maps clone.map = new Mapping[map.length]; for (int f = 0; f < mappingCount; f++) { clone.map[f] = new Mapping(atomatom.get(map[f].getChemObject(0)), atomatom.get(map[f].getChemObject(1))); } return clone; }
/** * Clones this <code>Reaction</code> and its content. * * @return The cloned object */ @Override public Object clone() throws CloneNotSupportedException { Reaction clone = (Reaction) super.clone(); // clone the reactants, products and agents clone.reactants = (IAtomContainerSet) reactants.clone(); clone.agents = (IAtomContainerSet) agents.clone(); clone.products = (IAtomContainerSet) products.clone(); // create a Map of corresponding atoms for molecules (key: original Atom, // value: clone Atom) Map<IAtom, IAtom> atomatom = new Hashtable<IAtom, IAtom>(); for (int i = 0; i < reactants.getAtomContainerCount(); ++i) { IAtomContainer mol = reactants.getAtomContainer(i); IAtomContainer mol2 = clone.reactants.getAtomContainer(i); for (int j = 0; j < mol.getAtomCount(); ++j) atomatom.put(mol.getAtom(j), mol2.getAtom(j)); } // clone the maps clone.map = new Mapping[map.length]; for (int f = 0; f < mappingCount; f++) { clone.map[f] = new Mapping(atomatom.get(map[f].getChemObject(0)), atomatom.get(map[f].getChemObject(1))); } return clone; }
AtomContainer2 clone = (AtomContainer2) super.clone();