So I'm trying to solve this problem here:
I have a list of pairs:
List<Tuple<Byte, Byte>> pairList
pairList = ( [0,1], [0,2], [0,3], [1,2],[1,3],[2,3])
I have a custom class:
Class CustomPairList {
byte first;
byte second;
int result;
public byte getFirst();
public byte getSecond();
public int getResult();
}
I have another list of the above class, with this data:
List<CustomPairList> customPairlist;
customPairList = {[0,1,1000], [0,2,1000],[0,3,1000]......[0,10,1000],
[1,2,2000],[1,3,2000],[1,4,2000].......[1,10,2000],
[2,3,3000],[2,4,3000]..................[3,10,3000],
'''
...
[14,1,4000].............................[14,10,4000]}
My goal from the above two lists would be to compare the two lists and extract the result from the customPairList (second list) for a given pair.
For example:
For the pair in the pairlist (0,1) should match the pair in the customPairList (0,1) and the "result" is 1000
Another example:
pair (1,2) in pairlist has a match in customPairList (1,2) and render its corresponding "result" value 2000
How do I achieve this?