public class Blockade extends StandardEntity
Constructor and Description |
---|
Blockade(Blockade other)
Blockade copy constructor.
|
Blockade(EntityID id)
Construct a Blockade object with entirely undefined property values.
|
Modifier and Type | Method and Description |
---|---|
protected Entity |
copyImpl()
Create a copy of this entity.
|
int[] |
getApexes()
Get the apexes of this area.
|
IntArrayProperty |
getApexesProperty()
Get the apexes property.
|
Pair<java.lang.Integer,java.lang.Integer> |
getLocation(WorldModel<? extends StandardEntity> world)
Get the location of this entity.
|
EntityID |
getPosition()
Get the position of this blockade.
|
EntityRefProperty |
getPositionProperty()
Get the position property.
|
Property |
getProperty(java.lang.String urn)
Get a property by urn.
|
int |
getRepairCost()
Get the repair cost of this blockade.
|
IntProperty |
getRepairCostProperty()
Get the repair cost property.
|
java.awt.Shape |
getShape()
Get this area as a Java Shape object.
|
StandardEntityURN |
getStandardURN()
Get the URN of this entity type as an instanceof StandardEntityURN.
|
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 |
isApexesDefined()
Find out if the apexes property has been defined.
|
boolean |
isPositionDefined()
Find out if the position property has been defined.
|
boolean |
isRepairCostDefined()
Find out if the repair cost 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 |
setApexes(int[] apexes)
Set the apexes.
|
void |
setPosition(EntityID position)
Set the position.
|
void |
setRepairCost(int cost)
Set the repair cost.
|
void |
setX(int x)
Set the X coordinate.
|
void |
setY(int y)
Set the Y coordinate.
|
void |
undefineApexes()
Undefine the apexes property.
|
void |
undefinePosition()
Undefine the position property.
|
void |
undefineRepairCost()
Undefine the repair cost property.
|
void |
undefineX()
Undefine the X property.
|
void |
undefineY()
Undefine the Y property.
|
getURN
addEntityListener, copy, equals, firePropertyChanged, getEntityName, getFullDescription, getID, getProperties, hashCode, read, registerProperties, removeEntityListener, toString, write
public Blockade(EntityID id)
id
- The ID of this entity.public Blockade(Blockade other)
other
- The Blockade 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.protected Entity copyImpl()
AbstractEntity
copyImpl
in class AbstractEntity
public StandardEntityURN getStandardURN()
StandardEntity
getStandardURN
in class StandardEntity
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 IntArrayProperty getApexesProperty()
public int[] getApexes()
public void setApexes(int[] apexes)
apexes
- The new apexes.public boolean isApexesDefined()
public void undefineApexes()
public EntityRefProperty getPositionProperty()
public EntityID getPosition()
public void setPosition(EntityID position)
position
- The new position.public boolean isPositionDefined()
public void undefinePosition()
public IntProperty getRepairCostProperty()
public int getRepairCost()
public void setRepairCost(int cost)
cost
- The new repair cost.public boolean isRepairCostDefined()
public void undefineRepairCost()
public java.awt.Shape getShape()