001    /*
002    @license.text@
003     */
004    
005    package biz.hammurapi.util;
006    
007    /**
008     * @author Pavel Vlasov 
009     * @version $Revision: 1.2 $
010     */
011    public class TypeAcceptor implements Acceptor {
012            private Class type;
013    
014            public TypeAcceptor(Class type) {
015                    this.type=type;
016            }
017            
018            public boolean accept(Object element) {
019                    return type.isInstance(element);
020            }                       
021    }