001// Licensed under the MIT license. See LICENSE file in the project root for full license information.
002
003package de.bytefish.pgbulkinsert.pgsql.model.geometric;
004
005public class LineSegment {
006
007    private final Point p1;
008    private final Point p2;
009
010    public LineSegment(Point p1, Point p2) {
011
012        if(p1 == null) {
013            throw new IllegalArgumentException("p1");
014        }
015
016        if(p2 == null) {
017            throw new IllegalArgumentException("p2");
018        }
019
020        this.p1 = p1;
021        this.p2 = p2;
022    }
023
024    public Point getP1() {
025        return p1;
026    }
027
028    public Point getP2() {
029        return p2;
030    }
031
032}