org.jboss.forge.shell.util
Class Lists
java.lang.Object
org.jboss.forge.shell.util.Lists
public class Lists
- extends Object
- Author:
- Lincoln Baxter, III
|
Constructor Summary |
Lists()
|
|
Method Summary |
static int |
indexOfLastElement(List<?> list)
Return the index of the last element of this List, if any (size - 1), if the list is empty, return 0; |
static
|
lastElement(List<T> list)
Return the the last element of this List, if any. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Lists
public Lists()
indexOfLastElement
public static int indexOfLastElement(List<?> list)
- Return the index of the last element of this List, if any (size - 1), if the list is empty, return 0;
lastElement
public static <T> T lastElement(List<T> list)
- Return the the last element of this List, if any. If the list contains elements, return the element at index:
"size - 1", if the list is empty, return null;
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.