public abstract class Area extends StandardEntity
Modifier | Constructor and Description |
---|---|
protected |
Area(Area other)
Area copy constructor.
|
protected |
Area(EntityID id)
Construct a subclass of Area with entirely undefined property values.
|
Modifier and Type | Method and Description |
---|---|
int[] |
getApexList()
Get the list of apexes for this area.
|
java.util.List<EntityID> |
getBlockades()
Get the blockades in this area.
|
EntityRefListProperty |
getBlockadesProperty()
Get the blockades property.
|
java.util.List<Edge> |
getEdges()
Get the edges of this area.
|
EdgeListProperty |
getEdgesProperty()
Get the edges property.
|
Edge |
getEdgeTo(EntityID neighbour)
Get the edge that crosses to a particular neighbour.
|
Pair<java.lang.Integer,java.lang.Integer> |
getLocation(WorldModel<? extends StandardEntity> world)
Get the location of this entity.
|
java.util.List<EntityID> |
getNeighbours()
Get the neighbours of this area.
|
Property |
getProperty(java.lang.String urn)
Get a property by urn.
|
java.awt.Shape |
getShape()
Get this area as a Java Shape object.
|
int |
getX()
Get the X coordinate.
|
IntProperty |
getXProperty()
Get the X property.
|
int |
getY()
Get the Y coordinate.
|
IntProperty |
getYProperty()
Get the Y property.
|
boolean |
isBlockadesDefined()
Find out if the blockades property has been defined.
|
boolean |
isEdgesDefined()
Find out if the edges property has been defined.
|
boolean |
isXDefined()
Find out if the X property has been defined.
|
boolean |
isYDefined()
Find out if the Y property has been defined.
|
void |
setBlockades(java.util.List<EntityID> blockades)
Set the blockades in this area.
|
void |
setEdges(java.util.List<Edge> edges)
Set the edges.
|
void |
setX(int x)
Set the X coordinate.
|
void |
setY(int y)
Set the Y coordinate.
|
void |
undefineBlockades()
Undefine the blockades property.
|
void |
undefineEdges()
Undefine the edges property.
|
void |
undefineX()
Undefine the X property.
|
void |
undefineY()
Undefine the Y property.
|
getStandardURN, getURN
addEntityListener, copy, copyImpl, equals, firePropertyChanged, getEntityName, getFullDescription, getID, getProperties, hashCode, read, registerProperties, removeEntityListener, toString, write
protected Area(EntityID id)
id
- The ID of this entity.protected Area(Area other)
other
- The Area to copy.public Pair<java.lang.Integer,java.lang.Integer> getLocation(WorldModel<? extends StandardEntity> world)
StandardEntity
getLocation
in class StandardEntity
world
- The world model to look up for entity references.public Property getProperty(java.lang.String urn)
Entity
getProperty
in interface Entity
getProperty
in class AbstractEntity
urn
- The urn to look up.public IntProperty getXProperty()
public int getX()
public void setX(int x)
x
- The new X coordinate.public boolean isXDefined()
public void undefineX()
public IntProperty getYProperty()
public int getY()
public void setY(int y)
y
- The new y coordinate.public boolean isYDefined()
public void undefineY()
public EdgeListProperty getEdgesProperty()
public java.util.List<Edge> getEdges()
public void setEdges(java.util.List<Edge> edges)
edges
- The new edges.public boolean isEdgesDefined()
public void undefineEdges()
public EntityRefListProperty getBlockadesProperty()
public java.util.List<EntityID> getBlockades()
public void setBlockades(java.util.List<EntityID> blockades)
blockades
- The new blockades.public boolean isBlockadesDefined()
public void undefineBlockades()
public java.util.List<EntityID> getNeighbours()
public Edge getEdgeTo(EntityID neighbour)
neighbour
- The neighbour ID.public int[] getApexList()
public java.awt.Shape getShape()