« Return to Thread: Simpler function list implementation

Simpler function list implementation

by Kevin Day-7 :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.
We frequently find ourselves needing to perform relatively simple transformations on lists (for example, pull a value out of a composite object):
 
class A{
  public String val1;
  public String val2;
}
 
with a pipeline of:
 
EventList<A>  ->  FunctionList<A, String>
 
 
so this is pretty simple, right?  The Function implementation is actually boring it's so simple.
 
What I'm wondering is if FunctionList is too heavyweight for this sort of scenario.  It actually holds onto a full list of String objects, instead of just delegating the get() to the function.  Every list mutation winds up with relatively expensive array adjustments.  The function would have to be forward only, but I rarely find the need to do that in these scenarios.
 
 
Am I trying to over-optimized things, or is this an area that would make sense for a new list implementation?  It seems that other lists in GL would benefit here (for example, TreeList does this sort of thing behind the scenes).
 
- K
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@...

 « Return to Thread: Simpler function list implementation