diff --git a/api/src/main/java/com/github/skjolber/packing/api/StackPlacement.java b/api/src/main/java/com/github/skjolber/packing/api/StackPlacement.java index e7137be6..8c28026a 100644 --- a/api/src/main/java/com/github/skjolber/packing/api/StackPlacement.java +++ b/api/src/main/java/com/github/skjolber/packing/api/StackPlacement.java @@ -13,20 +13,13 @@ public class StackPlacement implements Placement3D, Serializable { protected int y; // depth coordinate protected int z; // height coordinate - // TODO weight constraint - protected int maxSupportedPressure; // i.e. - protected int maxSupportedWeight; - - public StackPlacement(Stackable stackable, StackValue value, int x, int y, int z, int maxSupportedPressure, - int maxSupportedWeight) { + public StackPlacement(Stackable stackable, StackValue value, int x, int y, int z) { super(); this.stackable = stackable; this.value = value; this.x = x; this.y = y; this.z = z; - this.maxSupportedPressure = maxSupportedPressure; - this.maxSupportedWeight = maxSupportedWeight; } public StackPlacement() { @@ -147,14 +140,6 @@ public void setValue(StackValue value) { this.value = value; } - public void setMaxSupportedPressure(int maxSupportedPressure) { - this.maxSupportedPressure = maxSupportedPressure; - } - - public void setMaxSupportedWeight(int maxSupportedWeight) { - this.maxSupportedWeight = maxSupportedWeight; - } - public int getWeight() { return stackable.getWeight(); } diff --git a/api/src/main/java/com/github/skjolber/packing/api/ep/Point3D.java b/api/src/main/java/com/github/skjolber/packing/api/ep/Point3D.java index 5499486e..ce4abe05 100644 --- a/api/src/main/java/com/github/skjolber/packing/api/ep/Point3D.java +++ b/api/src/main/java/com/github/skjolber/packing/api/ep/Point3D.java @@ -271,30 +271,6 @@ public boolean intersects(Point3D point) { return !(point.getMaxX() < minX || point.getMinX() > maxX || point.getMaxY() < minY || point.getMinY() > maxY || point.getMaxZ() < minZ || point.getMinZ() > maxZ); } - public boolean isYZPlaneEdgeZ(int z) { - return false; - } - - public boolean isYZPlaneEdgeY(int z) { - return false; - } - - public boolean isXYPlaneEdgeX(int x) { - return false; - } - - public boolean isXYPlaneEdgeY(int y) { - return false; - } - - public boolean isXZPlaneEdgeX(int x) { - return false; - } - - public boolean isXZPlaneEdgeZ(int z) { - return false; - } - public boolean shadowedX(int min, int max) { return minX < min && maxX > max; } diff --git a/core/src/main/java/com/github/skjolber/packing/packer/laff/FastLargestAreaFitFirstPackager.java b/core/src/main/java/com/github/skjolber/packing/packer/laff/FastLargestAreaFitFirstPackager.java index d64491b1..ffc44ba8 100644 --- a/core/src/main/java/com/github/skjolber/packing/packer/laff/FastLargestAreaFitFirstPackager.java +++ b/core/src/main/java/com/github/skjolber/packing/packer/laff/FastLargestAreaFitFirstPackager.java @@ -130,7 +130,7 @@ public DefaultPackResult pack(List stackables, Container targetContai Stack levelStack = new DefaultStack(); stack.add(levelStack); - StackPlacement first = new StackPlacement(stackable, bestFirstStackValue, 0, 0, 0, -1, -1); + StackPlacement first = new StackPlacement(stackable, bestFirstStackValue, 0, 0, 0); levelStack.add(first); @@ -216,7 +216,7 @@ public DefaultPackResult pack(List stackables, Container targetContai Point2D point = extremePoints2D.getValue(bestPointIndex); - StackPlacement stackPlacement = new StackPlacement(remove, bestStackValue, point.getMinX(), point.getMinY(), 0, -1, -1); + StackPlacement stackPlacement = new StackPlacement(remove, bestStackValue, point.getMinX(), point.getMinY(), 0); levelStack.add(stackPlacement); extremePoints2D.add(bestPointIndex, stackPlacement); diff --git a/core/src/main/java/com/github/skjolber/packing/packer/laff/LargestAreaFitFirstPackager.java b/core/src/main/java/com/github/skjolber/packing/packer/laff/LargestAreaFitFirstPackager.java index 4565ddb9..f99b1aa5 100644 --- a/core/src/main/java/com/github/skjolber/packing/packer/laff/LargestAreaFitFirstPackager.java +++ b/core/src/main/java/com/github/skjolber/packing/packer/laff/LargestAreaFitFirstPackager.java @@ -126,7 +126,7 @@ public DefaultPackResult pack(List stackables, Container targetContai Stack levelStack = new DefaultStack(); stack.add(levelStack); - StackPlacement first = new StackPlacement(stackable, firstStackValue, 0, 0, 0, -1, -1); + StackPlacement first = new StackPlacement(stackable, firstStackValue, 0, 0, 0); levelStack.add(first); @@ -197,7 +197,7 @@ public DefaultPackResult pack(List stackables, Container targetContai Point3D point = extremePoints3D.getValue(bestPointIndex); - StackPlacement stackPlacement = new StackPlacement(remove, bestStackValue, point.getMinX(), point.getMinY(), point.getMinZ(), -1, -1); + StackPlacement stackPlacement = new StackPlacement(remove, bestStackValue, point.getMinX(), point.getMinY(), point.getMinZ()); levelStack.add(stackPlacement); extremePoints3D.add(bestPointIndex, stackPlacement); diff --git a/core/src/main/java/com/github/skjolber/packing/packer/plain/PlainPackager.java b/core/src/main/java/com/github/skjolber/packing/packer/plain/PlainPackager.java index e93d2e6c..cb783747 100644 --- a/core/src/main/java/com/github/skjolber/packing/packer/plain/PlainPackager.java +++ b/core/src/main/java/com/github/skjolber/packing/packer/plain/PlainPackager.java @@ -166,7 +166,7 @@ public DefaultPackResult pack(List stackables, Container targetContai Point3D point = extremePoints3D.getValue(bestPointIndex); - StackPlacement stackPlacement = new StackPlacement(bestStackable, bestStackValue, point.getMinX(), point.getMinY(), point.getMinZ(), -1, -1); + StackPlacement stackPlacement = new StackPlacement(bestStackable, bestStackValue, point.getMinX(), point.getMinY(), point.getMinZ()); stack.add(stackPlacement); extremePoints3D.add(bestPointIndex, stackPlacement); diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/DefaultXSupportPoint2D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/DefaultXSupportPoint2D.java index 8b3cd297..ed72eb6a 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/DefaultXSupportPoint2D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/DefaultXSupportPoint2D.java @@ -40,10 +40,15 @@ public Point2D

clone(int maxX, int maxY) { } @Override - public Placement2D getXSupport() { - return xSupport; + public int getSupportedMaxX() { + return xSupport.getAbsoluteEndX(); } - + + @Override + public int getSupportedMinX() { + return xSupport.getAbsoluteX(); + } + @Override public SimplePoint2D

moveX(int x) { if(x <= xSupport.getAbsoluteEndX()) { diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/DefaultXYSupportPoint2D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/DefaultXYSupportPoint2D.java index 9b8e68bb..22f079f3 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/DefaultXYSupportPoint2D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/DefaultXYSupportPoint2D.java @@ -69,13 +69,23 @@ public SimplePoint2D

clone(int maxX, int maxY) { } @Override - public Placement2D getYSupport() { - return ySupport; + public int getSupportedMaxY() { + return ySupport.getAbsoluteEndY(); + } + + @Override + public int getSupportedMinY() { + return ySupport.getAbsoluteY(); } @Override - public Placement2D getXSupport() { - return xSupport; + public int getSupportedMaxX() { + return xSupport.getAbsoluteEndX(); + } + + @Override + public int getSupportedMinX() { + return xSupport.getAbsoluteX(); } @Override diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/DefaultYSupportPoint2D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/DefaultYSupportPoint2D.java index dc8062b7..be1e0dac 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/DefaultYSupportPoint2D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/DefaultYSupportPoint2D.java @@ -40,8 +40,13 @@ public Point2D

clone(int maxX, int maxY) { } @Override - public Placement2D getYSupport() { - return ySupport; + public int getSupportedMaxY() { + return ySupport.getAbsoluteEndY(); + } + + @Override + public int getSupportedMinY() { + return ySupport.getAbsoluteY(); } @Override diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/XSupportPoint2D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/XSupportPoint2D.java index 0b988d7d..789df09b 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/XSupportPoint2D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/XSupportPoint2D.java @@ -1,7 +1,5 @@ package com.github.skjolber.packing.ep.points2d; -import com.github.skjolber.packing.api.Placement2D; - /** * * Point supported by a line in the x direction, effectively enforcing a y coordinate. @@ -10,6 +8,8 @@ public interface XSupportPoint2D { - Placement2D getXSupport(); + int getSupportedMinX(); + int getSupportedMaxX(); + } diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/YSupportPoint2D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/YSupportPoint2D.java index 20ee6daa..6ce4dcb1 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/YSupportPoint2D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points2d/YSupportPoint2D.java @@ -1,7 +1,5 @@ package com.github.skjolber.packing.ep.points2d; -import com.github.skjolber.packing.api.Placement2D; - /** * * Point supported by a line in the y direction, effectively enforcing an x coordinate. @@ -10,6 +8,9 @@ public interface YSupportPoint2D { - Placement2D getYSupport(); + int getSupportedMinY(); + + int getSupportedMaxY(); + } diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/CustomIntYComparator.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/CustomIntYComparator.java index abdebaf3..9c21a055 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/CustomIntYComparator.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/CustomIntYComparator.java @@ -13,7 +13,6 @@ public class CustomIntYComparator implements IntComparator { @Override public int compare(int value1, int value2) { - Point3D o1 = values.get(value1); Point3D o2 = values.get(value2); diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/CustomIntZComparator.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/CustomIntZComparator.java index 3eb570c6..bd244ec6 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/CustomIntZComparator.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/CustomIntZComparator.java @@ -13,7 +13,6 @@ public class CustomIntZComparator implements IntComparator { @Override public int compare(int value1, int value2) { - Point3D o1 = values.get(value1); Point3D o2 = values.get(value2); diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/Default3DPlanePoint3D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/Default3DPlanePoint3D.java index bc5d9234..ccaf37fa 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/Default3DPlanePoint3D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/Default3DPlanePoint3D.java @@ -131,17 +131,14 @@ public Default3DPlanePoint3D

clone(int maxX, int maxY, int maxZ) { yzPlane, xzPlane, xyPlane); } - @Override public Placement3D getXZPlane() { return xzPlane; } - @Override public Placement3D getYZPlane() { return yzPlane; } - @Override public Placement3D getXYPlane() { return xyPlane; } diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXYPlanePoint3D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXYPlanePoint3D.java index 2a4457f1..39d27237 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXYPlanePoint3D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXYPlanePoint3D.java @@ -50,8 +50,7 @@ public boolean isXYPlaneEdgeX(int x) { public boolean isXYPlaneEdgeY(int y) { return xyPlane.getAbsoluteEndY() == y - 1; } - - @Override + public Placement3D getXYPlane() { return xyPlane; } diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXYPlaneXZPlanePoint3D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXYPlaneXZPlanePoint3D.java index 7481ef12..6f772d1d 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXYPlaneXZPlanePoint3D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXYPlaneXZPlanePoint3D.java @@ -93,12 +93,10 @@ public DefaultXYPlaneXZPlanePoint3D

clone(int maxX, int maxY, int maxZ) { return new DefaultXYPlaneXZPlanePoint3D<>(minX, minY, minZ, maxX, maxY, maxZ, xzPlane, xyPlane); } - @Override public Placement3D getXZPlane() { return xzPlane; } - @Override public Placement3D getXYPlane() { return xyPlane; } diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXYPlaneYZPlanePoint3D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXYPlaneYZPlanePoint3D.java index e0127ee3..4a2509e4 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXYPlaneYZPlanePoint3D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXYPlaneYZPlanePoint3D.java @@ -55,7 +55,6 @@ public boolean isYZPlaneEdgeY(int y) { return yzPlane.getAbsoluteEndY() == y - 1; } - @Override public Placement3D getYZPlane() { return yzPlane; } @@ -91,7 +90,6 @@ public boolean isXYPlaneEdgeY(int y) { return xyPlane.getAbsoluteEndY() == y - 1; } - @Override public Placement3D getXYPlane() { return xyPlane; } diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXZPlanePoint3D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXZPlanePoint3D.java index 0ce3ac74..d9d25c32 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXZPlanePoint3D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXZPlanePoint3D.java @@ -61,7 +61,6 @@ public DefaultXZPlanePoint3D

clone(int maxX, int maxY, int maxZ) { xzPlane); } - @Override public Placement3D getXZPlane() { return xzPlane; } diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXZPlaneYZPlanePoint3D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXZPlaneYZPlanePoint3D.java index 983607ca..a1750cde 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXZPlaneYZPlanePoint3D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultXZPlaneYZPlanePoint3D.java @@ -104,12 +104,10 @@ public DefaultXZPlaneYZPlanePoint3D

clone(int maxX, int maxY, int maxZ) { xzPlane, yzPlane); } - @Override public Placement3D getXZPlane() { return xzPlane; } - @Override public Placement3D getYZPlane() { return yzPlane; } diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultYZPlanePoint3D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultYZPlanePoint3D.java index e5eb9ef1..30cb3c6d 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultYZPlanePoint3D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/DefaultYZPlanePoint3D.java @@ -52,7 +52,6 @@ public boolean isYZPlaneEdgeY(int y) { return yzPlane.getAbsoluteEndY() == y - 1; } - @Override public Placement3D getYZPlane() { return yzPlane; } diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/XYPlanePoint3D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/XYPlanePoint3D.java index 3a44a887..c8cff187 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/XYPlanePoint3D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/XYPlanePoint3D.java @@ -1,7 +1,5 @@ package com.github.skjolber.packing.ep.points3d; -import com.github.skjolber.packing.api.Placement3D; - /** * * Z is fixed within a X-Y plane. @@ -18,5 +16,4 @@ public interface XYPlanePoint3D { int getSupportedXYPlaneMaxY(); - Placement3D getXYPlane(); } diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/XZPlanePoint3D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/XZPlanePoint3D.java index 1a66a215..5a5ae4a1 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/XZPlanePoint3D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/XZPlanePoint3D.java @@ -1,7 +1,5 @@ package com.github.skjolber.packing.ep.points3d; -import com.github.skjolber.packing.api.Placement3D; - /** * * Y is fixed within an x-z plane @@ -17,6 +15,4 @@ public interface XZPlanePoint3D { int getSupportedXZPlaneMinZ(); int getSupportedXZPlaneMaxZ(); - - Placement3D getXZPlane(); } diff --git a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/YZPlanePoint3D.java b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/YZPlanePoint3D.java index aa23ec62..c40e203a 100644 --- a/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/YZPlanePoint3D.java +++ b/extreme-points/src/main/java/com/github/skjolber/packing/ep/points3d/YZPlanePoint3D.java @@ -1,7 +1,5 @@ package com.github.skjolber.packing.ep.points3d; -import com.github.skjolber.packing.api.Placement3D; - /** * * X is fixed within a Y-Z plane. @@ -17,5 +15,4 @@ public interface YZPlanePoint3D { int getSupportedYZPlaneMaxZ(); - Placement3D getYZPlane(); } diff --git a/extreme-points/src/test/java/com/github/skjolber/packing/points2d/assertj/AbstractSimplePoint2DAssert.java b/extreme-points/src/test/java/com/github/skjolber/packing/points2d/assertj/AbstractSimplePoint2DAssert.java index 4b8a2e8e..5729d11b 100644 --- a/extreme-points/src/test/java/com/github/skjolber/packing/points2d/assertj/AbstractSimplePoint2DAssert.java +++ b/extreme-points/src/test/java/com/github/skjolber/packing/points2d/assertj/AbstractSimplePoint2DAssert.java @@ -17,14 +17,14 @@ protected AbstractSimplePoint2DAssert(ACTUAL actual, Class selfType) { super(actual, selfType); } + public SELF isYSupport(int y) { isNotNull(); if(!actual.isYSupport(y)) { if(actual instanceof YSupportPoint2D) { YSupportPoint2D ySupportPoint2D = (YSupportPoint2D)actual; - Placement2D support = ySupportPoint2D.getYSupport(); - failWithMessage("Expected y support at " + y + ", was " + support.getAbsoluteY() + " to " + support.getAbsoluteEndY()); + failWithMessage("Expected y support at " + y + ", was " + ySupportPoint2D.getSupportedMinY() + " to " + ySupportPoint2D.getSupportedMaxY()); } else { failWithMessage("Expected y support at " + y + ", was none for " + actual); } @@ -37,9 +37,8 @@ public SELF isNoYSupport(int y) { if(actual.isYSupport(y)) { if(actual instanceof YSupportPoint2D) { YSupportPoint2D ySupportPoint2D = (YSupportPoint2D)actual; - Placement2D support = ySupportPoint2D.getYSupport(); - failWithMessage("Expected no y support at " + y + ", was " + support.getAbsoluteY() + " to " + support.getAbsoluteEndY()); + failWithMessage("Expected no y support at " + y + ", was " + ySupportPoint2D.getSupportedMinY() + " to " + ySupportPoint2D.getSupportedMaxY()); } } return myself; @@ -49,10 +48,9 @@ public SELF isXSupport(int x) { isNotNull(); if(!actual.isXSupport(x)) { if(actual instanceof XSupportPoint2D) { - XSupportPoint2D ySupportPoint2D = (XSupportPoint2D)actual; - Placement2D support = ySupportPoint2D.getXSupport(); + XSupportPoint2D xSupport = (XSupportPoint2D)actual; - failWithMessage("Expected x support at " + x + ", was " + support.getAbsoluteX() + " to " + support.getAbsoluteEndX()); + failWithMessage("Expected x support at " + x + ", was " + xSupport.getSupportedMinX() + " to " + xSupport.getSupportedMaxX()); } else { failWithMessage("Expected x support at " + x + ", was none for " + actual); } @@ -64,10 +62,9 @@ public SELF isNoXSupport(int x) { isNotNull(); if(actual.isXSupport(x)) { if(actual instanceof XSupportPoint2D) { - XSupportPoint2D ySupportPoint2D = (XSupportPoint2D)actual; - Placement2D support = ySupportPoint2D.getXSupport(); + XSupportPoint2D xSupport = (XSupportPoint2D)actual; - failWithMessage("Expected no x support at " + x + ", was " + support.getAbsoluteX() + " to " + support.getAbsoluteEndX()); + failWithMessage("Expected no x support at " + x + ", was " + xSupport.getSupportedMinX() + " to " + xSupport.getSupportedMaxX()); } } return myself; @@ -83,9 +80,8 @@ public SELF isMaxYSupport(int y) { isNotNull(); if(actual instanceof YSupportPoint2D) { YSupportPoint2D ySupportPoint2D = (YSupportPoint2D)actual; - Placement2D ySupport = ySupportPoint2D.getYSupport(); - if(ySupport.getAbsoluteEndY() != y) { - failWithMessage("Expected y support limit " + y + ", was " + ySupport.getAbsoluteEndY()); + if(ySupportPoint2D.getSupportedMaxY() != y) { + failWithMessage("Expected y support limit " + y + ", was " + ySupportPoint2D.getSupportedMaxY()); } } else { failWithMessage("No y support, expected " + y + ", was none for " + actual); @@ -97,8 +93,7 @@ public SELF isNoYSupport() { isNotNull(); if(actual instanceof YSupportPoint2D) { YSupportPoint2D ySupportPoint2D = (YSupportPoint2D)actual; - Placement2D support = ySupportPoint2D.getYSupport(); - failWithMessage("Expected no y support, was " + support.getAbsoluteEndY()); + failWithMessage("Expected no y support, was " + ySupportPoint2D.getSupportedMaxY()); } return myself; } @@ -107,8 +102,7 @@ public SELF isNoXSupport() { isNotNull(); if(actual instanceof XSupportPoint2D) { XSupportPoint2D xSupportPoint2D = (XSupportPoint2D)actual; - Placement2D support = xSupportPoint2D.getXSupport(); - failWithMessage("Expected no x support, was " + support.getAbsoluteEndX()); + failWithMessage("Expected no x support, was " + xSupportPoint2D.getSupportedMaxX()); } return myself; } @@ -117,14 +111,12 @@ public SELF isMaxXSupport(int x) { isNotNull(); if(actual instanceof XSupportPoint2D) { XSupportPoint2D xSupportPoint2D = (XSupportPoint2D)actual; - Placement2D ySupport = xSupportPoint2D.getXSupport(); - if(ySupport.getAbsoluteEndX() != x) { - failWithMessage("Expected x support limit " + x + ", was " + ySupport.getAbsoluteEndX()); + if(xSupportPoint2D.getSupportedMaxX() != x) { + failWithMessage("Expected x support limit " + x + ", was " + xSupportPoint2D.getSupportedMaxX()); } } else { failWithMessage("No x support, expected " + x); } return myself; } - }