Update DecomposeSpatioLine.java

This commit is contained in:
crowdosNWPU 2024-01-21 11:29:03 +08:00 committed by GitHub
parent a2d7151871
commit cef2d43596
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -21,10 +21,10 @@ public class DecomposeSpatioLine {
* @throws InvalidConstraintException if an invalid constraint is detected
*/
public DecomposeSpatioLine(double width,List<Coordinate> pointsList) throws InvalidConstraintException {
if(pointsList==null)
throw new InvalidConstraintException("Invalid pointsList");
this.pointsList = pointsList;
this.width = width;
if(pointsList==null)
throw new InvalidConstraintException("Invalid pointsList");
}
@ -36,9 +36,9 @@ public class DecomposeSpatioLine {
* @throws InvalidConstraintException if an invalid constraint is detected
*/
public DecomposeSpatioLine(double width,Coordinate...pointsList) throws InvalidConstraintException {
this(width,Arrays.asList(pointsList));
if(pointsList==null)
throw new InvalidConstraintException("Invalid pointsList");
this(width,Arrays.asList(pointsList));
}
/**