@ Nonnull public final ArrayList < A > toArrayList ( ) { ArrayList < A > list = new ArrayList <> ( this . length ) ; ImmutableList < A > l = this ; for ( int i = 0 ; i < length ; i ++ ) { list . add ( ( ( NonEmptyImmutableList < A > ) l ) . head ) ; l = ( ( NonEmptyImmutableList < A > ) l ) . tail ; } return list ; }
Converts this list into a java . util . ArrayList .