/** * Method limited to just AbstractFlow and its subclasses. Forces a resolve of the entire Flow, * and results in a mutable list of the values in the flow. */ protected List<T> toMutableList() { return toMutableList(this); }
/** * Method limited to just AbstractFlow and its subclasses. Forces a resolve of the entire Flow, * and results in a mutable list of the values in the flow. */ protected List<T> toMutableList() { return toMutableList(this); }
@Override @SuppressWarnings("unchecked") public T[] toArray(Class<T> type) { assert type != null; List<T> list = toMutableList(); Object array = Array.newInstance(type, list.size()); return list.toArray((T[]) array); }
@Override @SuppressWarnings("unchecked") public T[] toArray(Class<T> type) { assert type != null; List<T> list = toMutableList(); Object array = Array.newInstance(type, list.size()); return list.toArray((T[]) array); }
@Override public List<T> toList() { if (isEmpty()) return Collections.emptyList(); return Collections.unmodifiableList(toMutableList()); }
@Override public List<T> toList() { if (isEmpty()) return Collections.emptyList(); return Collections.unmodifiableList(toMutableList()); }