Lines Matching refs:list
39 import java.util.List;
58 protected final Map<ResourceFolderType, List<ResourceFolder>> mFolderMap =
59 new EnumMap<ResourceFolderType, List<ResourceFolder>>(ResourceFolderType.class);
61 protected final Map<ResourceType, List<ResourceItem>> mResourceMap =
62 new EnumMap<ResourceType, List<ResourceItem>>(ResourceType.class);
64 private final Map<List<ResourceItem>, List<ResourceItem>> mReadOnlyListMap =
65 new IdentityHashMap<List<ResourceItem>, List<ResourceItem>>();
92 // get the list for the resource type
93 List<ResourceFolder> list = mFolderMap.get(type);
95 if (list == null) {
96 list = new ArrayList<ResourceFolder>();
99 list.add(cf);
101 mFolderMap.put(type, list);
107 for (ResourceFolder cFolder : list) {
119 list.add(cf);
132 // get the list of folders for the resource type.
133 List<ResourceFolder> list = mFolderMap.get(type);
135 if (list != null) {
136 int count = list.size();
138 ResourceFolder resFolder = list.get(i);
142 list.remove(i);
196 List<ResourceItem> list = mResourceMap.get(type);
198 if (list != null) {
199 for (ResourceItem item : list) {
228 List<ResourceItem> list = mResourceMap.get(type);
229 if (list == null) {
230 list = new ArrayList<ResourceItem>();
231 mResourceMap.put(type, list);
234 list.add(item);
237 list.remove(oldItem);
252 * Processes a folder and adds it to the list of existing folders.
276 * Returns a list of {@link ResourceFolder} for a specific {@link ResourceFolderType}.
279 public List<ResourceFolder> getFolders(ResourceFolderType type) {
283 public List<ResourceType> getAvailableResourceTypes() {
284 List<ResourceType> list = new ArrayList<ResourceType>();
290 List<ResourceType> types = FolderTypeRelationship.getRelatedResourceTypes(folderType);
296 if (list.contains(types.get(0)) == false) {
297 list.add(types.get(0));
302 List<ResourceFolder> folders = mFolderMap.get(folderType);
307 // then we add them, but only if they aren't already in the list.
309 if (list.contains(folderResType) == false) {
310 list.add(folderResType);
318 return list;
322 * Returns a list of {@link ResourceItem} matching a given {@link ResourceType}.
327 List<ResourceItem> list = mResourceMap.get(type);
329 if (list == null) {
333 List<ResourceItem> roList = mReadOnlyListMap.get(list);
335 roList = Collections.unmodifiableList(list);
336 mReadOnlyListMap.put(list, roList);
348 List<ResourceItem> items = mResourceMap.get(type);
358 for (List<ResourceFolder> list : mFolderMap.values()) {
359 for (ResourceFolder resFolder : list) {
380 List<ResourceFolder> folders = mFolderMap.get(type);
407 * Returns the list of source files for a given resource.
415 * @return a list of files generating this resource or null if it was not found.
417 public List<ResourceFile> getSourceFiles(ResourceType type, String name,
474 * Returns the sorted list of languages used in the resources.
479 Collection<List<ResourceFolder>> folderList = mFolderMap.values();
480 for (List<ResourceFolder> folderSubList : folderList) {
494 * Returns the sorted list of regions used in the resources with the given language.
500 Collection<List<ResourceFolder>> folderList = mFolderMap.values();
501 for (List<ResourceFolder> folderSubList : folderList) {
560 List<ResourceItem> list = mResourceMap.get(type);
561 if (list != null) {
562 for (int i = 0 ; i < list.size(); i++) {
563 ResourceItem item = list.get(i);
580 List<ResourceItem> items = mResourceMap.get(type);
607 Collection<List<ResourceItem>> lists = mResourceMap.values();
608 for (List<ResourceItem> list : lists) {
609 for (int i = 0 ; i < list.size() ;) {
610 if (list.get(i).hasNoSourceFile()) {
611 list.remove(i);
627 List<ResourceItem> list = mResourceMap.get(type);
629 if (list != null) {
630 for (ResourceItem item : list) {