You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2008/06/30 22:41:21 UTC

svn commit: r672903 - /ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilGenerics.java

Author: doogie
Date: Mon Jun 30 13:41:20 2008
New Revision: 672903

URL: http://svn.apache.org/viewvc?rev=672903&view=rev
Log:
Add checkStack variants.

Modified:
    ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilGenerics.java

Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilGenerics.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilGenerics.java?rev=672903&r1=672902&r2=672903&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilGenerics.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilGenerics.java Mon Jun 30 13:41:20 2008
@@ -22,6 +22,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Stack;
 
 import javolution.util.FastMap;
 
@@ -96,6 +97,16 @@
     }
 
     @SuppressWarnings("unchecked")
+    public static <T> Stack<T> checkStack(Object object) {
+        return (Stack<T>) checkCollectionCast(object, Stack.class);
+    }
+
+    public static <T> Stack<T> checkStack(Object object, Class<T> type) {
+        checkCollectionContainment(object, Stack.class, type);
+        return checkStack(object);
+    }
+
+    @SuppressWarnings("unchecked")
     public static <T> Set<T> checkSet(Object object) {
         return (Set<T>) checkCollectionCast(object, Set.class);
     }