Skip to content

Commit

Permalink
refact: inherit getfluid from interface
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Jun 6, 2022
1 parent da74f8a commit 327bce9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,12 @@ public ProcessEquipmentBaseClass(String name) {
super(name);
}



/** {@inheritDoc} */
@Override
public SystemInterface getThermoSystem() {
return null;
}

/** {@inheritDoc} */
@Override
public SystemInterface getFluid() {
return getThermoSystem();
}

/** {@inheritDoc} */
@Override
public void displayResult() {}
Expand Down Expand Up @@ -98,7 +90,7 @@ public void setRegulatorOutSignal(double signal) {}
@Override
public void setController(ControllerDeviceInterface controller) {
this.controller = controller;
hasController = true;
hasController = controller == null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,31 +88,33 @@ public interface ProcessEquipmentInterface extends SimulationInterface, java.io.

/**
* <p>
* getThermoSystem.
* getFluid.
* </p>
*
* @return a {@link neqsim.thermo.system.SystemInterface} object
*/
public SystemInterface getThermoSystem();
default public SystemInterface getFluid() {
return getThermoSystem();
}

/**
* <p>
* getMassBalance.
* getThermoSystem.
* </p>
*
* @param unit a {@link java.lang.String} object
* @return a double
* @return a {@link neqsim.thermo.system.SystemInterface} object
*/
public double getMassBalance(String unit);
public SystemInterface getThermoSystem();

/**
* <p>
* getFluid.
* getMassBalance.
* </p>
*
* @return a {@link neqsim.thermo.system.SystemInterface} object
* @param unit a {@link java.lang.String} object
* @return a double
*/
public SystemInterface getFluid();
public double getMassBalance(String unit);

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ public SystemInterface getReservoirFluid() {
* public StreamInterface getOilOutStream() { return oilOutStream; }
*/

/** {@inheritDoc} */
@Override
public SystemInterface getFluid() {
return thermoSystem;
}

/**
* <p>
* addGasProducer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ public SystemInterface getThermoSystem() {
return null;
}

/** {@inheritDoc} */
@Override
public SystemInterface getFluid() {
return getThermoSystem();
}

/**
* <p>
* setSpecification.
Expand Down

0 comments on commit 327bce9

Please sign in to comment.