Class FOMList<T>

  • All Implemented Interfaces:
    Iterable<T>, Collection<T>, List<T>

    @Deprecated
    public class FOMList<T>
    extends AbstractCollection<T>
    implements List<T>
    Deprecated.
    Legacy AEM 6.x API.
    Implements an ElementSet around an internal buffered iterator. Here's the rationale: Axiom parses incrementally. Using the iterators provided by Axiom, we can walk a set of elements while preserving the incremental parsing model, however, if we went with just java.util.Iterator, we'd lose the ability to do things like feed.getEntries().get(0), or use the new Java5 style iterators for (Entry e : feed.getEntries()). However, using a regular java.util.List also isn't a great option because it means we have to iterate through all of the elements before returning back to the caller. This gives us a hybrid approach. We create an internal iterator, then create a List from that, the iterator is consumed as the list is used. The List itself is unmodifiable.