public class HolonElement
extends java.lang.Object
Constructor and Description |
---|
HolonElement(HolonElement element)
Create a copy of the HolonElement given each one a new ID.
|
HolonElement(java.lang.String eleName,
int amount,
float energy)
Create a new HolonElement with a user-defined name, amount of the same
element and energy per element.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getActive()
Get the Status of the Element (see description of variables).
|
int |
getAmount()
Get the actual amount of Elements in the selected Object.
|
java.lang.String |
getEleName()
Get the user-defined Name.
|
float |
getEnergy()
Get the energy value of the selected Element.
|
float[] |
getEnergyAt()
Get the Array of energy (100 values).
|
java.util.LinkedList<java.awt.Point> |
getGraphPoints()
Get the points (values) in the graph.
|
int |
getId()
Get the Id of the selected HolonElement.
|
java.lang.String |
getObj()
Get the actual object.
|
java.lang.String |
getSav() |
char |
getSign()
Get the symbol of the value (see variable description).
|
float |
getTotalEnergy()
Multiply the amount of gadgets, given by the user, and the
consumption/production.
|
float |
getTotalEnergyAtTimeStep(int x)
Get the energy value at a selected time x.
|
void |
setActive(boolean active)
Set the Status of the Element (see description of variables).
|
void |
setAmount(int amount)
Set the amount of the Element in the selected Object.
|
void |
setEleName(java.lang.String name)
Set the name to any new name.
|
void |
setEnergy(float energy)
Set the energy value of the selected Element.
|
void |
setEnergyAt(float energy)
Set energy to any value to the whole array.
|
void |
setEnergyAt(int pos,
float energy)
Set energy to any value at a given position.
|
void |
setGraphPoints(java.util.LinkedList<java.awt.Point> points)
Set the points (values) in the graph.
|
void |
setObj(java.lang.String obj)
Set the object to a new one.
|
void |
setSav(java.lang.String sav)
for save purposes.
|
void |
setSign(float energy)
Set symbol of the value.
|
public HolonElement(java.lang.String eleName, int amount, float energy)
eleName
- Stringamount
- intenergy
- floatpublic HolonElement(HolonElement element)
element
- element to copypublic float[] getEnergyAt()
public void setEnergyAt(float energy)
energy
- the valuepublic void setEnergyAt(int pos, float energy)
pos
- intenergy
- floatpublic java.lang.String getEleName()
public void setEleName(java.lang.String name)
name
- the name to setpublic int getAmount()
public void setAmount(int amount)
amount
- the amount to setpublic float getEnergy()
public void setEnergy(float energy)
energy
- the energy to setpublic boolean getActive()
public void setActive(boolean active)
active
- the active to setpublic float getTotalEnergy()
public float getTotalEnergyAtTimeStep(int x)
x
- intpublic char getSign()
public void setSign(float energy)
energy
- the sign to setpublic java.lang.String getSav()
public void setSav(java.lang.String sav)
sav
- the stored to setpublic java.lang.String getObj()
public void setObj(java.lang.String obj)
obj
- the obj to setpublic java.util.LinkedList<java.awt.Point> getGraphPoints()
public void setGraphPoints(java.util.LinkedList<java.awt.Point> points)
points
- the Graph pointspublic int getId()