public static void checkDuplicatedValue(List<ExecutableElement> elements,Class clazz){
  Set<String> values=new HashSet<>();
  for (  ExecutableElement method : elements) {
    List<String> value=getValueFromAnnotation(method,clazz);
    if (!values.addAll(value)) {
      throw new DuplicatedValueException(value,method,clazz);
    }
  }
}

public static void checkDuplicatedValue ( List < ExecutableElement > elements , Class clazz ) { Set < String > values = new HashSet < > ( ) ; for ( ExecutableElement method : elements ) { List < String > value = getValueFromAnnotation ( method , clazz ) ; if ( ! values . addAll ( value ) ) { throw new DuplicatedValueException ( value , method , clazz ) ; } } }
checks the elements in the provided list annotated with an annotation against duplicate values . < p / > raises an exception if any annotation value is found multiple times .
