Class SRVMWorld
- java.lang.Object
-
- org.spectrumauctions.sats.core.model.World
-
- org.spectrumauctions.sats.core.model.srvm.SRVMWorld
-
- All Implemented Interfaces:
java.io.Serializable,GenericWorld
public final class SRVMWorld extends World implements GenericWorld
- Author:
- Michael Weiss
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SRVMWorld(SRVMWorldSetup setup, RNGSupplier rngSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableList<SRVMBidder>createPopulation(java.util.Collection<SRVMBidderSetup> bidderSetups, RNGSupplier rngSupplier)java.util.List<SRVMBand>getAllGenericDefinitions()com.google.common.collect.ImmutableList<SRVMBand>getBands()com.google.common.collect.ImmutableList<SRVMLicense>getLicenses()intgetNumberOfGoods()voidrefreshFieldBackReferences()Some of the members of the World (e.g.java.util.List<SRVMBidder>restorePopulation(long populationId)Restore serializedSATSBidderinstances via population id-
Methods inherited from class org.spectrumauctions.sats.core.model.World
equals, getId, getModelName, hashCode, openNewPopulation, restorePopulation, restorePopulation, store
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.spectrumauctions.sats.core.model.GenericWorld
getGenericDefinitionOf
-
-
-
-
Constructor Detail
-
SRVMWorld
public SRVMWorld(SRVMWorldSetup setup, RNGSupplier rngSupplier)
-
-
Method Detail
-
getNumberOfGoods
public int getNumberOfGoods()
- Specified by:
getNumberOfGoodsin classWorld- See Also:
World.getNumberOfGoods()
-
getLicenses
public com.google.common.collect.ImmutableList<SRVMLicense> getLicenses()
- Specified by:
getLicensesin classWorld- Returns:
- An immutable set containing all licenses.
-
getBands
public com.google.common.collect.ImmutableList<SRVMBand> getBands()
-
createPopulation
public com.google.common.collect.ImmutableList<SRVMBidder> createPopulation(java.util.Collection<SRVMBidderSetup> bidderSetups, RNGSupplier rngSupplier)
-
restorePopulation
public java.util.List<SRVMBidder> restorePopulation(long populationId)
Description copied from class:WorldRestore serializedSATSBidderinstances via population id- Specified by:
restorePopulationin classWorld- Parameters:
populationId- the population id- Returns:
- the deserialized bidders
- See Also:
World.restorePopulation(long)
-
refreshFieldBackReferences
public void refreshFieldBackReferences()
Description copied from class:WorldSome of the members of the World (e.g. licenses) have circular references back to the world.
As the used gsonSerializer cannot handle this yet, the circular references are not serialized and have to be restored after deserialization by calling this method.
This method will be removed in a later version and the problem be solved during deserialization.- Specified by:
refreshFieldBackReferencesin classWorld- See Also:
World.refreshFieldBackReferences()
-
getAllGenericDefinitions
public java.util.List<SRVMBand> getAllGenericDefinitions()
- Specified by:
getAllGenericDefinitionsin interfaceGenericWorld
-
-