Permalink
Browse files

Remove combination interfaces

For example:
BinaryCompositeMask extends BinaryCompositeMaskPredicate<Localizable>, Mask
uses are replaced by the constituent interfaces.
  • Loading branch information...
tpietzsch committed Oct 1, 2017
1 parent b7565b4 commit 029ff8e79d40e1d55bf713433342cb349a58f0fb
Showing with 8 additions and 49 deletions.
  1. +8 −40 src/main/java/net/imglib2/troi/MaskTrees.java
  2. +0 −9 src/main/java/net/imglib2/troi/Masks.java
@@ -80,41 +80,9 @@
}
}
public interface BinaryCompositeMask extends BinaryCompositeMaskPredicate< Localizable >, Mask
{
}
public interface BinaryCompositeMaskInterval extends BinaryCompositeMask, MaskInterval
{
}
public interface UnaryCompositeMask extends UnaryCompositeMaskPredicate< Localizable >, Mask
{
}
public interface UnaryCompositeMaskInterval extends UnaryCompositeMask, MaskInterval
{
}
public interface BinaryCompositeRealMask extends BinaryCompositeMaskPredicate< RealLocalizable >, RealMask
{
}
public interface BinaryCompositeRealMaskRealInterval extends BinaryCompositeRealMask, RealMaskRealInterval
{
}
public interface UnaryCompositeRealMask extends UnaryCompositeMaskPredicate< RealLocalizable >, RealMask
{
}
public interface UnaryCompositeRealMaskRealInterval extends UnaryCompositeRealMask, RealMaskRealInterval
{
}
public static class DefaultBinaryCompositeMask
extends AbstractEuclideanSpace
implements BinaryCompositeMask
implements BinaryCompositeMaskPredicate< Localizable >, Mask
{
private final BinaryMaskOperator operator;
@@ -174,7 +142,7 @@ public BinaryMaskOperator operator()
public static class DefaultUnaryCompositeMask
extends AbstractEuclideanSpace
implements UnaryCompositeMask
implements UnaryCompositeMaskPredicate< Localizable >, Mask
{
private final UnaryMaskOperator operator;
@@ -224,7 +192,7 @@ public UnaryMaskOperator operator()
public static class DefaultBinaryCompositeMaskInterval
extends AbstractWrappedInterval< IntervalOrEmpty >
implements BinaryCompositeMaskInterval, IntervalOrEmpty
implements BinaryCompositeMaskPredicate< Localizable >, MaskInterval, IntervalOrEmpty
{
private final BinaryMaskOperator operator;
@@ -290,7 +258,7 @@ public boolean isEmpty()
public static class DefaultUnaryCompositeMaskInterval
extends AbstractWrappedInterval< IntervalOrEmpty >
implements UnaryCompositeMaskInterval, IntervalOrEmpty
implements UnaryCompositeMaskPredicate< Localizable >, MaskInterval, IntervalOrEmpty
{
private final UnaryMaskOperator operator;
@@ -346,7 +314,7 @@ public boolean isEmpty()
public static class DefaultBinaryCompositeRealMask
extends AbstractEuclideanSpace
implements BinaryCompositeRealMask
implements BinaryCompositeMaskPredicate< RealLocalizable >, RealMask
{
private final BinaryMaskOperator operator;
@@ -406,7 +374,7 @@ public BinaryMaskOperator operator()
public static class DefaultUnaryCompositeRealMask
extends AbstractEuclideanSpace
implements UnaryCompositeRealMask
implements UnaryCompositeMaskPredicate< RealLocalizable >, RealMask
{
private final UnaryMaskOperator operator;
@@ -456,7 +424,7 @@ public UnaryMaskOperator operator()
public static class DefaultBinaryCompositeRealMaskRealInterval
extends AbstractWrappedRealInterval< RealIntervalOrEmpty >
implements BinaryCompositeRealMaskRealInterval, RealIntervalOrEmpty
implements BinaryCompositeMaskPredicate< RealLocalizable >, RealMaskRealInterval, RealIntervalOrEmpty
{
private final BinaryMaskOperator operator;
@@ -522,7 +490,7 @@ public boolean isEmpty()
public static class DefaultUnaryCompositeRealMaskRealInterval
extends AbstractWrappedRealInterval< RealIntervalOrEmpty >
implements UnaryCompositeRealMaskRealInterval, RealIntervalOrEmpty
implements UnaryCompositeMaskPredicate< RealLocalizable >, RealMaskRealInterval, RealIntervalOrEmpty
{
private final UnaryMaskOperator operator;
@@ -13,14 +13,6 @@
import net.imglib2.troi.Bounds.IntBounds;
import net.imglib2.troi.Bounds.RealBounds;
import net.imglib2.troi.Bounds.UnaryBoundsOperator;
import net.imglib2.troi.MaskTrees.BinaryCompositeMask;
import net.imglib2.troi.MaskTrees.BinaryCompositeMaskInterval;
import net.imglib2.troi.MaskTrees.BinaryCompositeRealMask;
import net.imglib2.troi.MaskTrees.BinaryCompositeRealMaskRealInterval;
import net.imglib2.troi.MaskTrees.UnaryCompositeMask;
import net.imglib2.troi.MaskTrees.UnaryCompositeMaskInterval;
import net.imglib2.troi.MaskTrees.UnaryCompositeRealMask;
import net.imglib2.troi.MaskTrees.UnaryCompositeRealMaskRealInterval;
import net.imglib2.troi.MaskTrees.DefaultBinaryCompositeMask;
import net.imglib2.troi.MaskTrees.DefaultBinaryCompositeMaskInterval;
import net.imglib2.troi.MaskTrees.DefaultBinaryCompositeRealMask;
@@ -43,7 +35,6 @@
/*
* MaskOperator definitions (for both integral and real masks)
* ===============================================================
* TODO: should these be public?
*/
public static final BinaryMaskOperator AND = new BinaryMaskOperator( BoundaryType::and, Bounds.and )

0 comments on commit 029ff8e

Please sign in to comment.