users@jaxb.java.net

Re: Multiple internal lists for xs:choice mapping?

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Tue, 16 Aug 2005 20:04:28 +0200

Hi.

> The attached FilterList class allows you to do what you want.
>
> Given a heterogeneous list of B,C,D, and E, it gives a live updatable
> view limited to just one type. You'd do:
>
> List list = obj.getBorCorDorE();
> List bList = new FilterList(list,B.class);
>
> bList and list shared the underlying storage, so any change you made on
> one side is going to be visible on the other side.
>
> I have a few utility code like this, and I'm wondering where to put
> them. If other people are interested in contributing those little code
> pieces, maybe we should have the jaxb-utils project.

This could be put into the existing jaxbcommons project.

Bye.
/lexi