diff --git a/src/main/java/net/imglib2/type/numeric/VolatileARGBType.java b/src/main/java/net/imglib2/type/numeric/VolatileARGBType.java index 840ab6f46dd866125a0a76e83bbf6a9bd97585da..079a5e1927c008fbac33f77c190c7628c9b8b6e3 100644 --- a/src/main/java/net/imglib2/type/numeric/VolatileARGBType.java +++ b/src/main/java/net/imglib2/type/numeric/VolatileARGBType.java @@ -51,35 +51,17 @@ public class VolatileARGBType extends AbstractVolatileNativeNumericType< ARGBTyp { final protected NativeImg< ?, ? extends VolatileIntAccess > img; - private static class WrappedARGBType extends ARGBType - { - public WrappedARGBType( final NativeImg< ?, ? extends IntAccess > img ) - { - super( img ); - } - - public WrappedARGBType( final IntAccess access ) - { - super( access ); - } - - public void setAccess( final IntAccess access ) - { - dataAccess = access; - } - } - // this is the constructor if you want it to read from an array public VolatileARGBType( final NativeImg< ?, ? extends VolatileIntAccess > img ) { - super( new WrappedARGBType( img ), false ); + super( new ARGBType( img ), false ); this.img = img; } // this is the constructor if you want to specify the dataAccess public VolatileARGBType( final VolatileIntAccess access ) { - super( new WrappedARGBType( access ), access.isValid() ); + super( new ARGBType( access ), access.isValid() ); this.img = null; } @@ -105,7 +87,7 @@ public class VolatileARGBType extends AbstractVolatileNativeNumericType< ARGBTyp public void updateContainer( final Object c ) { final VolatileIntAccess a = img.update( c ); - ( ( WrappedARGBType ) t ).setAccess( a ); + t.dataAccess = a; setValid( a.isValid() ); } diff --git a/src/main/java/net/imglib2/type/numeric/integer/VolatileByteType.java b/src/main/java/net/imglib2/type/numeric/integer/VolatileByteType.java index fa80a8d4f434e34b40d92ccc37a4322d506a3daf..4cb78cdc1e7a4125caa9369d690586aa211a2eff 100644 --- a/src/main/java/net/imglib2/type/numeric/integer/VolatileByteType.java +++ b/src/main/java/net/imglib2/type/numeric/integer/VolatileByteType.java @@ -48,35 +48,17 @@ public class VolatileByteType extends AbstractVolatileNativeRealType< ByteType, { final protected NativeImg< ?, ? extends VolatileByteAccess > img; - private static class WrappedByteType extends ByteType - { - public WrappedByteType( final NativeImg<?, ? extends ByteAccess> img ) - { - super( img ); - } - - public WrappedByteType( final ByteAccess access ) - { - super( access ); - } - - public void setAccess( final ByteAccess access ) - { - dataAccess = access; - } - } - // this is the constructor if you want it to read from an array public VolatileByteType( final NativeImg< ?, ? extends VolatileByteAccess > img ) { - super( new WrappedByteType( img ), false ); + super( new ByteType( img ), false ); this.img = img; } // this is the constructor if you want to specify the dataAccess public VolatileByteType( final VolatileByteAccess access ) { - super( new WrappedByteType( access ), access.isValid() ); + super( new ByteType( access ), access.isValid() ); this.img = null; } @@ -102,7 +84,7 @@ public class VolatileByteType extends AbstractVolatileNativeRealType< ByteType, public void updateContainer( final Object c ) { final VolatileByteAccess a = img.update( c ); - ( (WrappedByteType) t ).setAccess( a ); + t.dataAccess = a; setValid( a.isValid() ); } diff --git a/src/main/java/net/imglib2/type/numeric/integer/VolatileIntType.java b/src/main/java/net/imglib2/type/numeric/integer/VolatileIntType.java index 0a0094d4f07c8374e57a88e1af05a6edb1a94009..380d902904dbab29c8b2c643769c0a2ce367ee24 100644 --- a/src/main/java/net/imglib2/type/numeric/integer/VolatileIntType.java +++ b/src/main/java/net/imglib2/type/numeric/integer/VolatileIntType.java @@ -48,35 +48,17 @@ public class VolatileIntType extends AbstractVolatileNativeRealType< IntType, Vo { final protected NativeImg< ?, ? extends VolatileIntAccess > img; - private static class WrappedIntType extends IntType - { - public WrappedIntType( final NativeImg<?, ? extends IntAccess> img ) - { - super( img ); - } - - public WrappedIntType( final IntAccess access ) - { - super( access ); - } - - public void setAccess( final IntAccess access ) - { - dataAccess = access; - } - } - // this is the constructor if you want it to read from an array public VolatileIntType( final NativeImg< ?, ? extends VolatileIntAccess > img ) { - super( new WrappedIntType( img ), false ); + super( new IntType( img ), false ); this.img = img; } // this is the constructor if you want to specify the dataAccess public VolatileIntType( final VolatileIntAccess access ) { - super( new WrappedIntType( access ), access.isValid() ); + super( new IntType( access ), access.isValid() ); this.img = null; } @@ -102,7 +84,7 @@ public class VolatileIntType extends AbstractVolatileNativeRealType< IntType, Vo public void updateContainer( final Object c ) { final VolatileIntAccess a = img.update( c ); - ( (WrappedIntType) t ).setAccess( a ); + t.dataAccess = a; setValid( a.isValid() ); } diff --git a/src/main/java/net/imglib2/type/numeric/integer/VolatileLongType.java b/src/main/java/net/imglib2/type/numeric/integer/VolatileLongType.java index 0dca3955a50f97670a177a8f945be58b807a07b8..b2945a79626c1e9a4736237010469b9f1615a3da 100644 --- a/src/main/java/net/imglib2/type/numeric/integer/VolatileLongType.java +++ b/src/main/java/net/imglib2/type/numeric/integer/VolatileLongType.java @@ -48,35 +48,17 @@ public class VolatileLongType extends AbstractVolatileNativeRealType< LongType, { final protected NativeImg< ?, ? extends VolatileLongAccess > img; - private static class WrappedLongType extends LongType - { - public WrappedLongType( final NativeImg<?, ? extends LongAccess> img ) - { - super( img ); - } - - public WrappedLongType( final LongAccess access ) - { - super( access ); - } - - public void setAccess( final LongAccess access ) - { - dataAccess = access; - } - } - // this is the constructor if you want it to read from an array public VolatileLongType( final NativeImg< ?, ? extends VolatileLongAccess > img ) { - super( new WrappedLongType( img ), false ); + super( new LongType( img ), false ); this.img = img; } // this is the constructor if you want to specify the dataAccess public VolatileLongType( final VolatileLongAccess access ) { - super( new WrappedLongType( access ), access.isValid() ); + super( new LongType( access ), access.isValid() ); this.img = null; } @@ -102,7 +84,7 @@ public class VolatileLongType extends AbstractVolatileNativeRealType< LongType, public void updateContainer( final Object c ) { final VolatileLongAccess a = img.update( c ); - ( (WrappedLongType) t ).setAccess( a ); + t.dataAccess = a; setValid( a.isValid() ); } diff --git a/src/main/java/net/imglib2/type/numeric/integer/VolatileShortType.java b/src/main/java/net/imglib2/type/numeric/integer/VolatileShortType.java index ef03b2cdc0880d4c9b61383108cd3811c5222d58..92198acab022ba0cfeb6cb08837e27e1c628ab42 100644 --- a/src/main/java/net/imglib2/type/numeric/integer/VolatileShortType.java +++ b/src/main/java/net/imglib2/type/numeric/integer/VolatileShortType.java @@ -48,35 +48,17 @@ public class VolatileShortType extends AbstractVolatileNativeRealType< ShortType { final protected NativeImg< ?, ? extends VolatileShortAccess > img; - private static class WrappedShortType extends ShortType - { - public WrappedShortType( final NativeImg<?, ? extends ShortAccess> img ) - { - super( img ); - } - - public WrappedShortType( final ShortAccess access ) - { - super( access ); - } - - public void setAccess( final ShortAccess access ) - { - dataAccess = access; - } - } - // this is the constructor if you want it to read from an array public VolatileShortType( final NativeImg< ?, ? extends VolatileShortAccess > img ) { - super( new WrappedShortType( img ), false ); + super( new ShortType( img ), false ); this.img = img; } // this is the constructor if you want to specify the dataAccess public VolatileShortType( final VolatileShortAccess access ) { - super( new WrappedShortType( access ), access.isValid() ); + super( new ShortType( access ), access.isValid() ); this.img = null; } @@ -102,7 +84,7 @@ public class VolatileShortType extends AbstractVolatileNativeRealType< ShortType public void updateContainer( final Object c ) { final VolatileShortAccess a = img.update( c ); - ( (WrappedShortType) t ).setAccess( a ); + t.dataAccess = a; setValid( a.isValid() ); } diff --git a/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedByteType.java b/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedByteType.java index b8834fcd6145f68ad3b53241646266cfef6a38d3..2be925f1690ffbb5385c7696d27ba63b35575824 100644 --- a/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedByteType.java +++ b/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedByteType.java @@ -49,35 +49,17 @@ public class VolatileUnsignedByteType extends AbstractVolatileNativeRealType< Un { final protected NativeImg< ?, ? extends VolatileByteAccess > img; - private static class WrappedUnsignedByteType extends UnsignedByteType - { - public WrappedUnsignedByteType( final NativeImg<?, ? extends ByteAccess> img ) - { - super( img ); - } - - public WrappedUnsignedByteType( final ByteAccess access ) - { - super( access ); - } - - public void setAccess( final ByteAccess access ) - { - dataAccess = access; - } - } - // this is the constructor if you want it to read from an array public VolatileUnsignedByteType( final NativeImg< ?, ? extends VolatileByteAccess > img ) { - super( new WrappedUnsignedByteType( img ), false ); + super( new UnsignedByteType( img ), false ); this.img = img; } // this is the constructor if you want to specify the dataAccess public VolatileUnsignedByteType( final VolatileByteAccess access ) { - super( new WrappedUnsignedByteType( access ), access.isValid() ); + super( new UnsignedByteType( access ), access.isValid() ); this.img = null; } @@ -103,7 +85,7 @@ public class VolatileUnsignedByteType extends AbstractVolatileNativeRealType< Un public void updateContainer( final Object c ) { final VolatileByteAccess a = img.update( c ); - ( ( WrappedUnsignedByteType )t ).setAccess( a ); + t.dataAccess = a; setValid( a.isValid() ); } diff --git a/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedIntType.java b/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedIntType.java index 3a1cce6a77371cbda57cf0cc999e7b8ad3cd5c9a..53ebf01daa9bdd18974f2aafdc225167f306dd46 100644 --- a/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedIntType.java +++ b/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedIntType.java @@ -47,35 +47,17 @@ public class VolatileUnsignedIntType extends AbstractVolatileNativeRealType< Uns { final protected NativeImg< ?, ? extends VolatileIntAccess > img; - private static class WrappedUnsignedIntType extends UnsignedIntType - { - public WrappedUnsignedIntType( final NativeImg<?, ? extends IntAccess> img ) - { - super( img ); - } - - public WrappedUnsignedIntType( final IntAccess access ) - { - super( access ); - } - - public void setAccess( final IntAccess access ) - { - dataAccess = access; - } - } - // this is the constructor if you want it to read from an array public VolatileUnsignedIntType( final NativeImg< ?, ? extends VolatileIntAccess > img ) { - super( new WrappedUnsignedIntType( img ), false ); + super( new UnsignedIntType( img ), false ); this.img = img; } // this is the constructor if you want to specify the dataAccess public VolatileUnsignedIntType( final VolatileIntAccess access ) { - super( new WrappedUnsignedIntType( access ), access.isValid() ); + super( new UnsignedIntType( access ), access.isValid() ); this.img = null; } @@ -101,7 +83,7 @@ public class VolatileUnsignedIntType extends AbstractVolatileNativeRealType< Uns public void updateContainer( final Object c ) { final VolatileIntAccess a = img.update( c ); - ( ( WrappedUnsignedIntType ) t ).setAccess( a ); + t.dataAccess = a; setValid( a.isValid() ); } diff --git a/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedLongType.java b/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedLongType.java index c8a14fe0f20f200f50d7f702adaadb4e2b65225e..5be7748b99004e096870c8cc3bc387760f664766 100644 --- a/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedLongType.java +++ b/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedLongType.java @@ -47,35 +47,17 @@ public class VolatileUnsignedLongType extends AbstractVolatileNativeRealType< Un { final protected NativeImg< ?, ? extends VolatileLongAccess > img; - private static class WrappedUnsignedLongType extends UnsignedLongType - { - public WrappedUnsignedLongType( final NativeImg<?, ? extends LongAccess> img ) - { - super( img ); - } - - public WrappedUnsignedLongType( final LongAccess access ) - { - super( access ); - } - - public void setAccess( final LongAccess access ) - { - dataAccess = access; - } - } - // this is the constructor if you want it to read from an array public VolatileUnsignedLongType( final NativeImg< ?, ? extends VolatileLongAccess > img ) { - super( new WrappedUnsignedLongType( img ), false ); + super( new UnsignedLongType( img ), false ); this.img = img; } // this is the constructor if you want to specify the dataAccess public VolatileUnsignedLongType( final VolatileLongAccess access ) { - super( new WrappedUnsignedLongType( access ), access.isValid() ); + super( new UnsignedLongType( access ), access.isValid() ); this.img = null; } @@ -101,7 +83,7 @@ public class VolatileUnsignedLongType extends AbstractVolatileNativeRealType< Un public void updateContainer( final Object c ) { final VolatileLongAccess a = img.update( c ); - ( ( WrappedUnsignedLongType ) t ).setAccess( a ); + t.dataAccess = a; setValid( a.isValid() ); } diff --git a/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedShortType.java b/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedShortType.java index a63ef5499a8d4faf3055f77b4b980dd6b8778fdb..8d831e991f6ea3309556c9925f1e87f0ec639db3 100644 --- a/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedShortType.java +++ b/src/main/java/net/imglib2/type/numeric/integer/VolatileUnsignedShortType.java @@ -48,35 +48,17 @@ public class VolatileUnsignedShortType extends AbstractVolatileNativeRealType< U { final protected NativeImg< ?, ? extends VolatileShortAccess > img; - private static class WrappedUnsignedShortType extends UnsignedShortType - { - public WrappedUnsignedShortType( final NativeImg<?, ? extends ShortAccess> img ) - { - super( img ); - } - - public WrappedUnsignedShortType( final ShortAccess access ) - { - super( access ); - } - - public void setAccess( final ShortAccess access ) - { - dataAccess = access; - } - } - // this is the constructor if you want it to read from an array public VolatileUnsignedShortType( final NativeImg< ?, ? extends VolatileShortAccess > img ) { - super( new WrappedUnsignedShortType( img ), false ); + super( new UnsignedShortType( img ), false ); this.img = img; } // this is the constructor if you want to specify the dataAccess public VolatileUnsignedShortType( final VolatileShortAccess access ) { - super( new WrappedUnsignedShortType( access ), access.isValid() ); + super( new UnsignedShortType( access ), access.isValid() ); this.img = null; } @@ -102,7 +84,7 @@ public class VolatileUnsignedShortType extends AbstractVolatileNativeRealType< U public void updateContainer( final Object c ) { final VolatileShortAccess a = img.update( c ); - ( (WrappedUnsignedShortType) t ).setAccess( a ); + t.dataAccess = a; setValid( a.isValid() ); } diff --git a/src/main/java/net/imglib2/type/numeric/real/VolatileDoubleType.java b/src/main/java/net/imglib2/type/numeric/real/VolatileDoubleType.java index eb821a3e4c31d5c2e815b893dec1310732a292f0..3a5e3f402dbba1c6a4ff28c31398eb171d4162a9 100644 --- a/src/main/java/net/imglib2/type/numeric/real/VolatileDoubleType.java +++ b/src/main/java/net/imglib2/type/numeric/real/VolatileDoubleType.java @@ -48,35 +48,17 @@ public class VolatileDoubleType extends AbstractVolatileNativeRealType< DoubleTy { final protected NativeImg< ?, ? extends VolatileDoubleAccess > img; - private static class WrappedDoubleType extends DoubleType - { - public WrappedDoubleType( final NativeImg<?, ? extends DoubleAccess> img ) - { - super( img ); - } - - public WrappedDoubleType( final DoubleAccess access ) - { - super( access ); - } - - public void setAccess( final DoubleAccess access ) - { - dataAccess = access; - } - } - // this is the constructor if you want it to read from an array public VolatileDoubleType( final NativeImg< ?, ? extends VolatileDoubleAccess > img ) { - super( new WrappedDoubleType( img ), false ); + super( new DoubleType( img ), false ); this.img = img; } // this is the constructor if you want to specify the dataAccess public VolatileDoubleType( final VolatileDoubleAccess access ) { - super( new WrappedDoubleType( access ), access.isValid() ); + super( new DoubleType( access ), access.isValid() ); this.img = null; } @@ -102,7 +84,7 @@ public class VolatileDoubleType extends AbstractVolatileNativeRealType< DoubleTy public void updateContainer( final Object c ) { final VolatileDoubleAccess a = img.update( c ); - ( ( WrappedDoubleType )t ).setAccess( a ); + t.dataAccess = a; setValid( a.isValid() ); } diff --git a/src/main/java/net/imglib2/type/numeric/real/VolatileFloatType.java b/src/main/java/net/imglib2/type/numeric/real/VolatileFloatType.java index 1da5bcb893ab2022c00478d5d8b01326cc0d2868..c89bb7d3cce32e838c707f94384f5efca80a4ed8 100644 --- a/src/main/java/net/imglib2/type/numeric/real/VolatileFloatType.java +++ b/src/main/java/net/imglib2/type/numeric/real/VolatileFloatType.java @@ -48,35 +48,17 @@ public class VolatileFloatType extends AbstractVolatileNativeRealType< FloatType { final protected NativeImg< ?, ? extends VolatileFloatAccess > img; - private static class WrappedFloatType extends FloatType - { - public WrappedFloatType( final NativeImg<?, ? extends FloatAccess> img ) - { - super( img ); - } - - public WrappedFloatType( final FloatAccess access ) - { - super( access ); - } - - public void setAccess( final FloatAccess access ) - { - dataAccess = access; - } - } - // this is the constructor if you want it to read from an array public VolatileFloatType( final NativeImg< ?, ? extends VolatileFloatAccess > img ) { - super( new WrappedFloatType( img ), false ); + super( new FloatType( img ), false ); this.img = img; } // this is the constructor if you want to specify the dataAccess public VolatileFloatType( final VolatileFloatAccess access ) { - super( new WrappedFloatType( access ), access.isValid() ); + super( new FloatType( access ), access.isValid() ); this.img = null; } @@ -102,7 +84,7 @@ public class VolatileFloatType extends AbstractVolatileNativeRealType< FloatType public void updateContainer( final Object c ) { final VolatileFloatAccess a = img.update( c ); - ( ( WrappedFloatType )t ).setAccess( a ); + t.dataAccess = a; setValid( a.isValid() ); }