List of usage examples for java.util LinkedHashSet equals
boolean equals(Object o);
From source file:org.asqatasun.referential.creator.CodeGeneratorMojo.java
private void extractAvailableLangsFromCsvHeader(String[] csvHeaders) throws I18NLanguageNotFoundException { LinkedHashSet<String> themeList = new LinkedHashSet<>(); LinkedHashSet<String> critereList = new LinkedHashSet<>(); LinkedHashSet<String> testList = new LinkedHashSet<>(); for (String header : csvHeaders) { if (header.startsWith(THEME_LABEL_COLUMN_NAME)) { themeList.add(header.split("_")[1]); } else if (header.startsWith(CRITERION_LABEL_COLUMN_NAME)) { critereList.add(header.split("_")[1]); } else if (header.startsWith(TEST_LABEL_COLUMN_NAME)) { testList.add(header.split("_")[1]); }// w w w . jav a2s . c o m } if (isCriterionPresent) { if (themeList.equals(critereList) && testList.equals(critereList)) { langSet.addAll(themeList); } else { throw new I18NLanguageNotFoundException("All Label on csv column must have internationalization"); } } else { if (themeList.equals(testList)) { langSet.addAll(themeList); } else { throw new I18NLanguageNotFoundException("All Label on csv column must have internationalization"); } } }
From source file:org.opens.referentiel.creator.CodeGeneratorMojo.java
private void extractAvailableLangsFromCsvHeader(String[] csvHeaders) throws I18NLanguageNotFoundException { LinkedHashSet<String> themeList = new LinkedHashSet(); LinkedHashSet<String> critereList = new LinkedHashSet(); LinkedHashSet<String> testList = new LinkedHashSet(); for (String header : csvHeaders) { if (header.startsWith(THEME_LABEL_COLUMN_NAME)) { themeList.add(header.split("_")[1]); } else if (header.startsWith(CRITERION_LABEL_COLUMN_NAME)) { critereList.add(header.split("_")[1]); } else if (header.startsWith(TEST_LABEL_COLUMN_NAME)) { testList.add(header.split("_")[1]); }/*from ww w. j a v a2 s.c om*/ } if (isCriterionPresent) { if (themeList.equals(critereList) && testList.equals(critereList)) { langSet.addAll(themeList); } else { throw new I18NLanguageNotFoundException("All Label on csv column must have internationalization"); } } else { if (themeList.equals(testList)) { langSet.addAll(themeList); } else { throw new I18NLanguageNotFoundException("All Label on csv column must have internationalization"); } } }