|
|
|
Re: EMF filter EList [message #1274517 is a reply to message #1271428] |
Fri, 21 March 2014 15:34 |
Ed Merks Messages: 33113 Registered: July 2009 |
Senior Member |
|
|
Given it's read only, you can use AbstractSequentialList and also
implement EList (which is just have move throw exceptions)...
On 14/03/2014 9:30 PM, Ed Merks wrote:
> Do you intend to make the list read only? Does it need to be an
> EList? You might just use AbstractSequentialList. Google collections
> provides lots of convenient classes for filtered list...
>
> On 14/03/2014 2:49 PM, Sir Wayne wrote:
>> Hello,
>>
>> i want to filter a list with >10.000 objects. Is there a efficient
>> way for emf?
>>
>>
>> public class AImplCustom extends AImpl
>> {
>>
>> @Override
>> public EList<B> getBs(String type)
>> {
>> EList<B> bs = new BasicEList<B>();
>>
>> for (B b : getBs())
>> {
>> if (type.equals(b.getType()))
>> {
>> bs.add(b);
>> }
>> }
>>
>> return bs;
>> }
>>
>>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02834 seconds