From 98159cc1310b7b0cf792f6cf4d06bf8e9bda9d75 Mon Sep 17 00:00:00 2001
From: ribeaudc <ribeaudc>
Date: Mon, 10 Mar 2008 11:23:20 +0000
Subject: [PATCH] [LMS-267] remove: - 'ISampleDAO.tryFindSampleWithProcByCode'.
 change: - 'ISampleDAO.tryFindSimpleSampleByCode' renamed to
 'ISampleDAO.tryFindSampleByCode'. - Unit test failed (be fixed very soon) but
 smoke tests are OK. add: - 'SampleBO.enrichWithProcedures.'

SVN: 4729
---
 .../cisd/common/collections/CollectionUtils.java  | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/common/source/java/ch/systemsx/cisd/common/collections/CollectionUtils.java b/common/source/java/ch/systemsx/cisd/common/collections/CollectionUtils.java
index 90be85907b1..78586100752 100644
--- a/common/source/java/ch/systemsx/cisd/common/collections/CollectionUtils.java
+++ b/common/source/java/ch/systemsx/cisd/common/collections/CollectionUtils.java
@@ -91,6 +91,21 @@ public final class CollectionUtils
         return abbreviate(collection, maxLength, ToStringDefaultConverter.getInstance(), style);
     }
 
+    /**
+     * Abbreviates a given <code>Collection</code>.
+     * <p>
+     * By default it shows the number of items left.
+     * </p>
+     * 
+     * @param maxLength the maximum number of items that should be shown. If <code>-1</code> then all items will be
+     *            displayed.
+     */
+    public final static <T> String abbreviate(final Collection<T> collection, final int maxLength,
+            final IToStringConverter<? super T> converter)
+    {
+        return abbreviate(collection, maxLength, converter, CollectionStyle.DEFAULT_COLLECTION_STYLE);
+    }
+
     /**
      * Abbreviates a given <code>Collection</code>.
      * <p>
-- 
GitLab