Code example for Set

Methods: add, contains

0
            mAppsNotInWorkspace = new HashSet<String>();
            mAppsInWorkspace = new HashMap<String, String>();
        } 
 
        public boolean isWorkspaceApp(String appName) {
            if (mAppsNotInWorkspace.contains(appName)) {
                return false; 
            } 
 
            String projectName = mAppsInWorkspace.get(appName);
            if (projectName == null) {
                IProject p = ProjectHelper.findAndroidProjectByAppName(appName);
                if (p == null) {
                    mAppsNotInWorkspace.add(appName);
                } else { 
                    projectName = p.getName();
                    mAppsInWorkspace.put(appName, projectName);
                } 
            } 
            return projectName != null;
        }