public class CellImpl extends java.lang.Object implements Cell
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PERSISTENCE_DEFINITION_NAME |
Constructor and Description |
---|
CellImpl() |
CellImpl(double x,
double y,
double width,
double height) |
Modifier and Type | Method and Description |
---|---|
Cell |
clone()
Creates a copy of the object.
|
boolean |
contains(double x,
double y) |
boolean |
equals(java.lang.Object o) |
double |
getHeight() |
java.awt.geom.Rectangle2D |
getRectangle() |
double |
getWidth() |
double |
getX() |
double |
getY() |
int |
hashCode() |
boolean |
intersects(java.awt.geom.Rectangle2D rect) |
boolean |
isContained(java.awt.geom.Rectangle2D rect) |
void |
join(Cell c) |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
static void |
registerPersistent() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setHeight(double height) |
void |
setWidth(double width) |
void |
setX(double x) |
void |
setY(double y) |
java.lang.String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, wait
cloneQuietly, cloneQuietly
public static final java.lang.String PERSISTENCE_DEFINITION_NAME
public CellImpl()
public CellImpl(double x, double y, double width, double height)
public Cell clone() throws java.lang.CloneNotSupportedException
Cloneable
clone
in interface Cell
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isContained(java.awt.geom.Rectangle2D rect)
isContained
in interface Cell
public boolean intersects(java.awt.geom.Rectangle2D rect)
intersects
in interface Cell
public java.awt.geom.Rectangle2D getRectangle()
getRectangle
in interface Cell
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static void registerPersistent()
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException