java - Multiple Dispatch With Two Parameters? -
Here is the case that I'm trying to support:
An IDataStore is an interface that specifies how to insert data into the data store. There are two child interfaces, IDataStoreA and IDataStoreB which specify different ways to get data from the data store.
Specifies a method to calculate on a ICalculator data
I want to create an ICalculationPerformer class I IDataStore And will carry a specific implementation of ICalculator and specify the logic for receiving data from the data store and how to present it to the calculator.
Public Interface ICAlexerformer & lt; D iDatastore extends, C iculator & gt; { performing zero (D datastore_, C calculator_); }
An implementation may look like this:
Public class converterlessonformer icelculation at the operator < Datastore, Calculator A & gt; {Execution of zero (datastore datastore_, calculator a calculator); } My main square has an icelculation atomizer, but its concept is not compiled at the time; I get a raw type of warning that suppose it receives the ICRLXformer from a factory
class driver {IDataStore datastore; // Injected through the Constructor Spring Icillator Calculator; // Static Wide Men (Constructive) via Constructor Incentive Spring Spray {// Wrong Type Warning! ICalculationPerformer p = Calculator on Farmer Factory.getCalculationPerformer (Datastore, Calculator); }} Is there any way around raw type warning?
Comments
Post a Comment