Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jetty.util
Class LazyList

    java.lang.Object
      org.eclipse.jetty.util.LazyList

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

    public class LazyList

extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Lazy List creation. A List helper class that attempts to avoid unnecessary List 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.

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