aboutsummaryrefslogtreecommitdiff
path: root/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/CollectionUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/CollectionUtils.java')
-rw-r--r--moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/CollectionUtils.java29
1 files changed, 14 insertions, 15 deletions
diff --git a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/CollectionUtils.java b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/CollectionUtils.java
index 01a80ea..dcca377 100644
--- a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/CollectionUtils.java
+++ b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/CollectionUtils.java
@@ -21,40 +21,39 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
-
package at.gv.egovernment.moaspss.util;
import java.util.Iterator;
import java.util.List;
/**
- * Various utility methods for dealing with <code>java.util.Collection</code>
- * classes.
- *
+ * Various utility methods for dealing with <code>java.util.Collection</code>
+ * classes.
+ *
* @author Patrick Peck
* @version $Id$
*/
public class CollectionUtils {
-
+
/**
- * Convert a <code>List</code> of <code>Number</code> objects to an
+ * Convert a <code>List</code> of <code>Number</code> objects to an
* <code>int</code> array.
- *
- * @param nums The <code>List</code> containing the numbers whose integer
- * value to put into the result.
- * @return The <code>int</code> values of the <code>Number</code>s contained
- * in <code>nums</code>.
+ *
+ * @param nums The <code>List</code> containing the numbers whose integer value
+ * to put into the result.
+ * @return The <code>int</code> values of the <code>Number</code>s contained in
+ * <code>nums</code>.
*/
public static int[] toIntArray(List nums) {
- int[] result = new int[nums.size()];
+ final int[] result = new int[nums.size()];
Iterator iter;
int i;
-
+
for (i = 0, iter = nums.iterator(); iter.hasNext(); i++) {
- Number num = (Number) iter.next();
+ final Number num = (Number) iter.next();
result[i] = num.intValue();
}
-
+
return result;
}
}