@Test public void testValidFontPackFolder_returnsTrueIfValid() throws Exception { File validFontPackFolder = getFileResource(VALID_FONT_FOLDER_NAME); assertTrue(FontPackage.validFontPackFolder(validFontPackFolder.getPath())); }
public static boolean validFontPackFolder(String path) { final File folder = new File(path); if (!folder.exists() || !folder.isDirectory()) return false; final String[] fileList = folder.list(); if (fileList == null) return false; final Set<String> fileNameSet = new HashSet<>(Arrays.asList(fileList)); return fileNameSet.containsAll(Style.REMOTE_STYLE_NAMES); }
FontPackage { public static boolean validFontPackFolder(String path) { final File folder = new File(path); if (!folder.exists() || !folder.isDirectory()) return false; final String[] fileList = folder.list(); if (fileList == null) return false; final Set<String> fileNameSet = new HashSet<>(Arrays.asList(fileList)); return fileNameSet.containsAll(Style.REMOTE_STYLE_NAMES); } }
FontPackage { public static boolean validFontPackFolder(String path) { final File folder = new File(path); if (!folder.exists() || !folder.isDirectory()) return false; final String[] fileList = folder.list(); if (fileList == null) return false; final Set<String> fileNameSet = new HashSet<>(Arrays.asList(fileList)); return fileNameSet.containsAll(Style.REMOTE_STYLE_NAMES); } FontPackage(String name); private  FontPackage(File folder); }
FontPackage { public static boolean validFontPackFolder(String path) { final File folder = new File(path); if (!folder.exists() || !folder.isDirectory()) return false; final String[] fileList = folder.list(); if (fileList == null) return false; final Set<String> fileNameSet = new HashSet<>(Arrays.asList(fileList)); return fileNameSet.containsAll(Style.REMOTE_STYLE_NAMES); } FontPackage(String name); private  FontPackage(File folder); static FontPackage fromFolder(File folder); String getName(); Set<Font> getFontSet(); Typeface getTypeface(Style style); Font getFont(Style style); static boolean validFontPackFolder(String path); }
FontPackage { public static boolean validFontPackFolder(String path) { final File folder = new File(path); if (!folder.exists() || !folder.isDirectory()) return false; final String[] fileList = folder.list(); if (fileList == null) return false; final Set<String> fileNameSet = new HashSet<>(Arrays.asList(fileList)); return fileNameSet.containsAll(Style.REMOTE_STYLE_NAMES); } FontPackage(String name); private  FontPackage(File folder); static FontPackage fromFolder(File folder); String getName(); Set<Font> getFontSet(); Typeface getTypeface(Style style); Font getFont(Style style); static boolean validFontPackFolder(String path);  }