Skip to content

Commit

Permalink
Add javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
tpietzsch committed Sep 15, 2024
1 parent 0ebbccc commit 3db98ed
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import net.imglib2.util.CloseableThreadLocal;

/**
* Boilerplate for {@link BlockSupplier} to simplify implementations.
* <p>
* Implements {@link BlockSupplier#threadSafe()} as a wrapper that makes {@link
* ThreadLocal} {@link BlockSupplier#independentCopy()} copies.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,23 @@
import net.imglib2.util.Cast;
import net.imglib2.util.CloseableThreadLocal;

/**
* Default implementation of {@link UnaryBlockOperator}.
* <p>
* If you implement a {@code BlockProcessor<I,O>}, you typically wrap it with a
* {@code DefaultUnaryBlockOperator}, specifying the source {@code S} and target
* {@code T} ImgLib2 {@code NativeType}s corresponding to primitive array types
* {@code I} and {@code O}, and the number of source and target dimension.
* <p>
* The {@link UnaryBlockOperator} can then be used in {@link
* BlockSupplier#andThen(UnaryBlockOperator)} chains in a type- and
* simensionality-safe manner.
*
* @param <S>
* source type
* @param <T>
* target type
*/
public class DefaultUnaryBlockOperator< S extends NativeType< S >, T extends NativeType< T > > implements UnaryBlockOperator< S, T >
{
private final S sourceType;
Expand Down

0 comments on commit 3db98ed

Please sign in to comment.