|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dbe.eve.simulator.LocalServicePool
public class LocalServicePool
Is used to manage services
| Field Summary | |
|---|---|
(package private) static org.apache.log4j.Logger |
logger
|
private EvEModel |
model
|
(package private) static MersenneTwister |
mt
|
private java.util.Vector<ServicePoolElement> |
servicePool
|
| Constructor Summary | |
|---|---|
LocalServicePool()
constructs an ServicePool |
|
LocalServicePool(java.util.Vector newServicePool,
EvEModel model)
Constructs an ServicePool have certain already stored. |
|
| Method Summary | |
|---|---|
void |
clearLocalServicePool()
|
java.lang.Object |
clone()
returns an hard copy of the ServicePool |
Service |
getRandomService()
returns random an Serivce of the ServicePool |
java.util.Vector |
getServicePool()
returns the ServicePool |
ServicePoolElement |
getServicePoolElement(Service searchedService)
search in the ServicePool if the searchedService is stored in this ServicePool |
java.util.Vector |
getServicePoolServices()
returns an Vector which store the Services of the ServicePool |
java.util.Vector |
getServicePoolServicesSortedByNumUsedInGA()
The first element of the return value (a vector) is the ServicePoolElement with the smallest NumUsedInGA |
java.util.Vector |
getServicePoolServicesSortedByWasAddedAtStep()
The first element of the return value (a vector) is the oldes ServicePoolElement |
int |
getServicePoolSize()
returns the number of Services which are stored in this ServicePool |
void |
putServiceToServicePool(Service serviceToAdd)
adds an Service to this ServicePool |
void |
putServiceToServicePool(java.util.Vector<Service> servicesToAdd)
adds all Services in a given Vector to this ServicePool |
boolean |
removeServiceFromServicePool(Service serviceToRemove)
removes an Service from this ServicePool |
boolean |
serviceWasUsedInGA(Service serviceToSearch)
return true if the service was used one or more times in an GA |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.util.Vector<ServicePoolElement> servicePool
private EvEModel model
static MersenneTwister mt
static org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public LocalServicePool()
public LocalServicePool(java.util.Vector newServicePool,
EvEModel model)
newServicePool - are Services which should be stored in the ServicePool| Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic java.util.Vector getServicePool()
public java.util.Vector getServicePoolServices()
public java.util.Vector getServicePoolServicesSortedByWasAddedAtStep()
public boolean serviceWasUsedInGA(Service serviceToSearch)
public java.util.Vector getServicePoolServicesSortedByNumUsedInGA()
public ServicePoolElement getServicePoolElement(Service searchedService)
searchedService -
public int getServicePoolSize()
public void putServiceToServicePool(Service serviceToAdd)
serviceToAdd - is the Service which should be addedpublic void putServiceToServicePool(java.util.Vector<Service> servicesToAdd)
servicesToAdd - are the Services which should be addedpublic boolean removeServiceFromServicePool(Service serviceToRemove)
serviceToRemove - is the Service which should be removed
public Service getRandomService()
public void clearLocalServicePool()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||