You can use `groupBy` to group a sequence of values by some
classification [1]. From your description it is not clear how your
model is supposed to work in detail so it's hard to give a more
precise answer. Some questions:
1. Why is the class called "Employees" (plural)?
2. Is the department matched by name? Why? Where do the target values come from?
3. What does your supposed result mean? Is it a valid Scala expression?
Actually, I'd guess if you start with stating your question in a way
that is fully specified you will already have 90% of the answer found
out yourself :)
HTH
Johannes
[1]
http://www.scala-lang.org/api/current/index.html#scala.collection.Seq
> --
> You received this message because you are subscribed to the Google Groups
> "scala-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
scala-user+...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
--
Johannes
-----------------------------------------------
Johannes Rudolph
http://virtual-void.net