Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package freemarker.ext.beans;
 
 

Author(s):
Attila Szegedi
Version:
$Id: CollectionAdapter.java,v 1.2 2005/06/12 19:03:04 szegedia Exp $
    private final BeansWrapper wrapper;
    private final TemplateCollectionModel model;
    
        this. = model;
        this. = wrapper;
    }
    
    public TemplateModel getTemplateModel() {
        return ;
    }
    
    public int size() {
        throw new UnsupportedOperationException();
    }
    public Iterator iterator() {
        try {
            return new Iterator() {
                final TemplateModelIterator i = .iterator();
    
                public boolean hasNext() {
                    try {
                        return .hasNext();
                    }
                    catch(TemplateModelException e) {
                        throw new UndeclaredThrowableException(e);
                    }
                }
                
                public Object next() {
                    try {
                        return .unwrap(.next());
                    }
                    catch(TemplateModelException e) {
                        throw new UndeclaredThrowableException(e);
                    }
                }
                
                public void remove() {
                    throw new UnsupportedOperationException();
                }
            };
        }
        catch(TemplateModelException e) {
            throw new UndeclaredThrowableException(e);
        }
    }
New to GrepCode? Check out our FAQ X