Esempio n. 1
0
        /// <summary>  Clones this SetOfMolecules and its content.
        ///
        /// </summary>
        /// <returns>    the cloned object
        /// </returns>
        public override System.Object Clone()
        {
            SetOfMolecules clone = (SetOfMolecules)base.Clone();

            IMolecule[] result = Molecules;
            for (int i = 0; i < result.Length; i++)
            {
                clone.addMolecule((Molecule)result[i].Clone());
            }
            return((System.Object)clone);
        }
Esempio n. 2
0
 /// <summary> Returns a String representation of the contents of this
 /// IChemObject.
 ///
 /// </summary>
 /// <returns> String representation of content
 /// </returns>
 public override System.String ToString()
 {
     System.Text.StringBuilder buffer = new System.Text.StringBuilder(64);
     buffer.Append("ChemModel(");
     buffer.Append(GetHashCode());
     if (SetOfMolecules != null)
     {
         buffer.Append(", ");
         //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Object.toString' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
         buffer.Append(SetOfMolecules.ToString());
     }
     else
     {
         buffer.Append(", No SetOfMolecules");
     }
     if (Crystal != null)
     {
         //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Object.toString' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
         buffer.Append(Crystal.ToString());
         buffer.Append(", ");
     }
     else
     {
         buffer.Append(", No Crystal");
     }
     if (SetOfReactions != null)
     {
         //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Object.toString' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
         buffer.Append(SetOfReactions.ToString());
         buffer.Append(", ");
     }
     else
     {
         buffer.Append(", No SetOfReactions");
     }
     buffer.Append(')');
     return(buffer.ToString());
 }