Skip to content
Snippets Groups Projects
Commit 8b0d9ded authored by LABOUREL Arnaud's avatar LABOUREL Arnaud
Browse files

added javadoc for interfaces

parent b1a2cf92
No related branches found
No related tags found
No related merge requests found
Pipeline #22190 passed
File suppressed by a .gitattributes entry, the file's encoding is unsupported, or the file size exceeds the limit.
......@@ -4,12 +4,35 @@ import model.genes.RegulatoryGene;
import java.util.List;
/**
* This interface represents an event in a simulation that involves updating genes.
*/
public interface SimulationEvent {
/**
* Update the state of genes associated with this event.
*/
void updateGenes();
/**
* Get the time at which this event occurs in the simulation.
*
* @return The time of the event.
*/
double getTime();
/**
* Get the list of regulatory genes affected by this event.
*
* @return A list of regulatory genes associated with this event.
*/
List<RegulatoryGene> getGenes();
String getInfo();
/**
* Get a description of this simulation event.
*
* @return A string describing the event.
*/
String description();
}
package model.genes;
/**
* This interface represents a gene that encodes a protein. It manages the protein concentration.
*/
public interface Gene {
/**
* Get the current protein concentration encoded by this gene.
*
* @return The current protein concentration.
*/
double getProteinConcentration();
/**
* Get the initial protein concentration encoded by this gene.
*
* @return The initial protein concentration.
*/
double getInitialProteinConcentration();
/**
* Set the protein concentration encoded by this gene to the specified value.
*
* @param proteinConcentration The new protein concentration to set.
*/
void setProteinConcentration(double proteinConcentration);
/**
* Get the name of this gene.
*
* @return The name of the gene.
*/
String getName();
/**
* Update the behavior of this gene for the specified duration.
* The protein concentration encoded by this gene is updated according
* to the production of the gene and the degradation rate of the protein.
*
* @param duration The duration for which to update the gene's behavior.
*/
void update(double duration);
/**
* Get the maximal production rate of protein by this gene.
*
* @return The maximal protein production rate.
*/
double getMaximalProduction();
/**
* Get the degradation rate of the protein encoded by this gene.
*
* @return The protein degradation rate.
*/
double getDegradationRate();
}
......@@ -2,10 +2,37 @@ package model.genes;
import model.regulators.Regulator;
/**
* This interface represents a regulatory gene, which extends the basic gene interface and includes methods
* for managing a gene's regulation.
*/
public interface RegulatoryGene extends Gene {
/**
* Get the regulator associated with this regulatory gene.
*
* @return The regulator linked to this gene.
*/
Regulator getRegulator();
/**
* Set the regulator associated with this regulatory gene.
*
* @param regulator The regulator to associate with this gene.
*/
void setRegulator(Regulator regulator);
/**
* Check if this regulatory gene is currently signaled, i.e., is influenced by its regulator.
*
* @return {@code true} if the gene is signaled, {@code false} otherwise.
*/
boolean isSignaled();
void setSignaled(boolean isSignaled);
/**
* Set the signaling status of this regulatory gene.
*
* @param isSignaled {@code true} to signal the gene, {@code false} to deactivate it.
*/
void setSignaled(boolean isSignaled);
}
......@@ -32,7 +32,7 @@ public class RegulatoryNetworkDataManager {
eventString.append(genes.get(index));
}
eventString.append(" ");
eventString.append(event.getInfo()).append("\n");
eventString.append(event.description()).append("\n");
bufferedWriter.write(eventString.toString());
}
}
......
package model.regulators;
/**
* This interface represents a regulator, which defines methods for controlling and providing input to a regulatory
* gene.
*/
public interface Regulator {
/**
* Compute and provide an input value for a regulatory gene.
*
* @return The input value generated by the regulator.
*/
double inputFunction();
public String getInfo();
/**
* Get a description of this regulator.
*
* @return A string describing the regulator.
*/
public String description();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment