public virtual void testShowKeys()
        {
            JDFAttributeMap m1 = new JDFAttributeMap("a1", "v1");

            Assert.AreEqual("(a1 = v1)", m1.showKeys(" "));
            m1.put("b1", "v2");
            Assert.AreEqual("(a1 = v1) (b1 = v2)", m1.showKeys(" "));
            Assert.AreEqual("(a1 = v1)\n(b1 = v2)", m1.showKeys("\n"));
            Assert.AreEqual("(a1 = v1)(b1 = v2)", m1.showKeys(null));
        }
Exemple #2
0
        ///
        ///	 * <param name="sepMap"> the separator between maps </param>
        ///	 * <param name="sepEntry"> the saparator between map entries </param>
        ///	 * <returns> the string representation </returns>
        ///
        public virtual string showKeys(string sepMap, string sepEntry)
        {
            StringBuilder sb        = new StringBuilder();
            int           nPartMaps = this.Count;

            for (int i = 0; i < nPartMaps; i++)
            {
                JDFAttributeMap amParts = this[i];
                sb.Append("[").Append(i).Append("]").Append(amParts.showKeys(sepEntry));
                if (i + 1 < nPartMaps)
                {
                    sb.Append(sepMap);
                }
            }
            return(sb.ToString());
        }