|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dbe.eve.simulator.AttributePool
public class AttributePool
Is used to provide attributes
| Field Summary | |
|---|---|
private java.util.Vector |
attributes
|
private static AttributePool |
instance
|
(package private) static org.apache.log4j.Logger |
logger
|
private EvEModel |
model
|
(package private) static MersenneTwister |
mt
|
| Constructor Summary | |
|---|---|
private |
AttributePool()
|
| Method Summary | |
|---|---|
boolean |
addAttribute(Attribute attributeToAdd)
Adds an Attribute to the Pool |
void |
clear()
Clears the attribute pool |
java.util.Vector |
getAllAttributesInAttributePool()
Return the whole AttributePool |
Attribute |
getAttribute(int ID)
Retuns an Attribute which have a specific ID |
private int |
getConfiguredAttributeLenght()
|
static AttributePool |
getInstance()
Singelton to ensure that only one Instance exsist |
Attribute |
getRandomAttribute()
Returns a random picked Attribute of the AttributePool |
java.util.Vector |
getRandomAttributes()
creates a vector of attributes choosen randomly from the attribute pool number of attributes is taken from the eveModel |
java.util.Vector |
getRandomAttributes(int numOfAttributes)
creates a vector of attributes choosen randomly from the attribute pool |
DemandedAttribute |
getRandomDemandedAttribute()
Returns a random picked Attribute of the AttributePool and converts its into an DemandedAttribute |
java.util.Vector |
getRandomDemandedAttributes()
creates a vector of DemandedAttributes choosen randomly from the attribute pool number of attributes is taken from the eveModel |
java.util.Vector |
getRandomDemandedAttributes(int numOfDemandedAttributes)
creates a vector with demandedAttributes choosen randomly from the attribute pool |
void |
initialiseRandomAttributePool(int numberOfAttributes)
Creates an random AttributePool |
boolean |
removeAttribute(Attribute attributeToRemove)
Removes an Attribute of this AttributePool |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static AttributePool instance
private java.util.Vector attributes
static org.apache.log4j.Logger logger
private EvEModel model
static MersenneTwister mt
| Constructor Detail |
|---|
private AttributePool()
| Method Detail |
|---|
public static AttributePool getInstance()
public boolean addAttribute(Attribute attributeToAdd)
attributeToAdd - is the Attribute which should be added to the Pool
public boolean removeAttribute(Attribute attributeToRemove)
attributeToRemove - represents the Attribute which should be removed from the AttributePool
public void initialiseRandomAttributePool(int numberOfAttributes)
numberOfAttributes - is the number of Attributes of which the random AttributePool should exsistpublic java.util.Vector getAllAttributesInAttributePool()
public Attribute getAttribute(int ID)
ID -
public Attribute getRandomAttribute()
public java.util.Vector getRandomAttributes()
numOfAttributes - number of attributes
public java.util.Vector getRandomAttributes(int numOfAttributes)
numOfAttributes - number of attributes
private int getConfiguredAttributeLenght()
public DemandedAttribute getRandomDemandedAttribute()
public java.util.Vector getRandomDemandedAttributes()
numOfAttributes - number of attributes
public java.util.Vector getRandomDemandedAttributes(int numOfDemandedAttributes)
numOfAttributes - number of attributes
public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||