public class GridDataManager extends GridManager
Constructor and Description |
---|
GridDataManager(int size)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addComponent(java.lang.String name,
int location)
Overrides the super class' behavior to also initialize an IDataProvider
for the location.
|
java.lang.Object |
clone()
Deep copies and returns a newly instantiated object.
|
void |
copy(GridDataManager otherObject)
Deep copies the contents of the object from another object.
|
boolean |
equals(java.lang.Object otherObject)
Compares the contents of objects and returns true
if they are identical, otherwise returns false.
|
SFRComponent |
getDataProvider(int location)
Gets an IDataProvider for a specified location.
|
int |
hashCode()
Returns the hashCode of the object.
|
boolean |
removeComponent(int location)
Overrides the super class' behavior to also remove the IDataProvider from
the location.
|
boolean |
removeComponent(java.lang.String name)
Overrides the super class' behavior to also remove the IDataProvider from
any location inhabited by the component.
|
copy, getComponentLocations, getComponentName
public GridDataManager(int size)
size
- The size of the Grid.public SFRComponent getDataProvider(int location)
location
- The location to fetch the IDataProvider.public boolean addComponent(java.lang.String name, int location)
addComponent
in interface IGridManager
addComponent
in class GridManager
name
- The name of the Component to add to the grid.location
- The location index in which to put the Component.public boolean removeComponent(int location)
removeComponent
in interface IGridManager
removeComponent
in class GridManager
location
- The index of the Component to remove.public boolean removeComponent(java.lang.String name)
removeComponent
in interface IGridManager
removeComponent
in class GridManager
name
- The name of the Component to remove from the GridManager.public boolean equals(java.lang.Object otherObject)
equals
in class GridManager
otherObject
- The object to compare against.public int hashCode()
Returns the hashCode of the object.
hashCode
in class GridManager
public void copy(GridDataManager otherObject)
Deep copies the contents of the object from another object.
otherObject
- The other object to copy the contents of.public java.lang.Object clone()
Deep copies and returns a newly instantiated object.
clone
in class GridManager