aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/org/apache/fop/util/ListUtil.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/util/ListUtil.java b/src/java/org/apache/fop/util/ListUtil.java
index d97457510..8e88e4cbf 100644
--- a/src/java/org/apache/fop/util/ListUtil.java
+++ b/src/java/org/apache/fop/util/ListUtil.java
@@ -34,22 +34,22 @@ public final class ListUtil {
/**
* Retrieve the last element from a list.
*
- * @param list
- * The list to work on
+ * @param <T> the type of objects stored in the list
+ * @param list the list to work on
* @return last element
*/
- public static Object getLast(List list) {
+ public static <T> T getLast(List<T> list) {
return list.get(list.size() - 1);
}
/**
* Retrieve and remove the last element from a list.
*
- * @param list
- * The list to work on
+ * @param <T> the type of objects stored in the list
+ * @param list the list to work on
* @return previous last element
*/
- public static Object removeLast(List list) {
+ public static <T> T removeLast(List<T> list) {
return list.remove(list.size() - 1);
}
}