public class Terminus
extends java.lang.Object
implements java.io.Serializable
Yarn (which is a pseudoline).
Every Yarn begins and ends at a Terminus, and each Terminus is the
beginning or ending point of exactly one Yarn.
Each Terminus has an associated angle, which is the angle of the family
of parallel rhomb edges that define the Yarn.| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID
For serialization
|
| Modifier and Type | Method and Description |
|---|---|
static Terminus |
createTerminus(int i,
int a)
Public static factory method
|
boolean |
equals(java.lang.Object obj)
Two Termini are equal if they have the same indices and angles.
|
int |
getAngle()
A getter method.
|
int |
getIndex()
A getter method.
|
int |
hashCode()
hashCode override.
|
void |
swapAngles(Terminus t)
Swap the angles of two Termini.
|
java.lang.String |
toString()
Simple toString method
|
public static final long serialVersionUID
public static Terminus createTerminus(int i, int a)
i - The index of this in a big list of Termini.a - The angle.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int getIndex()
public int getAngle()
public java.lang.String toString()
toString in class java.lang.Objectpublic void swapAngles(Terminus t)
t - The other Terminus.