352133 - Generally resolve java 1.5isms

+ Expanding on the test cases for LazyList to make sure that it behaves
  well with Generics in the mix.
This commit is contained in:
Joakim Erdfelt 2011-08-03 08:23:59 -07:00
parent 0a6c7ad846
commit 4b7b44249e
2 changed files with 1105 additions and 158 deletions

View File

@ -28,13 +28,13 @@ import java.util.ListIterator;
* creation. If a method needs to create a List to return, but it is
* expected that this will either be empty or frequently contain a
* single item, then using LazyList will avoid additional object
* creations by using Collections.EMPTY_LIST or
* Collections.singletonList where possible.
* creations by using {@link Collections#EMPTY_LIST} or
* {@link Collections#singletonList(Object)} where possible.
* <p>
* LazyList works by passing an opaque representation of the list in
* and out of all the LazyList methods. This opaque object is either
* null for an empty list, an Object for a list with a single entry
* or an ArrayList<Object> for a list of items.
* or an {@link ArrayList} for a list of items.
*
* <p><h4>Usage</h4>
* <pre>
@ -155,7 +155,7 @@ public class LazyList
}
/* ------------------------------------------------------------ */
/** Ensure the capcity of the underlying list.
/** Ensure the capacity of the underlying list.
*
*/
public static Object ensureSize(Object list, int initialSize)