Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 355296

Summary: [otjld] consider lifting of collections of base objects
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTJAssignee: Project Inbox <objectteams.otj-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Stephan Herrmann CLA 2011-08-20 10:41:44 EDT
In examples where a team is used to implement a use case we sometimes
see collections of base objects being added to the team for processing.

Currently, this has to be done one-by-one:
  public void addObject (Base as Role o) { objects.add(o); }
plus:
  for (Base b : bases) theTeam.addObject(b);

Would it make sense to support s.t. like this, too:

  Collection<Role> objects;
  public void addObjects (Collection<Base as Role> objects) {
      this.objects = objects;
  }
to be used as
  theTeam.addObjects(bases);
?

The tricky part is: lifting would have to create a new collection,
but we'd probably have to pick statically, what kind of collection is used.

The logic would be similar to array lifting.