diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2011-02-02 20:57:06 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2011-02-02 20:57:06 +0000 |
commit | 99958ef6253a233b4ffeabf5711ba65ac4b71061 (patch) | |
tree | cc0ec60d59c2cba6f90d7e644692fc07746b4245 | |
parent | 9490404b65fcd1c763280fcad3ab8e1b6ecd2589 (diff) | |
download | xmlgraphics-fop-99958ef6253a233b4ffeabf5711ba65ac4b71061.tar.gz xmlgraphics-fop-99958ef6253a233b4ffeabf5711ba65ac4b71061.zip |
Generify ListUtil methods
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1066626 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/util/ListUtil.java | 12 |
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); } } |