Package testPackage.ae

Source Code of testPackage.ae.UseTemplates

/**
*
*/
package testPackage.ae;

import java.util.ArrayList;

import testPackage.Base;
import testPackage.IBase;


/**
*
* @author mpinzger@tudelft.net
*
*/
public class UseTemplates {
    public void useSimpleTemplate() {
        SimpleTemplate<String> stringList = new SimpleTemplate<String>();
        stringList.add("TestString");
       
        stringList.count(new ArrayList<String>());
        stringList.templateMethod(new ArrayList<String>());
    }
   
    public void useImplementTemplate() {
        IBase base = new Base(10, 20) {
            public int compute() {
                return getA() * getB();
            };   
        };
       
        ImplementTemplate<IBase> it = new ImplementTemplate<IBase>();
        it.foo(base);
    }
}
TOP

Related Classes of testPackage.ae.UseTemplates

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.