You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by sc...@apache.org on 2009/10/24 13:08:52 UTC
svn commit: r829343 -
/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java
Author: scolebourne
Date: Sat Oct 24 11:08:52 2009
New Revision: 829343
URL: http://svn.apache.org/viewvc?rev=829343&view=rev
Log:
Apply generics
Modified:
commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java
Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java?rev=829343&r1=829342&r2=829343&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java Sat Oct 24 11:08:52 2009
@@ -487,7 +487,7 @@
* @throws IllegalArgumentException if the collection has
* <code>null</code> elements or is <code>null</code>
*/
- public static void noNullElements(Collection collection, String message) {
+ public static void noNullElements(Collection<?> collection, String message) {
Validate.notNull(collection);
for (Iterator<?> it = collection.iterator(); it.hasNext();) {
if (it.next() == null) {
@@ -513,7 +513,7 @@
* @throws IllegalArgumentException if the collection has
* <code>null</code> elements or is <code>null</code>
*/
- public static void noNullElements(Collection collection) {
+ public static void noNullElements(Collection<?> collection) {
Validate.notNull(collection);
int i = 0;
for (Iterator<?> it = collection.iterator(); it.hasNext(); i++) {
@@ -537,7 +537,7 @@
* @param message the exception message if the <code>Collection</code> has elements not of type <code>clazz</code>
* @since 2.1
*/
- public static void allElementsOfType(Collection collection, Class clazz, String message) {
+ public static void allElementsOfType(Collection<?> collection, Class<?> clazz, String message) {
Validate.notNull(collection);
Validate.notNull(clazz);
for (Iterator<?> it = collection.iterator(); it.hasNext(); ) {
@@ -567,7 +567,7 @@
* the <code>Class</code> which the collection's elements are expected to be, not null
* @since 2.1
*/
- public static void allElementsOfType(Collection collection, Class clazz) {
+ public static void allElementsOfType(Collection<?> collection, Class<?> clazz) {
Validate.notNull(collection);
Validate.notNull(clazz);
int i = 0;