public class SimpleHex extends java.lang.Object implements Hex, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
SimpleRhomb[] |
rhombs
The three rhombs in this hex.
|
static long |
serialVersionUID
For serialization.
|
| Constructor and Description |
|---|
SimpleHex(SimpleRhomb r0,
SimpleRhomb r1,
SimpleRhomb r2)
Public constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Rhomb jj)
Determine if this contains a given Rhomb.
|
SimpleHex |
createSimpleHex(java.util.List<Rhomb> allJoins,
java.util.List<Rhomb> newJoins)
Simplification method.
|
boolean |
doubleOverlap(SimpleHex t)
Determine if this contains a
SimpleRhomb in common with another SimpleHex. |
boolean |
equals(java.lang.Object obj)
Two SimpleHexes are equal if they contain the same three SimpleRhombs.
|
java.util.List<Hex> |
flip()
Flip the Rhombs in this SimpleHex.
|
SimplePolygon2D |
getHex()
Getter method.
|
Rhomb[] |
getJoins()
Getter method.
|
boolean |
valid()
Determine if this represents a hexagon--i.e., if the three rhombs all touch one another.
|
public static final long serialVersionUID
public final SimpleRhomb[] rhombs
public SimpleHex(SimpleRhomb r0, SimpleRhomb r1, SimpleRhomb r2)
public Rhomb[] getJoins()
public SimplePolygon2D getHex()
public SimpleHex createSimpleHex(java.util.List<Rhomb> allJoins, java.util.List<Rhomb> newJoins)
createSimpleHex in interface Hexpublic boolean valid()
public boolean contains(Rhomb jj)
SimpleRhombs, so any other type of Rhomb will return false.public boolean doubleOverlap(SimpleHex t)
SimpleRhomb in common with another SimpleHex.t - The other SimpleHex.public boolean equals(java.lang.Object obj)
equals in class java.lang.Object