Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.kasource.kaevent.example.guice.channel;
 
 
 import  com.google.inject.Singleton;
 
//CHECKSTYLE:OFF
///CLOVER:OFF
@Singleton
@BeanListener("thermometer")
public class Heater {
    private boolean enabled = false;
    public Heater() {
	}
    
	void initialize() {
	}
    public boolean isEnabled() {
        return ;
    }
    public void temperatureChanged(TemperatureChangedEvent event) {
        if (event.getCurrentTemperature() < event.getSource().getOptimalTemperatur()) {
            if (!) {
                ..println("Heater started.");
            }
             = true;
        } else {
            if () {
                ..println("Heater turned off.");
            }
             = false;
        }
    }
New to GrepCode? Check out our FAQ X