com.github.skjolber.packing.ep.points2d.DefaultPoint2D Maven / Gradle / Ivy
package com.github.skjolber.packing.ep.points2d;
import java.util.ArrayList;
import java.util.List;
import com.github.skjolber.packing.api.Placement2D;
import com.github.skjolber.packing.api.ep.Point2D;
public class DefaultPoint2D extends Point2D
{
public DefaultPoint2D(int minX, int minY, int maxX, int maxY) {
super(minX, minY, maxX, maxY);
}
@Override
public boolean isXSupport(int x) {
return false;
}
@Override
public boolean isYSupport(int y) {
return false;
}
public Point2D
clone(int maxX, int maxY) {
return new DefaultPoint2D<>(minX, minY, maxX, maxY);
}
@Override
public List
getPlacements2D() {
List
list = new ArrayList<>();
return list;
}
@Override
public Point2D
moveX(int x, int maxX, int maxY) {
return new DefaultPoint2D<>(x, minY, maxX, maxY);
}
@Override
public Point2D
moveY(int y, int maxX, int maxY) {
return new DefaultPoint2D<>(minX, y, maxX, maxY);
}
@Override
public Point2D
moveX(int x, int maxX, int maxY, P ySupport) {
return new DefaultYSupportPoint2D<>(x, minY, maxY, maxY, ySupport);
}
@Override
public Point2D
moveY(int y, int maxX, int maxY, P xSupport) {
return new DefaultXSupportPoint2D<>(minX, y, maxX, maxX, xSupport);
}
}