diff --git a/src/main/java/net/imglib2/view/fluent/RaView.java b/src/main/java/net/imglib2/view/fluent/RaView.java index fe7108a9d..743c4934b 100644 --- a/src/main/java/net/imglib2/view/fluent/RaView.java +++ b/src/main/java/net/imglib2/view/fluent/RaView.java @@ -54,7 +54,7 @@ public interface RaView< T, V extends RaView< T, V > > extends RandomAccessible< { RandomAccessible< T > delegate(); - static < T, V extends RaView< T, V > > RaView< T, ? > wrap( final RandomAccessible< T > delegate ) + static < T, V extends RaView< T, V > > RaView< T, V > wrap( final RandomAccessible< T > delegate ) { return ( RaView< T, V > ) () -> delegate; } @@ -335,18 +335,18 @@ default RraView< T > interpolate( final Interpolation< T > interpolation ) * U>} that reads a value from its first argument and writes a converted * value to its second argument. * - * @param converter - * converts pixel values from {@code T} to {@code U} - * @param targetSupplier - * creates instances of {@code U} for storing converted values * @param * target pixel type + * @param targetSupplier + * creates instances of {@code U} for storing converted values + * @param converter + * converts pixel values from {@code T} to {@code U} * * @return a converted view */ default < U > RaView< U, ? > convert( - final Converter< ? super T, ? super U > converter, - final Supplier< U > targetSupplier ) + final Supplier< U > targetSupplier, + final Converter< ? super T, ? super U > converter ) { return wrap( Converters.convert2( delegate(), converter, targetSupplier ) ); } @@ -361,18 +361,18 @@ default RraView< T > interpolate( final Interpolation< T > interpolation ) * from its first argument and writes a converted value to its second * argument. * - * @param converterSupplier - * converts pixel values from {@code T} to {@code U} - * @param targetSupplier - * creates instances of {@code U} for storing converted values * @param * target pixel type + * @param targetSupplier + * creates instances of {@code U} for storing converted values + * @param converterSupplier + * converts pixel values from {@code T} to {@code U} * * @return a converted view */ default < U > RaView< U, ? > convert( - final Supplier< Converter< ? super T, ? super U > > converterSupplier, - final Supplier< U > targetSupplier ) + final Supplier< U > targetSupplier, + final Supplier< Converter< ? super T, ? super U > > converterSupplier ) { return wrap( Converters.convert2( delegate(), converterSupplier, targetSupplier ) ); } diff --git a/src/main/java/net/imglib2/view/fluent/RaiView.java b/src/main/java/net/imglib2/view/fluent/RaiView.java index 9b7640aaf..0b410fa72 100644 --- a/src/main/java/net/imglib2/view/fluent/RaiView.java +++ b/src/main/java/net/imglib2/view/fluent/RaiView.java @@ -434,19 +434,18 @@ default RaiView< T > expand( Extension< T > extension, long... border ) * U>} that reads a value from its first argument and writes a converted * value to its second argument. * - * @param converter - * converts pixel values from {@code T} to {@code U} - * @param targetSupplier - * creates instances of {@code U} for storing converted values * @param * target pixel type + * @param targetSupplier + * creates instances of {@code U} for storing converted values + * @param converter + * converts pixel values from {@code T} to {@code U} * * @return a converted view */ @Override default < U > RaiView< U > convert( - final Converter< ? super T, ? super U > converter, - final Supplier< U > targetSupplier ) + final Supplier< U > targetSupplier, final Converter< ? super T, ? super U > converter ) { return wrap( Converters.convert2( delegate(), converter, targetSupplier ) ); } @@ -461,19 +460,18 @@ default < U > RaiView< U > convert( * from its first argument and writes a converted value to its second * argument. * - * @param converterSupplier - * converts pixel values from {@code T} to {@code U} - * @param targetSupplier - * creates instances of {@code U} for storing converted values * @param * target pixel type + * @param targetSupplier + * creates instances of {@code U} for storing converted values + * @param converterSupplier + * converts pixel values from {@code T} to {@code U} * * @return a converted view */ @Override default < U > RaiView< U > convert( - final Supplier< Converter< ? super T, ? super U > > converterSupplier, - final Supplier< U > targetSupplier ) + final Supplier< U > targetSupplier, final Supplier< Converter< ? super T, ? super U > > converterSupplier ) { return wrap( Converters.convert2( delegate(), converterSupplier, targetSupplier ) ); } diff --git a/src/test/java/net/imglib2/view/fluent/StreamifiedViewsExample.java b/src/test/java/net/imglib2/view/fluent/StreamifiedViewsExample.java index a0a91ad3a..9205ffea1 100644 --- a/src/test/java/net/imglib2/view/fluent/StreamifiedViewsExample.java +++ b/src/test/java/net/imglib2/view/fluent/StreamifiedViewsExample.java @@ -23,7 +23,7 @@ public static void main( String[] args ) RealRandomAccessible< DoubleType > doubleView = img.view() .extend( Extension.zero() ) .permute( 0, 1 ) - .convert( ( i, o ) -> o.set( i.get() ), DoubleType::new ) + .convert( DoubleType::new, ( i, o ) -> o.set( i.get() ) ) .interpolate( Interpolation.lanczos() ); RandomAccess< IntType > access = img.view()