From ec2d46d919438ed853d090945dc855967e437dc8 Mon Sep 17 00:00:00 2001 From: tpietzsch Date: Tue, 2 Apr 2024 22:37:25 +0200 Subject: [PATCH] Make inner classes private for better encapsulation --- src/main/java/net/imglib2/roi/boundary/Boundary.java | 4 ++-- src/main/java/net/imglib2/roi/labeling/LabelRegion.java | 2 +- .../imglib2/roi/util/IterableRandomAccessibleRegion.java | 2 +- .../net/imglib2/roi/util/IterableRegionOnBooleanRAI.java | 2 +- .../imglib2/roi/util/PositionableWrappedIterableRegion.java | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/imglib2/roi/boundary/Boundary.java b/src/main/java/net/imglib2/roi/boundary/Boundary.java index 489baf90..74d3580e 100644 --- a/src/main/java/net/imglib2/roi/boundary/Boundary.java +++ b/src/main/java/net/imglib2/roi/boundary/Boundary.java @@ -135,7 +135,7 @@ public RandomAccess< BoolType > randomAccess( final Interval interval ) return randomAccess(); } - final class BoundaryIterable extends AbstractWrappedInterval< Interval > implements IterableInterval< Void > + private final class BoundaryIterable extends AbstractWrappedInterval< Interval > implements IterableInterval< Void > { BoundaryIterable() { @@ -179,7 +179,7 @@ public Void firstElement() } } - final class BoundaryCursor extends Point implements Cursor< Void > + private final class BoundaryCursor extends Point implements Cursor< Void > { private int i; diff --git a/src/main/java/net/imglib2/roi/labeling/LabelRegion.java b/src/main/java/net/imglib2/roi/labeling/LabelRegion.java index 6813e29d..88df4f6c 100644 --- a/src/main/java/net/imglib2/roi/labeling/LabelRegion.java +++ b/src/main/java/net/imglib2/roi/labeling/LabelRegion.java @@ -186,7 +186,7 @@ public PositionableIterableInterval< Void > inside() return inside; } - class LabelRegionIterable extends AbstractWrappedPositionableLocalizable< LabelRegion > implements PositionableIterableInterval< Void > + private final class LabelRegionIterable extends AbstractWrappedPositionableLocalizable< LabelRegion< T > > implements PositionableIterableInterval< Void > { LabelRegionIterable() { diff --git a/src/main/java/net/imglib2/roi/util/IterableRandomAccessibleRegion.java b/src/main/java/net/imglib2/roi/util/IterableRandomAccessibleRegion.java index e805d49a..7dca8391 100644 --- a/src/main/java/net/imglib2/roi/util/IterableRandomAccessibleRegion.java +++ b/src/main/java/net/imglib2/roi/util/IterableRandomAccessibleRegion.java @@ -96,7 +96,7 @@ public IterableInterval< Void > inside() return inside; } - class InsideIterable extends AbstractWrappedInterval< Interval > implements IterableInterval< Void > + private final class InsideIterable extends AbstractWrappedInterval< Interval > implements IterableInterval< Void > { InsideIterable() { diff --git a/src/main/java/net/imglib2/roi/util/IterableRegionOnBooleanRAI.java b/src/main/java/net/imglib2/roi/util/IterableRegionOnBooleanRAI.java index d5c449f0..92d8c0d6 100644 --- a/src/main/java/net/imglib2/roi/util/IterableRegionOnBooleanRAI.java +++ b/src/main/java/net/imglib2/roi/util/IterableRegionOnBooleanRAI.java @@ -95,7 +95,7 @@ public IterableInterval< Void > inside() return inside; } - class InsideIterable extends AbstractWrappedInterval< Interval > implements IterableInterval< Void > + private final class InsideIterable extends AbstractWrappedInterval< Interval > implements IterableInterval< Void > { InsideIterable() { diff --git a/src/main/java/net/imglib2/roi/util/PositionableWrappedIterableRegion.java b/src/main/java/net/imglib2/roi/util/PositionableWrappedIterableRegion.java index 2359d43a..a638a5b7 100644 --- a/src/main/java/net/imglib2/roi/util/PositionableWrappedIterableRegion.java +++ b/src/main/java/net/imglib2/roi/util/PositionableWrappedIterableRegion.java @@ -84,7 +84,7 @@ public RandomAccess< T > randomAccess( final Interval interval ) return new RA( source.randomAccess( Intervals.translate( interval, currentOffset ) ), currentOffset ); } - class RA extends OffsetPositionableLocalizable< RandomAccess< T > > implements RandomAccess< T > + private final class RA extends OffsetPositionableLocalizable< RandomAccess< T > > implements RandomAccess< T > { public RA( final RandomAccess< T > source, final long[] offset ) { @@ -116,7 +116,7 @@ public PositionableIterableInterval< Void > inside() return inside; } - class InsideIterable extends AbstractWrappedPositionableLocalizable< PositionableWrappedIterableRegion< T > > implements PositionableIterableInterval< Void > + private final class InsideIterable extends AbstractWrappedPositionableLocalizable< PositionableWrappedIterableRegion< T > > implements PositionableIterableInterval< Void > { InsideIterable() { @@ -172,7 +172,7 @@ public long max( final int d ) } } - class PositionableInsideCursor extends OffsetLocalizable< Cursor< Void > > implements Cursor< Void > + private final class PositionableInsideCursor extends OffsetLocalizable< Cursor< Void > > implements Cursor< Void > { public PositionableInsideCursor( final Cursor< Void > cursor ) {