import java.util.*;
public class LimitBag<T extends Number>{
    private T content;
    
    public LimitBag(T content) {
        this.content = content;
    }

    public T get() {
        return this.content;
    }

    public void set(T content) {
        this.content = content;
    }

    public static void main(String[] args){
      //LimitBag<List> bag1=new LimitBag<List>(new ArrayList());//编译出错
      LimitBag<Integer> bag2=new LimitBag<Integer>(12);
    }
}


/****************************************************
 * 作者：孙卫琴                                     *
 * 来源：<<Java面向对象编程>>                       *
 * 技术支持网址：www.javathinker.net                *
 ***************************************************/
