/** * Creates a new document-based element list. The list may store other * elements and even elements which itself are lists. * * @param <E> The type of the element node * @param <T> The type of the child node * @param <I> type of the initialisation data for new elements * @param router Router for the document supporting this list * @param parent The parent element holding list elements * @param childTag The tag with which list elements are created * @param factory The factory that for each element creates a child object * @return A new, document based element list */ public static <E, T, I> DocumentBasedElementList<E, T, I> create( DocumentEventRouter<? super E, E, ?> router, E parent, String childTag, Factory<E, ? extends T, I> factory) { DocumentBasedElementList<E, T, I> list = new DocumentBasedElementList<E, T, I>( router, parent, childTag, factory); list.dispatchAndLoad(); return list; }