I have the following problem, I have 3 lists and I need to merge them into 1 single list, and for that I created a function with recursion, but I have a field called (ENABLE_INPUT) that has condition "0" or "1" and that can be in any of the levels, when it is "0" in any of the levels even if it is in the first level, every generated line must remain with the condition "0", but I can not solve it, I can not leave the place
Thank you for using the code button, but your long lines make the code very difficult to understand. They also suggest to me that you are trying to do too much all in one place and your methods are too long. Divide the methods into smaller methods, which is [part of] refactoring. But, as Stephan said, please start by explaining what your program does and what all the Lists and Maps are supposed to contain.
Also, get rid off the habit populating List, Map... that way, even though it is very tempting.
Use static initializers and the habitual way to add/put elements.
Using the way you do, you are unnecessarily creating anonymous classes which as a result after compilation produces en excessive amount of compiled classes.
If that code snippet were in let's say Test.java source file, after compiling it you'd end up with:
Test.class, Test$1.class, Test$2.class, Test$3.class, Test$4.class
As opposed to:
posted 2 weeks ago
It would be a layout generator, I can have several layout settings and I can have "N levels" at each layout, so I had to make it dynamic. Each level can have one or more dimensions.
Unfortunately I can't generate an object class, because each layout can be created with one dimension type.
Lists were created this way just to generate the sample content.
The point is that when I use the recursion function, I can't handle the "ENABLE_INPUT" field satisfactorily or the list is all filled with "0" or filled with "1" (I tried to create some conditions to handle, but couldn't resolve )
So I left, I came home, and I ate some pie. And then I read this tiny ad: