@Test public void testGetLanguageMnemonic() { UtilsTest.LOGGER.info("testGetLanguageMnemonic"); try { final List<Character> mnemonicList = new ArrayList<>(); mnemonicList.add(new Character('a')); mnemonicList.add(new Character('b')); mnemonicList.add(new Character('c')); final String nombreConLetraLibre = new String("abcd"); final String nombreSinLetraLibre = new String("abc"); Assert.assertTrue(this.languageMnemonicSucces(mnemonicList, nombreConLetraLibre)); Assert.assertTrue(this.languageMnemonicFail(mnemonicList, nombreSinLetraLibre)); } catch (final java.awt.HeadlessException e) { } }
public static char getLanguageMnemonic(final List<Character> mnemonicList, final String actualLanguage){ for (int i=0; i< actualLanguage.length(); i++) { final char caracter = actualLanguage.charAt(i); if (!mnemonicList.contains(Character.valueOf(caracter))) { mnemonicList.add(Character.valueOf(caracter)); return caracter; } } return 0; }
Utils { public static char getLanguageMnemonic(final List<Character> mnemonicList, final String actualLanguage){ for (int i=0; i< actualLanguage.length(); i++) { final char caracter = actualLanguage.charAt(i); if (!mnemonicList.contains(Character.valueOf(caracter))) { mnemonicList.add(Character.valueOf(caracter)); return caracter; } } return 0; } }
Utils { public static char getLanguageMnemonic(final List<Character> mnemonicList, final String actualLanguage){ for (int i=0; i< actualLanguage.length(); i++) { final char caracter = actualLanguage.charAt(i); if (!mnemonicList.contains(Character.valueOf(caracter))) { mnemonicList.add(Character.valueOf(caracter)); return caracter; } } return 0; } private  Utils(); }
Utils { public static char getLanguageMnemonic(final List<Character> mnemonicList, final String actualLanguage){ for (int i=0; i< actualLanguage.length(); i++) { final char caracter = actualLanguage.charAt(i); if (!mnemonicList.contains(Character.valueOf(caracter))) { mnemonicList.add(Character.valueOf(caracter)); return caracter; } } return 0; } private  Utils(); static void openFile(final String filepath); static void openFile(final File file); static char getLanguageMnemonic(final List<Character> mnemonicList, final String actualLanguage); static void remarcar(final JComponent component); static void setContrastColor(final JComponent component); static void setFontBold(final JComponent component); static String remarkMnemonic( final String text, final int key); static FileFilter getRepositoryFileFilterPkcs12(); static FileFilter getRepositoryFileFilterPkcs11(); static void showToolTip(final boolean show, final JWindow tip, final JButton boton, final JLabel tipText); }
Utils { public static char getLanguageMnemonic(final List<Character> mnemonicList, final String actualLanguage){ for (int i=0; i< actualLanguage.length(); i++) { final char caracter = actualLanguage.charAt(i); if (!mnemonicList.contains(Character.valueOf(caracter))) { mnemonicList.add(Character.valueOf(caracter)); return caracter; } } return 0; } private  Utils(); static void openFile(final String filepath); static void openFile(final File file); static char getLanguageMnemonic(final List<Character> mnemonicList, final String actualLanguage); static void remarcar(final JComponent component); static void setContrastColor(final JComponent component); static void setFontBold(final JComponent component); static String remarkMnemonic( final String text, final int key); static FileFilter getRepositoryFileFilterPkcs12(); static FileFilter getRepositoryFileFilterPkcs11(); static void showToolTip(final boolean show, final JWindow tip, final JButton boton, final JLabel tipText);  }