commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Ward">
Subject [Betwixt] Collections' element names
Date Mon, 06 Jan 2003 12:32:31 GMT
Individual elements of a collection seem to be named after the class of the
object in the collection. I have a collection of objects that all implement
the same interface, but may be of different types. Is there a way to get
betwixt to output the collection using the name of the interface the objects
are implementing? Similarly if the objects in the collection all extend a
common base class is it possible to have all elements named after the common
base class?

This example is a bit contrived but ..

    public Collection getNames()
        Collection c = new ArrayList();
        c.add(new StringBuffer("john"));
        return c;

will produce something like ..


is it possible to get betwixt to output ..


View raw message