Forge - Shell API 1.2.0.Final

org.jboss.forge.shell.util
Class Lists

java.lang.Object
  extended by 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
<T> T
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
 

Constructor Detail

Lists

public Lists()
Method Detail

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;


Forge - Shell API 1.2.0.Final

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.