Package org.seamcat.model.factory
Class Factory
- java.lang.Object
-
- org.seamcat.model.factory.Factory
-
public class Factory extends java.lang.Object
This class can be used by all plugins to get factories and builders for the different types of SEAMCAT
-
-
Constructor Summary
Constructors Constructor Description Factory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AntennaGainFactory
antennaGainFactory()
static <T> T
build(T prototype)
method that returns an immutable instance ofT
.static void
checkPlugin(ConsistencyCheckContext context, Configuration conf)
static CorrelationModeFactory
correlationModes()
static CoverageRadiusFactory
coverageRadii()
static DistributionFactory
distributionFactory()
Get the factory handling the creation of distributionsstatic boolean
equals(SystemPlugin system, BuiltInSystem type)
static EventProcessingFactory
eventProcessors()
static DataExporter
exporter()
static <T> T
fromInstance(java.lang.Class<T> clazz, T t)
static FunctionFactory
functionFactory()
static boolean
in(SystemPlugin system, BuiltInSystem... type)
static void
initialize(DistributionFactory distributionFactory, PropagationModelFactory propagationModelFactory, org.seamcat.model.factory.Factory.Builders builders, AntennaGainFactory antennaGainFactory, FunctionFactory functionFactory, CoverageRadiusFactory coverageRadiusFactory, EventProcessingFactory eventProcessingFactory, CorrelationModeFactory correlationModeFactory, PluginFactory pluginFactory, ResultFactory resultFactory, DataExporter exporter, SystemHandler systemHandler, UIFactory uiFactory)
static <T> T
instance(java.lang.Class<T> clazz)
static PluginFactory
plugins()
static PropagationModelFactory
propagationModelFactory()
Get the factory handling the creation or copy of propagation modelsstatic <T> T
prototype(java.lang.Class<T> clazz)
This method returns the prototype object to be build.static <T> T
prototype(java.lang.Class<T> clazz, T t)
This method returns the prototype object to be build with values according to the argument t.static ResultFactory
results()
static UIFactory
uiFactory()
static <V> Returner<V>
when(V value)
Used in conjunction withprototype()
.
-
-
-
Method Detail
-
initialize
public static void initialize(DistributionFactory distributionFactory, PropagationModelFactory propagationModelFactory, org.seamcat.model.factory.Factory.Builders builders, AntennaGainFactory antennaGainFactory, FunctionFactory functionFactory, CoverageRadiusFactory coverageRadiusFactory, EventProcessingFactory eventProcessingFactory, CorrelationModeFactory correlationModeFactory, PluginFactory pluginFactory, ResultFactory resultFactory, DataExporter exporter, SystemHandler systemHandler, UIFactory uiFactory)
-
distributionFactory
public static DistributionFactory distributionFactory()
Get the factory handling the creation of distributions- Returns:
- Distribution Factory instance
-
propagationModelFactory
public static PropagationModelFactory propagationModelFactory()
Get the factory handling the creation or copy of propagation models- Returns:
-
prototype
public static <T> T prototype(java.lang.Class<T> clazz)
This method returns the prototype object to be build. The prototype is used in thewhen
method to bind return value for methods, e.g.when( prototype.temperature()).thenReturn( 37.5);
- Returns:
- prototype instance of type T
-
prototype
public static <T> T prototype(java.lang.Class<T> clazz, T t)
This method returns the prototype object to be build with values according to the argument t. The prototype is used in thewhen
method to bind return value for methods, e.g.when( prototype.temperature()).thenReturn( 37.5);
- Returns:
- prototype instance of type T
-
when
public static <V> Returner<V> when(V value)
Used in conjunction withprototype()
.
Specifies what an instance should return by using the prototype.- Parameters:
value
- method invoked on the prototype. Value only used to generateReturner
accepting the correct return value- Returns:
- Returner object to be passed the actual value to return
-
build
public static <T> T build(T prototype)
method that returns an immutable instance ofT
.- Parameters:
prototype
- a prototype instance with recorded return values to be set in the final immutable instance- Returns:
- immutable instance of T
-
instance
public static <T> T instance(java.lang.Class<T> clazz)
-
fromInstance
public static <T> T fromInstance(java.lang.Class<T> clazz, T t)
-
antennaGainFactory
public static AntennaGainFactory antennaGainFactory()
-
coverageRadii
public static CoverageRadiusFactory coverageRadii()
-
eventProcessors
public static EventProcessingFactory eventProcessors()
-
plugins
public static PluginFactory plugins()
-
functionFactory
public static FunctionFactory functionFactory()
-
correlationModes
public static CorrelationModeFactory correlationModes()
-
results
public static ResultFactory results()
-
exporter
public static DataExporter exporter()
-
checkPlugin
public static void checkPlugin(ConsistencyCheckContext context, Configuration conf)
-
equals
public static boolean equals(SystemPlugin system, BuiltInSystem type)
-
in
public static boolean in(SystemPlugin system, BuiltInSystem... type)
-
uiFactory
public static UIFactory uiFactory()
-
-