@Status(stage=DEVELOPMENT, unitTests=COMPLETE) @ThreadSafety(level=IMMUTABLE) public class CLine extends Object implements Serializable
CPoints
.Constructor and Description |
---|
CLine(CPoint fromPoint,
CPoint toPoint)
Creates this CLine from the supplied
CPoints . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object line)
Determines whether this CLine is equal to the supplied line.
|
CPoint |
getFromPoint()
Gets the first CPoint of this CLine.
|
double |
getLength()
Gets the length of this CLine.
|
CPoint |
getToPoint()
Gets the second CPoint of this CLine.
|
int |
hashCode()
Computes the hash code of this CLine.
|
String |
toString()
Creates a String representation of this CLine.
|
public CLine(CPoint fromPoint, CPoint toPoint)
CPoints
.fromPoint
- From point.toPoint
- To point.NullPointerException
- When either the supplied fromPoint or
toPoint is null.ArithmeticException
- When the supplied points are equal.public CPoint getFromPoint()
public CPoint getToPoint()
public double getLength()
public boolean equals(Object line)
public int hashCode()
Copyright © 2008–2018. All rights reserved.