The console has many extra functions and an improved help screen. It also accepts names as well as numbers for input. Example: /periode 3maanden /scherm binnenluchtvochtigheid It searches for keywords, so exact naming is not necessary.
37 lines
1.0 KiB
Java
37 lines
1.0 KiB
Java
import java.util.ArrayList;
|
|
|
|
public class LangsteDroogstePeriode extends Grootheid{
|
|
private ArrayList<Double> list;
|
|
private int langstePeriode;
|
|
|
|
public LangsteDroogstePeriode(Measurement measurement1, ArrayList<Measurement> measurement2){
|
|
list = new ArrayList<Double>();
|
|
langstePeriode = 0;
|
|
updatePeriod(measurement2);
|
|
}
|
|
|
|
public void updatePeriod(ArrayList<Measurement> measurement2){
|
|
createList(measurement2);
|
|
langstePeriode = StatisticsCalculator.langsteDroogstePeriode(list);
|
|
}
|
|
|
|
public void display(String periode, boolean knop1, boolean knop2, double batt){
|
|
GUIboard.writePageToMatrix("Langste Droge Periode", langstePeriode + "", periode, knop1, knop2, batt);
|
|
}
|
|
|
|
public void displayGraph(){}
|
|
|
|
private void createList(ArrayList<Measurement> measurement2)
|
|
{
|
|
if(!list.isEmpty())
|
|
{
|
|
list.clear();
|
|
}
|
|
|
|
for(Measurement ms : measurement2)
|
|
{
|
|
list.add(ms.getRainRate());
|
|
}
|
|
}
|
|
}
|