org.apache.commons.ognl
Interface ElementsAccessor

All Known Implementing Classes:
ArrayElementsAccessor, CollectionElementsAccessor, EnumerationElementsAccessor, IteratorElementsAccessor, MapElementsAccessor, NumberElementsAccessor, ObjectElementsAccessor

public interface ElementsAccessor

This interface defines a method for getting the "elements" of an object, which means any objects that naturally would be considered to be contained by the object. So for a collection, you would expect this method to return all the objects in that collection; while for an ordinary object you would expect this method to return just that object.

An implementation of this interface will often require that its target objects all be of some particular type. For example, the MapElementsAccessor class requires that its targets all implement the Map interface.

Author:
Luke Blanshard (blanshlu@netscape.net), Drew Davidson (drew@ognl.org)

Method Summary
 Enumeration<?> getElements(Object target)
          Returns an iterator over the elements of the given target object.
 

Method Detail

getElements

Enumeration<?> getElements(Object target)
                           throws OgnlException
Returns an iterator over the elements of the given target object.

Parameters:
target - the object to get the elements of
Returns:
an iterator over the elements of the given object
Throws:
OgnlException - if there is an error getting the given object's elements


Copyright © 1997-2013 The Apache Software Foundation. All Rights Reserved.