zoukankan      html  css  js  c++  java
  • 设计模式适配器模式

    /**
     * @author Rollen-Holt 设计模式之 適配器模式
     */
    
    interface window{
    	void open();
    	void close();
    	void activated();
    	void iconified();
    }
    
    abstract class WindowAdapter{
    	public void open(){
    
    	}
    	public void close(){
    
    	}
    	public void activated(){
    		
    	}
    	public void iconified(){
    		
    	}
    }
    
    class AdapterDemo extends WindowAdapter{
    	public void open(){
    		System.out.println("打开窗口");
    	}
    	public void close(){
    		System.out.println("关闭窗口");
    	}
    }
    
    class hello{
    	public static void main(String[] a){
    		AdapterDemo a1=new AdapterDemo();
    		a1.open();
    		a1.close();
    	}
    }
    

      

  • 相关阅读:
    clip-path
    box-reflect
    循环内click赋值跳转
    github pages 不能识别下划线开头的文件
    Telerik Reporting
    VS2015项目发布失败且没有错误提示
    kendo grid 过滤器
    kendo 月份选择
    kendo grid过滤
    odata连接现有数据库
  • 原文地址:https://www.cnblogs.com/rollenholt/p/2144884.html
Copyright © 2011-2022 走看看