I finally got to looking at your code but when I got everything together, I found an issue with trying to get these classes to understand each other. It seems that the definition of floebox is reliant on the definition of connector, but connector relies on floebox. You have a circular dependency in your code.
Also, floebox seems to rely on blockmd which I don’t have access to. name
inside of floebox’s definition is also never defined, so its purpose cannot be accommodated for.
I’m going to reiterate once again to look at the Guidelines–Tips on Asking Questions sections labeled:
- Is your problem isolated?
- Can we run your code to see the same thing as you?
Final note: rereading your question which is specifically regarding the behavior of findend(), which has several issues keeping it from being testable on our end, I can see that your original problem revolved around adding elements to an ArrayList.
I would consider using ArrayList’s overloaded add() function that only takes in one operator: the item you’re adding. You don’t need to use an index to add an ArrayList to the next index.
i.incon.add(this);
It might solve your issue. I can’t be sure it will, as I don’t have enough information on your problem.