private SoyList newListFromIterable ( Iterable < ? > items ) { // Create a list backed by a Java list which has eagerly converted each value into a lazy // value provider. Specifically, the list iteration is done eagerly so that the lazy value // provider can cache its value. ImmutableList . Builder < SoyValueProvider > builder = ImmutableList . builder ( ) ; for ( Object item : items ) { builder . add ( convertLazy ( item ) ) ; } return ListImpl . forProviderList ( builder . build ( ) ) ; }
Creates a SoyList from a Java Iterable .