'How to found different in list

I have a list with the next value (for example) -

[{branches='master', include='*.jar,*.pom,*.zip', exclude='*.rar'},
 {branches='', include='*.txt,*.pom,*.zip', exclude='*.rar'}]

List can have a more than 2 lines. In above example only exclude is correct.
I need to use unique, for found different values for branches, include and exclude. Maybe it is possobility to use size for found different

unique(){ }.size()

I need throw error if branches='master' and branches='foo' for example. And the same for include and exclude.
If i have below values in list in example, it is will be correct for me. Help please to find different in list

[{branches='master', include='*.pom,*.zip', exclude='*.jar'},
 {branches='master', include='*.pom,*.zip', exclude='*.jar'}]


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source