Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.kasource.kaevent.example.guice.custom;
 
 
 import  com.google.inject.Singleton;
 
//CHECKSTYLE:OFF
///CLOVER:OFF
@Singleton
@BeanListener("thermometer")
public class Heater implements TemperatureChangeListener {
	private boolean enabled = false;
	public Heater() {
	}
	void initialize() {
	}
	public boolean isEnabled() {
		return ;
	}
    
    @Override
    public void highTemperature(TemperatureChangeEvent event) {
        if () {
            ..println("Heater turned off.");
        }
         = false;
        
    }
    
    @Override
    public void lowTemperature(TemperatureChangeEvent event) {
        if (!) {
            ..println("Heater started.");
        }
         = true;
        
    }
    
    @Override
    public void mediumTemperature(TemperatureChangeEvent event) {
        if () {
            ..println("Heater turned off.");
        }
         = false;
        
    }
New to GrepCode? Check out our FAQ X