Converts the elements of a nested collection one level deeper
All 2 scenarios hold
The generic signature of a List, Set, or Map parameter decides what its elements become. The same cell text converts to a different type according to the element type the test method declares.
Every table below reads the same way. It holds one input column per collection kind, all three carrying the same values. Then it holds the element type the method received, and the elements themselves, which the input columns must convert to.
The method signature fixes an element type, and no row can vary it. Each element type therefore gets its own table.
Only a Map's value type takes part in conversion. Its keys are always the cell text, whatever key type the signature declares.
The element type is itself a collection. Its own element type decides what the innermost values become. That type is Short in this table.
| Scenario | List input | Set input | Map input | Element type? | Innermost elements? |
|---|---|---|---|---|---|
| A list of lists |
|
|
| java.util.List |
|
| Several nested lists |
|
|
| java.util.List |
|