Author: ivaynberg
Date: Mon Dec 11 10:17:45 2006
New Revision: 485783
URL: http://svn.apache.org/viewvc?view=rev&rev=485783
Log:
generics
Modified:
incubator/wicket/trunk/wicket-extensions/src/main/java/wicket/extensions/markup/html/repeater/util/ModelIteratorAdapter.java
Modified:
incubator/wicket/trunk/wicket-extensions/src/main/java/wicket/extensions/markup/html/repeater/util/ModelIteratorAdapter.java
URL:
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket-extensions/src/main/java/wicket/extensions/markup/html/repeater/util/ModelIteratorAdapter.java?view=diff&rev=485783&r1=485782&r2=485783
==============================================================================
---
incubator/wicket/trunk/wicket-extensions/src/main/java/wicket/extensions/markup/html/repeater/util/ModelIteratorAdapter.java
(original)
+++
incubator/wicket/trunk/wicket-extensions/src/main/java/wicket/extensions/markup/html/repeater/util/ModelIteratorAdapter.java
Mon Dec 11 10:17:45 2006
@@ -1,18 +1,18 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
under
+ * the License.
*/
package wicket.extensions.markup.html.repeater.util;
@@ -25,12 +25,15 @@
* Iterator adapter that wraps adaptee's elements with a model. Convinient when
* implementing [EMAIL PROTECTED] RefreshingView}.
*
+ * @param <T>
+ *
* @author Igor Vaynberg (ivaynberg)
*
+ *
*/
-public abstract class ModelIteratorAdapter implements Iterator
+public abstract class ModelIteratorAdapter<T> implements Iterator<IModel<T>>
{
- private Iterator delegate;
+ private Iterator<T> delegate;
/**
* Constructor
@@ -38,7 +41,7 @@
* @param delegate
* iterator that will be wrapped
*/
- public ModelIteratorAdapter(Iterator delegate)
+ public ModelIteratorAdapter(Iterator<T> delegate)
{
this.delegate = delegate;
}
@@ -54,7 +57,7 @@
/**
* @see java.util.Iterator#next()
*/
- public Object next()
+ public IModel<T> next()
{
return model(delegate.next());
}
@@ -76,5 +79,5 @@
* object to be wrapped
* @return IModel wrapper for the object
*/
- abstract protected IModel model(Object object);
+ abstract protected IModel<T> model(T object);
}