View Javadoc

1   package ch.visnet.heartbreak;
2   
3   import java.util.Calendar;
4   
5   
6   public class ScheduledIlluminance implements Illuminance {
7     private final Schedule illuminanceSchedule;
8     private final Calendar timeProvider;
9   
10    public ScheduledIlluminance(Schedule illuminanceSchedule,
11                                Calendar timeProvider) {
12      this.illuminanceSchedule = illuminanceSchedule;
13      this.timeProvider = timeProvider;
14    }
15  
16    public double getIlluminance() {
17      return illuminanceSchedule.getValueAt((Calendar)timeProvider.clone());
18    }
19  }