View Javadoc
1   package net.avcompris.guixer.core;
2   
3   import static com.google.common.base.Preconditions.checkNotNull;
4   
5   import java.io.IOException;
6   
7   final class SwitchToNullImpl implements SwitchTo {
8   
9   	private final Command underlyingCommand;
10  
11  	public SwitchToNullImpl(final Command underlyingCommand) {
12  
13  		this.underlyingCommand = checkNotNull(underlyingCommand, "underlyingCommand");
14  	}
15  
16  	@Override
17  	public Command defaultContent() throws IOException {
18  
19  		// do nothing
20  
21  		return underlyingCommand;
22  	}
23  
24  	@Override
25  	public Command parentFrame() throws IOException {
26  
27  		// do nothing
28  
29  		return underlyingCommand;
30  	}
31  
32  	@Override
33  	public Command frame(final String name) throws IOException {
34  
35  		// do nothing
36  
37  		return underlyingCommand;
38  	}
39  }