Hello everyone,
what I am trying to do is:
I have list of VG object (it is a VariableDataGroupData object). let us say:
I have 5 elements VG in my lTree list. VG0, VG1, VG2, VG3, VG4 objects. Each object (VG0, VG1, VG2, VG3, VG4) contains andVar
String list and notVar String list.
method1 is actually the same as method2. It allows to check if list2 (the second parameter of method1 function)
contains list1 which is the first parameter of method1 function.
Know that list1 (the first parameter of method1 function) can be null or empty and list2(the second parameter of method1 function)
as well can be null or empty.
So if list1 is null or empty, method 1 return tru else if list2 is null or empty we return false.
Otherwise I need to check if list2 contains all elements of list1.
I need to compare each element of my list, with all other elements of my list except to the current element itself.
And if the current element if different from the other element:
If I start form the end of my list:
Let us say for (VG4 and VG3):
for x = 4 I need to compare (VG4 and VG3) --> check if VG4.andVar contains VG3.andVar then check if VG3.notVar contains VG4.notVar, if both conditions are TRUe, the I remove VG4 from lTree list.
- if the current element is VG4: I need to check if (VG4.andVar string list contains all VG3.andVar string list(for that i need to check if both lists are not null or empty as I explained above))
if YES (TRUE) I will need to check if (VG3.notVar string list contains all VG4.notVar string list(for that i need to check if both lists are not null or empty as I explained above))
if YES (TRUE) I need to remove VG4 from my lTree list.
Then x = 3 I need to compare (VG3 and VG4) --> check if VG3.andVar contains VG4.andVar then check if VG4.notVar contains VG3.notVar, if both conditions are TRUe, the I remove VG3 from lTree list.
Then x = 2 I need to compare (VG2 and VG3).....
x = 2 I need to compare (VG2 and VG4)
Then x = 1 I need to compare (VG1 and VG2)
x = 1 I need to compare (VG1 and VG3)
x = 1 I need to compare (VG1 and VG4)
Then x = 0 I need to compare (VG0 and VG1)
x = 0 I need to compare (VG0 and VG2)
x = 0 I need to compare (VG0 and VG3)
x = 0 I need to compare (VG0 and VG4)