public class Hex
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private Coordinate |
point |
private PortType |
port |
private static long |
serialVersionUID |
private HexType |
type |
Constructor and Description |
---|
Hex(HexType type,
Coordinate point)
Creates a hex object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Coordinate |
getBottomLeftCoordinate()
Gets the coordinate of the bottom left point.
|
Coordinate |
getBottomRightCoordinate()
Gets the coordinate of the bottom right point.
|
Coordinate |
getLeftCoordinate()
Gets the coordinate of the left point.
|
Coordinate |
getPoint() |
PortType |
getPort() |
Coordinate |
getRightCoordinate()
Gets the coordinate of the right point (opposed to the wrong one?...)
|
Coordinate |
getTopLeftCoordinate()
Gets the coordinate of the top left point.
|
Coordinate |
getTopRightCoordinate()
Gets the coordinate of the top right point.
|
HexType |
getType() |
int |
hashCode() |
void |
setPort(PortType port) |
java.lang.String |
toString() |
private static final long serialVersionUID
private HexType type
private Coordinate point
private PortType port
public Hex(HexType type, Coordinate point)
type
- The resource type of the hex.point
- The coordinate of the hex.public HexType getType()
public Coordinate getPoint()
public Coordinate getTopLeftCoordinate()
public Coordinate getLeftCoordinate()
public Coordinate getBottomLeftCoordinate()
public Coordinate getTopRightCoordinate()
public Coordinate getRightCoordinate()
public Coordinate getBottomRightCoordinate()
public PortType getPort()
public void setPort(PortType port) throws MapException
port
- the port to setMapException
- Thrown when a port can't be added to the hex.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object