query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Returns all languages from the specified project.
public List<StudyLanguage> getByDsKeyProject(String dsKey) { StringBuilder sbHql = new StringBuilder(); sbHql.append("from StudyLanguage sl"); sbHql.append(" join fetch sl.language l"); sbHql.append(" join fetch sl.project p"); sbHql.append(" where p.dsKey = :dsKey"); Query query = getSession().createQuery(sbHql.toString()); query.setParameter("dsKey", dsKey); List<StudyLanguage> languages = query.list(); return languages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Language> getAll();", "public List<Language> getAllLanguages() {\r\n\r\n\t\tStringBuilder sbHql = new StringBuilder();\r\n\t\tsbHql.append(\"from Language\");\r\n\r\n\t\tQuery query = getSession().createQuery(sbHql.toString());\r\n\r\n\t\tList<Language> languages = query.list();\r\n\r\n\t\treturn languages;\r\n\t}", "@PermitAll\n @Override\n public List<Language> getLanguages(String lang) {\n Map params = new HashMap<String, Object>();\n if (lang != null) {\n params.put(CommonSqlProvider.PARAM_LANGUAGE_CODE, lang);\n }\n params.put(CommonSqlProvider.PARAM_ORDER_BY_PART, \"item_order\");\n return getRepository().getEntityList(Language.class, params);\n }", "public List<Language> getLanguages() {\n return metaDao().queryLanguages();\n }", "public List<Project> getAllProjects();", "@GetMapping(\"api/languages\")\n\tpublic List<Language> index(){\n\t\treturn languageService.allLanguages();\n\t}", "@GetMapping(\"/languages\")\n public List<Language> getLanguages() {\n return languageFacade.getLanguages();\n }", "public String[] getLanguages()\n {\n return languages;\n }", "public List<String> getLanguages() {\n return languages;\n }", "List<TermLang> findByProjectLangId(long id, Pageable pageable);", "public List<Project> findAllProject() {\n\treturn projectmapper.findProject(null);\n}", "public ArrayList<Language> listLanguages(){\n\t\t\t\n\t\t\tconnectToDatabase();\n\t\t\tArrayList<Language> languageArray = new ArrayList<Language>();\n\t\t\ttry {\n\t\t\t\tStatement create = connection.createStatement();\n\t\t\t\tResultSet result = create.executeQuery(\"Select languages.ID as id, languages.Name AS language FROM languages;\");\n\n\t\t\t\twhile(result.next()){\n\t\t\t\t\t\n\t\t\t\t\tLanguage newLanguage = new Language(result.getInt(\"id\"), result.getString(\"language\"));\n\t\t\t\t\tlanguageArray.add(newLanguage);\n\t\t\t\t}\n\t\t\t\treturn languageArray;\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"An error occurred when retrieving languages from the database.\");\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn languageArray;\n\t\t\t}\n\t\t\t\n\t\t}", "public String getLanguages() {\n return languages;\n }", "public Language[] getLanguageList() {\n return languageList;\n }", "public String[] getLanguages() {\n/* 238 */ return getStringArray(\"language\");\n/* */ }", "List<Language> findAll();", "com.clarifai.grpc.api.ConceptLanguage getConceptLanguages(int index);", "java.util.List<com.clarifai.grpc.api.ConceptLanguage> \n getConceptLanguagesList();", "public Future<List<String>> getAvailableLanguages() throws DynamicCallException, ExecutionException {\n return call(\"getAvailableLanguages\");\n }", "public static Collection<String> getDesignLanguages(IProject project, boolean updating) {\r\n\t\tWorkspaceContext wc = WorkspaceContext.getContext();\r\n\t\tif (updating)\r\n\t\t\tProjectContextProvider.beginProjectUpdating(project);\r\n\t\tIProjectContext pc = wc.getContextForProject(project);\r\n\t\tif (updating)\r\n\t\t\tProjectContextProvider.endProjectUpdating(project);\r\n\t\tif (pc == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tISymbianProjectContext spc = \r\n\t\t\t(ISymbianProjectContext) pc.getAdapter(ISymbianProjectContext.class);\r\n\t\tif (spc != null) {\r\n\t\t\tIDesignerDataModelSpecifier specifier = spc.getRootModel();\r\n\t\t\tif (specifier == null)\r\n\t\t\t\treturn null;\r\n\t\t\t\r\n\t\t\treturn (Collection<String>) specifier.runWithLoadedModelNoSourceGen(\r\n\t\t\t\tnew IDesignerDataModelSpecifier.IRunWithModelAction() {\r\n\t\t\t\t\tpublic Object run(LoadResult lr) {\r\n\t\t\t\t\t\tIDesignerDataModel model = lr.getModel();\r\n\t\t\t\t\t\tif (model != null) {\r\n\t\t\t\t\t\t\tDesignerDataModel dm = (DesignerDataModel) model;\r\n\t\t\t\t\t\t\tILocalizedStringBundle bundle = dm.getDesignerData().getStringBundle();\r\n\t\t\t\t\t\t\tif (bundle != null) {\r\n\t\t\t\t\t\t\t\tCollection<String> languages = new ArrayList();\r\n\t\t\t\t\t\t\t\tfor (Object object : bundle.getLocalizedStringTables()) {\r\n\t\t\t\t\t\t\t\t\tILocalizedStringTable lst = (ILocalizedStringTable) object;\r\n\t\t\t\t\t\t\t\t\tLanguage language = lst.getLanguage();\r\n\t\t\t\t\t\t\t\t\tint code = language.getLanguageCode();\r\n\t\t\t\t\t\t\t\t\tStringBuffer buffer = new StringBuffer();\r\n\t\t\t\t\t\t\t\t\tbuffer.append(code);\r\n\t\t\t\t\t\t\t\t\tif (code < 10)\r\n\t\t\t\t\t\t\t\t\t\tbuffer.insert(0, 0);\r\n\t\t\t\t\t\t\t\t\tlanguages.add(buffer.toString());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\treturn languages;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}", "@RequestMapping(value = \"\",\n method = RequestMethod.GET)\n @ResponseBody\n public ApiResponse<List<SupportedLanguage>> getAllLanguages() {\n LOG.debug(\"REST request to get all languages\");\n\n final ApiResponse <List <SupportedLanguage>> apiResponse = new ApiResponse <List<SupportedLanguage>>();\n\n List<SupportedLanguage> languageList = null;\n\n try {\n languageList = supportedLanguageService.findAllLanguages();\n apiResponse.setData(languageList);\n LOG.debug(\"Size{}\", languageList.size());\n } catch (Exception e) {\n throw new LucasRuntimeException(LucasRuntimeException.INTERNAL_ERROR, e);\n }\n\n return apiResponse;\n\n }", "private List<String> loadLanguages() {\n\t\tFile directory = new File(\"./src/resources/languages\");\t// load current directory\n\t\t\n\t\tFilenameFilter textFilter = new FilenameFilter() {\n\t\t\tpublic boolean accept(File dir, String name) {\n\t\t\t\tif(!name.startsWith(\"Syntax\") && !name.startsWith(\"LanguageCodes\")) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\t\n\t\tResourceFilter filter = new ResourceFilter(directory, textFilter);\n\t\t\n\t\tList<String> languages = (List<String>) filter.getFilteredList();\n\t\t\n\t\tlanguages = languages.stream()\n\t\t\t\t\t\t\t .map(m -> m.replace(UNWANTED_EXTENSION, \"\"))\n\t\t\t\t \t\t\t .collect(Collectors.toList());\n\t\t\n\t\treturn languages;\n\t}", "public ArrayList<Value> getAll(Project project)\n\t{\n\t\t\n\t\treturn null;\n\t}", "@GetMapping(\"/getAll\")\r\n\tpublic List<Project> getAllProjects() {\r\n\t\treturn persistenceService.getAllProjects();\r\n\t}", "public List<Project> findAllProject() {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT * FROM TA_PROJECTS\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}", "public Future<List<String>> getSupportedLanguages() throws DynamicCallException, ExecutionException {\n return call(\"getSupportedLanguages\");\n }", "public LanguageList getLanguageList() {\r\n return languageList;\r\n }", "@Test\n public void listAllAvailableLanguages() throws IOException {\n System.out.println(\n \"Language preprocessing components for the following languages are available:\\n \"\n + String.join(\", \", LanguageComponents.languages()));\n }", "public List<String> getAvailableLanguages() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getAvailableLanguages\").get();\n }", "List<Project> selectAll();", "public static List<String> getLanguages() {\n\t\treturn Stream.of(values()).map(v -> v.getLanguage()).sorted((lang1, lang2) -> lang1.toLowerCase().compareTo(lang2.toLowerCase()))\n\t\t\t\t.collect(Collectors.toList());\n\t}", "public List<String[]> getAllProject() {\n String url = Host.getSonar() + \"api/projects/index\";\n String json = null;\n try {\n Object[] response = HttpUtils.sendGet(url, Authentication.getBasicAuth(\"sonar\"));\n if (Integer.parseInt(response[0].toString()) == 200) {\n json = response[1].toString();\n }\n } catch (Exception e) {\n logger.error(\"Get sonar project list: GET request error.\", e);\n }\n if (json == null) {\n logger.warn(\"Get sonar project list: response empty.\");\n return null;\n }\n List<Map<String, Object>> projects = JSONArray.fromObject(json);\n if (projects.size() == 0) {\n logger.warn(\"Get sonar project list: empty list.\");\n return null;\n }\n List<String[]> result = new ArrayList<>();\n for (Map<String, Object> oneProject : projects) {\n result.add(new String[]{oneProject.get(\"nm\").toString(), oneProject.get(\"k\").toString()});\n }\n return result;\n }", "public ArrayList<Project> getProjects(){\n return this.projects;\n }", "public List<String> getProjects() {\r\n\t\treturn projects;\r\n\t}", "List<EclipseProject> getProjects() {\n return getFlattenedProjects(selectedProjects);\n }", "@GetMapping(\"/analysis-templates\")\n\tpublic List<AnalysisTemplate> getProjectAnalysisTemplates(@PathVariable long projectId, Locale locale) {\n\t\treturn pipelineService.getProjectAnalysisTemplates(projectId, locale);\n\t}", "void getAllProjectList(int id);", "com.clarifai.grpc.api.ConceptLanguageOrBuilder getConceptLanguagesOrBuilder(\n int index);", "public static HashMap<String, String> getLangs() {\r\n\t\t// search for it\r\n\t\tHashMap<String, String> names = new HashMap<String, String>();\r\n\t\tnames.put(\"de\", \"Deutsch (integriert) - German (included)\");\r\n\r\n\t\t// load all files from this dir\r\n\t\tfor (File f : new File(YAamsCore.programPath, \"lang\").listFiles()) {\r\n\t\t\tif (f.isDirectory() && new File(f, \"info.xml\").canRead()) {\r\n\t\t\t\tHashMap<String, String> data = (HashMap<String, String>) FileHelper.loadXML(new File(f, \"info.xml\"));\r\n\t\t\t\tnames.put(f.getName(), data.get(\"title\"));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn names;\r\n\t}", "public List<Locale> getTranslationLocales(String edition);", "public List<String> getSupportedLanguages() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getSupportedLanguages\").get();\n }", "public List<ProjectType> invokeQueryProjects() throws TsResponseException {\n checkSignedIn();\n\n final List<ProjectType> projects = new ArrayList<>();\n\n int currentPage = 1; // Tableau starts counting at 1\n BigInteger totalReturned = BigInteger.ZERO;\n BigInteger totalAvailable;\n\n // Loop over pages\n do {\n // Query the projects page\n final String url = getUriBuilder().path(QUERY_PROJECTS) //\n .queryParam(\"pageNumber\", currentPage) //\n .queryParam(\"pageSize\", PROJECTS_PAGE_SIZE) //\n .build(m_siteId).toString();\n final TsResponse response = get(url);\n\n // Get the projects from the response\n projects.addAll(response.getProjects().getProject());\n\n // Next page\n currentPage++;\n // NOTE: total available is the number of datasources available\n totalAvailable = response.getPagination().getTotalAvailable();\n totalReturned = totalReturned.add(response.getPagination().getPageSize());\n } while (totalReturned.compareTo(totalAvailable) < 0);\n\n return projects;\n }", "Set<Locale> getManagedLocales();", "public List<Language> getDownloadableLanguage() {\n\t\tList<Language> languages = languageManager.getAllAvailable();\n\t\tList<Language> result = new ArrayList<Language>();\n\t\tfor(Language language : languages){\n\t\t\tif(language.getBasePackages() != null &&\n\t\t\t\t\tlanguage.getBasePackages().size() != 0){\n\t\t\t\tresult.add(language);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static IProject[] getAllRubyProjects() {\r\n \t\tArrayList<IProject> rubyProjects = new ArrayList<IProject>();\r\n \t\tIWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();\r\n \t\t\r\n \t\tfor (Project aweProject : ProjectPlugin.getPlugin().getProjectRegistry().getProjects()) {\r\n \t\t\tfor (RubyProject rubyProject : aweProject.getElements(RubyProject.class)) {\r\n \t\t\t\tIProject resourceProject = root.getProject(rubyProject.getName());\r\n \t\t\t\ttry {\t\t\t\t\t\r\n \t\t\t\t\tresourceProject.setPersistentProperty(AWE_PROJECT_NAME, aweProject.getName());\r\n \t\t\t\t}\r\n \t\t\t\tcatch (CoreException e) {\r\n \t\t\t\t\tProjectPlugin.log(null, e);\r\n \t\t\t\t}\r\n \t\t\t\tfinally {\t\t\t\r\n \t\t\t\t\trubyProjects.add(resourceProject);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\treturn rubyProjects.toArray(new IProject[]{});\r\n \t}", "public List getAvailableProjects (){\n\t\tList retValue = new ArrayList ();\n\t\tthis.setProcessing (true);\n\t\ttry {\n\t\t\tfor (Iterator it = getPersistenceManager().getExtent(Project.class, true).iterator();it.hasNext ();){\n\t\t\t\tretValue.add (it.next());\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.setProcessing (false);\n\t\t}\n\t\treturn retValue;\n\t}", "@Query(value = \"select count(termLang) from TermLang termLang where termLang.value is not null and termLang.projectLangId in \" +\n \"(select projectLang.id from ProjectLang projectLang where projectLang.projectId = :projectId and projectLang.isDeleted = false \" +\n \"and termLang.term.id in (select term.id from Term term where termLang.term.id = term.id and term.isDeleted = false) )\")\n long countAllTranslation(long projectId);", "public abstract List<ProjectBean> getProjectList();", "@Override\n\tpublic IReplacement getAllReplacements(String lang){\n\t\t//connects to a DB and gets new values and names from there\n\t\tList<AutoreplaceL> data=dao.getByPropertiesValuePortionOrdered(\n\t\t\t\tnull, null, WHERE_NAMES, new Object[]{Boolean.TRUE, lang}, 0, -1, ORDER_BY, ORDER_HOW);\n\t\tList<String> values=new ArrayList<String>(data.size());\n\t\tList<Pattern> names_pattern=new ArrayList<Pattern>(data.size());\n\t\tfor (int i=0;i<data.size();i++){\n\t\t\tnames_pattern.add(Pattern.compile(Pattern.quote(data.get(i).getLocaleParent().getCode())));\n\t\t\tvalues.add(data.get(i).getText());\n\t\t}\n\t\treturn new Replacement(values, names_pattern);\n\t}", "public IProject [] getProjects(){\n\t\treturn projects;\n\t}", "String[] getLanguageList(InputStream inputStream) throws CaptionConverterException;", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Culture> findAllCulture() {\n\t\treturn session.openSession().createQuery(\" from Culture\").list();\n\t}", "public List<Locale> getAvailableLocales() {\n List<T> items = (List<T>) MongoEntity.getDs().find(this.getClass(), \"reference\", this.reference).asList();\n List<Locale> locales = new ArrayList<Locale>();\n\n if (items != null && !items.isEmpty()) {\n for (T item : items) {\n locales.add(item.language);\n }\n }\n return locales;\n }", "@ApiMethod(\n name = \"getProjects\",\n path = \"getProjects\",\n httpMethod = HttpMethod.POST\n )\n public List<Project> getProjects(){\n \tQuery<Project> query = ofy().load().type(Project.class);\n \treturn query.list();\n }", "java.util.List<? extends com.clarifai.grpc.api.ConceptLanguageOrBuilder> \n getConceptLanguagesOrBuilderList();", "public String[] getLanguage() {\n return mSelf.getLanguage();\n }", "public List<ProjectEntity> getProjectByName() {\n\t\treturn null;\n\t}", "public Map<Locale, T> getAvailableLocalesAndTranslatables() {\n Map<Locale, T> returnMap = new HashMap<Locale, T>();\n List<T> items = (List<T>) MongoEntity.getDs().find(this.getClass(), \"reference\", this.reference).asList();\n\n if (items != null && !items.isEmpty()) {\n for (T item : items) {\n returnMap.put(item.language, item);\n }\n }\n return returnMap;\n }", "List<Project> getWithNonResolvedMessages();", "@Override\r\n\tpublic List<Language> selectAllByEntity(Language language) {\n\t\treturn null;\r\n\t}", "@GetMapping(value = \"/projects\", produces = \"application/json\")\n public ResponseEntity<?> listAllProjects()\n {\n List<Project> projectList = projectService.findAllProjects();\n\n return new ResponseEntity<>(projectList, HttpStatus.OK);\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<T> getAllByLanguage(Lang lang) {\r\n\t\treturn getSqlMapClientTemplate().queryForList(\r\n\t\t\t\tSqlMapUtils.getSelectByLanguage(getShortName()), lang);\r\n\t}", "public List<AbstractProject> getProjectList() {\n\t\tList<AbstractProject> projectList = new ArrayList<AbstractProject>();\n\t\tConnection conn = getConnection();\n\t\tPreparedStatement stmtSelect = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tStringBuilder sbSelect = new StringBuilder(SELECT)\n\t\t\t\t.append(projectIdColumnName).append(COMMA)\n\t\t\t\t.append(projectNameColumnName)\n\t\t\t\t.append(FROM).append(projectTableName);\n\n\t\t\tstmtSelect = conn.prepareStatement(sbSelect.toString());\n\t\t\trs = stmtSelect.executeQuery();\n\t\t\t\n\t\t\twhile (rs.next()) { \n\t\t\t\tAbstractProject project = (AbstractProject) ATElementFactory.createITreeComponent(projectType);\n\t\t\t\tproject.setId(rs.getInt(1));\n\t\t\t\tproject.setName(rs.getString(2));\n\t\t\t\tproject.setDescription(rs.getString(3));\n\t\t\t\tprojectList.add(project);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DAOException(e);\n\t\t\t\n\t\t} finally {\n\t\t\tDbUtils.closeQuietly(conn);\n\t\t\tDbUtils.closeQuietly(stmtSelect);\n\t\t\tDbUtils.closeQuietly(rs);\n\t\t}\n\t\t\n\t\treturn projectList;\n\t}", "public Langs() {\n this(DSL.name(\"langs\"), null);\n }", "public List<Build> getBuildsForProject(int projectId);", "public Set<String> get(JavaProject javaProject, ProgressMonitor progressMonitor);", "String getLang();", "private Collection<EclipseProject> allProjects() {\n Collection<EclipseProject> all = new HashSet<EclipseProject>(selectedProjects);\n all.addAll(requiredProjects);\n return all;\n }", "public static String[] getISOLanguages() {\n/* 229 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic List<Translator> findAll() {\n\t\treturn null;\n\t}", "public ArrayList<Book> getListBooklanguage(String laguage);", "public String getLanguage();", "public ArrayList<Project> allProjects() {\n ArrayList<Project> projects = new ArrayList<>();\n for (Role role : this.roles) {\n if (role instanceof Member) {\n projects.add(((Member) role).getProject());\n } else if (role instanceof Leader) {\n projects.add(((Member) role).getProject());\n }\n }\n return projects;\n }", "public Project[] findAll() throws ProjectDaoException {\n\t\treturn findByDynamicSelect(SQL_SELECT + \" ORDER BY ID\", null);\n\t}", "public ProjectsList getProjects() {\n return projects.clone();\n }", "@Override\r\n\tpublic LanguageApi getLanguageApi() {\r\n\t\treturn this;\r\n\t}", "@RequestMapping(value = \"/project\", method = RequestMethod.GET)\n\tpublic Response getProjects() {\n\t\tResponse response = new Response();\n\t\ttry {\n\t\t\tList<Project> projects = projectService.getAllProjects();\n\t\t\tif (!projects.isEmpty()) {\n\t\t\t\tresponse.setCode(CustomResponse.SUCCESS.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.SUCCESS.getMessage());\n\t\t\t\tresponse.setData(transformProjectToPojectDto(projects));\n\t\t\t} else {\n\t\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\tlogger.error(\"get all project Failed \", e);\n\t\t}\n\t\treturn response;\n\t}", "String getLanguage();", "String getLanguage();", "String getLanguage();", "@ApiModelProperty(required = true, value = \"Language codes for the schemas available.\")\n @JsonProperty(\"Languages\")\n public List<String> getLanguages() {\n return languages;\n }", "@Override\n\tpublic List<String> viewAllProjects(String userId) {\n\t\treturn fileDao.getUserAllProjectsName(userId);\n\t}", "public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }", "public ReactorResult<java.lang.String> getAllOntologies20070510nid3Language_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ONTOLOGIES20070510NID3LANGUAGE, java.lang.String.class);\r\n\t}", "public List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> getProjects() throws RegistryException {\n return getProjects(-1, -1, null, null);\n }", "public static Set<CharSequence> getSearchBase(Project project, Folder folder) {\n Set<CharSequence> result = new HashSet<>();\n ConcurrentMap<Folder,List<CharSequence>> projectSearchBase = searchBase.get(project);\n if (projectSearchBase != null) {\n List<CharSequence> list = projectSearchBase.get(folder);\n if (list != null) {\n synchronized(list) {\n result.addAll(list);\n }\n }\n }\n return result;\n }", "@RequestMapping(value = \"/project-role\", method = RequestMethod.GET)\n public\n @ResponseBody\n Collection<ProjectRole> getProjectRoles() {\n return Arrays.asList(ProjectRole.values());\n }", "public List<PmPropertyLanguageBean> selectPropertyWithLanguages(Map Paramter);", "public List<Project> getAllProject(boolean isDeleted) throws EmployeeManagementException;", "public List<Project> listProject(String query) throws StorageException {\n\t\tif (query == null || query.compareTo(\"\") == 0) {\n\t\t\tquery = \"1\";\n\t\t}\n\t\tList<Project> projectList = new ArrayList<Project>();\n\t\tString sortOrder = \"_ID ASC\";\n\t\tString[] selectionArguments = null;\n\t\tProject project;\n\t\tCursor cursor = contentResolver.query(LocalStorageContentProvider.PROJECT_URI, null, query, selectionArguments,\n\t\t\t\tsortOrder);\n\t\ttry {\n\t\t\tif (cursor.moveToFirst()) {\n\t\t\t\tdo {\n\t\t\t\t\tproject = new Project();\n\t\t\t\t\tproject.set_Id(cursor.getString(cursor.getColumnIndex(\"_ID\")));\n\t\t\t\t\tproject.setName(cursor.getString(cursor.getColumnIndex(\"NAME\")));\n\t\t\t\t\tproject.setDescription(cursor.getString(cursor.getColumnIndex(\"DESCRIPTION\")));\n\t\t\t\t\tprojectList.add(project);\n\t\t\t\t} while (cursor.moveToNext());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new StorageException();\n\t\t} finally {\n\t\t\tif (cursor != null && !cursor.isClosed()) {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t}\n\t\treturn projectList;\n\t}", "@Override\n protected String[] onGetLanguage() {\n return mCurrentLanguage;\n }", "public List<String> languageSupport() {\r\n\t\tList<String> twitterResponseList = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tProperties properties = getProperties();\r\n\t\t\tString apiUrl = properties.getProperty(\"twitter.api.language.support\");\r\n\r\n\t\t\tHttpResponse apiResponse = executeHttpGet(apiUrl);\r\n\r\n\t\t\tif (200 == apiResponse.getStatusLine().getStatusCode()) {\r\n\t\t\t\tJSONArray jsonArray = new JSONArray(EntityUtils.toString(apiResponse.getEntity()));\r\n\t\t\t\tfor (int i = 0; i < jsonArray.length() && i < 10; i++) {\r\n\t\t\t\t\tJSONObject object = (JSONObject) jsonArray.get(i);\r\n\t\t\t\t\tString displayText = (String) object.get(\"name\");\r\n\t\t\t\t\ttwitterResponseList.add(displayText);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn twitterResponseList;\r\n\t}", "public List<Preference<Language>> getAcceptedLanguages() {\n // Lazy initialization with double-check.\n List<Preference<Language>> a = this.acceptedLanguages;\n if (a == null) {\n synchronized (this) {\n a = this.acceptedLanguages;\n if (a == null) {\n this.acceptedLanguages = a = new ArrayList<Preference<Language>>();\n }\n }\n }\n return a;\n }", "@Override\r\n\tpublic List<Project> findProject() {\n\t\treturn iSearchSaleRecordDao.findProject();\r\n\t}", "public List getLocaleLabels() {\n\n return (localeLabels);\n\n }", "public List<String> getResources(String baseUrl, String domain, String project, Client client)\n throws ClientHandlerException {\n\n ClientResponse response = null;\n List<String> resourceVal = Collections.emptyList();\n WebResource webResource = client.resource(baseUrl).path(\"qcbin\").path(\"rest\").path(\"domains\").path(domain)\n .path(\"projects\").path(project).path(\"resources\");\n\n response = webResource.accept(MediaType.APPLICATION_XML).get(ClientResponse.class);\n\n Entities entities = response.getEntity(Entities.class);\n if (entities.getTotalResults() > Constants.ZERO) {\n for (Entity entity : entities.getEntity()) {\n if (\"defect\".equalsIgnoreCase(entity.getType()) && entity.getFields() != null) {\n resourceVal = new ArrayList<String>();\n for (Field field : entity.getFields().getFieldList()) {\n resourceVal.add(field.getValue());\n }\n\n }\n }\n }\n\n return resourceVal;\n }", "public List<String> getAudioLanguageCodes() {\n return getAudioLanguages()\n .stream()\n .map(locale -> {\n String l = locale.getLanguage();\n if (StringUtils.isNotBlank(locale.getCountry())) {\n l += '-' + locale.getCountry().toLowerCase();\n }\n return l;\n })\n .collect(Collectors.toList());\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<T> getAllByLanguage(QueryParameters qp) {\r\n\t\treturn getSqlMapClientTemplate().queryForList(\r\n\t\t\t\tSqlMapUtils.getFindByLanguage(getShortName()), qp);\r\n\t}", "void getAllProjectList(int id, UserType userType);" ]
[ "0.6838118", "0.67188317", "0.66426927", "0.6640688", "0.65287995", "0.64076376", "0.6291268", "0.6290463", "0.6241715", "0.6240499", "0.61886305", "0.61519456", "0.61322594", "0.61179215", "0.60974646", "0.60934234", "0.6059293", "0.5990136", "0.5961712", "0.5938889", "0.59164685", "0.5911348", "0.5883608", "0.58395725", "0.58359355", "0.5804338", "0.58003205", "0.57769465", "0.5751664", "0.5728472", "0.56768036", "0.5665346", "0.56609917", "0.5628643", "0.5609725", "0.5605145", "0.55631584", "0.5548172", "0.5525128", "0.55058247", "0.55033296", "0.54957515", "0.5483938", "0.5467938", "0.54621506", "0.5460377", "0.5432247", "0.5416527", "0.5391719", "0.5390661", "0.5379808", "0.5377583", "0.5377518", "0.5372715", "0.5362363", "0.53598475", "0.53388643", "0.5314639", "0.5308278", "0.52927655", "0.5279936", "0.5262968", "0.52474487", "0.5242405", "0.5225063", "0.52209204", "0.5213546", "0.5210498", "0.5209893", "0.5189122", "0.51698583", "0.51537496", "0.5142326", "0.51392853", "0.50956434", "0.5094084", "0.5088262", "0.5087104", "0.508543", "0.508543", "0.508543", "0.5079929", "0.5070256", "0.5063792", "0.5058764", "0.50568193", "0.5048804", "0.50454724", "0.50441456", "0.50439507", "0.5041311", "0.50317985", "0.5027925", "0.5009197", "0.500838", "0.49943596", "0.49894965", "0.49877235", "0.49863827", "0.49643242" ]
0.5715401
30
Get all languages registered
public List<Language> getAllLanguages() { StringBuilder sbHql = new StringBuilder(); sbHql.append("from Language"); Query query = getSession().createQuery(sbHql.toString()); List<Language> languages = query.list(); return languages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Language> getAll();", "public List<Language> getLanguages() {\n return metaDao().queryLanguages();\n }", "@GetMapping(\"/languages\")\n public List<Language> getLanguages() {\n return languageFacade.getLanguages();\n }", "public List<String> getLanguages() {\n return languages;\n }", "public String[] getLanguages() {\n/* 238 */ return getStringArray(\"language\");\n/* */ }", "public String[] getLanguages()\n {\n return languages;\n }", "public Future<List<String>> getAvailableLanguages() throws DynamicCallException, ExecutionException {\n return call(\"getAvailableLanguages\");\n }", "public String getLanguages() {\n return languages;\n }", "public Language[] getLanguageList() {\n return languageList;\n }", "@GetMapping(\"api/languages\")\n\tpublic List<Language> index(){\n\t\treturn languageService.allLanguages();\n\t}", "public List<String> getAvailableLanguages() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getAvailableLanguages\").get();\n }", "@RequestMapping(value = \"\",\n method = RequestMethod.GET)\n @ResponseBody\n public ApiResponse<List<SupportedLanguage>> getAllLanguages() {\n LOG.debug(\"REST request to get all languages\");\n\n final ApiResponse <List <SupportedLanguage>> apiResponse = new ApiResponse <List<SupportedLanguage>>();\n\n List<SupportedLanguage> languageList = null;\n\n try {\n languageList = supportedLanguageService.findAllLanguages();\n apiResponse.setData(languageList);\n LOG.debug(\"Size{}\", languageList.size());\n } catch (Exception e) {\n throw new LucasRuntimeException(LucasRuntimeException.INTERNAL_ERROR, e);\n }\n\n return apiResponse;\n\n }", "@PermitAll\n @Override\n public List<Language> getLanguages(String lang) {\n Map params = new HashMap<String, Object>();\n if (lang != null) {\n params.put(CommonSqlProvider.PARAM_LANGUAGE_CODE, lang);\n }\n params.put(CommonSqlProvider.PARAM_ORDER_BY_PART, \"item_order\");\n return getRepository().getEntityList(Language.class, params);\n }", "private List<String> loadLanguages() {\n\t\tFile directory = new File(\"./src/resources/languages\");\t// load current directory\n\t\t\n\t\tFilenameFilter textFilter = new FilenameFilter() {\n\t\t\tpublic boolean accept(File dir, String name) {\n\t\t\t\tif(!name.startsWith(\"Syntax\") && !name.startsWith(\"LanguageCodes\")) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\t\n\t\tResourceFilter filter = new ResourceFilter(directory, textFilter);\n\t\t\n\t\tList<String> languages = (List<String>) filter.getFilteredList();\n\t\t\n\t\tlanguages = languages.stream()\n\t\t\t\t\t\t\t .map(m -> m.replace(UNWANTED_EXTENSION, \"\"))\n\t\t\t\t \t\t\t .collect(Collectors.toList());\n\t\t\n\t\treturn languages;\n\t}", "public static HashMap<String, String> getLangs() {\r\n\t\t// search for it\r\n\t\tHashMap<String, String> names = new HashMap<String, String>();\r\n\t\tnames.put(\"de\", \"Deutsch (integriert) - German (included)\");\r\n\r\n\t\t// load all files from this dir\r\n\t\tfor (File f : new File(YAamsCore.programPath, \"lang\").listFiles()) {\r\n\t\t\tif (f.isDirectory() && new File(f, \"info.xml\").canRead()) {\r\n\t\t\t\tHashMap<String, String> data = (HashMap<String, String>) FileHelper.loadXML(new File(f, \"info.xml\"));\r\n\t\t\t\tnames.put(f.getName(), data.get(\"title\"));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn names;\r\n\t}", "List<Language> findAll();", "@Test\n public void listAllAvailableLanguages() throws IOException {\n System.out.println(\n \"Language preprocessing components for the following languages are available:\\n \"\n + String.join(\", \", LanguageComponents.languages()));\n }", "Set<Locale> getManagedLocales();", "public Future<List<String>> getSupportedLanguages() throws DynamicCallException, ExecutionException {\n return call(\"getSupportedLanguages\");\n }", "public LanguageList getLanguageList() {\r\n return languageList;\r\n }", "public ArrayList<Language> listLanguages(){\n\t\t\t\n\t\t\tconnectToDatabase();\n\t\t\tArrayList<Language> languageArray = new ArrayList<Language>();\n\t\t\ttry {\n\t\t\t\tStatement create = connection.createStatement();\n\t\t\t\tResultSet result = create.executeQuery(\"Select languages.ID as id, languages.Name AS language FROM languages;\");\n\n\t\t\t\twhile(result.next()){\n\t\t\t\t\t\n\t\t\t\t\tLanguage newLanguage = new Language(result.getInt(\"id\"), result.getString(\"language\"));\n\t\t\t\t\tlanguageArray.add(newLanguage);\n\t\t\t\t}\n\t\t\t\treturn languageArray;\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"An error occurred when retrieving languages from the database.\");\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn languageArray;\n\t\t\t}\n\t\t\t\n\t\t}", "public List<String> getSupportedLanguages() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getSupportedLanguages\").get();\n }", "public String[] getLanguage() {\n return mSelf.getLanguage();\n }", "public List<Locale> getTranslationLocales(String edition);", "java.util.List<com.clarifai.grpc.api.ConceptLanguage> \n getConceptLanguagesList();", "public List<Locale> getAvailableLocales() {\n List<T> items = (List<T>) MongoEntity.getDs().find(this.getClass(), \"reference\", this.reference).asList();\n List<Locale> locales = new ArrayList<Locale>();\n\n if (items != null && !items.isEmpty()) {\n for (T item : items) {\n locales.add(item.language);\n }\n }\n return locales;\n }", "public static List<String> getLanguages() {\n\t\treturn Stream.of(values()).map(v -> v.getLanguage()).sorted((lang1, lang2) -> lang1.toLowerCase().compareTo(lang2.toLowerCase()))\n\t\t\t\t.collect(Collectors.toList());\n\t}", "public Map<Locale, T> getAvailableLocalesAndTranslatables() {\n Map<Locale, T> returnMap = new HashMap<Locale, T>();\n List<T> items = (List<T>) MongoEntity.getDs().find(this.getClass(), \"reference\", this.reference).asList();\n\n if (items != null && !items.isEmpty()) {\n for (T item : items) {\n returnMap.put(item.language, item);\n }\n }\n return returnMap;\n }", "public Set<Locale> getAvailableLocales () {;\n\t\treturn Collections.unmodifiableSet(serviceProvider.getDictionariesManager().getLocaleDictionaries().keySet());\n\t}", "public List<Language> getDownloadableLanguage() {\n\t\tList<Language> languages = languageManager.getAllAvailable();\n\t\tList<Language> result = new ArrayList<Language>();\n\t\tfor(Language language : languages){\n\t\t\tif(language.getBasePackages() != null &&\n\t\t\t\t\tlanguage.getBasePackages().size() != 0){\n\t\t\t\tresult.add(language);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public Enumeration getLocales() {\n List list = new ArrayList();\n list.add(this.locale);\n return Collections.enumeration(list);\n }", "public String getLanguage();", "@Override\n protected String[] onGetLanguage() {\n return mCurrentLanguage;\n }", "String getLanguage();", "String getLanguage();", "String getLanguage();", "@ApiModelProperty(required = true, value = \"Language codes for the schemas available.\")\n @JsonProperty(\"Languages\")\n public List<String> getLanguages() {\n return languages;\n }", "public List getSupportedLocales() {\n\n return (supportedLocales);\n\n }", "public List getLocaleLabels() {\n\n return (localeLabels);\n\n }", "public static ULocale[] getAvailableLocales() {\n/* 212 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public List<String> getAudioLanguageCodes() {\n return getAudioLanguages()\n .stream()\n .map(locale -> {\n String l = locale.getLanguage();\n if (StringUtils.isNotBlank(locale.getCountry())) {\n l += '-' + locale.getCountry().toLowerCase();\n }\n return l;\n })\n .collect(Collectors.toList());\n }", "public static String[] getLangNames() {\r\n\t\tHashMap<String, String> ges = getLangs();\r\n\r\n\t\tString[] names = new String[ges.size()];\r\n\t\tint i = 0;\r\n\t\t// add all\r\n\t\tfor (String key : ges.keySet()) {\r\n\t\t\tnames[i] = ges.get(key);\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\treturn names;\r\n\t}", "com.clarifai.grpc.api.ConceptLanguage getConceptLanguages(int index);", "String[] getLanguageList(InputStream inputStream) throws CaptionConverterException;", "public List<Preference<Language>> getAcceptedLanguages() {\n // Lazy initialization with double-check.\n List<Preference<Language>> a = this.acceptedLanguages;\n if (a == null) {\n synchronized (this) {\n a = this.acceptedLanguages;\n if (a == null) {\n this.acceptedLanguages = a = new ArrayList<Preference<Language>>();\n }\n }\n }\n return a;\n }", "String getLang();", "public List<String> languageSupport() {\r\n\t\tList<String> twitterResponseList = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tProperties properties = getProperties();\r\n\t\t\tString apiUrl = properties.getProperty(\"twitter.api.language.support\");\r\n\r\n\t\t\tHttpResponse apiResponse = executeHttpGet(apiUrl);\r\n\r\n\t\t\tif (200 == apiResponse.getStatusLine().getStatusCode()) {\r\n\t\t\t\tJSONArray jsonArray = new JSONArray(EntityUtils.toString(apiResponse.getEntity()));\r\n\t\t\t\tfor (int i = 0; i < jsonArray.length() && i < 10; i++) {\r\n\t\t\t\t\tJSONObject object = (JSONObject) jsonArray.get(i);\r\n\t\t\t\t\tString displayText = (String) object.get(\"name\");\r\n\t\t\t\t\ttwitterResponseList.add(displayText);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn twitterResponseList;\r\n\t}", "@Override\n\t\tpublic Enumeration getLocales() {\n\t\t\treturn null;\n\t\t}", "public static String[] getLangIDs() {\r\n\t\tHashMap<String, String> ges = getLangs();\r\n\r\n\t\tString[] names = new String[ges.size()];\r\n\t\tint i = 0;\r\n\t\t// add all\r\n\t\tfor (String key : ges.keySet()) {\r\n\t\t\tnames[i] = key;\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\treturn names;\r\n\t}", "@Override\n\tpublic Enumeration getLocales() {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Culture> findAllCulture() {\n\t\treturn session.openSession().createQuery(\" from Culture\").list();\n\t}", "public List<Locale> getAvailableLocales() {\n\t\t\n\t\treturn locales;\n\t}", "public ArrayList<Book> getListBooklanguage(String laguage);", "public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }", "public static final Locale[] getAvailableLocales()\n/* */ {\n/* 456 */ return getAvailEntry(\"com/ibm/icu/impl/data/icudt48b\", ICU_DATA_CLASS_LOADER).getLocaleList();\n/* */ }", "List<Locale> getSupportedLocales() {\n return Collections.unmodifiableList(mSupportedLocales);\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<T> getAllByLanguage(Lang lang) {\r\n\t\treturn getSqlMapClientTemplate().queryForList(\r\n\t\t\t\tSqlMapUtils.getSelectByLanguage(getShortName()), lang);\r\n\t}", "java.lang.String getLanguage();", "java.lang.String getLanguage();", "@SuppressWarnings(\"unchecked\")\n public List<Locale> getLocales()\n {\n Locale loc = getLocale();\n if (loc == null)\n {\n return EMPTY_LOCALE_LIST;\n }\n else\n {\n LinkedList<Locale> locs = new LinkedList<Locale>();\n locs.add(loc);\n if (clientRequest != null)\n {\n Enumeration<Locale> clientLocs = (Enumeration<Locale>) clientRequest.getLocales();\n while (clientLocs.hasMoreElements())\n {\n Locale current = clientLocs.nextElement();\n if (current.getLanguage().equals(loc.getLanguage()) && current.getCountry().equals(loc.getCountry()))\n continue;\n locs.add(current);\n }\n }\n return Collections.unmodifiableList(locs);\n }\n }", "public ReactorResult<java.lang.String> getAllOntologies20070510nid3Language_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ONTOLOGIES20070510NID3LANGUAGE, java.lang.String.class);\r\n\t}", "@Override\r\n\tpublic Set<AvailableLocale> getAvailableLocales() {\r\n\t\treturn availableLocales;\r\n\t}", "java.util.List<? extends com.clarifai.grpc.api.ConceptLanguageOrBuilder> \n getConceptLanguagesOrBuilderList();", "public static String[] getISOLanguages() {\n/* 229 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static Set<String> getEnglishWords()\n{\n return english_words;\n}", "@Override\n\tpublic Enumeration<Locale> getLocales() {\n\t\treturn null;\n\t}", "public void setLanguages(List<String> languages) {\n this.languages = languages;\n }", "@Override\n\tpublic List<Translator> findAll() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<Language> selectAllByEntity(Language language) {\n\t\treturn null;\r\n\t}", "protected String[] getAvailableLocaleNames() {\n return LocaleInfo.getAvailableLocaleNames();\n }", "public static final Locale[] getAvailableLocales(String baseName, ClassLoader loader)\n/* */ {\n/* 448 */ return getAvailEntry(baseName, loader).getLocaleList();\n/* */ }", "public static I18NBundle getStrings() {\n\t\treturn strings;\n\t}", "@GetMapping(\"/localisations\")\n @Timed\n public List<Localisation> getAllLocalisations() {\n log.debug(\"REST request to get all Localisations\");\n return localisationService.findAll();\n }", "public String getLanguageKey();", "public List getLocaleValues() {\n\n return (localeValues);\n\n }", "public static final Locale[] getAvailableLocales() {\n return getAvailEntry(ICU_BASE_NAME).getLocaleList();\n }", "public List<Locale> getSupportedLocales() {\n return this.supportedLocales;\n }", "public void setLanguages(String languages) {\n this.languages = languages;\n }", "com.google.protobuf.ByteString\n getLanguageBytes();", "public String getLang() {\n return lang;\n }", "com.google.protobuf.ByteString\n getLanguageBytes();", "public Langs() {\n this(DSL.name(\"langs\"), null);\n }", "com.google.protobuf.ByteString\n getLanguageBytes();", "@Override\n\tpublic IReplacement getAllReplacements(String lang){\n\t\t//connects to a DB and gets new values and names from there\n\t\tList<AutoreplaceL> data=dao.getByPropertiesValuePortionOrdered(\n\t\t\t\tnull, null, WHERE_NAMES, new Object[]{Boolean.TRUE, lang}, 0, -1, ORDER_BY, ORDER_HOW);\n\t\tList<String> values=new ArrayList<String>(data.size());\n\t\tList<Pattern> names_pattern=new ArrayList<Pattern>(data.size());\n\t\tfor (int i=0;i<data.size();i++){\n\t\t\tnames_pattern.add(Pattern.compile(Pattern.quote(data.get(i).getLocaleParent().getCode())));\n\t\t\tvalues.add(data.get(i).getText());\n\t\t}\n\t\treturn new Replacement(values, names_pattern);\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<T> getAllByLanguage(QueryParameters qp) {\r\n\t\treturn getSqlMapClientTemplate().queryForList(\r\n\t\t\t\tSqlMapUtils.getFindByLanguage(getShortName()), qp);\r\n\t}", "public static void display(){\r\n String baseName = \"res.Messages\";\r\n ResourceBundle messages = ResourceBundle.getBundle(baseName, Locale.getDefault());\r\n System.out.println(messages.getString(\"locales\"));\r\n\r\n Locale available[] = Locale.getAvailableLocales();\r\n for(Locale locale : available) {\r\n System.out.println(locale.getDisplayCountry() + \"\\t\" + locale.getDisplayLanguage(locale));\r\n }\r\n }", "public static final Locale[] getAvailableLocales(String baseName) {\n return getAvailEntry(baseName).getLocaleList();\n }", "public static String[] getAvailableLocaleStrings() {\n\t\tLocale[] availableLocales = getAvailableLocales();\n\t\tString[] result = new String[availableLocales.length];\n\t\tfor (int i = 0; i < availableLocales.length; i++) {\n\t\t\tresult[i] = availableLocales[i].toString();\n\t\t}\n\t\treturn result;\n\t}", "public List<ITranslationResource> getResources(){\n\t\treturn resources;\n\t}", "String getLocalization();", "public String getLanguage() {\n return _language;\n }", "private List<LocaleListItem> gatherLocales(String languageCode) {\n final ArrayList<LocaleListItem> result = new ArrayList<LocaleListItem>();\n for (Locale locale : Locale.getAvailableLocales()) {\n if (locale.getLanguage().equals(languageCode)) {\n result.add(new LocaleListItem(locale));\n }\n }\n return result;\n }", "public String getLanguage() {\r\n return language;\r\n }", "public String getLanguage() {\n return language;\n }", "public String getLanguage() {\n return language;\n }", "public Language getLanguage() {\r\n\t\t\treturn lang;\r\n\t\t}", "public static String getLanguage() {\n return language;\n }", "Language findById(String id);", "public String getLanguage()\n {\n return mLanguage;\n }", "private static Map<String, List<String>> loadCitiesByLanguage() {\n String resource = Config.get(\"generate.geography.foreign.birthplace.default_file\",\n \"geography/foreign_birthplace.json\");\n return loadCitiesByLanguage(resource);\n }" ]
[ "0.82856226", "0.79352266", "0.769443", "0.7598684", "0.75826585", "0.75793", "0.7502127", "0.7457778", "0.7415148", "0.7409245", "0.74051625", "0.73751324", "0.72923577", "0.7222491", "0.7206271", "0.7199561", "0.71475005", "0.7122317", "0.7049389", "0.70105493", "0.69466525", "0.68921846", "0.6849449", "0.68488747", "0.68216646", "0.6819538", "0.6799065", "0.6794077", "0.6775965", "0.67090267", "0.6601917", "0.6553803", "0.6529035", "0.6497234", "0.6497234", "0.6497234", "0.647648", "0.6472769", "0.6468295", "0.64074314", "0.6385748", "0.6385223", "0.63728845", "0.6356577", "0.6312571", "0.62848616", "0.6264745", "0.6263978", "0.62452936", "0.62341994", "0.6219683", "0.62090313", "0.6202301", "0.6154478", "0.6153926", "0.6144343", "0.61426795", "0.6133705", "0.6133705", "0.6117256", "0.60974085", "0.6073868", "0.60642576", "0.60546863", "0.60406256", "0.6001453", "0.60002023", "0.59885013", "0.5980853", "0.59785855", "0.5963847", "0.5962566", "0.5955628", "0.5947119", "0.5934117", "0.59200007", "0.5916066", "0.5915622", "0.5900621", "0.5895204", "0.5875512", "0.5856866", "0.58426785", "0.5833961", "0.58148295", "0.5813252", "0.5805394", "0.5775278", "0.57691276", "0.57644594", "0.575219", "0.5751436", "0.5743119", "0.5740159", "0.5740159", "0.57383406", "0.5726255", "0.5720445", "0.5720361", "0.571806" ]
0.77548915
2
Inserts language a project.
public void saveStudyLanguage(StudyLanguage studyLanguage) { Query query = getSession() .createSQLQuery("INSERT INTO study_language (id_project, id_language) VALUES (:valor1, :valor2)"); query.setParameter("valor1", studyLanguage.getProject().getIdProject()); query.setParameter("valor2", studyLanguage.getLanguage().getIdLanguage()); query.executeUpdate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Builder addInLanguage(Language value);", "Builder addInLanguage(Text value);", "Builder addInLanguage(String value);", "@Override\n\tpublic Integer addProject(ProjectInfo project) {\n\t\treturn sqlSession.insert(\"cn.sep.samp2.project.addProject\", project);\n\t}", "Language create(Language language);", "int insert(countrylanguage record);", "@Override\r\n\tpublic int insertProject(Project p) throws MyException {\n\t\tlogger.debug(\"프로젝트 생성전no:\"+p.getProjectNo());\r\n\t\tint result=dao.insertProject(session, p);\r\n\t\tif(result==0) {\r\n\t\t\tthrow new MyException(\"프로젝트 삽입에러\");\r\n\t\t}\r\n\t\tlogger.debug(\"프로젝트 생성후no:\"+p.getProjectNo());\r\n\t\t\r\n\t\tp.setProjectNo(p.getProjectNo());\r\n\t\tresult=dao.insertProjectMember(session,p);\r\n\t\t\r\n\t\tif(result==0){\r\n\t\t\tthrow new MyException(\"프로젝트멤버 삽입에러\");\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public void putPrimaryLanguage(String value){\n editor.putString(PRIMARY_LANGUAGE, value);\n editor.apply();\n }", "public int DSAddProject(String ProjectName, String ProjectLocation);", "public void addProject(Project p){\n this.projects.addProject(p);\n }", "int insertSelective(countrylanguage record);", "public void addLanguage(String value) {\n/* 230 */ addStringToBag(\"language\", value);\n/* */ }", "private void importLanguage(JTFFile file) {\n if (file.getLanguage() != null) {\n if (languagesService.exist(file.getLanguage())) {\n file.setLanguage(languagesService.getSimpleData(file.getLanguage().getName()));\n } else {\n languagesService.create(file.getLanguage());\n }\n\n file.getFilm().setTheLanguage(file.getLanguage());\n }\n }", "public void addOntologies20070510nid3Language(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), ONTOLOGIES20070510NID3LANGUAGE, value);\r\n\t}", "public void createProject(Project newProject);", "int insert(Project record);", "public Project insertProject(Project project, boolean isUndoOrRedo)\n\t\t\tthrows StorageException, ConstraintCheckingException {\n\t\ttry {\n\t\t\tContentValues projectValues = new ContentValues();\n\t\t\tprojectValues.put(\"_ID\", project.get_Id());\n\t\t\tprojectValues.put(\"NAME\", project.getName());\n\t\t\tprojectValues.put(\"DESCRIPTION\", project.getDescription());\n\t\t\tUri uri = contentResolver.insert(LocalStorageContentProvider.PROJECT_URI, projectValues);\n\t\t} catch (Exception e) {\n\t\t\tthrow new StorageException();\n\t\t}\n\t\tif (!isUndoOrRedo) {\n\t\t\tthis.getProjectInsertedList().add(project);\n\t\t}\n\t\treturn project;\n\t}", "Builder addInLanguage(Language.Builder value);", "protected void addLanguageParameter() throws Exception\n {\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n try\n {\n ArrayList termbaseLangs = new ArrayList();\n termbaseLangs.add(ALL);\n c = ConnectionPool.getConnection();\n ps = c.prepareStatement(TERM_LANG_QUERY);\n rs = ps.executeQuery();\n while (rs.next())\n {\n termbaseLangs.add(rs.getString(1));\n }\n\n // We should use .addList() and use a multi-select list instead\n // to let the user select multiple languages...BUT\n // this widget just does not work in the current inetsoft version\n // with the DHTML viewer (ok for java viewer)\n // So, we're stuck with giving the user one value to choose.\n theParameters.addChoice(\"selectedLang\", ALL,\n termbaseLangs.toArray());\n theParameters.setAlias(\"selectedLang\", \"Language\");\n }\n finally\n {\n ConnectionPool.silentClose(rs);\n ConnectionPool.silentClose(ps);\n ConnectionPool.silentReturnConnection(c);\n }\n }", "void setLanguage(Language language);", "public void addLanguage(String language){\n if(!this.languages.contains(language)){this.languages.add(language);}\n }", "public AddProject() {\n try\n {\n infDB = new InfDB(\"\\\\Users\\\\Oliver\\\\Documents\\\\Skola\\\\Mini_sup\\\\Realisering\\\\MICEDB.FDB\");\n System.out.println(\"Uppkopplingen lyckades\");\n }\n catch(InfException e)\n {\n System.out.println(e.getMessage());\n }\n \n try\n {\n infDB = new InfDB(\"C:\\\\Users\\\\TP300LA-C4034\\\\Desktop\\\\Delkurs 4, Lill-supen\\\\InformatikDB\\\\MICEDB.FDB\");\n System.out.println(\"Uppkopplingen lyckades\");\n }\n catch(InfException e)\n {\n System.out.println(e.getMessage());\n }\n getPlatforms();\n initComponents();\n setLocationRelativeTo(null);\n \n }", "public boolean addProject(Project p) {\n try {\n String insert = \"INSERT INTO PROJECTS\"\n + \"(CLIENT,DESCRIPTION,HOURS,STARTDATE,DUEDATE,INVOICESENT,CLIENT_ID,PROJECT_ID) \"\n + \"VALUES(?,?,?,?,?,?,?,PROJECTS_SEQ.NEXTVAL)\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(insert);\n ps.setString(1, p.getClientId());\n ps.setString(2, p.getDescription());\n ps.setString(3, p.getHours());\n ps.setString(4, p.getStartdate());\n ps.setString(5, p.getDuedate());\n ps.setString(6, p.getInvoicesent());\n ps.setString(7, p.getClientId());\n\n ps.executeUpdate();\n ps.close();\n return true;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return false;\n }\n }", "public void deleteLanguage(Long idProject, Long idLanguage) {\r\n\t\tTransaction transaction = getSession().beginTransaction();\r\n\t\ttry {\r\n\r\n\t\t\tString hql = \"delete from StudyLanguage where project.idProject= :idProject and language.idLanguage =:idLanguage\";\r\n\t\t\tQuery query = getSession().createQuery(hql);\r\n\t\t\tquery.setLong(\"idProject\", idProject);\r\n\t\t\tquery.setLong(\"idLanguage\", idLanguage);\r\n\t\t\tSystem.out.println(query.executeUpdate());\r\n\r\n\t\t\ttransaction.commit();\r\n\t\t} catch (Throwable t) {\r\n\t\t\ttransaction.rollback();\r\n\t\t\tthrow t;\r\n\t\t}\r\n\r\n\t}", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "private void addProjectTask(ActionEvent e) {\n Calendar dueDate = dueDateModel.getValue();\n String title = titleEntry.getText();\n String description = descriptionEntry.getText();\n Project parent = (Project) parentEntry.getSelectedItem();\n addProjectTask(title, description, parent, dueDate);\n }", "public boolean insertProject(Project project) throws EmployeeManagementException;", "@Test(expected = NotEnglishWordException.class)\r\n\tpublic void testEnglishAdd() throws LanguageSyntaxException {\r\n\t\ttrans.addWord(\"дом\", \"домик\");\r\n\t}", "public void add(View project){\n projects.add(project);\n }", "public void store() throws IOException, SQLException {\r\n \r\n /* Project section */\r\n final HashMap<Object, Object> projectdata = new HashMap<Object, Object>(8);\r\n \r\n if(project == null){\r\n \t// The title \r\n projectdata.put(ProjectAccessor.TITLE, title);\r\n // Create the project database object.\r\n final ProjectAccessor newProject = new ProjectAccessor(projectdata);\r\n newProject.persist(conn);\r\n projectid = (Long) newProject.getGeneratedKeys()[0];\r\n } else {\r\n \tprojectid = project.getProjectid();\r\n }\r\n }", "public abstract void addUnit(LanguageUnit languageUnit);", "private void add_proj_DATABASE(Project project) {\n }", "public void addCountryLanguage(String newLanguage) {\n languages.add(newLanguage);\n }", "public void saveNewProject(){\n String pn = tGUI.ProjectTextField2.getText();\n String pd = tGUI.ProjectTextArea1.getText();\n String statusID = tGUI.StatusComboBox.getSelectedItem().toString();\n String customerID = tGUI.CustomerComboBox.getSelectedItem().toString();\n\n int sstatusID = getStatusID(statusID);\n int ccustomerID = getCustomerID(customerID);\n\n try {\n pstat = cn.prepareStatement (\"insert into projects (project_name, project_description, project_status_id, customer_id) VALUES (?,?,?,?)\");\n pstat.setString(1, pn);\n pstat.setString(2,pd);\n pstat.setInt(3, sstatusID);\n pstat.setInt(4, ccustomerID);\n pstat.executeUpdate();\n\n }catch (SQLException ex) {\n Logger.getLogger(ProjectMethods.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void setLanguage(String language);", "public Language(String name) {\n this.name = name;\n }", "int insert(UserOperateProject record);", "public void addOntologies20070510nid3Language( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), ONTOLOGIES20070510NID3LANGUAGE, value);\r\n\t}", "public void addProjectAction() throws IOException {\n\t\tfinal FXMLSpringLoader loader = new FXMLSpringLoader(appContext);\n\t\tfinal Dialog<Project> dialog = loader.load(\"classpath:view/Home_AddProjectDialog.fxml\");\n\t\tdialog.initOwner(addProject.getScene().getWindow());\n\t\tfinal Optional<Project> result = dialog.showAndWait();\n\t\tif (result.isPresent()) {\n\t\t\tlogger.trace(\"dialog 'add project' result: {}\", result::get);\n\t\t\tprojectsObservable.add(result.get());\n\t\t}\n\t}", "public void addFromProject() {\n btAddFromProject().push();\n }", "public synchronized void addProjectCP(File f) { projectCP.add(f); }", "public com.walgreens.rxit.ch.cda.POCDMT000040LanguageCommunication insertNewLanguageCommunication(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.POCDMT000040LanguageCommunication target = null;\n target = (com.walgreens.rxit.ch.cda.POCDMT000040LanguageCommunication)get_store().insert_element_user(LANGUAGECOMMUNICATION$26, i);\n return target;\n }\n }", "void createProjectForExercise(ProgrammingExercise programmingExercise) throws VersionControlException;", "int insert(ProjGroup record);", "public long insertRowMain(String tableName, String language1, String language2) {\n ContentValues values = new ContentValues();\n values.put(KEY_TABLE_NAME_MAIN, tableName);\n values.put(KEY_MAIN_LANGUAGE_1, language1);\n values.put(KEY_MAIN_LANGUAGE_2, language2);\n\n return db.insert(MAIN_TABLE_NAME, null, values);\n }", "private static boolean addNewProject() {\n\t\tString[] options = new String[] {\"Ongoing\",\"Finished\",\"Cancel\"};\n\t\tint choice = JOptionPane.showOptionDialog(frame, \"Select new project type\" , \"Add new Project\", \n\t\t\t\tJOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, options[2]);\n\t\t\n\t\tNewProjectDialog dialog;\n\t\t\n\t\tswitch(choice) {\n\t\tcase 0:\n\t\t\tdialog = new NewProjectDialog(\"o\");\n\t\t\tdialog.setVisible(true);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tdialog = new NewProjectDialog(\"f\");\n\t\t\tdialog.setVisible(true);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "Project createProject();", "Project createProject();", "Project createProject();", "@Override\n\tpublic Tutorial insert(Tutorial t) {\n\t\treturn cotizadorRepository.save(t);\n\n\t\t\n\t}", "LectureProject createLectureProject();", "private static void addNature(IProject project) throws CoreException {\n \tfinal String jsProjectNature = \"org.eclipse.wst.jsdt.core.jsNature\";\n \t\n if (!project.hasNature(jsProjectNature)) {\n IProjectDescription description = project.getDescription();\n String[] prevNatures = description.getNatureIds();\n String[] newNatures = new String[prevNatures.length + 1];\n System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);\n newNatures[prevNatures.length] = jsProjectNature;\n description.setNatureIds(newNatures);\n \n IProgressMonitor monitor = null;\n project.setDescription(description, monitor);\n }\n }", "public String handleAdd() \n throws HttpPresentationException, webschedulePresentationException\n { \n\t try {\n\t Project project = new Project();\n saveProject(project);\n throw new ClientPageRedirectException(PROJECT_ADMIN_PAGE);\n\t } catch(Exception ex) {\n return showAddPage(\"You must fill out all fields to add this project\");\n }\n }", "public static void addNature(IProject project) {\n\t\t// Cannot modify closed projects.\n\t\tif (!project.isOpen())\n\t\t\treturn;\n\n\t\t// Get the description.\n\t\tIProjectDescription description;\n\t\ttry {\n\t\t\tdescription = project.getDescription();\n\t\t}\n\t\tcatch (CoreException e) {\n\t\t\tPTJavaLog.logError(e);\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine if the project already has the nature.\n\t\tList<String> newIds = new ArrayList<String>();\n\t\tnewIds.addAll(Arrays.asList(description.getNatureIds()));\n\t\tint index = newIds.indexOf(NATURE_ID);\n\t\tif (index != -1)\n\t\t\treturn;\n\t\n\t\t// Add the nature\n\t\tnewIds.add(NATURE_ID);\n\t\tdescription.setNatureIds(newIds.toArray(new String[newIds.size()]));\n\t\n\t\ttry {\n\t\t\t// Save the description.\n\t\t\tproject.setDescription(description, null);\n\t\t\t\n\t\t\tif (project.hasNature(JavaCore.NATURE_ID)) {\n\t\t\t\tIJavaProject javaProject = JavaCore.create(project);\n\t\t\t\t// set up compiler to not copy .ptjava files to output\n\t\t\t\tMap options = javaProject.getOptions(false);\n\t\t\t\toptions.put(JavaCore.CORE_JAVA_BUILD_RESOURCE_COPY_FILTER,\n\t\t\t\t\t\t\"*.ptjava\");\n\t\t\t\tjavaProject.setOptions(options);\n\t\t\t} else {\n\t\t\t\tPTJavaLog.logInfo(\"The project to add ParaTask nature does not have Java nature!\");\n\t\t\t}\n\t\t}\n\t\tcatch (CoreException e) {\n\t\t\tPTJavaLog.logError(e);\n\t\t}\n\t}", "public void addProj() {\n\t\tbtnAdd.click();\n\t}", "@Override\n\tpublic void insertProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}", "public static void createListingTranslation(int listingId, String language){EtsyService.postService(\"/listings/\"+listingId+\"/translations/\"+language);}", "public int add(Project p) {\n\treturn projectmapper.add(p);\n}", "@Override\n\tpublic void insert(String descrizione) throws SQLException {\n\t\tPreparedStatement ps=conn.prepareStatement(\"INSERT INTO categoria(descrizione) VALUES (?)\");\n\t\tps.setString(1, descrizione);\n\t\tps.executeUpdate();\n\t\t\n\t}", "public static void addOntologies20070510nid3Language(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.add(model, instanceResource, ONTOLOGIES20070510NID3LANGUAGE, value);\r\n\t}", "public void setLanguage(String newLanguage) {\r\n language = newLanguage;\r\n }", "public Language saveLanguage(Language newLanguage) {\n\t\treturn languageRepository.save(newLanguage);\r\n\t}", "public Language(Integer languageId) {\r\n this.languageId = languageId;\r\n }", "private void setProject()\n\t{\n\t\tproject.setName(tf0.getValue().toString());\n \t\tproject.setDescription(tf8.getValue().toString());\n \t\tproject.setEndDate(df4.getValue());\n \t\tif (sf6.getValue().toString().equals(\"yes\"))project.setActive(true);\n \t\telse project.setActive(false);\n \t\tif (!tf7.getValue().toString().equals(\"\"))project.setBudget(Float.parseFloat(tf7.getValue().toString()));\n \t\telse project.setBudget(-1);\n \t\tproject.setNextDeadline(df5.getValue());\n \t\tproject.setStartDate(df3.getValue());\n \t\ttry \n \t\t{\n \t\t\t\tif (sf1.getValue()!=null)\n\t\t\t\tproject.setCustomerID(db.selectCustomerforName( sf1.getValue().toString()));\n\t\t}\n \t\tcatch (SQLException|java.lang.NullPointerException e) \n \t\t{\n \t\t\tErrorWindow wind = new ErrorWindow(e); \n \t UI.getCurrent().addWindow(wind);\t\t\n \t e.printStackTrace();\n\t\t\t}\n \t\tproject.setInserted_by(\"Grigoris\");\n \t\tproject.setModified_by(\"Grigoris\");\n \t\tproject.setRowversion(1);\n \t\tif (sf2.getValue()!=null)project.setProjectType(sf2.getValue().toString());\n \t\telse project.setProjectType(null);\n\t }", "public void loadProject(String projectContents, String langDefContents) {\n final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n final DocumentBuilder builder;\n final Document projectDoc;\n final Document langDoc;\n try {\n builder = factory.newDocumentBuilder();\n projectDoc = builder.parse(new InputSource(new StringReader(projectContents)));\n final Element projectRoot = projectDoc.getDocumentElement();\n langDoc = builder.parse(new InputSource(new StringReader(projectContents)));\n final Element langRoot = langDoc.getDocumentElement();\n if (workspaceLoaded) {\n resetWorkspace();\n }\n if (langDefContents == null) {\n loadBlockLanguage(langDefRoot);\n } else {\n loadBlockLanguage(langRoot);\n }\n workspace.loadWorkspaceFrom(projectRoot, langRoot);\n workspaceLoaded = true;\n\n } catch (ParserConfigurationException e) {\n throw new RuntimeException(e);\n } catch (SAXException e) {\n throw new RuntimeException(e);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public boolean addTask(Project p) {\n try {\n String update = \"INSERT INTO TASKS (PROJECT_ID,HOURS_ADDED,DESCRIPTION,HOURS) VALUES(?,?,?,?) \";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(update);\n ps.setString(1, p.getProjectId());\n ps.setString(2, p.getHoursadded());\n ps.setString(3, p.getDescription());\n ps.setString(4, p.getHours());\n\n ps.executeUpdate();\n\n ps.close();\n return true;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return false;\n }\n }", "int insert(ProjectOtherView record);", "private void newProject(ActionEvent x) {\n\t\tthis.controller.newProject();\n\t}", "@Test\n public void insertAndGetProjects() throws InterruptedException {\n insertProjects();\n\n setProjectIds(); //We set id after insertion in database not to interfere with autogenerate\n\n List<Project> expectedProjects = Arrays.asList( //We prepare id sorted expected list\n PROJECT_MAGICGITHUB,\n PROJECT_ENTREVOISINS,\n PROJECT_MAREU\n );\n\n //When : we get the list of projects\n List<Project> actualProjects = LiveDataTestUtil.getValue(projectDao.getProjects());\n\n //Then : the retrieved list contains the three projects sorted by id (insertion order)\n assertArrayEquals(expectedProjects.toArray(), actualProjects.toArray());\n }", "private void startTranslation(\n String sourceLanguageName, \n boolean isSourceExternal, \n String targetLanguageName,\n boolean isTargetExternal,\n boolean isTargetNew) \n {\n FrostResourceBundle sourceBundle;\n TranslateableFrostResourceBundle targetBundle;\n \n FrostResourceBundle rootBundle = new FrostResourceBundle(); // english fallback for source language\n \n if( isSourceExternal ) {\n // load external properties file\n sourceBundle = new FrostResourceBundle(sourceLanguageName, rootBundle, true);\n } else {\n // build in source\n sourceBundle = new FrostResourceBundle(sourceLanguageName, rootBundle, false);\n }\n \n if( isTargetExternal ) {\n // load external properties file\n targetBundle = new TranslateableFrostResourceBundle(targetLanguageName, null, true);\n } else if( isTargetNew ) {\n // start a new translation, nothing to load\n targetBundle = new TranslateableFrostResourceBundle();\n } else {\n // target is build-in, enhance existing translation\n targetBundle = new TranslateableFrostResourceBundle(targetLanguageName, null, false);\n }\n \n // TODO: run dialog with source and targetbundle, if user pressed OK save the targetbundle:\n \n targetBundle.saveBundleToFile(targetLanguageName);\n \n }", "private void insertar(String nombre, String Contra) {\n ini.Tabla.insertar(nombre, Contra);\n AVLTree arbol = new AVLTree();\n Nod nodo=null;\n ini.ListaGen.append(0,0,\"\\\\\",nombre,\"\\\\\",\"\\\\\",arbol,\"C\",nodo); \n \n }", "public static void addNature(IProject project) throws CoreException {\n if (!project.hasNature(HumanTaskNature.NATURE_ID)) {\n IProjectDescription description = project.getDescription();\n String[] prevNatures = description.getNatureIds();\n String[] newNatures = new String[prevNatures.length + 1];\n System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);\n newNatures[prevNatures.length] = HumanTaskNature.NATURE_ID;\n description.setNatureIds(newNatures);\n project.setDescription(description, null);\n }\n }", "public ContentTitle createContentTitle(String language, String value, Content content) {\n return contentTitleDAO.create(language, value, content);\n }", "public void addData(Env env, Options opt, CanalComm ag, List<PLiteral> language){\n\t\tPField p = IndepPField.createPField(env, opt, language);\n\t\tif (identifier(ag)==-1){\n\t\t\tagents.add(ag);\n\t\t\tcommLanguage.add(p);\n\t\t}\n\t\telse\n\t\t\tcommLanguage.set(identifier(ag), p);\n\t}", "int insert(Ltsprojectpo record);", "int insert(CliStaffProject record);", "@Override\n public void setLanguage(String lang) {\n }", "@Override\n\tpublic void insertProjectTeam(ProjectTeamBean projectTeamBean) {\n\t\t\n\t}", "public void newProjectAction() throws IOException {\n\t\tfinal FXMLSpringLoader loader = new FXMLSpringLoader(appContext);\n\t\tfinal Dialog<Project> dialog = loader.load(\"classpath:view/Home_NewProjectDialog.fxml\");\n\t\tdialog.initOwner(newProject.getScene().getWindow());\n\t\tfinal Optional<Project> result = dialog.showAndWait();\n\t\tif (result.isPresent()) {\n\t\t\tlogger.trace(\"dialog 'new project' result: {}\", result::get);\n\t\t\tprojectsObservable.add(result.get());\n\t\t}\n\t}", "public Language(String languageId) {\r\n\t\tthis.languageId = languageId;\r\n\t}", "@Override\n\tpublic int addProject(Project project) \n\t\t\tthrows DuplicateKeyException, Exception {\n\t\tif (project == null)\n\t\t\tthrow new Exception(\"Missing input project\");\n\t\ttry {\n\t\t\t// insert Project record\n\t\t\tint retId = addDomainObject(project);\n\t\t\tproject.setId(retId);\n\t\t\treturn retId;\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.addProject MustOverrideException: \" + e.getMessage());\n\t\t\treturn -1;\n\t\t}\n\t\tcatch (DuplicateKeyException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.addProject DuplicateKeyException: \" + e.getMessage());\n\t\t\tthrow e;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.addProject Exception: \" + e.getMessage());\n\t\t\tthrow e;\n\t\t}\n\t}", "int insertSelective(UserOperateProject record);", "@PostMapping(value = \"/project\", consumes = \"application/json\", produces = \"application/json\")\n public ResponseEntity<?> addNewProject(@Valid @RequestBody Project newProject) throws URISyntaxException\n {\n newProject.setProjectid(0);\n newProject = projectService.save(newProject);\n\n // set the location header for the newly created resource\n HttpHeaders responseHeaders = new HttpHeaders();\n URI newProjectURI = ServletUriComponentsBuilder.fromCurrentRequest()\n .path(\"/{projectid}\")\n .buildAndExpand(newProject.getProjectid())\n .toUri();\n responseHeaders.setLocation(newProjectURI);\n\n return new ResponseEntity<>(null, responseHeaders, HttpStatus.CREATED);\n }", "@Override\n\tpublic void insert(Categoria cat) throws SQLException {\n\t\t\n\t}", "public void setLanguage(Language l)\n\t{\n\t\tm_language = l;\n\t}", "@Test (groups = {\"Functional\"})\n public void testAddProject() {\n //When\n CreateProject createProject = dashboard.clickCreateProjectButton();\n String projectName = \"TestProject\";\n String testAccount = \"Account1\";\n createProject.setProjectName(projectName);\n createProject.clickPublicProjectPrivacy();\n createProject.setAccountDropDown(testAccount);\n project = createProject.clickCreateProject();\n\n //Then\n assertEquals(PROJECT_NAME, project.getTitle());\n }", "private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "private void loadProject()\n\t{\n\t\t\n\t\tint fileChooserReturnValue =\n\t\t\twindowTemplate\n\t\t\t\t.getFileChooser()\n\t\t\t\t.showOpenDialog(windowTemplate);\n\t\t\n\t\tif(fileChooserReturnValue == JFileChooser.APPROVE_OPTION) {\n\t\t\t// Delete the current cards\n\t\t\tdeleteAllCards();\n\t\t\t\n\t\t\t// Get the file that the user selected\n\t\t\tFile file = windowTemplate.getFileChooser().getSelectedFile();\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t// Open the input streams\n\t\t\t\tFileInputStream fileInput = new FileInputStream(file.getAbsolutePath());\n\t\t\t\tObjectInputStream objectInput = new ObjectInputStream(fileInput);\n\t\t\t\t\n\t\t\t\t// Get ready to save the cards\n\t\t\t\tArrayList<Card> newCards = new ArrayList<Card>();\n\t\t\t\t\n\t\t\t\t// Get the objects\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tObject inputObject = objectInput.readObject();\n\t\t\t\t\t\n\t\t\t\t\twhile(inputObject instanceof Card) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add the card\n\t\t\t\t\t\tnewCards.add((Card) inputObject);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Read the next object\n\t\t\t\t\t\tinputObject = objectInput.readObject();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} catch(EOFException e2) {\n\t\t\t\t\t\n\t\t\t\t\t// We've reached the end of the file, time to add the new project\n\t\t\t\t\taddCards(newCards);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Close the input streams\n\t\t\t\tobjectInput.close();\n\t\t\t\tfileInput.close();\n\t\t\t\t\n\t\t\t\t// Update the title of the frame to reflect the current project\n\t\t\t\twindowTemplate.setTitle(file.getName());\n\t\t\t\t\n\t\t\t} catch (ClassNotFoundException | IOException e1) {\n\t\t\t\tJOptionPane.showMessageDialog(windowTemplate, \"Could not open the file.\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void testAdd() throws TeamException, CoreException {\n IProject project = createProject(\"testAdd\", new String[] { });\n // add some resources\n buildResources(project, new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" }, false);\n // add them to CVS\n add(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE));\n add(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE));\n add(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO));\n add(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE));\n }", "public static AddProject newInstance() {\n AddProject fragment = new AddProject();\n return fragment;\n }", "public Language(String rootPath) {\n\t\tthis.rootPath = rootPath;\n\t}", "public void insert(String word) {\r\n tree.add(word);\r\n }", "public void language(String system) {\n String language=\"c语言\";\n this.output.output(system, language);\n //System.out.println(\"C语言编程!\\n\");\n }", "private void translate()\r\n\t{\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\t\r\n\t\tString language = locale.getLanguage();\r\n\t\t\r\n\t\ttranslate(language);\r\n\t}", "public void setLanguage(String language) {\r\n this.language = language;\r\n }", "void addDicItem(String language, String key, String value)\n {\n DictionaryCache.addTranslation(language, key, value);\n }", "String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;", "public void loadProject(String arg) throws IOException {\n Project newProject = Project.readProject(arg);\n newProject.setConfiguration(project.getConfiguration());\n project = newProject;\n projectLoadedFromFile = true;\n }", "private void changeLanguage(Language lang) {\n this.resources = ResourceBundle.getBundle(UIController.RESOURCE_PATH + lang);\n uiController.setLanguage(lang);\n fileLoadButton.setText(resources.getString(\"LoadSimulationXML\"));\n uiController.setTitle(resources.getString(\"Launch\"));\n }", "public void setLanguage(String language) {\n this.language = language;\n }" ]
[ "0.6055631", "0.6020853", "0.5893176", "0.5797307", "0.5721132", "0.5715215", "0.57123816", "0.5614184", "0.5608163", "0.55988646", "0.5504498", "0.5483587", "0.5479205", "0.5475768", "0.54606086", "0.5443326", "0.54367405", "0.53960544", "0.538819", "0.53308755", "0.52993923", "0.529843", "0.52834255", "0.5267567", "0.5258601", "0.5257275", "0.52373105", "0.52205014", "0.5216822", "0.52108526", "0.51937544", "0.51884824", "0.5188148", "0.5163717", "0.5122865", "0.5115855", "0.51124096", "0.51081353", "0.5091081", "0.508189", "0.50754386", "0.50429666", "0.5034907", "0.5021036", "0.5019095", "0.5007424", "0.5005938", "0.5005938", "0.5005938", "0.49982408", "0.49865198", "0.49750707", "0.49748212", "0.4972478", "0.49521402", "0.49134958", "0.491061", "0.49086806", "0.4860956", "0.48608226", "0.48540285", "0.48522878", "0.48426098", "0.48227626", "0.48223814", "0.48219094", "0.4820404", "0.4815849", "0.48106942", "0.48032066", "0.47984916", "0.47951454", "0.4791497", "0.47779095", "0.47742742", "0.47641507", "0.4761179", "0.4749927", "0.47428975", "0.47317487", "0.47217968", "0.4719819", "0.47126067", "0.46930385", "0.46895057", "0.46818483", "0.46816", "0.46706107", "0.46696967", "0.46653244", "0.46631587", "0.46568498", "0.46566555", "0.46549493", "0.46417582", "0.46400955", "0.46243438", "0.4624148", "0.46234873", "0.46189827" ]
0.54800135
12
Delete language of protocol project
public void deleteLanguage(Long idProject, Long idLanguage) { Transaction transaction = getSession().beginTransaction(); try { String hql = "delete from StudyLanguage where project.idProject= :idProject and language.idLanguage =:idLanguage"; Query query = getSession().createQuery(hql); query.setLong("idProject", idProject); query.setLong("idLanguage", idLanguage); System.out.println(query.executeUpdate()); transaction.commit(); } catch (Throwable t) { transaction.rollback(); throw t; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void delComLanguage(int id) {\n\t\t\n\t}", "public void deleteLanguages(){\n editor.remove(PRIMARY_LANGUAGE);\n editor.remove(SECONDARY_LANGUAGE);\n editor.apply();\n }", "public void removeByP_L(long groupId, java.lang.String language);", "public static void deleteListingTranslation(int listingId, String language){EtsyService.deleteService(\"/listings/\"+listingId+\"/translations/\"+language);}", "int deleteByPrimaryKey(countrylanguageKey key);", "public void removeOntologies20070510nid3Language(java.lang.String value) {\r\n\t\tBase.remove(this.model, this.getResource(), ONTOLOGIES20070510NID3LANGUAGE, value);\r\n\t}", "public void unsetLang()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(LANG$28);\n }\n }", "private void removeLangauge(String langName, String langAbbrv) {\n fileSystem.removeLanguage(langName);\n for (int i = 0; i < mFullList.size(); i++) {\n Category cat = (Category) mFullList.get(i);\n for (int j = 0; j < cat.phraseList.size(); j++) {\n Phrase p = (Phrase) cat.phraseList.get(j);\n if (p.phraseLanguages.containsKey(langName)) {\n p.phraseLanguages.remove(langName);\n if (p.phraseLanguages.size() == 0)\n fileSystem.removePhrase(p.getPhraseText(), cat.getCategoryTitle());\n }\n }\n }\n\n }", "public static void deleteExample() throws IOException {\n\n Neo4jUtil neo4jUtil = new Neo4jUtil(\"bolt://localhost:7687\", \"neo4j\", \"neo4jj\" );\n\n Langual.getAllLangualList().forEach(langual -> {\n String cmd = \"MATCH (n:Langual)-[r:lang_desc]-(b:Langdesc) where n.factorCode='\"\n + langual.getFactorCode().trim()\n + \"' delete r\";\n neo4jUtil.myNeo4j(cmd);\n System.out.println(cmd);\n });\n }", "public void unsetLanguage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(LANGUAGE$14);\n }\n }", "public void unsetLanguage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(LANGUAGE$14);\n }\n }", "public void unsetLanguage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(LANGUAGE$14);\n }\n }", "public void removeOntologies20070510nid3Language( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), ONTOLOGIES20070510NID3LANGUAGE, value);\r\n\t}", "void deleteProject(String projectKey);", "@Override\n\tpublic boolean delete(Langues obj) {\n\t\treturn false;\n\t}", "public abstract void removeUnit(LanguageUnit languageUnit);", "public void removeByA_P_L_A(java.lang.String articleId, long groupId,\n\t\tjava.lang.String language, boolean approved);", "public void removeByP_L_A(long groupId, java.lang.String language,\n\t\tboolean approved);", "public void deleteProject(Long projectId);", "@Override\n\tpublic void deleteCulture(Culture u) {\n\t\tsession.getCurrentSession().delete(u);;\n\t}", "public void removeLanguageCommunication(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(LANGUAGECOMMUNICATION$26, i);\n }\n }", "public static void removeOntologies20070510nid3Language(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.remove(model, instanceResource, ONTOLOGIES20070510NID3LANGUAGE, value);\r\n\t}", "@Override\n\tpublic void removeByG_L(long groupId, String language) {\n\t\tfor (VcmsPortion vcmsPortion : findByG_L(groupId, language,\n\t\t\t\tQueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {\n\t\t\tremove(vcmsPortion);\n\t\t}\n\t}", "public void unsetXmlLang()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(XMLLANG$26);\n }\n }", "@Override\n\tpublic Integer delProject(ProjectInfo project) {\n\t\treturn sqlSession.update(\"cn.sep.samp2.project.delProject\", project);\n\t}", "public boolean deletePalvelupisteet();", "public void removeAllOntologies20070510nid3Language() {\r\n\t\tBase.removeAll(this.model, this.getResource(), ONTOLOGIES20070510NID3LANGUAGE);\r\n\t}", "public static void removeOntologies20070510nid3Language( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(model, instanceResource, ONTOLOGIES20070510NID3LANGUAGE, value);\r\n\t}", "@Override\n\tpublic void delete(Translator entity) {\n\t\t\n\t}", "@Test\r\n\tpublic void deleteGameProgram() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: deleteGameProgram \r\n\t\tInteger game_gameId = 0;\r\n\t\tInteger related_program_programId = 0;\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tGame response = service.deleteGameProgram(game_gameId, related_program_programId);\r\n\t\t// DO: JUnit - Add assertions to test outputs of operation: deleteGameProgram\r\n\t}", "public String removeTitle(String lang) {\n/* 372 */ return removeLangAlt(lang, \"title\");\n/* */ }", "public Builder clearLanguage() {\n bitField0_ = (bitField0_ & ~0x00000001);\n language_ = getDefaultInstance().getLanguage();\n onChanged();\n return this;\n }", "public void deleteTemporaryProject() throws CoreException{\n\t\tString versionName = DataManager.getProjectVersion();\n\t\tajdtHandler.deleteProject(versionName);\n\t\t\n\t\tif(versionName.contains(\"_Old\")){\n\t\t\tversionName = versionName.replace(\"_Old\", \"\");\n\t\t\tajdtHandler.deleteProject(versionName);\n\t\t}\n\t\t\n\t}", "public Builder clearLanguage() {\n\n language_ = getDefaultInstance().getLanguage();\n onChanged();\n return this;\n }", "int deleteByExample(LtsprojectpoExample example);", "public String deleteGame(){\t\t\n\t\ttry{\n\t\t\tnew GiocoDao().deleteGame(gioco);\n\t\t\treturn \"Gioco eliminato con successo!\";\n\t\t}\n\t\tcatch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "void deleteLesson(Module module, Lesson target);", "@Override\n\tpublic void deleteProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}", "void deleteQuestion(String questionId);", "void deleteDaftarhunianDtl(DaftarhunianDtl.MyCompositePK no) {\n }", "@Override\r\n\tpublic int deleteProject(Map<String, Object> map) throws Exception {\n\t\treturn 0;\r\n\t}", "@DELETE\r\n\t@Path(\"{code}\")\r\n\t@RolesAllowed(\"user\")\r\n\t@Produces(\"application/json\")\r\n\tpublic String deleteCountry(@PathParam(\"code\") String code) {\r\n\t\tWorldService service = ServiceProvider.getWorldService();\r\n\r\n\t\tJsonObjectBuilder job = Json.createObjectBuilder();\r\n\t\tString response = \"\";\r\n\t\t\r\n\t\ttry{\r\n\t\t\tif(service.deleteCountry(code)){\r\n\t\t\t\tservice.deleteCountry(code);\r\n\t\t\t response = \"Het land met code: \"+code+\" is verwijderd!\";\r\n\t\t\t job.add(\"response\", response );\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tresponse =\"Het land dat je probeert te verwijderen bestaat niet\";\r\n\t\t\t\tjob.add(\"response\", response);\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t}\r\n\t\tcatch(Error e){\r\n\t\t\tresponse = \"Er is wat fout gegaan met het verwijderen: \"+e.toString();\r\n\t\t job.add(\"response\", response );\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\r\n\t\treturn job.build().toString();\r\n\t}", "@Test\r\n\tpublic void deleteTeamProgram() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeamProgram \r\n\t\tInteger team_teamId_3 = 0;\r\n\t\tInteger related_program_programId = 0;\r\n\t\tTeam response = null;\r\n\t\tresponse = service.deleteTeamProgram(team_teamId_3, related_program_programId);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteTeamProgram\r\n\t}", "int deleteByPrimaryKey(String licFlow);", "public void deleteForum(Forum forum);", "public void deleteAlgorithm(){\r\n \ttry {\r\n\t\t\tConnectionFactory.createConnection().deleteAlgorithm(this.getSelectedAlgorithmID());\r\n\t\t\tinitAlgorithmList(-1);\r\n\r\n\t\t} catch (DataStorageException e) {\r\n\t\t\tthis.getLog().error(e.getMessage());\r\n\t\t}\r\n }", "@Override\n\tpublic void delete(String code) {\n\n\t}", "int deleteByExample(WfCfgModuleCatalogExample example);", "@DeleteMapping(\"/analysis-templates\")\n\tpublic ResponseEntity<AjaxResponse> removeProjectAnalysisTemplates(@RequestParam long templateId,\n\t\t\t@PathVariable long projectId, Locale locale) {\n\t\treturn ResponseEntity.ok(\n\t\t\t\tnew AjaxSuccessResponse(pipelineService.removeProjectAutomatedPipeline(templateId, projectId, locale)));\n\t}", "@Override\n public void deletePartida(String idPartida) {\n template.opsForHash().delete(idPartida, \"jugador1\");\n template.opsForHash().delete(idPartida, \"jugador2\");\n template.opsForSet().remove(\"partidas\",idPartida);\n }", "@RequestMapping(value = \"/translations/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteTranslation(@PathVariable Long id) {\n log.debug(\"REST request to delete Translation : {}\", id);\n translationRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"translation\", id.toString())).build();\n }", "@RequestMapping(value = \"/delete\", method = RequestMethod.POST)\n @ResponseStatus(HttpStatus.OK)\n void deleteSong(@RequestBody Song song) {\n String message = messageSource.getMessage(\"song.delete\", null,\"locale not found\", Locale.getDefault());\n logger.info(message);\n songService.delete(song);\n }", "Result deleteApp(String app);", "@DeleteMapping(\"/localisations/{id}\")\n @Timed\n public ResponseEntity<Void> deleteLocalisation(@PathVariable Long id) {\n log.debug(\"REST request to delete Localisation : {}\", id);\n localisationService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void removeFromLab(String lid) throws SQLException {\r\n\t\t\tthis.stmt=this.conn.createStatement();\r\n\t\t\t\r\n\t\t\tString deleteQuery=\"delete from \"+Subject.LAB_INFO_TABLE_NAME+\" where \"+Subject.LAB_ID+\"='\"+lid+\"'\";\r\n\t\t\tint i=stmt.executeUpdate(deleteQuery);\r\n\t\t\t/*if(i>0)\r\n\t\t\t\tSystem.out.println(\"Removed-> \"+lid);\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"NotAvailabel-> \"+lid);*/\r\n\t\t\t\r\n\t\t\tstmt.close();\r\n\t\t}", "public void delete() {\n\t\ttry {\n\t\t\tStatement stmt = m_db.m_conn.createStatement();\n\t\t\tString sqlString;\n\t\t\tString ret;\n\n\t\t\tsqlString = \"DELETE from country WHERE countryid=\" + m_country_id;\n\t\t\tm_db.runSQL(sqlString, stmt);\n\t\t\tstmt.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\">>>>>>>> EXCEPTION <<<<<<<<\");\n\t\t\tSystem.out.println(\"An Exception occured in delete().\");\n\t\t\tSystem.out.println(\"MESSAGE: \" + e.getMessage());\n\t\t\tSystem.out.println(\"LOCALIZED MESSAGE: \" + e.getLocalizedMessage());\n\t\t\tSystem.out.println(\"CLASS.TOSTRING: \" + e.toString());\n\t\t\tSystem.out.println(\">>>>>>>>>>>>>-<<<<<<<<<<<<<\");\n\t\t}\n\t}", "public void deleteChatRoom(ChatRoom cr);", "@Override\n\tpublic void delete(Game game) {\n\t\t\n\t}", "@DeleteMapping(\"/deleteProject/{projectId}\")\r\n\tpublic void deleteProject(@PathVariable String projectId) {\r\n\r\n\t\tpersistenceService.deleteProject(projectId);\r\n\t}", "void deleteTranslatedFiles(InformationResourceFile irFile);", "@DefaultMessage(\"Pressing commit will delete the current record from the database\")\n @Key(\"gen.deleteMessage\")\n String gen_deleteMessage();", "void deleteChallenge();", "public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);", "void deleteModule(Module module);", "public void delete(RelacionConceptoEmbalajePk pk) throws RelacionConceptoEmbalajeDaoException;", "public void logoutpackged() {\n\n editor.remove(IS_LOGIN);\n editor.remove(KEY_NAME);\n editor.remove(KEY_EMAIL);\n editor.remove(KEY_ID);\n// editor.remove(KEY_IMAGEURI);\n editor.remove(PROFILE_IMG_URL);\n editor.remove(PROFILE_IMG_PATH);\n// editor.remove(KEY_LANGUAGE);\n editor.commit();\n\n /* Intent i = new Intent(context, SelectLanguage.class);\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(i);\n ((Activity) context).finish();*/\n\n }", "public String deleteCurriculum(int curriculumId);", "@DeleteMapping(\"/programmes/{id}\")\n public ResponseEntity<Void> deleteProgramme(@PathVariable Long id) {\n log.debug(\"REST request to delete Programme : {}\", id);\n programmeService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "int deleteByExample(UserOperateProjectExample example);", "void deleteAllChallenges();", "@Override\n\tpublic void deleteModule() throws Exception {\n\n\t}", "public void deletePortletCategory(PortletCategory category);", "public String deleteProductionBlock(ProductionBlock pb);", "public static void removelanguage(Context ctx) {\n\n\t\tgetSharedPreferences(ctx).edit().putString(language, null)\n\t\t\t\t.commit();\n\n\t}", "@Override\r\n\tpublic void delete(int eno) {\n\r\n\t}", "void deleteLabel(@Nonnull final Label label, @Nonnull final Telegraf telegraf);", "void deleteCenterProgram(String centerProgramId);", "int deleteByExample(CliStaffProjectExample example);", "public void resetLanguage() {\n BlockConnectorShape.resetConnectorShapeMappings();\n getWorkspace().getEnv().resetAllGenuses();\n BlockLinkChecker.reset();\n }", "@Override\n\tpublic int delete(Uri uri, String selection, String[] selectionArgs) {\n\t\tint cnt = 1;\n\t\tmChallengesDB.del();\n\t\treturn cnt;\n\t}", "public void deleteCategorie(Categorie c);", "int deleteByExample(SysTeamExample example);", "void deleteLabel(@Nonnull final String labelID, @Nonnull final String telegrafID);", "void deleteByProjectId(Long projectId);", "public void deleteFile() {\n\t\tif (JOptionPane.showConfirmDialog(desktopPane,\n\t\t\t\t\"Are you sure? this action is permanent!\") != JOptionPane.YES_OPTION)\n\t\t\treturn;\n\n\t\tEllowFile file = null;\n\t\tTreePath paths[] = getSelectionModel().getSelectionPaths();\n\t\tif (paths == null)\n\t\t\treturn;\n\t\tfor (TreePath path : paths) {\n\t\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) path\n\t\t\t\t\t.getLastPathComponent();\n\t\t\tfile = (EllowFile) node.getUserObject();\n\t\t\tEllowynProject project = file.parentProject;\n\t\t\tfile.deleteAll();\n\t\t\tif (!file.isProjectFile && project != null)\n\t\t\t\tproject.rebuild(); // don't rebuild the project if the project\n\t\t\t\t\t\t\t\t\t// itself is deleted\n\t\t\tdesktopPane.closeFrames(file);\n\t\t\tmodel.removeNodeFromParent(node);\n\t\t}\n\t}", "@DELETE(\"pushrules/global/{kind}/{ruleId}\")\n Call<Void> deleteRule(@Path(\"kind\") String kind, @Path(\"ruleId\") String ruleId);", "public void delete(String namespace, String id, long version) throws StageException;", "void deleteExam(Module module, Exam target);", "@Override\n\tpublic void deleteConseille(Conseille c) {\n\t\t\n\t}", "private void deleteCourse() {\n // Only perform the delete if this is an existing pet.\n if (mCurrentCourseUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPetUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentCourseUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_course_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_course_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "@Transactional\r\n\tpublic void delete(final String pk) {\r\n\t\tdao.delete(CmVocabularyCategory.class, pk);\r\n\t}", "private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}", "void deleteMataKuliah (int id);", "public String deleteMessage(Integer id ){\n repo.deleteById(id);\n return \"Mensaje Eliminado\" + id;\n }", "public void deleteSelectedWord()\r\n {\n ArrayList al = crossword.getWords();\r\n al.remove(selectedWord);\r\n repopulateWords();\r\n }", "public void deleteLUC() {\r\n/* 135 */ this._has_LUC = false;\r\n/* */ }", "@Path (\"project/{repositoryId}/{groupId}/{projectId}\")\n @DELETE\n @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })\n @RedbackAuthorization (noPermission = true)\n ActionStatus deleteProject( @PathParam (\"groupId\") String groupId, @PathParam (\"projectId\") String projectId,\n @PathParam (\"repositoryId\") String repositoryId )\n throws ArchivaRestServiceException;", "int deleteByExample(Lbm83ChohyokanriPkeyExample example);", "Language create(Language language);", "public String handleDelete()\n throws HttpPresentationException, webschedulePresentationException\n {\n String projectID = this.getComms().request.getParameter(PROJ_ID);\n System.out.println(\" trying to delete a project \"+ projectID);\n \n\t try {\n\t Project project = ProjectFactory.findProjectByID(projectID);\n String title = project.getProj_name();\n project.delete();\n this.getSessionData().setUserMessage(\"The project, \" + title +\n \", was deleted\");\n // Catch any possible database exception as well as the null pointer\n // exception if the project is not found and is null after findProjectByID\n\t } catch(Exception ex) {\n this.getSessionData().setUserMessage(projectID + \" Please choose a valid project to delete\");\n }\n // Redirect to the catalog page which will display the error message,\n // if there was one set by the above exception\n throw new ClientPageRedirectException(PROJECT_ADMIN_PAGE);\n }" ]
[ "0.7418321", "0.7107073", "0.69168735", "0.6495546", "0.63196725", "0.62883145", "0.6261701", "0.62572086", "0.62494797", "0.6089374", "0.6089374", "0.6089374", "0.60430455", "0.5910719", "0.5910451", "0.59023607", "0.59021986", "0.5889167", "0.58265394", "0.5791727", "0.5778803", "0.57498085", "0.562653", "0.56225675", "0.5600839", "0.5537217", "0.5531738", "0.55294204", "0.552046", "0.5507295", "0.54948014", "0.54151344", "0.5399336", "0.5387544", "0.5375047", "0.5340252", "0.533671", "0.53173846", "0.5306899", "0.52955985", "0.5293978", "0.5277518", "0.5274176", "0.5256298", "0.52535903", "0.52385294", "0.52373827", "0.52307624", "0.522977", "0.5216107", "0.5202684", "0.5194807", "0.51675117", "0.5161477", "0.515905", "0.5139675", "0.51378244", "0.5135475", "0.51339126", "0.5127774", "0.51252866", "0.51200664", "0.5103508", "0.51003295", "0.5092718", "0.50810087", "0.50777775", "0.50756663", "0.5065479", "0.5064158", "0.5063381", "0.5062271", "0.5061653", "0.5055507", "0.50510967", "0.50415146", "0.5037527", "0.5032831", "0.50324935", "0.50300914", "0.5029478", "0.5027878", "0.5020327", "0.50172347", "0.50160754", "0.5015797", "0.50130814", "0.50058603", "0.5005699", "0.49900135", "0.49835148", "0.49822694", "0.49786574", "0.4975846", "0.4968979", "0.4966903", "0.49652532", "0.49553806", "0.49518707", "0.4946798" ]
0.67927176
3
The Factory for the model. It provides a create method for each nonabstract class of the model.
public interface ExpressionsFactory extends EFactory { /** * The singleton instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ ExpressionsFactory eINSTANCE = org.eclipse.ocl.expressions.impl.ExpressionsFactoryImpl.init(); /** * Returns a new object of class '<em>Association Class Call Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Association Class Call Exp</em>'. * @generated */ <C, P> AssociationClassCallExp<C, P> createAssociationClassCallExp(); /** * Returns a new object of class '<em>Boolean Literal Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Boolean Literal Exp</em>'. * @generated */ <C> BooleanLiteralExp<C> createBooleanLiteralExp(); /** * Returns a new object of class '<em>Collection Item</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Collection Item</em>'. * @generated */ <C> CollectionItem<C> createCollectionItem(); /** * Returns a new object of class '<em>Collection Literal Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Collection Literal Exp</em>'. * @generated */ <C> CollectionLiteralExp<C> createCollectionLiteralExp(); /** * Returns a new object of class '<em>Collection Range</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Collection Range</em>'. * @generated */ <C> CollectionRange<C> createCollectionRange(); /** * Returns a new object of class '<em>Enum Literal Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Enum Literal Exp</em>'. * @generated */ <C, EL> EnumLiteralExp<C, EL> createEnumLiteralExp(); /** * Returns a new object of class '<em>If Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>If Exp</em>'. * @generated */ <C> IfExp<C> createIfExp(); /** * Returns a new object of class '<em>Integer Literal Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Integer Literal Exp</em>'. * @generated */ <C> IntegerLiteralExp<C> createIntegerLiteralExp(); /** * Returns a new object of class '<em>Unlimited Natural Literal Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Unlimited Natural Literal Exp</em>'. * @generated */ <C> UnlimitedNaturalLiteralExp<C> createUnlimitedNaturalLiteralExp(); /** * Returns a new object of class '<em>Invalid Literal Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Invalid Literal Exp</em>'. * @generated */ <C> InvalidLiteralExp<C> createInvalidLiteralExp(); /** * Returns a new object of class '<em>Iterate Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Iterate Exp</em>'. * @generated */ <C, PM> IterateExp<C, PM> createIterateExp(); /** * Returns a new object of class '<em>Iterator Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Iterator Exp</em>'. * @generated */ <C, PM> IteratorExp<C, PM> createIteratorExp(); /** * Returns a new object of class '<em>Let Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Let Exp</em>'. * @generated */ <C, PM> LetExp<C, PM> createLetExp(); /** * Returns a new object of class '<em>Message Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Message Exp</em>'. * @generated */ <C, COA, SSA> MessageExp<C, COA, SSA> createMessageExp(); /** * Returns a new object of class '<em>Null Literal Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Null Literal Exp</em>'. * @generated */ <C> NullLiteralExp<C> createNullLiteralExp(); /** * Returns a new object of class '<em>Operation Call Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Operation Call Exp</em>'. * @generated */ <C, O> OperationCallExp<C, O> createOperationCallExp(); /** * Returns a new object of class '<em>Property Call Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Property Call Exp</em>'. * @generated */ <C, P> PropertyCallExp<C, P> createPropertyCallExp(); /** * Returns a new object of class '<em>Real Literal Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Real Literal Exp</em>'. * @generated */ <C> RealLiteralExp<C> createRealLiteralExp(); /** * Returns a new object of class '<em>State Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>State Exp</em>'. * @generated */ <C, S> StateExp<C, S> createStateExp(); /** * Returns a new object of class '<em>String Literal Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>String Literal Exp</em>'. * @generated */ <C> StringLiteralExp<C> createStringLiteralExp(); /** * Returns a new object of class '<em>Tuple Literal Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Tuple Literal Exp</em>'. * @generated */ <C, P> TupleLiteralExp<C, P> createTupleLiteralExp(); /** * Returns a new object of class '<em>Tuple Literal Part</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Tuple Literal Part</em>'. * @generated */ <C, P> TupleLiteralPart<C, P> createTupleLiteralPart(); /** * Returns a new object of class '<em>Type Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Type Exp</em>'. * @generated */ <C> TypeExp<C> createTypeExp(); /** * Returns a new object of class '<em>Unspecified Value Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Unspecified Value Exp</em>'. * @generated */ <C> UnspecifiedValueExp<C> createUnspecifiedValueExp(); /** * Returns a new object of class '<em>Variable</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Variable</em>'. * @generated */ <C, PM> Variable<C, PM> createVariable(); /** * Returns a new object of class '<em>Variable Exp</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Variable Exp</em>'. * @generated */ <C, PM> VariableExp<C, PM> createVariableExp(); /** * Returns the package supported by this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the package supported by this factory. * @generated */ ExpressionsPackage getExpressionsPackage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "TestModelFactory getTestModelFactory();", "public UsermodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public SqliteModelFactoryImpl()\n {\n super();\n }", "public PetrinetmodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "ModelsFactory getModelsFactory();", "public ParsedmodelFactoryImpl() {\n\t\tsuper();\n\t}", "protected abstract IModel<T> createModel(T object);", "public interface ConfigModelFactory\n{\n\t/**\n\t * Create an instance of the <code>ConfigModel</code>\n\t *\n\t * @return an instance of the configuration model\n\t */\n\tConfigModel createInstanceOfConfigModel();\n\n\t/**\n\t * Create an instance of the <code>InstanceModel</code>\n\t *\n\t * @return an instance of the instance model\n\t */\n\tInstanceModel createInstanceOfInstanceModel();\n\n\t/**\n\t * Create an instance of the <code>CsticModel</code>\n\t *\n\t * @return an instance of the characteristic model\n\t */\n\tCsticModel createInstanceOfCsticModel();\n\n\t/**\n\t * Create an instance of the <code>CsticValueModel</code>\n\t *\n\t * @param valueType\n\t * The containing Cstic value type\n\t * @return an instance of the characteristic value model\n\t */\n\tCsticValueModel createInstanceOfCsticValueModel(int valueType);\n\n\t/**\n\t * Create an instance of the <code>CsticGroupModel</code>\n\t *\n\t * @return an instance of the characteristic group model\n\t */\n\tCsticGroupModel createInstanceOfCsticGroupModel();\n\n\n\t/**\n\t * Create an instance of the <code>PriceModel</code>\n\t *\n\t * @return an instance of the price model\n\t */\n\tPriceModel createInstanceOfPriceModel();\n\n\t/**\n\t * Create an instance of the <code>SolvableConflictModel</code>\n\t *\n\t * @return an instance of the Solvable Conflict Model\n\t */\n\tSolvableConflictModel createInstanceOfSolvableConflictModel();\n\n\t/**\n\t * Create an instance of the <code>ConflictingAssumptionModel</code>\n\t *\n\t * @return an instance of the Conflicting Assumption Model\n\t */\n\tConflictingAssumptionModel createInstanceOfConflictingAssumptionModel();\n\n\t/**\n\t * Create an instance of the <code>PriceModel</code>\n\t *\n\t * @return an instance of the price model\n\t */\n\tPriceModel getZeroPriceModel();\n\n\t/**\n\t * Create an instance of the <code>PriceSummaryModel</code>\n\t *\n\t * @return an instance of the price summary model\n\t */\n\tPriceSummaryModel createInstanceOfPriceSummaryModel();\n\n\t/**\n\t * @return a builder to construct {@link ProductConfigMessage} objects\n\t */\n\tdefault ProductConfigMessageBuilder createProductConfigMessageBuilder()\n\t{\n\t\treturn new ProductConfigMessageBuilder();\n\t}\n\n\t/**\n\t * Create an instance of the <code>ProductConfigMessage</code><br>\n\t * uses the <code>DEFAULT</code> ProductConfigMessageSourceSubType\n\t *\n\t * @param message\n\t * localized message\n\t * @param key\n\t * message key, should be unique together with message source\n\t * @param severity\n\t * message severity\n\t * @param source\n\t * message source, should be unique together with message key\n\t * @return a message instance\n\t * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead\n\t */\n\t@Deprecated(since = \"1808\", forRemoval=true)\n\tdefault ProductConfigMessage createInstanceOfProductConfigMessage(final String message, final String key,\n\t\t\tfinal ProductConfigMessageSeverity severity, final ProductConfigMessageSource source)\n\t{\n\t\treturn createInstanceOfProductConfigMessage(message, key, severity, source, ProductConfigMessageSourceSubType.DEFAULT);\n\t}\n\n\t/**\n\t * Create an instance of the <code>ProductConfigMessage</code><br>\n\t *\n\t * @param message\n\t * localized message\n\t * @param key\n\t * message key, should be unique together with message source\n\t * @param severity\n\t * message severity\n\t * @param source\n\t * message source, should be unique together with message key\n\t * @param subType\n\t * optional sub type of the message source\n\t * @return a message instance\n\t * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead\n\t */\n\t@Deprecated(since = \"1808\", forRemoval=true)\n\tProductConfigMessage createInstanceOfProductConfigMessage(String message, String key, ProductConfigMessageSeverity severity,\n\t\t\tProductConfigMessageSource source, ProductConfigMessageSourceSubType subType);\n\n\n\t/**\n\t * Create an instance of the <code>VariantConditionModel</code>\n\t *\n\t * @return an instance of the variant condition model\n\t */\n\tVariantConditionModel createInstanceOfVariantConditionModel();\n\n\t/**\n\t * @return class name of the {@link PriceSummaryModel} implementation\n\t */\n\tString getTargetClassNamePriceSummaryModel();\n\n\n\t/**\n\t * @return class name of the {@link PriceModel} implementation\n\t */\n\tString getTargetClassNamePriceModel();\n\n\t/**\n\t * @return class name of the {@link CsticGroupModel} implementation\n\t */\n\tString getTargetClassNameCsticGroupModel();\n\n\t/**\n\t * @return class name of the {@link CsticValueModel} implementation\n\t */\n\tString getTargetClassNameCsticValueModel();\n\n\t/**\n\t * @return class name of the {@link CsticModel} implementation\n\t */\n\tString getTargetClassNameCsticModel();\n\n\t/**\n\t * @return class name of the {@link InstanceModel} implementation\n\t */\n\tString getTargetClassNameInstanceModel();\n\n\t/**\n\t * @return class name of the {@link ConfigModel} implementation\n\t */\n\tString getTargetClassNameConfigModel();\n\n\t/**\n\t * @return class name of the {@link SolvableConflictModel} implementation\n\t */\n\tString getTargetClassNameSolvableConflictModel();\n\n\t/**\n\t * @return class name of the {@link ConflictingAssumptionModel} implementation\n\t */\n\tString getTargetClassNameConflictingAssumptionModel();\n\n\t/**\n\t * @return class name of the {@link VariantConditionModel} implementation\n\t */\n\tString getTargetClassNameVariantConditionModel();\n}", "@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}", "public Factory() {\n\t\tsuper();\n\t}", "public interface ModelFactory <ModelObject> {\n public void createElement(ModelObject object);\n}", "EisModel createEisModel();", "BehaviouralModelFactory getBehaviouralModelFactory();", "CsticModel createInstanceOfCsticModel();", "public abstract void create();", "InstanceModel createInstanceOfInstanceModel();", "public M create(P model);", "void create(Model model) throws Exception;", "public void create(){}", "public static MusicModel createModel() {\n return new MusicModelImpl();\n }", "public interface AbstractFactory {\n /**\n * Create cpu cpu.\n *\n * @return the cpu\n */\n Cpu createCpu();\n\n /**\n * Create main board main board.\n *\n * @return the main board\n */\n MainBoard createMainBoard();\n}", "public Model createBaseModel() {\n return ModelFactory.createDefaultModel();\n }", "public interface AbstractFactory<T> {\n /**\n * Create a new Object of type T\n * @return the created object\n */\n T create();\n}", "private ConcreteFactory() {}", "DataModel createDataModel();", "public Factory() {\n\t\tclassMap = new TreeMap<String,Class<T> >();\n\t}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public interface Factory<T> {\n T create();\n}", "T create();", "T create();", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "public static SqliteModelFactory init()\n {\n try\n {\n SqliteModelFactory theSqliteModelFactory = (SqliteModelFactory)EPackage.Registry.INSTANCE.getEFactory(SqliteModelPackage.eNS_URI);\n if (theSqliteModelFactory != null)\n {\n return theSqliteModelFactory;\n }\n }\n catch (Exception exception)\n {\n EcorePlugin.INSTANCE.log(exception);\n }\n return new SqliteModelFactoryImpl();\n }", "interface Factory {\r\n /**\r\n * Create an instance of an agenda view model with the given saved\r\n * instance state.\r\n *\r\n * @param savedInstanceState previously saved state of the view model\r\n * @return the created agenda view model\r\n */\r\n AgendaViewModel create(Bundle savedInstanceState);\r\n }", "private EntityFactory() {}", "Klassenstufe createKlassenstufe();", "public interface Factory {\n Product create();\n}", "public <T> T createModel(Class<T> clazz) throws CreateModelException {\n return createModel(clazz, true);\n }", "@Override\n\tpublic void create() {\n\n\t}", "public abstract void create(T t);", "For createFor();", "CreateEventViewModelFactory() {\n super(Storage.class, Authenticator.class);\n }", "public static Factory factory() {\n return ext_dbf::new;\n }", "public interface Factory {\r\n}", "PriceModel createInstanceOfPriceModel();", "ZenModel createZenModel();", "public ObjectifyFactory factory() {\n return ofy().factory();\n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "public interface Creator<T> {\n\t\tpublic T create() throws APIException;\n\n\t\tpublic void destroy(T t);\n\n\t\tpublic boolean isValid(T t);\n\n\t\tpublic void reuse(T t);\n\t}", "public EntityFactoryImpl() {\n\t\tsuper();\n\t}", "DomainModel createDomainModel();", "@Override\n\tpublic void create () {\n\n\t}", "public interface Factory {\n LeiFeng createLeiFeng();\n}", "public void create() {\n\t\t\n\t}", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static PetrinetmodelFactory init() {\r\n\t\ttry {\r\n\t\t\tPetrinetmodelFactory thePetrinetmodelFactory = (PetrinetmodelFactory)EPackage.Registry.INSTANCE.getEFactory(PetrinetmodelPackage.eNS_URI);\r\n\t\t\tif (thePetrinetmodelFactory != null) {\r\n\t\t\t\treturn thePetrinetmodelFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new PetrinetmodelFactoryImpl();\r\n\t}", "protected abstract ENTITY createEntity();", "public static UsermodelFactory init() {\r\n\t\ttry {\r\n\t\t\tUsermodelFactory theUsermodelFactory = (UsermodelFactory)EPackage.Registry.INSTANCE.getEFactory(UsermodelPackage.eNS_URI);\r\n\t\t\tif (theUsermodelFactory != null) {\r\n\t\t\t\treturn theUsermodelFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new UsermodelFactoryImpl();\r\n\t}", "ConfigModel createInstanceOfConfigModel();", "public abstract T create(T obj);", "public static Factory factory() {\n return ext_h::new;\n }", "public interface DebuggerModelFactory\n\t\textends ExtensionPoint, ConfigurableFactory<DebuggerObjectModel> {\n\n\t/**\n\t * Get the priority for selecting this factory by default for the given program\n\t * \n\t * <p>\n\t * A default factory is selected when the current factory and the last successful factory are\n\t * incompatible with the current program, or if this is the very first time connecting. Of those\n\t * factories compatible with the current program, the one with the highest priority (larger\n\t * numerical value) is selected. If none are compatible, then the current selection is left as\n\t * is.\n\t * \n\t * <p>\n\t * Note that negative priorities imply the factory is not compatible with the given program or\n\t * local system.\n\t * \n\t * @param program the current program, or null\n\t * @return the priority, higher values mean higher priority\n\t */\n\tdefault int getPriority(Program program) {\n\t\treturn 0;\n\t}\n\n\t/**\n\t * Check if this factory is compatible with the local system and given program.\n\t * \n\t * <p>\n\t * <b>WARNING:</b> Implementations should not likely override this method. If one does, it must\n\t * behave in the same manner as given in this default implementation: If\n\t * {@link #getPriority(Program)} would return a non-negative result for the program, then this\n\t * factory is compatible with that program. If negative, this factory is not compatible.\n\t * \n\t * @param program the current program, or null\n\t * @return true if compatible\n\t */\n\tdefault boolean isCompatible(Program program) {\n\t\treturn getPriority(program) >= 0;\n\t}\n}", "public Model doCreateModel() {\n Model m = m_baseModelName == null ? maker.createFreshModel() : maker.createModel( m_baseModelName );\n return new OntModelImpl( this, m );\n }", "public interface IFactory {\n IUser createUser();\n IDepartment createDepartment();\n}", "public static ParsedmodelFactory init() {\n\t\ttry {\n\t\t\tParsedmodelFactory theParsedmodelFactory = (ParsedmodelFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://parsedmetadata/1.0\"); \n\t\t\tif (theParsedmodelFactory != null) {\n\t\t\t\treturn theParsedmodelFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ParsedmodelFactoryImpl();\n\t}", "public interface SerializerFactory<T> {\n\t\n\t/** the method creates a new MessageSerializer.\n\t * \n\t * @return new object that implements the MessageSerializer interface. \n\t */\n MessageSerializer<T> create();\n}", "public PiviFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "Factory<? extends T> buildPersonFactory(String type);", "public PedidoFactoryImpl() {\n\t\tsuper();\n\t}", "public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public interface Creator {\n public abstract Item factoryMethod();\n public abstract Item factoryMethod(String name);\n public abstract Item factoryMethod(String name, List<Flower> flowerList);\n}", "public abstract ProductFactory getFactory();", "public Model() {\n\t}", "public Model() {\n\t}", "public LanterneFactoryImpl() {\n\t\tsuper();\n\t}", "public interface Factory {\n Animal createAnimal();\n}", "public interface AbstractFactory {\n Bmw produceBmw();\n Benz produceBenz();\n}", "public MystFactoryImpl()\r\n {\r\n super();\r\n }", "public PertFactory() {\n for (Object[] o : classTagArray) {\n addStorableClass((String) o[1], (Class) o[0]);\n }\n }", "public interface IFactory<T extends MaterialCastingRecipe> {\n T create(ResourceLocation id, String group, @Nullable Ingredient cast, int itemCost, IMaterialItem result,\n boolean consumed, boolean switchSlots);\n }", "private VegetableFactory() {\n }", "protected MoneyFactory() {\n\t}", "public EnotationFactoryImpl() {\n\t\tsuper();\n\t}", "public Model() {\n this(DSL.name(\"model\"), null);\n }", "public EcoreFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public TypeAdapterFactory() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = TypePackage.eINSTANCE;\n\t\t}\n\t}", "interface Create {}", "public GameDomainFactory() {\r\n\t\t\r\n\t\tCreateGameDomain = new HashMap<String, GameDomainFactory.gameDomainCreator>();\r\n\t\tCreateGameDomain.put(\"TicTacToe\" , new ticTacToeCreator());\r\n\t\tCreateGameDomain.put(\"Reversi\", new CreatorReversi());\r\n\t}", "public abstract <T> T create(Object object, Class<T> clazz);", "public EcoreFactoryImpl() {\n super();\n }", "public static Factory factory() {\n return text::new;\n }", "public FvFactoryImpl() {\n\t\tsuper();\n\t}", "public abstract Product productFactory(String type);" ]
[ "0.71565163", "0.71565163", "0.71565163", "0.71565163", "0.71565163", "0.71565163", "0.71565163", "0.70742077", "0.7051943", "0.6983852", "0.69748455", "0.6965496", "0.69568366", "0.69481784", "0.6860293", "0.6811446", "0.6807123", "0.6756206", "0.6694741", "0.6656823", "0.6654312", "0.6640736", "0.6595195", "0.6580549", "0.65715563", "0.6555794", "0.6534009", "0.648342", "0.64748156", "0.6450784", "0.6445946", "0.64300567", "0.6421489", "0.64043415", "0.6400982", "0.63907266", "0.63907266", "0.6368747", "0.6349325", "0.63468486", "0.6345672", "0.63069546", "0.6302681", "0.6292132", "0.6289528", "0.6275873", "0.6264616", "0.6250081", "0.623463", "0.62291795", "0.62248415", "0.6222761", "0.6219561", "0.62143695", "0.62126905", "0.62034976", "0.61920136", "0.61674654", "0.61650974", "0.6154887", "0.61427796", "0.61426824", "0.6140671", "0.61348015", "0.6117416", "0.6079516", "0.6065549", "0.60619617", "0.60616994", "0.6044366", "0.60355604", "0.60280776", "0.6026859", "0.6021375", "0.60200113", "0.60140157", "0.60013527", "0.5987638", "0.5981197", "0.59794974", "0.59472996", "0.59472996", "0.59399843", "0.5938128", "0.59361154", "0.59327817", "0.59254813", "0.59222776", "0.5919654", "0.59025806", "0.5900669", "0.5895235", "0.5894421", "0.5892311", "0.5877348", "0.58726925", "0.5863833", "0.58636236", "0.5861607", "0.585989", "0.58558" ]
0.0
-1
Returns a new object of class 'Association Class Call Exp'.
<C, P> AssociationClassCallExp<C, P> createAssociationClassCallExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public Assoc getAssoc();", "public void testCtor() throws Exception {\n PasteAssociationAction pasteAction = new PasteAssociationAction(transferable, namespace);\n\n assertEquals(\"Should return Association instance.\", association, pasteAction.getModelElement());\n }", "OperationCallExp createOperationCallExp();", "private Association parseAssociation(Record record) {\n return new Association(record.value(CommonTerms.associationIDTerm),\n record.value(DwcTerm.occurrenceID),\n record.value(TermFactory.instance().findTerm(TermURIs.associationType)),\n record.value(TermFactory.instance().findTerm(TermURIs.targetOccurrenceID)),\n record.value(DwcTerm.measurementDeterminedDate), record.value(DwcTerm.measurementDeterminedBy),\n record.value(DwcTerm.measurementMethod), record.value(DwcTerm.measurementRemarks),\n record.value(CommonTerms.sourceTerm), record.value(CommonTerms.bibliographicCitationTerm),\n record.value(CommonTerms.contributorTerm), record.value(CommonTerms.referenceIDTerm));\n }", "ActivationExpression createActivationExpression();", "public static NewExpression new_(Class type) { throw Extensions.todo(); }", "public Association association(ComplexEObject ceo)\n {\n if (_inverseFieldName == null)\n {\n return new Association(this, ceo);\n }\n else\n {\n return new Association(this, ceo, inverseField());\n }\n }", "ClassInstanceCreationExpression getClass_();", "NewAnonymousClassExpression(AST ast) {\r\n\t\tsuper(ast);\r\n\t}", "EReference createEReference();", "public PgOpclassRecord() {\n\t\tsuper(test.generated.pg_catalog.tables.PgOpclass.PG_OPCLASS);\n\t}", "public AssociationClass(UmlClass lc, Relationship r) {\n\t // Initialize the values\n id = lc.getId();\n logicalClass = lc;\n relationship = r;\n\t}", "TypeAssociation getAssocieCommeObjetAction();", "<C, O> OperationCallExp<C, O> createOperationCallExp();", "public CianetoClass() {\r\n this.cianetoMethods = new Hashtable<String, Object>();\r\n this.cianetoAttributes = new Hashtable<String, Object>();\r\n }", "PropertyCallExp createPropertyCallExp();", "TypeAssociation getAssocieCommeSujetInstanceObjet();", "Oracion createOracion();", "public a mo8520o() {\n return new a();\n }", "Assignment createAssignment();", "Assignment createAssignment();", "Exploitation createExploitation();", "public Clade() {}", "@Test\n public void testAddAss() {\n ArrayList<Association<String, String>> arrayAs = new ArrayList<>();\n String in=\"cat\";\n String es=\"gato\";\n Association h=new Association (in, es);\n arrayAs.add(h);\n in=\"ballon\";\n es=\"globo\";\n Association k=new Association (in, es);\n arrayAs.add(k);\n Diccionario instance = new Diccionario(arrayAs);\n }", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions, Iterable<Member> members) { throw Extensions.todo(); }", "DescribedClass createDescribedClass();", "<C, P> PropertyCallExp<C, P> createPropertyCallExp();", "public static ObjectInstance getMultiplyToAddOperationCallObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"sourceEndpoint\", StringMangler\n .EncodeForJmx(getMultiplyEndpointMBean().getUrl()));\n properties.put(\"sourceOperation\", getMultiplyOperationMBean()\n .getName());\n properties.put(\"targetEndpoint\", StringMangler\n .EncodeForJmx(getAddEndpointMBean().getUrl()));\n properties.put(\"targetOperation\", getAddOperationMBean().getName());\n properties.put(\"jmxType\", new OperationCall().getJmxType());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'Divide-Subtract' OperationCall ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new OperationCall().getClass().getName());\n }", "public Object ae() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }", "private synchronized Association buildAssociationObject(ResultSet results) {\n\n Association assoc = null;\n String assocHandle = null;\n\n try {\n\n assocHandle = results.getString(1);\n String assocType = results.getString(2);\n java.util.Date expireIn = new java.util.Date(results.getTimestamp(3).getTime());\n String macKey = results.getString(4);\n String assocStore = results.getString(5);\n\n // we check if params are missing\n if (assocHandle == null || assocType == null || expireIn == null || macKey == null || assocStore == null) {\n log.error(\"Required data missing. Cannot build the Association object\");\n return null;\n }\n\n // Here we check if we are loading the correct associations\n if (associationStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_PRIVATE) &&\n assocStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_SHARED)) {\n log.error(\n \"Invalid association data found. Tried to load a Private Association but found a Shared Association\");\n return null;\n } else if (associationStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_SHARED) &&\n assocStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_PRIVATE)) {\n log.error(\n \"Invalid association data found. Tried to load a Shared Association but found a Private Association\");\n return null;\n }\n\n // Checks for association handle\n if (Association.TYPE_HMAC_SHA1.equals(assocType)) {\n assoc = Association.createHmacSha1(assocHandle, Base64.decode(macKey), expireIn);\n\n } else if (Association.TYPE_HMAC_SHA256.equals(assocType)) {\n assoc = Association.createHmacSha256(assocHandle, Base64.decode(macKey), expireIn);\n\n } else {\n log.error(\"Invalid association type \" + assocType + \" loaded from database\");\n return null;\n }\n\n } catch (SQLException e) {\n log.error(\"Failed to build the Association for \" + assocHandle + \". Error while accessing the database.\",\n e);\n } finally {\n IdentityDatabaseUtil.closeResultSet(results);\n }\n\n log.debug(\"Association \" + assocHandle + \" loaded successfully from the database.\");\n return assoc;\n }", "public CMObject newInstance();", "@SuppressWarnings( \"unchecked\" )\n public static <T> AssociationFunction<T> association( Association<T> association )\n {\n return ( (AssociationReferenceHandler<T>) Proxy.getInvocationHandler( association ) ).association();\n }", "public PayActinfoExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "A createA();", "public static Criteria newAndCreateCriteria() {\n YoungSeckillPromotionProductRelationExample example = new YoungSeckillPromotionProductRelationExample();\n return example.createCriteria();\n }", "public tudresden.ocl20.core.jmi.uml15.core.Association getAssociation()\n {\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n \tif (instance != null && \n \t\tinstance.isRepresentative(this.refMofId())&&\n \t\tinstance.hasRefObject(this.refMofId()))\n \t{ \t\t\n \t\treturn instance.getAssociation(this.refMofId());\n \t} \n \t\n\t\treturn super_getAssociation();\t\n }", "Object getClass_();", "Object getClass_();", "public DetachedCriteriaX createCriteria(String associationPath) {\r\n return(\r\n new DetachedCriteriaX(\r\n this.getImpl(),\r\n this.getCriteria().createCriteria(associationPath)\r\n )\r\n );\r\n }", "private static SerAcqImplEvaluation getSerAcqImplEvalObject(\n\t\t\tdouble noOfActSerAcquisition, double noOfActSerAcqWithSecSpec) {\n\t\tSerAcqImplEvaluation serAcqImplEvaluation = new SerAcqImplEvaluation(\n\t\t\t\tnoOfActSerAcquisition, noOfActSerAcqWithSecSpec);\n\n\t\treturn serAcqImplEvaluation;\n\t}", "protected a bi() {\n return new a(this);\n }", "EClass createEClass();", "JDefinedClass objectFactory();", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions) { throw Extensions.todo(); }", "protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }", "Assign createAssign();", "public static void main(String[] args) \r\n\t{\nBAssociation b= new BAssociation();\r\nb.a= new Aassociation();\r\nb.a.areaofRectangle(5, 6);\r\n\t\t\r\n\t}", "private static Occupation m147578a(Parcel parcel) {\n return new Occupation(parcel);\n }", "public Investigator() {}", "Reproducible newInstance();", "private static abstract class <init> extends com.google.android.gms.games.hodImpl\n{\n\n public com.google.android.gms.games.quest.Result zzau(Status status)\n {\n return new com.google.android.gms.games.quest.Quests.ClaimMilestoneResult(status) {\n\n final Status zzQs;\n final QuestsImpl.ClaimImpl zzavH;\n\n public Milestone getMilestone()\n {\n return null;\n }\n\n public Quest getQuest()\n {\n return null;\n }\n\n public Status getStatus()\n {\n return zzQs;\n }\n\n \n {\n zzavH = QuestsImpl.ClaimImpl.this;\n zzQs = status;\n super();\n }\n };\n }", "public static IPCGCallDetailCreator instance()\r\n {\r\n if (instance == null)\r\n {\r\n instance = new IPCGCallDetailCreator();\r\n }\r\n return instance;\r\n }", "ConjuntoTDA claves();", "public static Criteria newAndCreateCriteria() {\n SaleClassifyGoodExample example = new SaleClassifyGoodExample();\n return example.createCriteria();\n }", "public void makeInnerObject()\n\t{\n\t\tInnerClass_firstInnerClass objCreationInnerByMethod1=new InnerClass_firstInnerClass();\n\t\tobjCreationInnerByMethod1.accessOuterClassFields();\n\t}", "ClassAcft initClassAcft(ClassAcft iClassAcft)\n {\n iClassAcft.updateElementValue(\"ClassAcft\");\n return iClassAcft;\n }", "public OOP_207(){\n\n }", "@Override\n\tpublic void visit(OWLClassAssertionAxiom axiom) {\n\n\t\taddFact(RewritingVocabulary.ISA,//\n\t\t\t\taxiom.getIndividual().asOWLNamedIndividual().getIRI(), //\n\t\t\t\taxiom.getClassExpression().asOWLClass().getIRI());\n\t}", "TIAssignment createTIAssignment();", "Individual createIndividual();", "Clase createClase();", "public ActivityExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public AssociationTest(String name) {\n\t\tsuper(name);\n\t}", "private Concert createConcertInstance(String newArtistName, String newVenueName, Date newDate){\n long id = concertList.size(); // Usually covered by the database.\n Artist artist = new Artist(id, newArtistName);\n Venue venue = new Venue(id, newVenueName, \"Gaston Geenslaan 14, 3001 Leuven, Belgium\");\n return new Concert(id, artist, venue, newDate);\n }", "SomePlus createSomePlus();", "protected abstract Result createClasses( Outline outline, CClassInfo bean );", "public ARecord() {\n super(A.A);\n }", "public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }", "TypeAssociation getAssocieCommeObjetAdresse();", "private void translateConstructor( ) {\n \n Set<MethodInfoFlags> flags = EnumSet.noneOf( MethodInfoFlags.class );\n \n AVM2Method method = new AVM2Method( null, flags );\n avm2Class.avm2Class.constructor = method;\n \n AVM2MethodBody body = method.methodBody;\n body.maxStack = 1;\n body.maxRegisters = 1;\n body.maxScope = 11;\n body.scopeDepth = 10;\n \n InstructionList il = body.instructions;\n \n// il.append( OP_getlocal0 );\n// il.append( OP_pushscope );\n il.append( OP_getlocal0 );\n il.append( OP_constructsuper, 0 );\n \n// il.append( OP_findpropstrict, new AVM2QName( PUBLIC_NAMESPACE, \"drawTest\" ));\n il.append( OP_getlocal0 );\n \n il.append( OP_callpropvoid, new AVM2QName( EmptyPackage.namespace, \"drawTest\" ), 0 );\n\n il.append( OP_returnvoid );\n }", "public EmpdetailExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "Quote createQuote();", "public Coup coupAJouer();", "public ConvCalculator(Expression exp){\r\n this();\r\n this.expression = exp;\r\n }", "Plus createPlus();", "Plus createPlus();", "Plus createPlus();", "protected void createOrgAnnotations() {\n\t\tString source = \"org.abchip.mimo.core.base.invocation\";\n\t\taddAnnotation\n\t\t (invoiceEClass.getEOperations().get(0),\n\t\t source,\n\t\t new String[] {\n\t\t });\n\t}", "OBJECT createOBJECT();", "public ASTQuery subCreate(){\r\n\t\tASTQuery ast = create();\r\n\t\tast.setGlobalAST(this);\r\n\t\tast.setNSM(getNSM());\r\n\t\treturn ast;\r\n\t}", "public void addAssociation(String mPackage, Class type, RefObject a, RefObject b) throws CreationException {\n\t\t\n\t\ttrace.addTrace(TraceType.CREATION, \"Create Association of type \" + type.getSimpleName() + \" in target model.\");\n\t\t\n\t\tRefPackage pkg = loadBasePackage(mPackage);\n\t\tCollection<RefAssociation> assos = pkg.refAllAssociations();\n\t\tfor(RefAssociation ass:assos) {\n\t\t\t/* \n\t\t\t * The return type of java.lang.Class.getInterfaces()\n\t\t\t * has changed in Java 1.6.\n\t\t\t * To compile this file using Java 1.6 or later, change the\n\t\t\t * generic of the List 'interfaces' from List<Class> to\n\t\t\t * List<Class<?>>. \n\t\t\t */\n\t\t\tList<Class> interfaces = Arrays.asList(ass.getClass().getInterfaces());\n\t\t\tif(interfaces.contains(type)) {\n\t\t\t\tMethod add = null;\n\t\t\t\tMethod[] methods = ass.getClass().getMethods();\n\t\t\t\tfor(Method m : methods) {\n\t\t\t\t\tif (m.getName().equals(\"add\")) {\n\t\t\t\t\t\tadd = m;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (add == null) {\n\t\t\t\t\tthrow new CreationException(ADD_METHOD_NOT_FOUND + type.getSimpleName());\n\t\t\t\t}\n\t\t\t\n\t\t\t\tObject[] parameters = {a,b};\n\t\t\t\ttry {\n\t\t\t\t\tadd.invoke(ass, parameters);\n\t\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t\tthrow new CreationException(ERROR_ADD_ASS + type.getSimpleName());\n\t\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t\tthrow new CreationException(ERROR_ADD_ASS + type.getSimpleName());\n\t\t\t\t} catch (InvocationTargetException e) {\n\t\t\t\t\tthrow new CreationException(ERROR_ADD_ASS + type.getSimpleName());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t\n\t\t\n\t\t}", "TypeAssociation getEstRapporteeParRapport();", "public Query(Class c, String expression) {\r\n\t\t_product = c;\r\n\t\t_variable = \"c\";\r\n\t\t_expression = expression;\r\n\r\n\t}", "public CallInfo() {\n\t}", "public PromotionDetail() {\r\n\t}", "Concierto createConcierto();", "AExpArgs createAExpArgs();", "public Operation(){\n\t}", "private void addAssociationArrows(StringBuilder build) {\n\t\tbuild.append(\"edge [style = \\\"solid\\\"] [arrowhead = \\\"open\\\"]\\n\\t\");\n\t\tfor(String scName : this.classMap.keySet()){\n\t\t\tSassyClass sc = this.classMap.get(scName);\n\t\t\tfor(String as : sc.getAssociationClasses()){\n\t\t\t\t//TODO: Convert ArrayList<SassyMethod> -> SassyMethod (Check for '<')\n\t\t\t\tString getClass = as;\n\t\t\t\tbuild.append(sc + \"->\" + getClass);\n\t\t\t}\n\t\t}\n\t}", "CsticModel createInstanceOfCsticModel();", "public OidDt getSopclassElement() { \n\t\tif (mySopclass == null) {\n\t\t\tmySopclass = new OidDt();\n\t\t}\n\t\treturn mySopclass;\n\t}", "QuoteCoefficient createQuoteCoefficient();", "public Object aj() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }", "public static Object suggest(Customer c)\n{\n\treturn new Firework(\"demo\", 1);\n}", "public CallSet() {}", "public static Criteria newAndCreateCriteria() {\n TCpyBankCreditExample example = new TCpyBankCreditExample();\n return example.createCriteria();\n }", "public Expression() {\r\n }", "public Expression(Object ob) {\r\n\t\tthis();\r\n\t\taddElement(ob);\r\n\t}", "public static final XalanNodeAssociationManager createInstance() {\n String className = null;\n try {\n className = System.getProperty(XalanNodeAssociationManager.class.getName()+\".implementation\");\n } catch( SecurityException e ) {\n // a security manager might reject this call\n }\n if(className!=null) {\n // use specified one.\n try {\n return (XalanNodeAssociationManager)Class.forName(className).newInstance();\n } catch( Exception e ) {\n e.printStackTrace();\n return null;\n }\n } else {\n // guess from the version number of Xalan\n int ver = XSLProcessorVersion.VERSION*100 + XSLProcessorVersion.RELEASE;\n if( Debug.debug )\n System.err.println(\"Xalan version: \"+ver);\n if( ver>202 )\n return new XalanNodeAssociationManager_2_5();\n else\n return new XalanNodeAssociationManager_2_0();\n }\n }", "private static Object createNewInstance(String implement, String header, String expression) {\n\n\t\t// a feeble attempt at preventing arbitrary code execution\n\t\t// by limiting expressions to a single statement.\n\t\t// Otherwise the expression can be something like:\n\t\t// \tf(); } Object f() { System.exit(0); return null\n\t\tif (expression.contains(\";\"))\n\t\t\treturn null;\n\n\t\t// since we might create multiple expressions, we need their names to be unique\n\t\tString className = \"MyExpression\" + classNum++;\n\n\t\t// if we compile the class susseccfully, try and instantiate it\n\t\tif (writeAndCompile(className, implement, header, expression)) {\n\t\t\ttry {\n\t\t\t\tFile classFile = new File(path + className + \".class\");\n\t\t\t\t// load the class into the JVM, and try and get an instance of it\n\t\t\t\t//Class<?> newClass = ClassLoader.getSystemClassLoader().loadClass(className);\n\n\t\t\t\tURLClassLoader classLoader = URLClassLoader.newInstance(new URL[] { classFile.toURI().toURL() });\n\t\t\t\tClass<?> newClass = Class.forName(className, true, classLoader);\n\n\t\t\t\t// delete the class file, so we leave no trace\n\t\t\t\t// this is okay because we already loaded the class\n\t\t\t\ttry {\n\t\t\t\t\tclassFile.delete();\n\n\t\t\t\t// meh, we tried\n\t\t\t\t} catch (Exception e) {}\n\n\t\t\t\treturn newClass.newInstance();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t//System.out.println(\"Couldn't load class\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Couldn't write / compile source\");\n\t\t}\n\n\t\t// the class didn't compile\n\t\treturn null;\n\t}" ]
[ "0.5427646", "0.5295767", "0.5276471", "0.5231828", "0.52006364", "0.51944816", "0.5156657", "0.5154088", "0.5112983", "0.50771147", "0.50749695", "0.5052727", "0.5043861", "0.50288", "0.50042456", "0.4963085", "0.49594623", "0.49489692", "0.49421594", "0.49368137", "0.49368137", "0.49252176", "0.49172765", "0.48989436", "0.48929662", "0.48911372", "0.4889718", "0.48800912", "0.4876159", "0.4848603", "0.48472902", "0.48444438", "0.48346445", "0.48240048", "0.48234954", "0.48198545", "0.48062548", "0.48062548", "0.48051456", "0.47880065", "0.4785264", "0.47757578", "0.47756794", "0.47728753", "0.47600898", "0.47498104", "0.47496086", "0.4734042", "0.4729902", "0.47209802", "0.47170755", "0.4716105", "0.47121125", "0.47070843", "0.47062054", "0.46651226", "0.4661642", "0.46555826", "0.46505547", "0.46485022", "0.46433643", "0.4640028", "0.46217665", "0.46214473", "0.4620633", "0.46163824", "0.46144885", "0.46136785", "0.46033484", "0.4594584", "0.45934802", "0.4590055", "0.45849466", "0.45730212", "0.45726663", "0.45726663", "0.45726663", "0.45720708", "0.4569337", "0.456633", "0.45661455", "0.45587718", "0.45566618", "0.45559597", "0.45558304", "0.45521206", "0.4537886", "0.45349264", "0.45327136", "0.45308268", "0.45281053", "0.45264167", "0.45263693", "0.4525899", "0.4525705", "0.4524602", "0.45224193", "0.45153263", "0.45094758", "0.4508844" ]
0.802721
0
Returns a new object of class 'Boolean Literal Exp'.
<C> BooleanLiteralExp<C> createBooleanLiteralExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BooleanLiteralExp createBooleanLiteralExp();", "BooleanExpression createBooleanExpression();", "BooleanExpression createBooleanExpression();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "public BooleanExpTest(String name) {\n\t\tsuper(name);\n\t}", "String getBooleanTrueExpression();", "public Literal getLiteralBoolean(Boolean literalData);", "public Literal setLiteralBoolean(Boolean literalData);", "BoolOperation createBoolOperation();", "public BooleanLit createTrue(Position pos) {\n return (BooleanLit) xnf.BooleanLit(pos, true).type(xts.Boolean());\n }", "boolean booleanOf();", "public T caseBooleanLiteralExpCS(BooleanLiteralExpCS object) {\r\n return null;\r\n }", "BoolConstant createBoolConstant();", "public interface BooleanExpression extends Expression {\n /**\n * Evaluate the expression\n * \n * @return the result of the evaluation (true or false)\n */\n boolean evaluate();\n}", "IfExp createIfExp();", "public Literal createLiteral(boolean b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "public Boolean asBoolean();", "@JsSupport( {JsVersion.MOZILLA_ONE_DOT_ONE, \r\n\t\tJsVersion.JSCRIPT_TWO_DOT_ZERO})\r\npublic interface Boolean extends Object {\r\n\t\r\n\t@Constructor void Boolean();\r\n\t\r\n\t@Constructor void Boolean(boolean value);\r\n\t\r\n\t@Constructor void Boolean(Number value);\r\n\t\r\n\t@Constructor void Boolean(String value);\r\n\t\r\n\t@Function boolean valueOf();\r\n\t\r\n}", "public static TreeNode makeLiteral(Boolean booleanConstant) {\n return new BooleanNode(booleanConstant);\n }", "String getBooleanFalseExpression();", "String getBooleanExpression(boolean flag);", "@Override\r\n\tpublic Object visitBooleanLiteralExpression(\r\n\t\t\tBooleanLiteralExpression booleanLiteralExpression, Object arg)\r\n\t\t\tthrows Exception {\n\t if(booleanLiteralExpression.booleanLiteral.getText().equals(\"false\"))\r\n\t {\r\n\t mv.visitLdcInsn(new Boolean(false));\r\n\t }\r\n\t else\r\n\t {\r\n\t mv.visitLdcInsn(new Boolean(true));\r\n\t }\r\n if(arg != null)\r\n {\r\n// mv.visitMethodInsn(INVOKESTATIC, \"java/lang/Boolean\", \"valueOf\", \"(Z)Ljava/lang/Boolean;\");\r\n }\r\n\t return \"Z\";\r\n\t}", "public Object VisitBooleanLiteral(ASTBooleanLiteral boolliteral) {\n if (boolliteral.value()) {\n return new TypeClass(BooleanType.instance(), bt.constantExpression(1));\n } else {\n return new TypeClass(BooleanType.instance(), bt.constantExpression(0));\n }\n }", "public static Predicate<Boolean> identity() {\n return new Predicate<Boolean>() {\n\n @Override\n public boolean test(Boolean b) {\n return b;\n }\n\n };\n }", "public TruthExpression() {\r\n\t\tsuper(new Expression[]{});\r\n\t\tthis.truthValue = TruthValue.FALSE;\r\n\t}", "public static final BooleanConstantTrue getTrue()\n {\n return new BooleanConstant.BooleanConstantTrue();\n }", "public Boolean() {\n\t\tsuper(false);\n\t}", "public TrueValue (){\n }", "private BooleanFunctions()\n {\n }", "public T caseBooleanLiteral(BooleanLiteral object)\n {\n return null;\n }", "public T caseBooleanLiteral(BooleanLiteral object)\n {\n return null;\n }", "public BooleanLit createFalse(Position pos) {\n return (BooleanLit) xnf.BooleanLit(pos, false).type(xts.Boolean());\n }", "ConditionalExpression createConditionalExpression();", "public static Value makeBool(boolean b) {\n if (b)\n return theBoolTrue;\n else\n return theBoolFalse;\n }", "public BooleanValue(boolean bool) {\r\n this.val = bool;\r\n }", "@Test\n public void testBooleanLiteralTrue2() throws Exception {\n Boolean expected = Boolean.TRUE;\n String sql = \"SELECT TRUE\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, expected);\n verifyProperty(constantNode, Expression.TYPE_CLASS_PROP_NAME, DataTypeName.BOOLEAN.name());\n \n verifySql(\"SELECT TRUE\", fileNode);\n }", "public RubyBoolean getTrue() {\n return trueObject;\n }", "@Override\n\tpublic String visitBoolExpr(BoolExprContext ctx) {\n\t\tint childrenNo=ctx.children.size();\n\t\tif (childrenNo == 3 )\n\t\t{\n\t\t\tParseTree n=ctx.getChild(1);\t\t\t\n\t\t\tif (!(n instanceof TerminalNode)) return visit(n); //( boolExpr ) \n\t\t\telse if(n.equals(ctx.COMP())) {\n\t\t\t\tString firstOpType=visit(ctx.getChild(0)); //|arExpr COMP arExpr\n\t\t\t\tString secondOpType=visit(ctx.getChild(2)); \n\t\t\t\tif(!((firstOpType.equals(\"int\"))&&(secondOpType.equals(\"int\")))) throw new RuntimeException(\"you can only compare integer types\");\n\t\t\t\treturn \"boolean\";\n\t\t\t}else if(n==ctx.EQ()){\t\t\t\t\t\t\t\t\t\t\t//|arExpr EQ arExpr\n\t\t\t\tString firstOpType=visit(ctx.getChild(0)); \n\t\t\t\tString secondOpType=visit(ctx.getChild(2)); \t\t\t\t\n\t\t\t\tif(!(((firstOpType.equals(\"int\"))&&(secondOpType.equals(\"int\")))||((firstOpType.equals(\"char\"))&&(secondOpType.equals(\"char\"))))) throw new RuntimeException(\"you can only use\"\n\t\t\t\t\t\t+ \"\\\"==\\\" operator on integer or character types\");\n\t\t\t\treturn \"boolean\";\n\t\t\t}else if(n==ctx.AND()||n==ctx.OR()){ //|boolExpr (AND|OR)boolExpr\n\t\t\t\tString firstOpType=visit(ctx.getChild(0));\n\t\t\t\tString secondOpType=visit(ctx.getChild(2));\n\t\t\t\tif(!(firstOpType.equals(\"boolean\"))&&(secondOpType.equals(\"boolean\"))) throw new RuntimeException(\"you can only use boolean operators on boolean expressions\");\n\t\t\t\treturn \"boolean\";\n\t\t\t}\n\t\t} else if (childrenNo == 2 ) { //|NOT boolExpr\n\t\t\tString exprType=visit(ctx.getChild(1));\n\t\t\tif (!exprType.equals(\"boolean\")) throw new RuntimeException(\"NOT operator works only with boolean expresssions\");\n\t\t\t\treturn \"boolean\";\n\t\t}else {\t\t\t\t\t\t\t\t//|(ID|property|BOOLEANLIT|arrIdExpr|methodCall)\n\t\t\tParseTree n=ctx.getChild(0);\n\t\t\tif (n instanceof TerminalNode) {\t\t\t\t\n\t\t\t\tif (n==ctx.BOOLEANLIT()) return \"boolean\";\n\t\t\t\telse if(n==ctx.ID()){\n\t\t\t\t\tString key=visitTerminal((TerminalNode)n);\n\t\t\t\t\tRecord id= table.lookup(key);\n\t\t\t\t\tif (id==null) throw new RuntimeException(\"Identifier \"+key+\" is not declared\");\t\t\t\t\t\n\t\t\t\t\treturn id.getReturnType();\n\t\t\t\t\t\n\t\t\t\t}\t\t\t \n\t\t\t}else {\n\t\t\t\tString type=visit(ctx.getChild(0));\n\t\t\t\treturn type;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn null; //for debug\n\t}", "@Test\n public void testBooleanLiteralFalse2() throws Exception {\n Boolean expected = Boolean.FALSE;\n String sql = \"SELECT {b'false'}\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, expected);\n verifyProperty(constantNode, Expression.TYPE_CLASS_PROP_NAME, DataTypeName.BOOLEAN.name());\n\n verifySql(\"SELECT FALSE\", fileNode);\n }", "boolean getBoolValue();", "boolean getBoolValue();", "public final EObject ruleBoolLiteral() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token lv_value_1_0=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3752:28: ( ( () ( (lv_value_1_0= RULE_BOOL ) ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3753:1: ( () ( (lv_value_1_0= RULE_BOOL ) ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3753:1: ( () ( (lv_value_1_0= RULE_BOOL ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3753:2: () ( (lv_value_1_0= RULE_BOOL ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3753:2: ()\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3754:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getBoolLiteralAccess().getBoolLiteralAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3759:2: ( (lv_value_1_0= RULE_BOOL ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3760:1: (lv_value_1_0= RULE_BOOL )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3760:1: (lv_value_1_0= RULE_BOOL )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3761:3: lv_value_1_0= RULE_BOOL\r\n {\r\n lv_value_1_0=(Token)match(input,RULE_BOOL,FOLLOW_RULE_BOOL_in_ruleBoolLiteral8655); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t\t\tnewLeafNode(lv_value_1_0, grammarAccess.getBoolLiteralAccess().getValueBOOLTerminalRuleCall_1_0()); \r\n \t\t\r\n }\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElement(grammarAccess.getBoolLiteralRule());\r\n \t }\r\n \t\tsetWithLastConsumed(\r\n \t\t\tcurrent, \r\n \t\t\t\"value\",\r\n \t\tlv_value_1_0, \r\n \t\t\"BOOL\");\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "boolean isEBoolean();", "abstract public boolean getAsBoolean();", "@Override\n public Expression translateSyntacticSugar() {\n return new Condition(this.e1, BooleanConstant.TRUE, this.e2);\n }", "public T caseExpression_Boolean(Expression_Boolean object)\r\n {\r\n return null;\r\n }", "JavaExpression createJavaExpression();", "public StrBool(String f, String t){\r\n\t\tnew StrBool(f, t, false);\r\n\t}", "public boolean containsLiteralBoolean(Boolean literalData);", "public Literal getDeepLiteralBoolean(XDI3Segment contextNodeXri, Boolean literalData);", "public final EObject ruleBooleanLiteralExpCS() throws RecognitionException {\n EObject current = null;\n\n Token lv_symbol_0_0=null;\n Token lv_symbol_1_0=null;\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:7066:2: ( ( ( (lv_symbol_0_0= 'true' ) ) | ( (lv_symbol_1_0= 'false' ) ) ) )\n // InternalMyDsl.g:7067:2: ( ( (lv_symbol_0_0= 'true' ) ) | ( (lv_symbol_1_0= 'false' ) ) )\n {\n // InternalMyDsl.g:7067:2: ( ( (lv_symbol_0_0= 'true' ) ) | ( (lv_symbol_1_0= 'false' ) ) )\n int alt96=2;\n int LA96_0 = input.LA(1);\n\n if ( (LA96_0==105) ) {\n alt96=1;\n }\n else if ( (LA96_0==106) ) {\n alt96=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 96, 0, input);\n\n throw nvae;\n }\n switch (alt96) {\n case 1 :\n // InternalMyDsl.g:7068:3: ( (lv_symbol_0_0= 'true' ) )\n {\n // InternalMyDsl.g:7068:3: ( (lv_symbol_0_0= 'true' ) )\n // InternalMyDsl.g:7069:4: (lv_symbol_0_0= 'true' )\n {\n // InternalMyDsl.g:7069:4: (lv_symbol_0_0= 'true' )\n // InternalMyDsl.g:7070:5: lv_symbol_0_0= 'true'\n {\n lv_symbol_0_0=(Token)match(input,105,FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewLeafNode(lv_symbol_0_0, grammarAccess.getBooleanLiteralExpCSAccess().getSymbolTrueKeyword_0_0());\n \t\t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getBooleanLiteralExpCSRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(current, \"symbol\", lv_symbol_0_0, \"true\");\n \t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n break;\n case 2 :\n // InternalMyDsl.g:7083:3: ( (lv_symbol_1_0= 'false' ) )\n {\n // InternalMyDsl.g:7083:3: ( (lv_symbol_1_0= 'false' ) )\n // InternalMyDsl.g:7084:4: (lv_symbol_1_0= 'false' )\n {\n // InternalMyDsl.g:7084:4: (lv_symbol_1_0= 'false' )\n // InternalMyDsl.g:7085:5: lv_symbol_1_0= 'false'\n {\n lv_symbol_1_0=(Token)match(input,106,FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewLeafNode(lv_symbol_1_0, grammarAccess.getBooleanLiteralExpCSAccess().getSymbolFalseKeyword_1_0());\n \t\t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getBooleanLiteralExpCSRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(current, \"symbol\", lv_symbol_1_0, \"false\");\n \t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final EObject ruleBooleanLiteral() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n Token lv_isTrue_2_0=null;\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1918:28: ( ( () (otherlv_1= 'false' | ( (lv_isTrue_2_0= 'true' ) ) ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1919:1: ( () (otherlv_1= 'false' | ( (lv_isTrue_2_0= 'true' ) ) ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1919:1: ( () (otherlv_1= 'false' | ( (lv_isTrue_2_0= 'true' ) ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1919:2: () (otherlv_1= 'false' | ( (lv_isTrue_2_0= 'true' ) ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1919:2: ()\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1920:5: \n {\n if ( state.backtracking==0 ) {\n\n current = forceCreateModelElement(\n grammarAccess.getBooleanLiteralAccess().getBooleanLiteralAction_0(),\n current);\n \n }\n\n }\n\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1925:2: (otherlv_1= 'false' | ( (lv_isTrue_2_0= 'true' ) ) )\n int alt25=2;\n int LA25_0 = input.LA(1);\n\n if ( (LA25_0==48) ) {\n alt25=1;\n }\n else if ( (LA25_0==49) ) {\n alt25=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 25, 0, input);\n\n throw nvae;\n }\n switch (alt25) {\n case 1 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1925:4: otherlv_1= 'false'\n {\n otherlv_1=(Token)match(input,48,FOLLOW_48_in_ruleBooleanLiteral4564); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getBooleanLiteralAccess().getFalseKeyword_1_0());\n \n }\n\n }\n break;\n case 2 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1930:6: ( (lv_isTrue_2_0= 'true' ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1930:6: ( (lv_isTrue_2_0= 'true' ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1931:1: (lv_isTrue_2_0= 'true' )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1931:1: (lv_isTrue_2_0= 'true' )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1932:3: lv_isTrue_2_0= 'true'\n {\n lv_isTrue_2_0=(Token)match(input,49,FOLLOW_49_in_ruleBooleanLiteral4588); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n newLeafNode(lv_isTrue_2_0, grammarAccess.getBooleanLiteralAccess().getIsTrueTrueKeyword_1_1_0());\n \n }\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getBooleanLiteralRule());\n \t }\n \t\tsetWithLastConsumed(current, \"isTrue\", true, \"true\");\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "RealLiteralExp createRealLiteralExp();", "public Literal setDeepLiteralBoolean(XDI3Segment contextNodeXri, Boolean literalData);", "public void setLiteral(boolean isLiteral)\n {\n this.literal = isLiteral;\n }", "boolean getBoolean();", "boolean getBoolean();", "static Nda<Boolean> of( boolean... value ) { return Tensor.of( Boolean.class, Shape.of( value.length ), value ); }", "Expression createExpression();", "public StatementNode getStatementNodeOnTrue();", "@Override\n public void codeGenBoolExpr(DecacCompiler compiler, boolean condToranch, Label label) {\n }", "<C> IfExp<C> createIfExp();", "public boolean evaluatesToTrue(final String jsExpression);", "public final void rule__XBooleanLiteral__Alternatives_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2976:1: ( ( 'false' ) | ( ( rule__XBooleanLiteral__IsTrueAssignment_1_1 ) ) )\r\n int alt28=2;\r\n int LA28_0 = input.LA(1);\r\n\r\n if ( (LA28_0==40) ) {\r\n alt28=1;\r\n }\r\n else if ( (LA28_0==132) ) {\r\n alt28=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 28, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt28) {\r\n case 1 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2977:1: ( 'false' )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2977:1: ( 'false' )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2978:1: 'false'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXBooleanLiteralAccess().getFalseKeyword_1_0()); \r\n }\r\n match(input,40,FOLLOW_40_in_rule__XBooleanLiteral__Alternatives_16455); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXBooleanLiteralAccess().getFalseKeyword_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2985:6: ( ( rule__XBooleanLiteral__IsTrueAssignment_1_1 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2985:6: ( ( rule__XBooleanLiteral__IsTrueAssignment_1_1 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2986:1: ( rule__XBooleanLiteral__IsTrueAssignment_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXBooleanLiteralAccess().getIsTrueAssignment_1_1()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2987:1: ( rule__XBooleanLiteral__IsTrueAssignment_1_1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2987:2: rule__XBooleanLiteral__IsTrueAssignment_1_1\r\n {\r\n pushFollow(FOLLOW_rule__XBooleanLiteral__IsTrueAssignment_1_1_in_rule__XBooleanLiteral__Alternatives_16474);\r\n rule__XBooleanLiteral__IsTrueAssignment_1_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXBooleanLiteralAccess().getIsTrueAssignment_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Override\r\n\tpublic Object visitBooleanLitExpression(\r\n\t\t\tBooleanLitExpression booleanLitExpression, Object arg)\r\n\t\t\tthrows Exception {\r\n\t\tbooleanLitExpression.setType(booleanType);\r\n\t\treturn booleanType;\r\n\t}", "@Override\n\tpublic Object visitBooleanLiteral(BooleanLiteral literal) {\n\t\treturn null;\n\t}", "public interface BoolExprVisitor\n{\n void visit(AndExpr e);\n\n void visit(EqExpr e);\n\n void visit(ExistentialQuantifier e);\n\n void visit(GreaterEqExpr e);\n\n void visit(GreaterExpr e);\n\n void visit(ImplExpr e);\n\n void visit(LessEqExpr e);\n\n void visit(LessExpr e);\n\n void visit(NegExpr e);\n\n void visit(OrExpr e);\n\n void visit(UniversalQuantifier e);\n}", "public Expression convertToMutableBooleanExpression(ImmutableExpression booleanExpression) {\n OperationPredicate pred = booleanExpression.getFunctionSymbol();\n return termFactory.getExpression(pred, convertToMutableTerms(booleanExpression.getTerms()));\n }", "public boolean getBoolean();", "public T caseOpBool(OpBool object)\n {\n return null;\n }", "public Boolean booleanValue() {\n\t\tif (this.getLiteralValue() instanceof Boolean) {\n\t\t\treturn (Boolean) this.getLiteralValue();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public SPARQLBooleanXMLParser() {\n\t\tsuper();\n\t}", "public T casebooleanTerm(booleanTerm object)\n {\n return null;\n }", "public T caseExprBool(ExprBool object)\n {\n return null;\n }", "public void visit(BooleanLiteral n) {\n n.f0.accept(this);\n }", "public final void rule__XBooleanLiteral__Alternatives_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2354:1: ( ( 'false' ) | ( ( rule__XBooleanLiteral__IsTrueAssignment_1_1 ) ) )\n int alt20=2;\n int LA20_0 = input.LA(1);\n\n if ( (LA20_0==32) ) {\n alt20=1;\n }\n else if ( (LA20_0==69) ) {\n alt20=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 20, 0, input);\n\n throw nvae;\n }\n switch (alt20) {\n case 1 :\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2355:1: ( 'false' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2355:1: ( 'false' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2356:1: 'false'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXBooleanLiteralAccess().getFalseKeyword_1_0()); \n }\n match(input,32,FOLLOW_32_in_rule__XBooleanLiteral__Alternatives_15079); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXBooleanLiteralAccess().getFalseKeyword_1_0()); \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2363:6: ( ( rule__XBooleanLiteral__IsTrueAssignment_1_1 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2363:6: ( ( rule__XBooleanLiteral__IsTrueAssignment_1_1 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2364:1: ( rule__XBooleanLiteral__IsTrueAssignment_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXBooleanLiteralAccess().getIsTrueAssignment_1_1()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2365:1: ( rule__XBooleanLiteral__IsTrueAssignment_1_1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2365:2: rule__XBooleanLiteral__IsTrueAssignment_1_1\n {\n pushFollow(FOLLOW_rule__XBooleanLiteral__IsTrueAssignment_1_1_in_rule__XBooleanLiteral__Alternatives_15098);\n rule__XBooleanLiteral__IsTrueAssignment_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXBooleanLiteralAccess().getIsTrueAssignment_1_1()); \n }\n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final AliaChecker.boolean_expr_return boolean_expr() throws RecognitionException {\n\t\tAliaChecker.boolean_expr_return retval = new AliaChecker.boolean_expr_return();\n\t\tretval.start = input.LT(1);\n\n\t\tCommonTree root_0 = null;\n\n\t\tCommonTree _first_0 = null;\n\t\tCommonTree _last = null;\n\n\n\t\tCommonTree set26=null;\n\n\t\tCommonTree set26_tree=null;\n\n\t\ttry {\n\t\t\t// src\\\\alia\\\\AliaChecker.g:295:14: ( TRUE | FALSE )\n\t\t\t// src\\\\alia\\\\AliaChecker.g:\n\t\t\t{\n\t\t\troot_0 = (CommonTree)adaptor.nil();\n\n\n\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\tset26=(CommonTree)input.LT(1);\n\t\t\tif ( input.LA(1)==FALSE||input.LA(1)==TRUE ) {\n\t\t\t\tinput.consume();\n\t\t\t\tset26_tree = (CommonTree)adaptor.dupNode(set26);\n\n\n\t\t\t\tadaptor.addChild(root_0, set26_tree);\n\n\t\t\t\tstate.errorRecovery=false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\tthrow mse;\n\t\t\t}\n\n\t\t\t \n\n\t\t\t}\n\n\t\t\tretval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n\n\t\t}\n\t\t \n\t\t catch (RecognitionException e) { \n\t\t \tif(!e.getMessage().equals(\"\")) {\n\t\t\t\t\tSystem.err.println(\"Exception!:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t\tthrow (new AliaException(\"\"));\n\t\t } \n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public static VariableValue createValueObject(boolean value) {\n\t\treturn new BooleanValue(value);\n\t}", "default boolean asBool() {\n\t\tthrow new EvaluatorException(\"Expecting a bool value\");\n\t}", "public static BooleanConstantFalse getFalse()\n {\n return new BooleanConstant.BooleanConstantFalse();\n }", "@Override\n\t\tpublic BooleanType toBooleanType() {\n\t\t\treturn new BooleanType(false);\n\t\t}", "@Override\n\t\tpublic BooleanType toBooleanType() {\n\t\t\treturn new BooleanType(false);\n\t\t}", "@Override\n public String visit(BooleanLiteralExpr n, Object arg) {\n return null;\n }", "public static final SourceModel.Expr showBoolean(SourceModel.Expr x) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showBoolean), x});\n\t\t}", "public Cond newCond() {\n return new Cond();\n }", "protected ICompilerBooleanValue bTerm() throws InvalidConditionantException,\r\n\t\t\t\t\t\t\t TableFunctionMalformedException{\r\n\t\t\r\n\t\tICompilerBooleanValue val1 = notFactor();\r\n\r\n\t\t// LOOK FOR AND (OPTIONAL)\r\n\t\t// scan();\r\n\t\tif (look == '&') {\r\n\t\t\tmatch('&');\r\n\t\t\tICompilerBooleanValue val2 = notFactor();\r\n\t\t\tif (look == '&') {\r\n\t\t\t\tmatch('&');\r\n\t\t\t\treturn new CompilerAndValue(val1, new CompilerAndValue(val2,bTerm()));\r\n\t\t\t} else {\r\n\t\t\t\treturn new CompilerAndValue(val1, val2);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn val1;\r\n\t\t}\r\n\t}", "private CheckBoolean() {\n\t}", "public BooleanType(final boolean val) {\n\t\tthis.b = new Boolean(val);\n\t}", "LetExp createLetExp();", "@Override\n public Object evaluateNode(Interpretation interpretation) {\n InternalBoolean internalBoolean = term.verifyAndReturnBoolean(interpretation);\n return internalBoolean;\n }", "public boolean isLiteral()\n {\n return this.literal;\n }", "private boolean literals() {\r\n return OPT(GO() && literal() && literals());\r\n }", "public DBBoolean() {\n\t}", "public Object bool(String value) {\r\n if (value == null) return null;\r\n return isOracle() ? Integer.valueOf((isTrue(value) ? 1 : 0)) :\r\n Boolean.valueOf(isTrue(value));\r\n }", "@Override\n public Literal not() {\n if (negation == null) {\n negation = new NotBoolVar(this);\n }\n return negation;\n }", "public static Value makeAnyBool() {\n return theBoolAny;\n }", "public BooleanValue(boolean value) {\r\n\t\tthis.value = value;\r\n\t}" ]
[ "0.8917271", "0.80719984", "0.80719984", "0.6836748", "0.6836748", "0.6836748", "0.6836748", "0.68239635", "0.6798101", "0.67825943", "0.66681266", "0.6621452", "0.66104984", "0.6567679", "0.65298325", "0.6514846", "0.6474522", "0.64424425", "0.64275485", "0.64151716", "0.63526905", "0.63421166", "0.62767416", "0.6252184", "0.6188469", "0.618507", "0.618457", "0.61363065", "0.6136023", "0.6090318", "0.6078715", "0.60772234", "0.606116", "0.606116", "0.6031423", "0.6024716", "0.60173607", "0.6003982", "0.5966448", "0.59407085", "0.5917947", "0.591739", "0.59032786", "0.59032786", "0.5898918", "0.587959", "0.58680755", "0.5863829", "0.58389205", "0.5782999", "0.57755536", "0.57741654", "0.5762531", "0.5757928", "0.57360953", "0.57339233", "0.5726516", "0.5719793", "0.5709966", "0.5709966", "0.5707015", "0.5705105", "0.5694048", "0.5692291", "0.5683385", "0.5679532", "0.5665784", "0.5655165", "0.56548476", "0.56513155", "0.56511444", "0.5639095", "0.5627095", "0.56263775", "0.5617144", "0.56136066", "0.5609648", "0.560809", "0.56012833", "0.5595876", "0.55916816", "0.55897367", "0.55815756", "0.55796474", "0.55796474", "0.5563703", "0.5545921", "0.55424607", "0.55326414", "0.5525418", "0.55218077", "0.5497776", "0.549044", "0.54895425", "0.548951", "0.54850304", "0.5482639", "0.54619527", "0.54557407", "0.5454345" ]
0.8598908
1
Returns a new object of class 'Collection Item'.
<C> CollectionItem<C> createCollectionItem();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CollectionItem createCollectionItem();", "protected abstract Collection createCollection();", "public HashMap<String, Item> getItemCollection(){\n \tHashMap<String, Item> result = new HashMap<String, Item>(itemCollection);\r\n \treturn result;\r\n }", "public @NotNull Item newItem();", "public Item(){}", "public POJOCompteItem() {\n compte = new TreeMap<Date, Integer>();\n items = new ArrayList<Item>();\n }", "public Item createItem() {\n if(pickUpImplementation == null)\n {\n pickUpImplementation = new DefaultPickUp();\n }\n\n if(lookImplementation == null)\n {\n lookImplementation = new DefaultLook(R.string.default_look);\n }\n\n if(defaultItemInteraction == null)\n {\n throw new IllegalArgumentException(\"No default interaction specified!\");\n }\n\n\n return new Item(\n id,\n name,\n pickUpImplementation,\n lookImplementation,\n useImplementation,\n defaultItemInteraction\n );\n }", "private Item(){}", "public Item() {}", "public NewItems() {\n super();\n }", "public ItemCollection()\n\t{\n\t\t/*\n\t\t * master list of all consumable/miscellaneous items in the game\n\t\t * \n\t\t * to add a new item to the game, add the item to the itemCollections, and if it is a consumable,\n\t\t * add the effect to the useItem method in the switch statement. If it has no effect, don't add anything.\n\t\t * \n\t\t * sorted by NAME, VALUE, DESCRIPTION, TYPE\n\t\t */\n\t\t\n\t\t//CONSUMABLES\n\t\titemCollections.add(new Item(\"Polar Pop\", 1, \"Do you ever drink water?\", \"Consumable\"));\n\t\titemCollections.add(new Item(\"Klondike Bar\", 20, \"What would you do for this?\", \"Consumable\"));\n\t\titemCollections.add(new Item(\"Big tiddy goth GF\", 666, \"Vore.\", \"Consumable\"));\n\t\t\n\t\t//MISC, i.e. NO STATUS EFFECT\n\t\titemCollections.add(new Item(\"Sippy Cup\", 9, \"Somebody otta get their child their sippy cup back.\", \"Misc\"));\n\t\t\n\t\t/*\n\t\t * master list of equipment items in the game\n\t\t * \n\t\t * same as above\n\t\t * \n\t\t * sorted by NAME, VALUE, DESCRIPTION, TYPE, DAMAGE, DEFENSE, VITALITY, INTELLIGENCE, STRENGTH, WISDOM\n\t\t */\n\t\t\n\t\t//2H-WEAPONS\n\t\tequipmentCollections.add(new Equipment(\"A Big Boy's Sword\", 69, \"A two- handed sword for a big boy like you... You're growing up so fast!\", \"2H-Weapon\", 10, 0, 0, 0, 0, 0));\n\t\t\n\t\t//1H-WEAPONS\n\t\tequipmentCollections.add(new Equipment(\"Red Copper Pan\", 300, \"Hey there mothafuckas it's ya girl cathy, I got some brand new shit\", \"1H-Weapon\", 250, 0, 25, 3, 25, 3));\n\t\t\n\t\t//HEAD\n\t\tequipmentCollections.add(new Equipment(\"Broken Helmet\", 1, \"Leather helmet broken from thousands of years of war and abuse\", \"Head\", 0, 3, 0, 0, 0, 0));\n\t\t\n\t\t//TORSO\n\t\tequipmentCollections.add(new Equipment(\"Bloodied Tunic\", 1, \"Tunic covered in your own blood, you can see your wounds through its holes\", \"Torso\", 0, 2, 0, 0, 0, 0));\n\t\t\n\t\t//ARMS\n\t\tequipmentCollections.add(new Equipment(\"Torn Gloves\", 1, \"Gloves so torn they hardly protect your hands\", \"Arms\", 0, 1, 0, 0, 0, 0));\n\t\t\n\t\t//LEGS\n\t\tequipmentCollections.add(new Equipment(\"Muddy Pants\", 1, \"Cloth pants soiled in mud\", \"Legs\", 0, 2, 0, 0, 0, 0));\n\t\t\n\t\t//FEET\n\t\tequipmentCollections.add(new Equipment(\"Worn Boot\", 1, \"A boot with a hole in it, but where is the other one?\", \"Feet\", 0, 1, 0, 0, 0, 0));\n\t}", "protected Collection<V> newCollection() {\r\n \treturn new ArrayList<V>();\r\n }", "public Item newItem() {\n\t\tItem page = new Item();\r\n\t\tpage.setWpPublished(DateUtils.now());\r\n\t\tpage.setWpWeight(0);\r\n\t\treturn page;\r\n\t}", "Item getItem(int index) {\r\n return new Item(this, index);\r\n }", "@Override\n\tpublic CollectionItem getItem() {\n\t\treturn manga;\n\t}", "public Item()\n {\n super();\n }", "public ItemBlock createItemBlock() {\n\t\treturn new GenericItemBlock(this);\n\t}", "public Item() {\n }", "public Item() {\n }", "protected abstract void makeItem();", "@SuppressWarnings(\"unused\")\n public Item() {\n }", "public Collection() {\n this.collection = new ArrayList<>();\n }", "public Item getItem() { \n return myItem;\n }", "@Override\n\tpublic AbstractItem getObject() {\n\t\tif(item == null) {\n\t\t\titem = new HiTechItem();\n\t\t}\n\t\treturn item;\n\t}", "Items(){\n}", "public static MyListItem fromCursor(Cursor cursor) {\n MyListItem m = new MyListItem();\n return m;\n }", "public Item() {\n\t}", "public Item() {\n\t}", "protected DefaultItemCollection(DavResourceLocator locator,\n JcrDavSession session,\n DavResourceFactory factory, Item item) {\n super(locator, session, factory, item);\n if (exists() && !(item instanceof Node)) {\n throw new IllegalArgumentException(\"A collection resource can not be constructed from a Property item.\");\n }\n }", "protected Item() {\n }", "public Item() {\r\n this.name = \"\";\r\n this.description = \"\";\r\n this.price = 0F;\r\n this.type = \"\";\r\n this.available = 0;\r\n this.wholesaler = new Wholesaler();\r\n this.wholesalerId = 0;\r\n this.category = new Category();\r\n this.categoryId = 0; \r\n }", "CollectionReferenceElement createCollectionReferenceElement();", "public ListItems() {\n itemList = new ArrayList();\n }", "public Item(String itemName, String itemDescription){\n this.itemName = itemName;\n this.itemDescription = itemDescription;\n}", "public Item getItem() { return this; }", "CollectionResource createCollectionResource();", "public Item() {\n\t\tmenu.add(new Item(\"Snickers\", 10, 1.50, \"1\"));\n\t\tmenu.add(new Item(\"Chips\", 10, .50, \"2\"));\n\t\tmenu.add(new Item(\"Coke\", 10, 1.75, \"3\"));\n\n\t}", "ICpItem getCpItem();", "public ItemRecord() {\n super(Item.ITEM);\n }", "ListItem createListItem();", "public ItemInfo () {}", "public Item()\r\n {\r\n // Initialize instance variables\r\n \r\n }", "public static Item getItem( ) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n \n\tString query = \"select * from Item\";\n\ttry {\n ps = connection.prepareStatement(query);\n\t ResultSet rs = null;\n\t rs = ps.executeQuery();\n \n\t Item item = new Item();\n \n\t if (rs.next()) {\n\t\titem.setAttribute(rs.getString(1));\n\t\titem.setItemname(rs.getString(2));\n\t\titem.setDescription(rs.getString(3));\n\t\titem.setPrice(rs.getDouble(4));\n\t }\n\t rs.close();\n\t ps.close();\n\t return item;\n\t} catch (java.sql.SQLException sql) {\n\t sql.printStackTrace();\n\t return null;\n\t}\n }", "public Collection() {\n }", "public Item getItem() {\n Item item = new Item();\n item.setQuantidade(Integer.parseInt(txtQuantidade.getText()));\n item.setValor(Float.parseFloat(txtValor.getText()));\n item.setProduto((Produto)cmbProduto.getSelectedItem());\n \n return item;\n }", "public CPRIMITIVEALTERNATIVES getItem()\n {\n return item;\n }", "protected ResourceReference getItem()\n\t{\n\t\treturn ITEM;\n\t}", "@Override\r\n\t\r\n\t protected OverlayItem createItem(int index) {\n\t\treturn lstItems.get(index);\r\n\t\r\n\t }", "public Item_Record() {\n super(Item_.ITEM_);\n }", "public GItem(Item i) {\n this.mGItem = i.getId();\n this.title = i.getTitle();\n\n if (!i.getAddress().equals(\"\")){\n this.address = i.getAddress();\n }\n\n if (i instanceof OfficerItem){\n this.type = 1;\n\n } else if (i instanceof CompanyItem){\n this.type = 0;\n }\n\n }", "public Item createNew(int count) {\r\n Item i = new Item(name, id);\r\n i.setPickedUp(true);\r\n i.setCount(count);\r\n return i;\r\n }", "public RecentItem() {\n }", "public Inventory(){\n this.items = new ArrayList<InventoryItem>(); \n }", "public static MyListItem fromCursor(Cursor cursor) {\n MyListItem myListItem=new MyListItem();\n myListItem._id=cursor.getInt(0);\n myListItem.amount=cursor.getString(1);\n myListItem.dateTime=cursor.getString(2);\n myListItem.type=cursor.getShort(3);\n return myListItem;\n }", "public Item getItem ()\n\t{\n\t\treturn item;\n\t}", "public ItemReference alloc();", "public T getItem() {\r\n return item;\r\n }", "public ArrayList<Collectable> getItems(){\n return items;\n }", "public T getItem() {\n return item;\n }", "public FinalMysteryItem() {\n int randomIndex = new Random().nextInt(7);\n item = new Item(listOfPossibleNames[randomIndex], PRICE_TO_BUY);\n }", "Item(int i, String n, String c, double p) {\n this.id = i;\n this.name = n;\n this.category = c;\n this.price = p;\n }", "@JsonIgnore\n @Override\n public Item createDynamoDbItem() {\n return new Item()\n .withPrimaryKey(\"widgetId\", this.getWidgetId())\n .with(\"widgetJSONString\", WidgetSerializer.serialize(this));\n }", "public Item() \r\n\t{\r\n\t\tname = \"AbstractItem\";\r\n\t\tdescription = \"Example Item Generated\";\r\n\t\tprice = 0;\r\n\t}", "private CollectionType() {}", "public Item createNew(int xpos, int ypos) {\r\n Item i = new Item(name, id);\r\n i.setPosition(xpos, ypos);\r\n return i;\r\n }", "public Item_Record(Integer _Id_, String name_, String description_, String code_, Double price_, Double retailPrice_, Double costPrice_, Object _Search_, String[] _Types_, String _LastModified_, Integer _Version_) {\n super(Item_.ITEM_);\n\n set(0, _Id_);\n set(1, name_);\n set(2, description_);\n set(3, code_);\n set(4, price_);\n set(5, retailPrice_);\n set(6, costPrice_);\n set(7, _Search_);\n set(8, _Types_);\n set(9, _LastModified_);\n set(10, _Version_);\n }", "public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }", "public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }", "public Item getItem() {\n return item;\n }", "Collection<?> create(int initialCapacity);", "public Item(int weigth, String name, String description) {\n this.weigth = weigth;\n this.name = name;\n this.description = description;\n }", "public Item(Integer itemSlot) {\n this.itemSlot = itemSlot;\n }", "public RandomizedQueue() {\n collection = (Item[]) new Object[1];\n }", "public WECollection()\n {\n }", "public SeqItemset createExtendedWith(SeqItem it){\n\t\tSeqItemset newSet = new SeqItemset(m_itemset.length+1);\n\t\tSystem.arraycopy(m_itemset,0,newSet.m_itemset, 0, m_itemset.length);\n\t\tnewSet.m_itemset[m_itemset.length] = it;\n\t\treturn newSet;\n\t}", "public T getItem() {\n\t\treturn item;\n\t}", "public T getItem() {\n\t\treturn item;\n\t}", "private Item initItem() {\n String name = inputName.getText().toString();\n int quantityToBuy = -1;\n if (!inputQuantityToBuy.getText().toString().equals(\"\"))\n quantityToBuy = Integer.parseInt(inputQuantityToBuy.getText().toString());\n String units = inputUnits.getText().toString();\n double price = 0;\n if (!inputPrice.getText().toString().equals(\"\"))\n price = Double.parseDouble(inputPrice.getText().toString());\n int calories = 0;\n if (!inputCalories.getText().toString().equals(\"\"))\n calories = Integer.parseInt(inputCalories.getText().toString());\n ArrayList<String> allergies = allergyActions.getAllergies();\n return new Item(name, 0, units, quantityToBuy, 0, allergies, calories, price);\n }", "public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }", "public ShoppingListItem() {}", "public EnterpriseBeansItem() {\n super();\n }", "@Override // see item.java\n\tpublic void useItem() {\n\n\t}", "public static Item create( TopComponent tc ) {\n return new TopItem( tc );\n }", "public Item getItem() {\n\t\treturn item;\n\t}", "public com.rpg.framework.database.Protocol.Item.Builder addItemsBuilder() {\n return getItemsFieldBuilder().addBuilder(\n com.rpg.framework.database.Protocol.Item.getDefaultInstance());\n }", "public QuestionPoolItemData(){\n }", "public void setItem(Collectable c) {\n\t\tthis.m_item = c;\n\t}", "public Item(String description) {\n this.description = description;\n }", "public Item(String name, ItemType type)\n {\n\tthis.name = name;\n\tthis.type = type;\n }", "public static CollectionFragment newInstance() {\n CollectionFragment fragment = new CollectionFragment();\n return fragment;\n }", "@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}", "private void makeObject() {\n\t\t\n\t\tItem I1= new Item(1,\"Cap\",10.0f,\"to protect from sun\");\n\t\tItemMap.put(1, I1);\n\t\t\n\t\tItem I2= new Item(2,\"phone\",100.0f,\"Conversation\");\n\t\tItemMap.put(2, I2);\n\t\t\n\t\tSystem.out.println(\"Objects Inserted\");\n\t}", "public Item getItem() {\n return item;\n }", "public Item(E val) {\n value = val;\n }", "public Collection()\n {\n // initialisation des variables d'instance\n documents = new ArrayList<>();\n }", "private Object readResolve() {\n\t\titemsArray = new ItemDefinition[256];\n\t\tfor (ItemDefinition def : itemsList) {\n\t\t\titemsArray[def.getId()] = def;\n\t\t}\n\t\treturn this;\n\t}", "@NotNull\r\n @Contract(pure = true)\r\n public abstract Collection<GuiItem> getItems();", "public ParsedContainer()\r\n {\r\n container = new ItemContainer();\r\n hidden = false;\r\n }", "public Item(ItemEnum itemname, int points) {\n this.itemName = itemname;\n this.points = points;\n allItems.put(itemName, this);\n }", "public InventoryItem(String name) { \n\t\tthis(name, 1);\n\t}" ]
[ "0.8416673", "0.6858302", "0.672408", "0.6703515", "0.6625591", "0.65740407", "0.6561602", "0.65395737", "0.65226036", "0.64839226", "0.6440953", "0.6423754", "0.6400427", "0.6369608", "0.63183504", "0.6267142", "0.62121415", "0.6170502", "0.6170502", "0.6168569", "0.6146643", "0.6125093", "0.6117342", "0.60873413", "0.6085081", "0.60771495", "0.60491836", "0.60491836", "0.60403335", "0.60293233", "0.6023631", "0.6008067", "0.60050285", "0.599824", "0.5987817", "0.59844065", "0.5981148", "0.5956763", "0.5952898", "0.5940261", "0.5922721", "0.5911872", "0.59055316", "0.5895796", "0.58878255", "0.5884842", "0.5875815", "0.58733714", "0.58719796", "0.5832526", "0.5816053", "0.5812524", "0.57978296", "0.5797028", "0.57934505", "0.577589", "0.57737565", "0.5764846", "0.57640404", "0.5734432", "0.57303315", "0.5725348", "0.57140267", "0.57139915", "0.57088226", "0.5707199", "0.5688942", "0.5688942", "0.567108", "0.56703365", "0.5665554", "0.5656104", "0.5655384", "0.5651128", "0.5632516", "0.56317896", "0.56317896", "0.5631218", "0.56269985", "0.5618342", "0.5598016", "0.55907077", "0.55850047", "0.55790275", "0.55780584", "0.5577777", "0.55771536", "0.5573956", "0.55712044", "0.5569068", "0.556839", "0.55675757", "0.5563024", "0.55600566", "0.55549836", "0.5552797", "0.5548391", "0.5544633", "0.5540593", "0.5536606" ]
0.77569836
1
Returns a new object of class 'Collection Literal Exp'.
<C> CollectionLiteralExp<C> createCollectionLiteralExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CollectionLiteralExp createCollectionLiteralExp();", "public T caseCollectionLiteralExpCS(CollectionLiteralExpCS object) {\r\n return null;\r\n }", "public T caseCollectionTypeLiteralExpCS(CollectionTypeLiteralExpCS object) {\r\n return null;\r\n }", "public XbaseGrammarAccess.XCollectionLiteralElements getXCollectionLiteralAccess() {\r\n\t\treturn gaXbase.getXCollectionLiteralAccess();\r\n\t}", "protected Collection<V> newCollection() {\r\n \treturn new ArrayList<V>();\r\n }", "public XbaseGrammarAccess.XCollectionLiteralElements getXCollectionLiteralAccess() {\n\t\treturn gaXbase.getXCollectionLiteralAccess();\n\t}", "public XbaseGrammarAccess.XCollectionLiteralElements getXCollectionLiteralAccess() {\n\t\treturn gaXbase.getXCollectionLiteralAccess();\n\t}", "protected abstract Collection createCollection();", "public Collection() {\n this.collection = new ArrayList<>();\n }", "private CollectionType() {}", "CollectionReferenceElement createCollectionReferenceElement();", "public Collection<V> l_() {\n return new d(this);\n }", "public T caseCollectionLiteralPartsCS(CollectionLiteralPartsCS object) {\r\n return null;\r\n }", "@Test\n\tpublic void testCollectionAccess() throws ParseException {\n\t\tExpression expression = langParser(\"a[3]\").expression();\n\t\tassertTrue(expression instanceof CollectionAccess);\n\t\tCollectionAccess collectionAccess = (CollectionAccess) expression;\n\t\tassertTrue(collectionAccess.getCollection() instanceof Identifier);\n\t\tassertEquals(((Identifier) collectionAccess.getCollection()).getName(), \"a\");\n\t\tassertTrue(collectionAccess.getKey() instanceof LongLiteral);\n\t\tassertEquals(((LongLiteral) collectionAccess.getKey()).longValue(), 3L);\n\t}", "public final EObject entryRuleCollectionLiteralExpCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCollectionLiteralExpCS = null;\n\n\n try {\n // InternalMyDsl.g:6093:63: (iv_ruleCollectionLiteralExpCS= ruleCollectionLiteralExpCS EOF )\n // InternalMyDsl.g:6094:2: iv_ruleCollectionLiteralExpCS= ruleCollectionLiteralExpCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getCollectionLiteralExpCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleCollectionLiteralExpCS=ruleCollectionLiteralExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleCollectionLiteralExpCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public Collection<T> mo29734a() {\n return new ArrayList();\n }", "CollectionParameter createCollectionParameter();", "public T caseCollectionLiteralPartsOclExpCS(CollectionLiteralPartsOclExpCS object) {\r\n return null;\r\n }", "final public Expression Collection(Exp stack) throws ParseException {\n ArrayList<Expression> list;\n Expression node, head;\n RDFList rlist;\n int arobase = ASTQuery.L_DEFAULT, save = ASTQuery.L_LIST;\n list = new ArrayList<Expression>();\n save = astq.getListType();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ATLIST:\n case ATPATH:\n case AT:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ATLIST:\n jj_consume_token(ATLIST);\n arobase = ASTQuery.L_LIST; astq.setListType(arobase);\n break;\n case ATPATH:\n case AT:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case AT:\n jj_consume_token(AT);\n break;\n case ATPATH:\n jj_consume_token(ATPATH);\n break;\n default:\n jj_la1[225] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n arobase = ASTQuery.L_PATH; astq.setListType(arobase);\n break;\n default:\n jj_la1[226] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[227] = jj_gen;\n ;\n }\n jj_consume_token(LPAREN);\n label_42:\n while (true) {\n node = GraphNode(stack);\n list.add(node);\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case Q_IRIref:\n case QNAME_NS:\n case QNAME:\n case BLANK_NODE_LABEL:\n case VAR1:\n case VAR2:\n case ATLIST:\n case ATPATH:\n case TRUE:\n case FALSE:\n case INTEGER:\n case DECIMAL:\n case DOUBLE:\n case STRING_LITERAL1:\n case STRING_LITERAL2:\n case STRING_LITERAL_LONG1:\n case STRING_LITERAL_LONG2:\n case LPAREN:\n case LBRACKET:\n case ANON:\n case AT:\n ;\n break;\n default:\n jj_la1[228] = jj_gen;\n break label_42;\n }\n }\n jj_consume_token(RPAREN);\n head = list(stack, list, arobase);\n astq.setListType(save);\n {if (true) return head;}\n throw new Error(\"Missing return statement in function\");\n }", "public Collection() {\n }", "private PropertyCollection createCollectionProperty(final String descr, final String sep, final String esc) {\n\t\tXmlNode propertyNode = XmlNode.getDocumentTopLevel(new ByteArrayInputStream(descr.getBytes()));\n\t\tTypePropertyCollection type = new TypePropertyCollection(new XmlNode[] { propertyNode }, null, \"Collection\",\n\t\t\t\tsep, esc);\n\t\treturn new PropertyCollection(type, null);\n\t}", "public Collection()\n {\n // initialisation des variables d'instance\n documents = new ArrayList<>();\n }", "public Resource createCollection(String uri, String label) {\n Resource collection = createStatement(uri, ProvOntology.getRDFTypeFullURI(),\n ProvOntology.getCollectionExpandedClassFullURI());\n labelResource(collection, label);\n return collection;\n }", "private CollectionTypes(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "@Test\n\tpublic void testNestedCollectionAccess() throws ParseException {\n\t\tExpression expression = langParser(\"x['g'][v]\").expression();\n\t\tassertTrue(expression instanceof CollectionAccess);\n\t\tCollectionAccess collectionAccess = (CollectionAccess) expression;\n\t\tassertTrue(collectionAccess.getCollection() instanceof CollectionAccess);\n\t\tCollectionAccess collectionAccess1 = (CollectionAccess) collectionAccess.getCollection();\n\t\tassertEquals(((Identifier) collectionAccess1.getCollection()).getName(), \"x\");\n\t\tassertTrue(collectionAccess1.getKey() instanceof StringLiteral);\n\t\tassertEquals(((StringLiteral) collectionAccess1.getKey()).getValue(), \"g\");\n\t\tassertTrue(collectionAccess.getKey() instanceof Identifier);\n\t\tassertEquals(((Identifier) collectionAccess.getKey()).getName(), \"v\");\n\t}", "CollectionResource createCollectionResource();", "Collections() { return; }", "String getCollection();", "public final EObject ruleCollectionLiteralPartCS() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n EObject lv_ownedExpression_0_0 = null;\n\n EObject lv_ownedLastExpression_2_0 = null;\n\n EObject lv_ownedExpression_3_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:6198:2: ( ( ( ( (lv_ownedExpression_0_0= ruleExpCS ) ) (otherlv_1= '..' ( (lv_ownedLastExpression_2_0= ruleExpCS ) ) )? ) | ( (lv_ownedExpression_3_0= rulePatternExpCS ) ) ) )\n // InternalMyDsl.g:6199:2: ( ( ( (lv_ownedExpression_0_0= ruleExpCS ) ) (otherlv_1= '..' ( (lv_ownedLastExpression_2_0= ruleExpCS ) ) )? ) | ( (lv_ownedExpression_3_0= rulePatternExpCS ) ) )\n {\n // InternalMyDsl.g:6199:2: ( ( ( (lv_ownedExpression_0_0= ruleExpCS ) ) (otherlv_1= '..' ( (lv_ownedLastExpression_2_0= ruleExpCS ) ) )? ) | ( (lv_ownedExpression_3_0= rulePatternExpCS ) ) )\n int alt85=2;\n switch ( input.LA(1) ) {\n case RULE_INT:\n case RULE_SINGLE_QUOTED_STRING:\n case 20:\n case 40:\n case 44:\n case 73:\n case 74:\n case 75:\n case 76:\n case 77:\n case 78:\n case 79:\n case 80:\n case 81:\n case 82:\n case 83:\n case 93:\n case 94:\n case 96:\n case 97:\n case 98:\n case 99:\n case 100:\n case 103:\n case 105:\n case 106:\n case 107:\n case 108:\n case 111:\n case 116:\n case 117:\n {\n alt85=1;\n }\n break;\n case RULE_SIMPLE_ID:\n {\n int LA85_2 = input.LA(2);\n\n if ( (LA85_2==EOF||LA85_2==20||(LA85_2>=22 && LA85_2<=23)||LA85_2==31||LA85_2==38||(LA85_2>=44 && LA85_2<=48)||(LA85_2>=53 && LA85_2<=54)||LA85_2==59||(LA85_2>=70 && LA85_2<=71)||(LA85_2>=83 && LA85_2<=92)||LA85_2==95||LA85_2==101||LA85_2==109) ) {\n alt85=1;\n }\n else if ( (LA85_2==42) ) {\n alt85=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 85, 2, input);\n\n throw nvae;\n }\n }\n break;\n case RULE_ESCAPED_ID:\n {\n int LA85_3 = input.LA(2);\n\n if ( (LA85_3==EOF||LA85_3==20||(LA85_3>=22 && LA85_3<=23)||LA85_3==31||LA85_3==38||(LA85_3>=44 && LA85_3<=48)||(LA85_3>=53 && LA85_3<=54)||LA85_3==59||(LA85_3>=70 && LA85_3<=71)||(LA85_3>=83 && LA85_3<=92)||LA85_3==95||LA85_3==101||LA85_3==109) ) {\n alt85=1;\n }\n else if ( (LA85_3==42) ) {\n alt85=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 85, 3, input);\n\n throw nvae;\n }\n }\n break;\n case 19:\n {\n int LA85_4 = input.LA(2);\n\n if ( (LA85_4==42) ) {\n alt85=2;\n }\n else if ( (LA85_4==EOF||LA85_4==20||(LA85_4>=22 && LA85_4<=23)||LA85_4==31||LA85_4==38||(LA85_4>=44 && LA85_4<=48)||(LA85_4>=53 && LA85_4<=54)||LA85_4==59||(LA85_4>=70 && LA85_4<=71)||(LA85_4>=83 && LA85_4<=92)||LA85_4==95||LA85_4==101||LA85_4==109) ) {\n alt85=1;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 85, 4, input);\n\n throw nvae;\n }\n }\n break;\n case 60:\n {\n int LA85_5 = input.LA(2);\n\n if ( (LA85_5==42) ) {\n alt85=2;\n }\n else if ( (LA85_5==EOF||LA85_5==20||(LA85_5>=22 && LA85_5<=23)||LA85_5==31||LA85_5==38||(LA85_5>=44 && LA85_5<=48)||(LA85_5>=53 && LA85_5<=54)||LA85_5==59||(LA85_5>=70 && LA85_5<=71)||(LA85_5>=83 && LA85_5<=92)||LA85_5==95||LA85_5==101||LA85_5==109) ) {\n alt85=1;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 85, 5, input);\n\n throw nvae;\n }\n }\n break;\n case 61:\n {\n int LA85_6 = input.LA(2);\n\n if ( (LA85_6==42) ) {\n alt85=2;\n }\n else if ( (LA85_6==EOF||LA85_6==20||(LA85_6>=22 && LA85_6<=23)||LA85_6==31||LA85_6==38||(LA85_6>=44 && LA85_6<=48)||(LA85_6>=53 && LA85_6<=54)||LA85_6==59||(LA85_6>=70 && LA85_6<=71)||(LA85_6>=83 && LA85_6<=92)||LA85_6==95||LA85_6==101||LA85_6==109) ) {\n alt85=1;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 85, 6, input);\n\n throw nvae;\n }\n }\n break;\n case 42:\n {\n alt85=2;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 85, 0, input);\n\n throw nvae;\n }\n\n switch (alt85) {\n case 1 :\n // InternalMyDsl.g:6200:3: ( ( (lv_ownedExpression_0_0= ruleExpCS ) ) (otherlv_1= '..' ( (lv_ownedLastExpression_2_0= ruleExpCS ) ) )? )\n {\n // InternalMyDsl.g:6200:3: ( ( (lv_ownedExpression_0_0= ruleExpCS ) ) (otherlv_1= '..' ( (lv_ownedLastExpression_2_0= ruleExpCS ) ) )? )\n // InternalMyDsl.g:6201:4: ( (lv_ownedExpression_0_0= ruleExpCS ) ) (otherlv_1= '..' ( (lv_ownedLastExpression_2_0= ruleExpCS ) ) )?\n {\n // InternalMyDsl.g:6201:4: ( (lv_ownedExpression_0_0= ruleExpCS ) )\n // InternalMyDsl.g:6202:5: (lv_ownedExpression_0_0= ruleExpCS )\n {\n // InternalMyDsl.g:6202:5: (lv_ownedExpression_0_0= ruleExpCS )\n // InternalMyDsl.g:6203:6: lv_ownedExpression_0_0= ruleExpCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\tnewCompositeNode(grammarAccess.getCollectionLiteralPartCSAccess().getOwnedExpressionExpCSParserRuleCall_0_0_0());\n \t\t\t\t\t\n }\n pushFollow(FOLLOW_68);\n lv_ownedExpression_0_0=ruleExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\tif (current==null) {\n \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getCollectionLiteralPartCSRule());\n \t\t\t\t\t\t}\n \t\t\t\t\t\tset(\n \t\t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\t\"ownedExpression\",\n \t\t\t\t\t\t\tlv_ownedExpression_0_0,\n \t\t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.ExpCS\");\n \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\t\n }\n\n }\n\n\n }\n\n // InternalMyDsl.g:6220:4: (otherlv_1= '..' ( (lv_ownedLastExpression_2_0= ruleExpCS ) ) )?\n int alt84=2;\n int LA84_0 = input.LA(1);\n\n if ( (LA84_0==101) ) {\n alt84=1;\n }\n switch (alt84) {\n case 1 :\n // InternalMyDsl.g:6221:5: otherlv_1= '..' ( (lv_ownedLastExpression_2_0= ruleExpCS ) )\n {\n otherlv_1=(Token)match(input,101,FOLLOW_69); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewLeafNode(otherlv_1, grammarAccess.getCollectionLiteralPartCSAccess().getFullStopFullStopKeyword_0_1_0());\n \t\t\t\t\n }\n // InternalMyDsl.g:6225:5: ( (lv_ownedLastExpression_2_0= ruleExpCS ) )\n // InternalMyDsl.g:6226:6: (lv_ownedLastExpression_2_0= ruleExpCS )\n {\n // InternalMyDsl.g:6226:6: (lv_ownedLastExpression_2_0= ruleExpCS )\n // InternalMyDsl.g:6227:7: lv_ownedLastExpression_2_0= ruleExpCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\t\tnewCompositeNode(grammarAccess.getCollectionLiteralPartCSAccess().getOwnedLastExpressionExpCSParserRuleCall_0_1_1_0());\n \t\t\t\t\t\t\n }\n pushFollow(FOLLOW_2);\n lv_ownedLastExpression_2_0=ruleExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\t\tif (current==null) {\n \t\t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getCollectionLiteralPartCSRule());\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tset(\n \t\t\t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\t\t\"ownedLastExpression\",\n \t\t\t\t\t\t\t\tlv_ownedLastExpression_2_0,\n \t\t\t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.ExpCS\");\n \t\t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n break;\n case 2 :\n // InternalMyDsl.g:6247:3: ( (lv_ownedExpression_3_0= rulePatternExpCS ) )\n {\n // InternalMyDsl.g:6247:3: ( (lv_ownedExpression_3_0= rulePatternExpCS ) )\n // InternalMyDsl.g:6248:4: (lv_ownedExpression_3_0= rulePatternExpCS )\n {\n // InternalMyDsl.g:6248:4: (lv_ownedExpression_3_0= rulePatternExpCS )\n // InternalMyDsl.g:6249:5: lv_ownedExpression_3_0= rulePatternExpCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getCollectionLiteralPartCSAccess().getOwnedExpressionPatternExpCSParserRuleCall_1_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_2);\n lv_ownedExpression_3_0=rulePatternExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getCollectionLiteralPartCSRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"ownedExpression\",\n \t\t\t\t\t\tlv_ownedExpression_3_0,\n \t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.PatternExpCS\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "protected SimpleTypeImpl getSimpleCollection() {\n // Single property collection retrieve\n SimpleTypeImpl simpleCollectionString = new SimpleTypeImpl(\"simpleNameSpace\", SIMPLE_TYPE_NAME, null, true, null, null, null);\n return simpleCollectionString;\n }", "CollectionItem createCollectionItem();", "CollectionRange createCollectionRange();", "<C> CollectionRange<C> createCollectionRange();", "<C> CollectionItem<C> createCollectionItem();", "Collect getColl();", "java.lang.String getCollection();", "static <T> C11725h<Collection<T>> m37693a(Type type, C11760v vVar) {\n return new C11721b(vVar.mo29867a(C11780y.m37896a(type, Collection.class)));\n }", "public MultiStringColl() {\n c = null;\n how_many = 0;\n }", "public final EObject entryRuleCollectionLiteralPartCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCollectionLiteralPartCS = null;\n\n\n try {\n // InternalMyDsl.g:6185:64: (iv_ruleCollectionLiteralPartCS= ruleCollectionLiteralPartCS EOF )\n // InternalMyDsl.g:6186:2: iv_ruleCollectionLiteralPartCS= ruleCollectionLiteralPartCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getCollectionLiteralPartCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleCollectionLiteralPartCS=ruleCollectionLiteralPartCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleCollectionLiteralPartCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public T caseCollectionTypeIdentifierCS(CollectionTypeIdentifierCS object) {\r\n return null;\r\n }", "<C> UnlimitedNaturalLiteralExp<C> createUnlimitedNaturalLiteralExp();", "public WECollection()\n {\n }", "public final void synpred205_InternalMyDsl_fragment() throws RecognitionException { \n EObject this_CollectionLiteralExpCS_6 = null;\n\n\n // InternalMyDsl.g:7857:3: (this_CollectionLiteralExpCS_6= ruleCollectionLiteralExpCS )\n // InternalMyDsl.g:7857:3: this_CollectionLiteralExpCS_6= ruleCollectionLiteralExpCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t/* */\n \t\t\n }\n pushFollow(FOLLOW_2);\n this_CollectionLiteralExpCS_6=ruleCollectionLiteralExpCS();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }", "Collection<?> create(int initialCapacity);", "public static CollectionLikeType construct(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInts, JavaType elemT)\n/* */ {\n/* 53 */ return new CollectionLikeType(rawType, bindings, superClass, superInts, elemT, null, null, false);\n/* */ }", "public Layer_ElementsCollection()\n\t{\n\t\tthis.elements = new ArrayList<GIS_element>();\n\t}", "private CALExpressionNode visitSimpleListComprehension(CALParser.ListComprehensionContext ctx) {\n CALExpressionNode[] valueNodes;\n if (ctx.computations != null) {\n valueNodes = CollectionVisitor.getInstance().visitExpressions(ctx.computations).toArray(new CALExpressionNode[0]);\n } else {\n valueNodes = new CALExpressionNode[0];\n }\n\n ListInitNode simpleComprehensionNode = new ListInitNode(valueNodes);\n simpleComprehensionNode.setSourceSection(ScopeEnvironment.getInstance().createSourceSection(ctx));\n simpleComprehensionNode.addExpressionTag();\n\n return simpleComprehensionNode;\n }", "public Collection(char colour) { /* ... code ... */ }", "public void testResolveDereferenceDotCollection()\r\n {\r\n _field _count = _field.of( \"public int count;\" );\r\n _field _name = _field.of( \"public String name;\" );\r\n \r\n Form f = ForML.compile( \"{+field.type+} {+field.name+}, \");\r\n \r\n List<_field> l = new ArrayList<_field>();\r\n l.add( _count );\r\n l.add( _name );\r\n \r\n assertEquals( 2, f.getCardinality( \r\n VarContext.of( \"field\", l ) ) );\r\n \r\n String str = f.author( \r\n VarContext.of( \"field\", l ) );\r\n \r\n assertEquals( \"int count, String name\", str );\r\n }", "public static CollectionFragment newInstance() {\n CollectionFragment fragment = new CollectionFragment();\n return fragment;\n }", "private Clause make(Literal... e) {\n Clause c = new Clause();\n for (int i = 0; i < e.length; ++i) {\n c = c.add(e[i]);\n }\n return c;\n }", "protected CollectionLikeType(TypeBase base, JavaType elemT)\n/* */ {\n/* 44 */ super(base);\n/* 45 */ this._elementType = elemT;\n/* */ }", "EnsembleLettre(Collection<? extends Character> c) {\n\t\tsuper(c);\n\t}", "@Override\r\n public Literal newLiteral(PObj[] data) {\r\n String symbol = ((Constant) data[0]).getObject().toString();\r\n PObj[] fixed = new PObj[data.length - 1];\r\n System.arraycopy(data, 1, fixed, 0, fixed.length);\r\n PList terms = ProvaListImpl.create(fixed);\r\n return newLiteral(symbol, terms);\r\n }", "private Collection<?> buildForEachCollection(final ExecutionContext executionContext)\n {\n String text = foreach.getTextTrim();\n if (text != null && text.startsWith(\"#{\"))\n {\n return evaluateForEachExpression(executionContext, text);\n }\n return (Collection<?>) FieldInstantiator.getValue(List.class, foreach);\n }", "private PropertyCollection createCollectionProperty(final String descr) {\n\t\treturn createCollectionProperty(descr, null, null);\n\t}", "<C> RealLiteralExp<C> createRealLiteralExp();", "public String getCollectionClass ();", "Collection<? extends Object> getHadithChapterIntro();", "SimpleLiteral createSimpleLiteral();", "public CollectionLikeType withValueHandler(Object h)\n/* */ {\n/* 125 */ return new CollectionLikeType(this._class, this._bindings, this._superClass, this._superInterfaces, this._elementType, h, this._typeHandler, this._asStatic);\n/* */ }", "public <E> Collection<E> mo8156u(Collection<E> collection) {\n return Collections.unmodifiableList((List) collection);\n }", "protected SafeHashMap.ValuesCollection instantiateValuesCollection()\n {\n return new ValuesCollection();\n }", "public ObjectStack() {collection = new ArrayIndexedCollection();}", "Literal createLiteral();", "Literal createLiteral();", "public CollectionLikeType withContentTypeHandler(Object h)\n/* */ {\n/* 118 */ return new CollectionLikeType(this._class, this._bindings, this._superClass, this._superInterfaces, this._elementType.withTypeHandler(h), this._valueHandler, this._typeHandler, this._asStatic);\n/* */ }", "public CirArrayList(Collection<? extends E> col) {\n // todo: collection constructor\n this();\n for( E thing : col)\n add(size(), thing);\n }", "public RandomizedCollection() {\n map=new HashMap();\n li=new ArrayList();\n rand=new Random();\n }", "@AutoEscape\n\tpublic String getCollectionName();", "public final EObject ruleCollectionTypeCS() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n Token otherlv_3=null;\n AntlrDatatypeRuleToken lv_name_0_0 = null;\n\n EObject lv_ownedType_2_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:5804:2: ( ( ( (lv_name_0_0= ruleCollectionTypeIdentifier ) ) (otherlv_1= '(' ( (lv_ownedType_2_0= ruleTypeExpCS ) ) otherlv_3= ')' )? ) )\n // InternalMyDsl.g:5805:2: ( ( (lv_name_0_0= ruleCollectionTypeIdentifier ) ) (otherlv_1= '(' ( (lv_ownedType_2_0= ruleTypeExpCS ) ) otherlv_3= ')' )? )\n {\n // InternalMyDsl.g:5805:2: ( ( (lv_name_0_0= ruleCollectionTypeIdentifier ) ) (otherlv_1= '(' ( (lv_ownedType_2_0= ruleTypeExpCS ) ) otherlv_3= ')' )? )\n // InternalMyDsl.g:5806:3: ( (lv_name_0_0= ruleCollectionTypeIdentifier ) ) (otherlv_1= '(' ( (lv_ownedType_2_0= ruleTypeExpCS ) ) otherlv_3= ')' )?\n {\n // InternalMyDsl.g:5806:3: ( (lv_name_0_0= ruleCollectionTypeIdentifier ) )\n // InternalMyDsl.g:5807:4: (lv_name_0_0= ruleCollectionTypeIdentifier )\n {\n // InternalMyDsl.g:5807:4: (lv_name_0_0= ruleCollectionTypeIdentifier )\n // InternalMyDsl.g:5808:5: lv_name_0_0= ruleCollectionTypeIdentifier\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getCollectionTypeCSAccess().getNameCollectionTypeIdentifierParserRuleCall_0_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_62);\n lv_name_0_0=ruleCollectionTypeIdentifier();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getCollectionTypeCSRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_0_0,\n \t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.CollectionTypeIdentifier\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n // InternalMyDsl.g:5825:3: (otherlv_1= '(' ( (lv_ownedType_2_0= ruleTypeExpCS ) ) otherlv_3= ')' )?\n int alt77=2;\n int LA77_0 = input.LA(1);\n\n if ( (LA77_0==20) ) {\n alt77=1;\n }\n switch (alt77) {\n case 1 :\n // InternalMyDsl.g:5826:4: otherlv_1= '(' ( (lv_ownedType_2_0= ruleTypeExpCS ) ) otherlv_3= ')'\n {\n otherlv_1=(Token)match(input,20,FOLLOW_50); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(otherlv_1, grammarAccess.getCollectionTypeCSAccess().getLeftParenthesisKeyword_1_0());\n \t\t\t\n }\n // InternalMyDsl.g:5830:4: ( (lv_ownedType_2_0= ruleTypeExpCS ) )\n // InternalMyDsl.g:5831:5: (lv_ownedType_2_0= ruleTypeExpCS )\n {\n // InternalMyDsl.g:5831:5: (lv_ownedType_2_0= ruleTypeExpCS )\n // InternalMyDsl.g:5832:6: lv_ownedType_2_0= ruleTypeExpCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\tnewCompositeNode(grammarAccess.getCollectionTypeCSAccess().getOwnedTypeTypeExpCSParserRuleCall_1_1_0());\n \t\t\t\t\t\n }\n pushFollow(FOLLOW_8);\n lv_ownedType_2_0=ruleTypeExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\tif (current==null) {\n \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getCollectionTypeCSRule());\n \t\t\t\t\t\t}\n \t\t\t\t\t\tset(\n \t\t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\t\"ownedType\",\n \t\t\t\t\t\t\tlv_ownedType_2_0,\n \t\t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.TypeExpCS\");\n \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\t\n }\n\n }\n\n\n }\n\n otherlv_3=(Token)match(input,21,FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(otherlv_3, grammarAccess.getCollectionTypeCSAccess().getRightParenthesisKeyword_1_2());\n \t\t\t\n }\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "protected Collection createCollectionMatchingType(MappingContext mappingContext) {\n Class<?> collectionType = mappingContext.getTypeInformation().getSafeToWriteClass();\n if (collectionType.isAssignableFrom(ArrayList.class)) {\n return new ArrayList();\n } else if (collectionType.isAssignableFrom(LinkedHashSet.class)) {\n return new LinkedHashSet();\n } else {\n throw new ConfigMeMapperException(mappingContext, \"Unsupported collection type '\" + collectionType + \"'\");\n }\n }", "public ArrayList() {\n\t\tthis(10, 75);\n\t}", "public java.lang.String getCollection() {\n return collection_;\n }", "LetExp createLetExp();", "@Override\n\tpublic String getCollection() {\n\t\treturn null;\n\t}", "public static CodeBlock generateFromModelForCollection(Field field, GenerationPackageModel generationInfo) throws DefinitionException, InnerClassGenerationException {\n String typeName = field.getGenericType().getTypeName();\n\n if (typeName.matches(PATTERN_FOR_GENERIC_INNER_TYPES) ||\n typeName.equals(CLASS_LIST) ||\n typeName.equals(CLASS_SET) ||\n typeName.equals(CLASS_QUEUE))\n throw new DefinitionException(format(UNABLE_TO_DEFINE_GENERIC_TYPE,\n typeName,\n field.getName(),\n field.getDeclaringClass().getSimpleName(),\n FROM_MODEL + field.getDeclaringClass().getSimpleName()));\n\n String getField = GET + String.valueOf(field.getName().charAt(0)).toUpperCase() + field.getName().substring(1);\n\n if (typeName.contains(CLASS_STRING))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + STRING_COLLECTION_FIELD, field.getName(), getField)).build();\n if (typeName.contains(CLASS_INTEGER))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + INT_COLLECTION_FIELD, field.getName(), getField)).build();\n if (typeName.contains(CLASS_DOUBLE))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + DOUBLE_COLLECTION_FIELD, field.getName(), getField)).build();\n if (typeName.contains(CLASS_LONG))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + LONG_COLLECTION_FIELD, field.getName(), getField)).build();\n if (typeName.contains(CLASS_BYTE))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + BYTE_COLLECTION_FIELD, field.getName(), getField)).build();\n if (typeName.contains(CLASS_BOOLEAN))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + BOOL_COLLECTION_FIELD, field.getName(), getField)).build();\n if (typeName.contains(CLASS_FLOAT))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + FLOAT_COLLECTION_FIELD, field.getName(), getField)).build();\n\n ClassName newClassMapper = createMapperForInnerClassIfNeeded(getClassFromField(field), generationInfo);\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + ENTITY_COLLECTION_FIELD,\n field.getName(),\n getField,\n newClassMapper,\n FROM_MODEL + newClassMapper.simpleName().replace(MAPPER, EMPTY_STRING))).build();\n }", "public static java.util.Collection literals()\n {\n final java.util.Collection<String> literals = new java.util.ArrayList<String>(values().length);\n for (int i = 0; i < values().length; i++)\n {\n literals.add(values()[i].name());\n }\n return literals;\n }", "public RandomizedCollection() {\n map = new HashMap<>();\n arr = new ArrayList<>();\n }", "RealLiteralExp createRealLiteralExp();", "public Collection getCollection() {\n return mCollection;\n }", "public PermissionCollection newPermissionCollection()\n {\n return new WECollection();\n }", "public T caseInCollectionElementsDeclaration(InCollectionElementsDeclaration object)\n {\n return null;\n }", "ListType createListType();", "public interface CollectionCreator {\n\n /**\n * Creates a new collection instance to be populated by the binder.\n * \n * @param initialCapacity\n * The number of elements that will be added to the collection. To be\n * used with collections that can benefit from this information.\n * @return the newly created empty collection instance.\n */\n Collection<?> create(int initialCapacity);\n\n}", "@Override\n public PermissionCollection newPermissionCollection() {\n\t/* bug 4158302 fix */\n\treturn new Collection();\n }", "public RandomizedCollection() {\n nums = new ArrayList<>();\n num2Index = new HashMap<>();\n rand = new Random();\n }", "IterateExp createIterateExp();", "public ImmutableCollection<V> mo8391f() {\n return new C1375c(this.f9855g, 1, this.f9856h);\n }", "public GameCollection() {\n\t\tcollection = new Vector();\n\t}", "public Builder setCollection(\n java.lang.String value) {\n copyOnWrite();\n instance.setCollection(value);\n return this;\n }", "ArrayListOfStrings () {\n list = new ArrayList<String>();\n }", "public RandomizedCollection() {\n\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic void createReturnTypeAsCollection(AST ast,\r\n\t\t\tAbstractTypeDeclaration td, MethodDeclaration md,\r\n\t\t\tString umlTypeName, String umlQualifiedTypeName,\r\n\t\t\tString sourceDirectoryPackageName, String collectionTypeConstant) {\r\n\t\tType type = getChosenType(ast, umlTypeName, umlQualifiedTypeName,\r\n\t\t\t\tsourceDirectoryPackageName);\r\n\t\t// Create Collection\r\n\t\tSimpleType collectionType = ast.newSimpleType(ast\r\n\t\t\t\t.newName(collectionTypeConstant));\r\n\t\tParameterizedType pt = ast.newParameterizedType(collectionType);\r\n\t\tpt.typeArguments().add(type);\r\n\t\tmd.setReturnType2(pt);\r\n\t\ttd.bodyDeclarations().add(md);\r\n\t}", "@Override\n public DietCollection digestion() {\n return new DietCollection();\n }", "public ObjectStack() {\n this.collection = new ArrayIndexedCollection();\n }", "public java.lang.String getCollection() {\n return instance.getCollection();\n }", "public ListMemberConstraint( Collection existing, boolean caseSensitive )\n {\n if ( null == existing)\n {\n existing = new ArrayList();\n }\n m_caseSensitive = caseSensitive;\n m_existingElems = existing;\n }", "public RegexCharClass()\n\t{\n\t\t_rangelist = new java.util.ArrayList<SingleRange>(6);\n\t\t_canonical = true;\n\t\t_categories = new StringBuilder();\n\n\t}", "public ObjectStack() {\n\t\tcollection = new ArrayBackedIndexedCollection();\n\t}" ]
[ "0.84969586", "0.6781944", "0.66821426", "0.63383806", "0.6298185", "0.6273544", "0.6273544", "0.62021655", "0.61359936", "0.6114637", "0.61133033", "0.60675186", "0.6014194", "0.5972897", "0.5954091", "0.58266175", "0.58177567", "0.58128375", "0.577221", "0.5753558", "0.5723224", "0.5673539", "0.5665788", "0.55828", "0.5577384", "0.5572089", "0.5569354", "0.55513674", "0.5529204", "0.55164576", "0.5501034", "0.5471075", "0.54693705", "0.5434953", "0.54160064", "0.53872", "0.5364077", "0.5348622", "0.5332824", "0.5324591", "0.5317526", "0.5311163", "0.5310097", "0.53055793", "0.52907485", "0.52886695", "0.52680284", "0.52531356", "0.52463573", "0.52445483", "0.5218753", "0.51937526", "0.51910096", "0.5184997", "0.51645947", "0.51638836", "0.5141692", "0.5118184", "0.5116284", "0.5116277", "0.5110387", "0.508782", "0.50751865", "0.50747925", "0.50678706", "0.50678706", "0.50667644", "0.50460947", "0.50405324", "0.5039145", "0.50388736", "0.50271565", "0.5025419", "0.5024664", "0.50145555", "0.49989223", "0.49981058", "0.49919862", "0.49908966", "0.4986308", "0.49855092", "0.49786508", "0.4978003", "0.4977253", "0.4975429", "0.49634025", "0.4954587", "0.49491754", "0.49440315", "0.49436507", "0.49199048", "0.49178827", "0.49150956", "0.49101153", "0.4907565", "0.49061632", "0.48957038", "0.48943198", "0.4893821", "0.48928565" ]
0.8459348
1
Returns a new object of class 'Collection Range'.
<C> CollectionRange<C> createCollectionRange();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CollectionRange createCollectionRange();", "Range createRange();", "private Range() {}", "abstract public Range createRange();", "Range() {}", "public SetOfRanges() {\n RangeSet = new Vector();\n }", "RangeValue createRangeValue();", "public T caseCollectionRangeCS(CollectionRangeCS object) {\r\n return null;\r\n }", "public abstract ucar.array.RangeIterator getRangeIterator();", "@Override\r\n public void addRangeClass(AgeClass rgCls)\r\n {\n \r\n range.add(rgCls);\r\n }", "protected abstract Collection createCollection();", "public Range compose(Range r) throws InvalidRangeException {\n if ((length() == 0) || (r.length() == 0)) {\n return EMPTY;\n }\n if (this == VLEN || r == VLEN) {\n return VLEN;\n }\n /*\n * if(false) {// Original version\n * // Note that this version assumes that range r is\n * // correct with respect to this.\n * int first = element(r.first());\n * int stride = stride() * r.stride();\n * int last = element(r.last());\n * return new Range(name, first, last, stride);\n * } else {//new version: handles versions all values of r.\n */\n int sr_stride = this.stride * r.stride;\n int sr_first = element(r.first()); // MAP(this,i) == element(i)\n int lastx = element(r.last());\n int sr_last = Math.min(last(), lastx);\n return new Range(name, sr_first, sr_last, sr_stride);\n }", "public SummaryRanges() {\n this.intervals = new ArrayList<>();\n }", "public DateRange getDateRange();", "private Range() {\n this.length = 0;\n this.first = 0;\n this.last = -1;\n this.stride = 1;\n this.name = \"EMPTY\";\n }", "public AttributeRanges() {\n }", "public SummaryRanges() {\n tree = new TreeMap<>();\n }", "protected Collection<V> newCollection() {\r\n \treturn new ArrayList<V>();\r\n }", "@Test\n public void test_range_Integer_Collection2() {\n populate_i2();\n Collection<Integer> actual = Selector.range(i2, 3, 5, new CompareIntegerAscending());\n Collection<Integer> expected = new ArrayList<Integer>();\n expected.add(5);\n expected.add(3);\n Assert.assertEquals(\"Did not find range correctly\", expected, actual);\n }", "@Test\n public void test_range_Integer_Collection1() {\n populate_i1();\n Collection<Integer> actual = Selector.range(i1, 1, 5, new CompareIntegerAscending());\n Collection<Integer> expected = new ArrayList<Integer>();\n expected.add(2);\n expected.add(3);\n expected.add(4);\n Assert.assertEquals(\"Did not find range correctly\", expected, actual);\n }", "ValueRangeConstraint createValueRangeConstraint();", "RangeOfValuesType createRangeOfValuesType();", "protected abstract R toRange(D lower, D upper);", "public Collection() {\n this.collection = new ArrayList<>();\n }", "public RangeVector(RangeVector base) {\n int dimensions = base.values.length;\n this.values = Arrays.copyOf(base.values, dimensions);\n this.upper = Arrays.copyOf(base.upper, dimensions);\n this.lower = Arrays.copyOf(base.lower, dimensions);\n }", "private QARange cloneThis(){\n QARange retval = new QARange();\n retval.setName(this.getName());\n retval.setCardTypes(this.getCardTypes());\n retval.setCustom(this.getCustom());\n if (retval.getRangeValues()==null){\n retval.setRangeValues(new RealmList<QARangeValue>());\n }\n\n for (QARangeValue val: getRangeValues()) {\n retval.getRangeValues().add(val);\n }\n for (String cardType : getSupportedCardList()){\n retval.getSupportedCardList().add(cardType);\n }\n return retval;\n }", "@Test\n public void test_range_Integer_Collection4() {\n populate_i3();\n Collection<Integer> actual = Selector.range(i3, 4, 8, new CompareIntegerAscending());\n Collection<Integer> expected = new ArrayList<Integer>();\n expected.add(8);\n expected.add(7);\n expected.add(6);\n expected.add(5);\n expected.add(4);\n Assert.assertEquals(\"Did not find range correctly\", expected, actual);\n }", "@Override\n\tpublic int getRange() {\n\t\treturn range;\n\t}", "public Range(Double val) {\n\t\tminSum = maxSum = val;\n\t\tupdated = false;\n\t}", "public ImmutableSortedSet<C> subSet(Range<C> range) {\n return ImmutableRangeSet.this.subRangeSet((Range) range).asSet((DiscreteDomain<C>) this.domain);\n }", "@Test\n public void test_range_Integer_Collection3() {\n populate_i2();\n Collection<Integer> actual = Selector.range(i2, 5, 3, new CompareIntegerDescending());\n Collection<Integer> expected = new ArrayList<Integer>();\n expected.add(5);\n expected.add(3);\n Assert.assertEquals(\"Did not find range correctly\", expected, actual);\n }", "public Range(int length) {\n assert (length != 0);\n this.name = null;\n this.first = 0;\n this.last = length - 1;\n this.stride = 1;\n this.length = length;\n }", "public Set<T> getRanges();", "public Collection<V> l_() {\n return new d(this);\n }", "@Override\n\tpublic List<IRange> getRangeList() {\n\t\treturn null;\n\t}", "public int getRange() {\n return mRange;\n }", "public ReferenceRange() {\n\t\tsuper();\n\t\tmRr = CDAFactory.eINSTANCE.createReferenceRange();\n\t\tmRr.setObservationRange(getObsR());\n\t\tmRr.setTypeCode(ActRelationshipType.REFV);\n\t\tthis.setInterpretationCode(ObservationInterpretation.NORMAL);\n\t}", "@Override\r\n public String toString() {\r\n return \"Range [\" + \"min=\" + min + \", max=\" + max + \"]\";\r\n }", "public int getRange()\n\t{\n\t\treturn Range;\n\t}", "public final ANTLRv3Parser.range_return range() throws RecognitionException {\r\n ANTLRv3Parser.range_return retval = new ANTLRv3Parser.range_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token c1=null;\r\n Token c2=null;\r\n Token RANGE133=null;\r\n ANTLRv3Parser.elementOptions_return elementOptions134 =null;\r\n\r\n\r\n CommonTree c1_tree=null;\r\n CommonTree c2_tree=null;\r\n CommonTree RANGE133_tree=null;\r\n RewriteRuleTokenStream stream_RANGE=new RewriteRuleTokenStream(adaptor,\"token RANGE\");\r\n RewriteRuleTokenStream stream_CHAR_LITERAL=new RewriteRuleTokenStream(adaptor,\"token CHAR_LITERAL\");\r\n RewriteRuleSubtreeStream stream_elementOptions=new RewriteRuleSubtreeStream(adaptor,\"rule elementOptions\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:2: (c1= CHAR_LITERAL RANGE c2= CHAR_LITERAL ( elementOptions )? -> ^( CHAR_RANGE[$c1,\\\"..\\\"] $c1 $c2 ( elementOptions )? ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:4: c1= CHAR_LITERAL RANGE c2= CHAR_LITERAL ( elementOptions )?\r\n {\r\n c1=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_range2159); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_CHAR_LITERAL.add(c1);\r\n\r\n\r\n RANGE133=(Token)match(input,RANGE,FOLLOW_RANGE_in_range2161); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_RANGE.add(RANGE133);\r\n\r\n\r\n c2=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_range2165); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_CHAR_LITERAL.add(c2);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:42: ( elementOptions )?\r\n int alt61=2;\r\n int LA61_0 = input.LA(1);\r\n\r\n if ( (LA61_0==77) ) {\r\n alt61=1;\r\n }\r\n switch (alt61) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:42: elementOptions\r\n {\r\n pushFollow(FOLLOW_elementOptions_in_range2167);\r\n elementOptions134=elementOptions();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_elementOptions.add(elementOptions134.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // AST REWRITE\r\n // elements: c2, c1, elementOptions\r\n // token labels: c1, c2\r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleTokenStream stream_c1=new RewriteRuleTokenStream(adaptor,\"token c1\",c1);\r\n RewriteRuleTokenStream stream_c2=new RewriteRuleTokenStream(adaptor,\"token c2\",c2);\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 298:3: -> ^( CHAR_RANGE[$c1,\\\"..\\\"] $c1 $c2 ( elementOptions )? )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:298:6: ^( CHAR_RANGE[$c1,\\\"..\\\"] $c1 $c2 ( elementOptions )? )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(CHAR_RANGE, c1, \"..\")\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, stream_c1.nextNode());\r\n\r\n adaptor.addChild(root_1, stream_c2.nextNode());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:298:37: ( elementOptions )?\r\n if ( stream_elementOptions.hasNext() ) {\r\n adaptor.addChild(root_1, stream_elementOptions.nextTree());\r\n\r\n }\r\n stream_elementOptions.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "public Object readResolve() {\n if (this.ranges.isEmpty()) {\n return ImmutableRangeSet.of();\n }\n if (this.ranges.equals(ImmutableList.of(Range.all()))) {\n return ImmutableRangeSet.all();\n }\n return new ImmutableRangeSet(this.ranges);\n }", "public Collection() {\n }", "public double getRange(){\n\t\treturn range;\n\t}", "public static Range make(int first, int last) {\n try {\n return new Range(first, last);\n } catch (InvalidRangeException e) {\n throw new RuntimeException(e); // cant happen if last >= first\n }\n }", "int getRange();", "public SummaryRanges() {\n S.add(new MyPair(-INF, -INF)); S.add(new MyPair(INF, INF));\n }", "public interface IntervalRange<V extends Comparable<V>> extends Range<V> {\n\n\t/**\n\t * This method returns the lower bound of the interval.\n\t * \n\t * @return the lower bound. <code>null</code> means there is no lower bound,\n\t * i.e., this is an open interval.\n\t */\n\tpublic V getLowerBound();\n\n\t/**\n\t * This method returns the upper bound of the interval.\n\t * \n\t * @return the upper bound. <code>null</code> means there is no upper bound,\n\t * i.e., this is an open interval.\n\t */\n\tpublic V getUpperBound();\n\n}", "public void setRange(Range range) { setRange(range, true, true); }", "private ElectronRange(String name, String reference) {\n super(\"Electron Range\", name, reference);\n }", "Collection<?> create(int initialCapacity);", "public Sort Range() throws Z3Exception\n\t{\n\t\treturn Sort.Create(Context(),\n\t\t\t\tNative.getArraySortRange(Context().nCtx(), NativeObject()));\n\t}", "public Range(int first, int last) throws InvalidRangeException {\n this(null, first, last, 1);\n }", "public Range(int minIn, int maxIn) {\n min = minIn;\n max = maxIn;\n }", "public Range ageRange() {\n return getObject(Range.class, FhirPropertyNames.PROPERTY_AGE_RANGE);\n }", "public LongRange(long number) {\n/* 73 */ this.min = number;\n/* 74 */ this.max = number;\n/* */ }", "private SingleRange GetRangeAt(int i)\n\t{\n\t\treturn _rangelist.get(i);\n\t}", "public void add_Range(Range range_to_add){\n this.range_vector.add(range_to_add);\n }", "public final CQLParser.rangeFunction_return rangeFunction() throws RecognitionException {\n CQLParser.rangeFunction_return retval = new CQLParser.rangeFunction_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token openType=null;\n Token closeType=null;\n Token RANGE148=null;\n Token char_literal149=null;\n CQLParser.expression_return e = null;\n\n CQLParser.expression_return rangeStart = null;\n\n CQLParser.expression_return rangeEnd = null;\n\n\n Object openType_tree=null;\n Object closeType_tree=null;\n Object RANGE148_tree=null;\n Object char_literal149_tree=null;\n RewriteRuleTokenStream stream_116=new RewriteRuleTokenStream(adaptor,\"token 116\");\n RewriteRuleTokenStream stream_117=new RewriteRuleTokenStream(adaptor,\"token 117\");\n RewriteRuleTokenStream stream_114=new RewriteRuleTokenStream(adaptor,\"token 114\");\n RewriteRuleTokenStream stream_RANGE=new RewriteRuleTokenStream(adaptor,\"token RANGE\");\n RewriteRuleTokenStream stream_115=new RewriteRuleTokenStream(adaptor,\"token 115\");\n RewriteRuleTokenStream stream_118=new RewriteRuleTokenStream(adaptor,\"token 118\");\n RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,\"rule expression\");\n errorMessageStack.push(\"RANGE definition\"); \n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:2: ( RANGE e= expression ( (openType= '[' ) | (openType= '(' ) ) rangeStart= expression ',' rangeEnd= expression (closeType= ')' | closeType= ']' ) -> ^( RANGE $e $openType $closeType $rangeStart $rangeEnd) )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:4: RANGE e= expression ( (openType= '[' ) | (openType= '(' ) ) rangeStart= expression ',' rangeEnd= expression (closeType= ')' | closeType= ']' )\n {\n RANGE148=(Token)match(input,RANGE,FOLLOW_RANGE_in_rangeFunction2480); \n stream_RANGE.add(RANGE148);\n\n pushFollow(FOLLOW_expression_in_rangeFunction2484);\n e=expression();\n\n state._fsp--;\n\n stream_expression.add(e.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:23: ( (openType= '[' ) | (openType= '(' ) )\n int alt41=2;\n int LA41_0 = input.LA(1);\n\n if ( (LA41_0==117) ) {\n alt41=1;\n }\n else if ( (LA41_0==114) ) {\n alt41=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 41, 0, input);\n\n throw nvae;\n }\n switch (alt41) {\n case 1 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:24: (openType= '[' )\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:24: (openType= '[' )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:25: openType= '['\n {\n openType=(Token)match(input,117,FOLLOW_117_in_rangeFunction2490); \n stream_117.add(openType);\n\n\n }\n\n\n }\n break;\n case 2 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:41: (openType= '(' )\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:41: (openType= '(' )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:42: openType= '('\n {\n openType=(Token)match(input,114,FOLLOW_114_in_rangeFunction2498); \n stream_114.add(openType);\n\n\n }\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_expression_in_rangeFunction2504);\n rangeStart=expression();\n\n state._fsp--;\n\n stream_expression.add(rangeStart.getTree());\n char_literal149=(Token)match(input,115,FOLLOW_115_in_rangeFunction2506); \n stream_115.add(char_literal149);\n\n pushFollow(FOLLOW_expression_in_rangeFunction2510);\n rangeEnd=expression();\n\n state._fsp--;\n\n stream_expression.add(rangeEnd.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:103: (closeType= ')' | closeType= ']' )\n int alt42=2;\n int LA42_0 = input.LA(1);\n\n if ( (LA42_0==116) ) {\n alt42=1;\n }\n else if ( (LA42_0==118) ) {\n alt42=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 42, 0, input);\n\n throw nvae;\n }\n switch (alt42) {\n case 1 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:104: closeType= ')'\n {\n closeType=(Token)match(input,116,FOLLOW_116_in_rangeFunction2515); \n stream_116.add(closeType);\n\n\n }\n break;\n case 2 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:119: closeType= ']'\n {\n closeType=(Token)match(input,118,FOLLOW_118_in_rangeFunction2520); \n stream_118.add(closeType);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: openType, e, rangeEnd, rangeStart, closeType, RANGE\n // token labels: closeType, openType\n // rule labels: retval, e, rangeStart, rangeEnd\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleTokenStream stream_closeType=new RewriteRuleTokenStream(adaptor,\"token closeType\",closeType);\n RewriteRuleTokenStream stream_openType=new RewriteRuleTokenStream(adaptor,\"token openType\",openType);\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,\"rule e\",e!=null?e.tree:null);\n RewriteRuleSubtreeStream stream_rangeStart=new RewriteRuleSubtreeStream(adaptor,\"rule rangeStart\",rangeStart!=null?rangeStart.tree:null);\n RewriteRuleSubtreeStream stream_rangeEnd=new RewriteRuleSubtreeStream(adaptor,\"rule rangeEnd\",rangeEnd!=null?rangeEnd.tree:null);\n\n root_0 = (Object)adaptor.nil();\n // 505:3: -> ^( RANGE $e $openType $closeType $rangeStart $rangeEnd)\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:505:6: ^( RANGE $e $openType $closeType $rangeStart $rangeEnd)\n {\n Object root_1 = (Object)adaptor.nil();\n root_1 = (Object)adaptor.becomeRoot(stream_RANGE.nextNode(), root_1);\n\n adaptor.addChild(root_1, stream_e.nextTree());\n adaptor.addChild(root_1, stream_openType.nextNode());\n adaptor.addChild(root_1, stream_closeType.nextNode());\n adaptor.addChild(root_1, stream_rangeStart.nextTree());\n adaptor.addChild(root_1, stream_rangeEnd.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n errorMessageStack.pop(); \n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "DbQuery setRangeFilter(double startValue, double endValue) {\n filter = Filter.RANGE;\n filterType = FilterType.DOUBLE;\n this.startAt = startValue;\n this.endAt = endValue;\n return this;\n }", "public Intervals(T begin, T end) {\n this(new Interval<T>(begin, end));\n }", "public List<Range> getRanges() {\n // Lazy initialization with double-check.\n List<Range> r = this.ranges;\n if (r == null) {\n synchronized (this) {\n r = this.ranges;\n if (r == null) {\n this.ranges = r = new CopyOnWriteArrayList<Range>();\n }\n }\n }\n return r;\n }", "public HttpRange getRange() {\n return range;\n }", "public RangeDate<Vente> getDateRange() {\n return dateRange;\n }", "public Range<Double> a() {\n return new NumberRange(Double.valueOf(this.a), Double.valueOf(this.b));\n }", "RangeContainer createContainer(long[] data, RangeContainerStrategy strategy);", "public Collection()\n {\n // initialisation des variables d'instance\n documents = new ArrayList<>();\n }", "public AllowedValues(final RangeType range){\n \n valueOrRange = new ArrayList<>();\n valueOrRange.add(range);\n }", "public Range deceasedRange() {\n return getObject(Range.class, FhirPropertyNames.PROPERTY_DECEASED_RANGE);\n }", "private Interval(T start, T end) {\n this.start = start;\n this.end = end;\n }", "public String getRange() {\n return this.range;\n }", "private Range(String name, int length) {\n assert (length != 0);\n this.name = name;\n this.first = 0;\n this.last = length - 1;\n this.stride = 1;\n this.length = length;\n }", "public final void rule__RangeClause__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:11978:1: ( ( 'range' ) )\r\n // InternalGo.g:11979:1: ( 'range' )\r\n {\r\n // InternalGo.g:11979:1: ( 'range' )\r\n // InternalGo.g:11980:2: 'range'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getRangeClauseAccess().getRangeKeyword_1()); \r\n }\r\n match(input,83,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getRangeClauseAccess().getRangeKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "VocNoun getRange();", "public double[] getRange() \n{\n\treturn range;\n}", "@Nonnull \r\n\tpublic static Observable<Integer> range(\r\n\t\t\tfinal int start,\r\n\t\t\tfinal int count,\r\n\t\t\t@Nonnull final Scheduler pool) {\r\n\t\treturn new Range.AsInt(start, count, pool);\r\n\t}", "DbQuery setRangeFilter(String startValue, String endValue) {\n filter = Filter.RANGE;\n filterType = FilterType.STRING;\n this.startAt = startValue;\n this.endAt = endValue;\n return this;\n }", "@JSProperty(\"range\")\n double getRange();", "public static <T> Collection<T> range(Collection<T> c, T low, T high,\nComparator<T> comp) {\n // Check for null.\n if (c == null || comp == null) {\n throw new IllegalArgumentException();\n }\n \n // Checks if collection is empty.\n if (c.isEmpty()) {\n throw new NoSuchElementException();\n }\n \n // Make arraylist of original and arraylist for the range\n // Set j for number of qualifying values\n List<T> copyList = new ArrayList(c);\n List<T> range = new ArrayList(c);\n int j = 0;\n \n /* New copy so that the values within range listed are first in the array*/\n for (int i = 0; i < copyList.size(); i++) {\n if ((comp.compare(copyList.get(i), low) >= 0)\n && (comp.compare(copyList.get(i), high) <= 0)) {\n range.set(j, copyList.get(i));\n j++;\n }\n }\n \n // No values in the arraylist fall within the range.\n if (j == 0) {\n throw new NoSuchElementException();\n }\n \n // Delete extra values of range.\n for (int i = range.size() - 1; i > j - 1; i--) {\n range.remove(i);\n }\n \n return range;\n }", "public LongRange(Number number) {\n/* 87 */ if (number == null) {\n/* 88 */ throw new IllegalArgumentException(\"The number must not be null\");\n/* */ }\n/* 90 */ this.min = number.longValue();\n/* 91 */ this.max = number.longValue();\n/* 92 */ if (number instanceof Long) {\n/* 93 */ this.minObject = (Long)number;\n/* 94 */ this.maxObject = (Long)number;\n/* */ } \n/* */ }", "public Range(String name, int first, int last) throws InvalidRangeException {\n this(name, first, last, 1);\n }", "public NumericRangeFilter() {\n this(0.00, 999999.99);\n }", "public Uri getRange()\n {\n return range;\n }", "@Override\n public List<Bound> getBounds() {\n return Collections.unmodifiableList(bounds);\n }", "public ResultSet getItemRangeResultSet() {\n\t\treturn this.itemRangeResultSet;\n\t}", "public Collection getPosts_fromIDRange(int fromID, int toID)\r\n throws IllegalArgumentException, DatabaseException;", "default AddressRange range(Address address, long length) {\n\t\ttry {\n\t\t\treturn new AddressRangeImpl(address, length);\n\t\t}\n\t\tcatch (AddressOverflowException e) {\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}", "public RangeSlider(int min, int max) {\n super(min, max);\n initSlider();\n }", "public ContactListFilterPredicate range(ContactListFilterRange range) {\n this.range = range;\n return this;\n }", "public RangeSlider() {\n initSlider();\n }", "public final AstValidator.col_range_return col_range() throws RecognitionException {\n AstValidator.col_range_return retval = new AstValidator.col_range_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree COL_RANGE262=null;\n CommonTree DOUBLE_PERIOD264=null;\n AstValidator.col_ref_return col_ref263 =null;\n\n AstValidator.col_ref_return col_ref265 =null;\n\n\n CommonTree COL_RANGE262_tree=null;\n CommonTree DOUBLE_PERIOD264_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:451:11: ( ^( COL_RANGE ( col_ref )? DOUBLE_PERIOD ( col_ref )? ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:451:14: ^( COL_RANGE ( col_ref )? DOUBLE_PERIOD ( col_ref )? )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n COL_RANGE262=(CommonTree)match(input,COL_RANGE,FOLLOW_COL_RANGE_in_col_range2251); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n COL_RANGE262_tree = (CommonTree)adaptor.dupNode(COL_RANGE262);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(COL_RANGE262_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:451:26: ( col_ref )?\n int alt66=2;\n int LA66_0 = input.LA(1);\n\n if ( (LA66_0==CUBE||LA66_0==DOLLARVAR||LA66_0==GROUP||LA66_0==IDENTIFIER) ) {\n alt66=1;\n }\n switch (alt66) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:451:26: col_ref\n {\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_col_ref_in_col_range2253);\n col_ref263=col_ref();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, col_ref263.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n\n\n _last = (CommonTree)input.LT(1);\n DOUBLE_PERIOD264=(CommonTree)match(input,DOUBLE_PERIOD,FOLLOW_DOUBLE_PERIOD_in_col_range2256); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n DOUBLE_PERIOD264_tree = (CommonTree)adaptor.dupNode(DOUBLE_PERIOD264);\n\n\n adaptor.addChild(root_1, DOUBLE_PERIOD264_tree);\n }\n\n\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:451:49: ( col_ref )?\n int alt67=2;\n int LA67_0 = input.LA(1);\n\n if ( (LA67_0==CUBE||LA67_0==DOLLARVAR||LA67_0==GROUP||LA67_0==IDENTIFIER) ) {\n alt67=1;\n }\n switch (alt67) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:451:49: col_ref\n {\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_col_ref_in_col_range2258);\n col_ref265=col_ref();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, col_ref265.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public abstract Self byteRange(byte min, byte max);", "public double[] getRange(){\n\treturn RANGE;\n }", "public LongRange(Number number1, Number number2) {\n/* 132 */ if (number1 == null || number2 == null) {\n/* 133 */ throw new IllegalArgumentException(\"The numbers must not be null\");\n/* */ }\n/* 135 */ long number1val = number1.longValue();\n/* 136 */ long number2val = number2.longValue();\n/* 137 */ if (number2val < number1val) {\n/* 138 */ this.min = number2val;\n/* 139 */ this.max = number1val;\n/* 140 */ if (number2 instanceof Long) {\n/* 141 */ this.minObject = (Long)number2;\n/* */ }\n/* 143 */ if (number1 instanceof Long) {\n/* 144 */ this.maxObject = (Long)number1;\n/* */ }\n/* */ } else {\n/* 147 */ this.min = number1val;\n/* 148 */ this.max = number2val;\n/* 149 */ if (number1 instanceof Long) {\n/* 150 */ this.minObject = (Long)number1;\n/* */ }\n/* 152 */ if (number2 instanceof Long) {\n/* 153 */ this.maxObject = (Long)number2;\n/* */ }\n/* */ } \n/* */ }", "public interface RangeContainerFactoryDynamic extends RangeContainerFactory{\n\n /**\n * builds an immutable container optimized for range queries.\n * Data is expected to be 32k items or less.\n *\n * takes an additional strategy parameter to invoke the corresponding type of RangeContainer creation\n */\n RangeContainer createContainer(long[] data, RangeContainerStrategy strategy);\n\n}", "Range controlLimits();", "public BoundedIterator(List<? extends T> list, int start, int end)\n {\n iter_ = new listIterator<T>(list, start, end);\n }", "public Range compact() throws InvalidRangeException {\n if (stride == 1)\n return this;\n int first = first() / stride; // LOOK WTF ?\n int last = first + length() - 1;\n return new Range(name, first, last, 1);\n }", "public Iterable<Point2D> range(RectHV rect) {\n if (rect == null) {\n throw new IllegalArgumentException();\n }\n List<Point2D> list = new LinkedList<>();\n range(rect, new RectHV(0.0, 0.0, 1.0, 1.0), list, this.root);\n return list;\n }", "public static List <Index> rangeOf(int start, int end) {\r\n FastTable <Index> list = FastTable.newInstance();\r\n for (int i=start; i < end; i++) {\r\n list.add(Index.valueOf(i));\r\n }\r\n return list;\r\n }", "public boolean isRange() {\r\n return range;\r\n }" ]
[ "0.8827921", "0.7448077", "0.7430409", "0.73904186", "0.7029165", "0.66325384", "0.63539326", "0.62928176", "0.61771476", "0.6029435", "0.5974509", "0.5933793", "0.59051824", "0.5896161", "0.5889788", "0.58831394", "0.5880978", "0.5837541", "0.5833269", "0.583111", "0.58231753", "0.5822141", "0.57751244", "0.5746083", "0.573458", "0.5721388", "0.5688805", "0.563351", "0.5612977", "0.5602857", "0.55950665", "0.5572483", "0.5567882", "0.5560408", "0.55483836", "0.5546731", "0.55362856", "0.5508714", "0.5504836", "0.54945415", "0.5481532", "0.5460478", "0.5458531", "0.5457434", "0.5449525", "0.54457426", "0.54399645", "0.5437933", "0.5435895", "0.5433396", "0.54210335", "0.54196864", "0.54106694", "0.5388951", "0.538766", "0.53857887", "0.5379751", "0.53650784", "0.53619045", "0.5361242", "0.5337008", "0.5334758", "0.532213", "0.53112483", "0.5305298", "0.52999735", "0.52981645", "0.52887607", "0.528681", "0.5278446", "0.52686", "0.526655", "0.5228861", "0.5226666", "0.5224357", "0.5222304", "0.5218007", "0.5211302", "0.5209055", "0.52047455", "0.52024746", "0.5201742", "0.520107", "0.52004933", "0.51944", "0.51908696", "0.5181519", "0.5173937", "0.5168", "0.51640594", "0.51533234", "0.5146935", "0.51443684", "0.5143096", "0.5140858", "0.51385057", "0.51325047", "0.5132057", "0.51280886", "0.51230377" ]
0.8560176
1
Returns a new object of class 'Enum Literal Exp'.
<C, EL> EnumLiteralExp<C, EL> createEnumLiteralExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "EnumLiteralExp createEnumLiteralExp();", "EEnumLiteral createEEnumLiteral();", "public CustomMof14EnumLiteral createCustomMof14EnumLiteral();", "EEnum createEEnum();", "EnumRef createEnumRef();", "EnumConstant createEnumConstant();", "EnumTypeDefinition createEnumTypeDefinition();", "EnumTypeRule createEnumTypeRule();", "Enumeration createEnumeration();", "EnumValue createEnumValue();", "EnumValue createEnumValue();", "EnumValue createEnumValue();", "public interface CustomMof14EnumLiteralClass extends javax.jmi.reflect.RefClass {\n /**\n * The default factory operation used to create an instance object.\n * @return The created instance object.\n */\n public CustomMof14EnumLiteral createCustomMof14EnumLiteral();\n}", "EnumListValue createEnumListValue();", "EnumValueDefinition createEnumValueDefinition();", "TypeLiteralExp createTypeLiteralExp();", "Rule EnumValue() {\n return Sequence(\n Identifier(),\n Optional(EnumConst()),\n Optional(ListSeparator()),\n WhiteSpace(),\n actions.pushEnumValueNode());\n }", "public static LocalizedEnumField of(final LocalizedEnumField template) {\n LocalizedEnumFieldImpl instance = new LocalizedEnumFieldImpl();\n instance.setValue(template.getValue());\n return instance;\n }", "public static LocalizedEnumFieldBuilder builder() {\n return LocalizedEnumFieldBuilder.of();\n }", "public sym_complex_enum() {\n }", "InvalidLiteralExp createInvalidLiteralExp();", "EnumType(String p_i45705_1_, int p_i45705_2_, int p_i45705_3_, String p_i45705_4_, String p_i45705_5_) {\n/* */ this.field_176893_h = p_i45705_3_;\n/* */ this.field_176894_i = p_i45705_4_;\n/* */ this.field_176891_j = p_i45705_5_;\n/* */ }", "public static EnumDomain createEnumDomain() {\n\t\treturn new EnumDomain(new String[]{\"1\", \"2\", \"3\"});\n\t}", "public final eu.hyvar.dataValues.HyEnumLiteral parse_eu_hyvar_dataValues_HyEnumLiteral() throws RecognitionException {\r\n eu.hyvar.dataValues.HyEnumLiteral element = null;\r\n\r\n int parse_eu_hyvar_dataValues_HyEnumLiteral_StartIndex = input.index();\r\n\r\n Token a0=null;\r\n Token a1=null;\r\n Token a2=null;\r\n Token a3=null;\r\n Token a4=null;\r\n Token a5=null;\r\n Token a6=null;\r\n Token a7=null;\r\n Token a8=null;\r\n Token a9=null;\r\n Token a10=null;\r\n Token a11=null;\r\n Token a12=null;\r\n Token a13=null;\r\n Token a14=null;\r\n Token a15=null;\r\n\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 8) ) { return element; }\r\n\r\n // Hymanifest.g:2493:2: (a0= 'EnumLiteral(' (a1= IDENTIFIER_TOKEN ) a2= ',' (a3= INTEGER_LITERAL ) a4= ')' ( (a5= '[' ( (a6= DATE ) a7= '-' (a8= DATE ) | (a9= DATE ) a10= '-' a11= 'eternity' |a12= 'eternity' a13= '-' (a14= DATE ) ) a15= ']' ) )? )\r\n // Hymanifest.g:2494:2: a0= 'EnumLiteral(' (a1= IDENTIFIER_TOKEN ) a2= ',' (a3= INTEGER_LITERAL ) a4= ')' ( (a5= '[' ( (a6= DATE ) a7= '-' (a8= DATE ) | (a9= DATE ) a10= '-' a11= 'eternity' |a12= 'eternity' a13= '-' (a14= DATE ) ) a15= ']' ) )?\r\n {\r\n a0=(Token)match(input,21,FOLLOW_21_in_parse_eu_hyvar_dataValues_HyEnumLiteral2956); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\tif (element == null) {\r\n \t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\tstartIncompleteElement(element);\r\n \t\t}\r\n \t\tcollectHiddenTokens(element);\r\n \t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_0, null, true);\r\n \t\tcopyLocalizationInfos((CommonToken)a0, element);\r\n \t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t// expected elements (follow set)\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[132]);\r\n \t}\r\n\r\n // Hymanifest.g:2508:2: (a1= IDENTIFIER_TOKEN )\r\n // Hymanifest.g:2509:3: a1= IDENTIFIER_TOKEN\r\n {\r\n a1=(Token)match(input,IDENTIFIER_TOKEN,FOLLOW_IDENTIFIER_TOKEN_in_parse_eu_hyvar_dataValues_HyEnumLiteral2974); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\tif (terminateParsing) {\r\n \t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t\t\t}\r\n \t\t\tif (element == null) {\r\n \t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\tstartIncompleteElement(element);\r\n \t\t\t}\r\n \t\t\tif (a1 != null) {\r\n \t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolver tokenResolver = tokenResolverFactory.createTokenResolver(\"IDENTIFIER_TOKEN\");\r\n \t\t\t\ttokenResolver.setOptions(getOptions());\r\n \t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolveResult result = getFreshTokenResolveResult();\r\n \t\t\t\ttokenResolver.resolve(a1.getText(), element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM_LITERAL__NAME), result);\r\n \t\t\t\tObject resolvedObject = result.getResolvedToken();\r\n \t\t\t\tif (resolvedObject == null) {\r\n \t\t\t\t\taddErrorToResource(result.getErrorMessage(), ((CommonToken) a1).getLine(), ((CommonToken) a1).getCharPositionInLine(), ((CommonToken) a1).getStartIndex(), ((CommonToken) a1).getStopIndex());\r\n \t\t\t\t}\r\n \t\t\t\tjava.lang.String resolved = (java.lang.String) resolvedObject;\r\n \t\t\t\tif (resolved != null) {\r\n \t\t\t\t\tObject value = resolved;\r\n \t\t\t\t\telement.eSet(element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM_LITERAL__NAME), value);\r\n \t\t\t\t\tcompletedElement(value, false);\r\n \t\t\t\t}\r\n \t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_1, resolved, true);\r\n \t\t\t\tcopyLocalizationInfos((CommonToken) a1, element);\r\n \t\t\t}\r\n \t\t}\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t// expected elements (follow set)\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[133]);\r\n \t}\r\n\r\n a2=(Token)match(input,15,FOLLOW_15_in_parse_eu_hyvar_dataValues_HyEnumLiteral2995); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\tif (element == null) {\r\n \t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\tstartIncompleteElement(element);\r\n \t\t}\r\n \t\tcollectHiddenTokens(element);\r\n \t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_2, null, true);\r\n \t\tcopyLocalizationInfos((CommonToken)a2, element);\r\n \t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t// expected elements (follow set)\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[134]);\r\n \t}\r\n\r\n // Hymanifest.g:2558:2: (a3= INTEGER_LITERAL )\r\n // Hymanifest.g:2559:3: a3= INTEGER_LITERAL\r\n {\r\n a3=(Token)match(input,INTEGER_LITERAL,FOLLOW_INTEGER_LITERAL_in_parse_eu_hyvar_dataValues_HyEnumLiteral3013); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\tif (terminateParsing) {\r\n \t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t\t\t}\r\n \t\t\tif (element == null) {\r\n \t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\tstartIncompleteElement(element);\r\n \t\t\t}\r\n \t\t\tif (a3 != null) {\r\n \t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolver tokenResolver = tokenResolverFactory.createTokenResolver(\"INTEGER_LITERAL\");\r\n \t\t\t\ttokenResolver.setOptions(getOptions());\r\n \t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolveResult result = getFreshTokenResolveResult();\r\n \t\t\t\ttokenResolver.resolve(a3.getText(), element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM_LITERAL__VALUE), result);\r\n \t\t\t\tObject resolvedObject = result.getResolvedToken();\r\n \t\t\t\tif (resolvedObject == null) {\r\n \t\t\t\t\taddErrorToResource(result.getErrorMessage(), ((CommonToken) a3).getLine(), ((CommonToken) a3).getCharPositionInLine(), ((CommonToken) a3).getStartIndex(), ((CommonToken) a3).getStopIndex());\r\n \t\t\t\t}\r\n \t\t\t\tjava.lang.Integer resolved = (java.lang.Integer) resolvedObject;\r\n \t\t\t\tif (resolved != null) {\r\n \t\t\t\t\tObject value = resolved;\r\n \t\t\t\t\telement.eSet(element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM_LITERAL__VALUE), value);\r\n \t\t\t\t\tcompletedElement(value, false);\r\n \t\t\t\t}\r\n \t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_3, resolved, true);\r\n \t\t\t\tcopyLocalizationInfos((CommonToken) a3, element);\r\n \t\t\t}\r\n \t\t}\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t// expected elements (follow set)\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[135]);\r\n \t}\r\n\r\n a4=(Token)match(input,14,FOLLOW_14_in_parse_eu_hyvar_dataValues_HyEnumLiteral3034); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\tif (element == null) {\r\n \t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\tstartIncompleteElement(element);\r\n \t\t}\r\n \t\tcollectHiddenTokens(element);\r\n \t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_4, null, true);\r\n \t\tcopyLocalizationInfos((CommonToken)a4, element);\r\n \t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t// expected elements (follow set)\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[136]);\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[137]);\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[138]);\r\n \t}\r\n\r\n // Hymanifest.g:2610:2: ( (a5= '[' ( (a6= DATE ) a7= '-' (a8= DATE ) | (a9= DATE ) a10= '-' a11= 'eternity' |a12= 'eternity' a13= '-' (a14= DATE ) ) a15= ']' ) )?\r\n int alt22=2;\r\n int LA22_0 = input.LA(1);\r\n\r\n if ( (LA22_0==24) ) {\r\n alt22=1;\r\n }\r\n switch (alt22) {\r\n case 1 :\r\n // Hymanifest.g:2611:3: (a5= '[' ( (a6= DATE ) a7= '-' (a8= DATE ) | (a9= DATE ) a10= '-' a11= 'eternity' |a12= 'eternity' a13= '-' (a14= DATE ) ) a15= ']' )\r\n {\r\n // Hymanifest.g:2611:3: (a5= '[' ( (a6= DATE ) a7= '-' (a8= DATE ) | (a9= DATE ) a10= '-' a11= 'eternity' |a12= 'eternity' a13= '-' (a14= DATE ) ) a15= ']' )\r\n // Hymanifest.g:2612:4: a5= '[' ( (a6= DATE ) a7= '-' (a8= DATE ) | (a9= DATE ) a10= '-' a11= 'eternity' |a12= 'eternity' a13= '-' (a14= DATE ) ) a15= ']'\r\n {\r\n a5=(Token)match(input,24,FOLLOW_24_in_parse_eu_hyvar_dataValues_HyEnumLiteral3057); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\tif (element == null) {\r\n \t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t}\r\n \t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_5_0_0_0, null, true);\r\n \t\t\t\tcopyLocalizationInfos((CommonToken)a5, element);\r\n \t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t// expected elements (follow set)\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[139]);\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[140]);\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[141]);\r\n \t\t\t}\r\n\r\n // Hymanifest.g:2628:4: ( (a6= DATE ) a7= '-' (a8= DATE ) | (a9= DATE ) a10= '-' a11= 'eternity' |a12= 'eternity' a13= '-' (a14= DATE ) )\r\n int alt21=3;\r\n int LA21_0 = input.LA(1);\r\n\r\n if ( (LA21_0==DATE) ) {\r\n int LA21_1 = input.LA(2);\r\n\r\n if ( (LA21_1==16) ) {\r\n int LA21_3 = input.LA(3);\r\n\r\n if ( (LA21_3==DATE) ) {\r\n alt21=1;\r\n }\r\n else if ( (LA21_3==27) ) {\r\n alt21=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return element;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 21, 3, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return element;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 21, 1, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n else if ( (LA21_0==27) ) {\r\n alt21=3;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return element;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 21, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt21) {\r\n case 1 :\r\n // Hymanifest.g:2629:5: (a6= DATE ) a7= '-' (a8= DATE )\r\n {\r\n // Hymanifest.g:2629:5: (a6= DATE )\r\n // Hymanifest.g:2630:6: a6= DATE\r\n {\r\n a6=(Token)match(input,DATE,FOLLOW_DATE_in_parse_eu_hyvar_dataValues_HyEnumLiteral3090); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t\tif (terminateParsing) {\r\n \t\t\t\t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (a6 != null) {\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolver tokenResolver = tokenResolverFactory.createTokenResolver(\"DATE\");\r\n \t\t\t\t\t\t\ttokenResolver.setOptions(getOptions());\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolveResult result = getFreshTokenResolveResult();\r\n \t\t\t\t\t\t\ttokenResolver.resolve(a6.getText(), element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM_LITERAL__VALID_SINCE), result);\r\n \t\t\t\t\t\t\tObject resolvedObject = result.getResolvedToken();\r\n \t\t\t\t\t\t\tif (resolvedObject == null) {\r\n \t\t\t\t\t\t\t\taddErrorToResource(result.getErrorMessage(), ((CommonToken) a6).getLine(), ((CommonToken) a6).getCharPositionInLine(), ((CommonToken) a6).getStartIndex(), ((CommonToken) a6).getStopIndex());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tjava.util.Date resolved = (java.util.Date) resolvedObject;\r\n \t\t\t\t\t\t\tif (resolved != null) {\r\n \t\t\t\t\t\t\t\tObject value = resolved;\r\n \t\t\t\t\t\t\t\telement.eSet(element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM_LITERAL__VALID_SINCE), value);\r\n \t\t\t\t\t\t\t\tcompletedElement(value, false);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_5_0_0_1_0_0_0, resolved, true);\r\n \t\t\t\t\t\t\tcopyLocalizationInfos((CommonToken) a6, element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[142]);\r\n \t\t\t\t}\r\n\r\n a7=(Token)match(input,16,FOLLOW_16_in_parse_eu_hyvar_dataValues_HyEnumLiteral3129); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_5_0_0_1_0_0_1, null, true);\r\n \t\t\t\t\tcopyLocalizationInfos((CommonToken)a7, element);\r\n \t\t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[143]);\r\n \t\t\t\t}\r\n\r\n // Hymanifest.g:2679:5: (a8= DATE )\r\n // Hymanifest.g:2680:6: a8= DATE\r\n {\r\n a8=(Token)match(input,DATE,FOLLOW_DATE_in_parse_eu_hyvar_dataValues_HyEnumLiteral3159); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t\tif (terminateParsing) {\r\n \t\t\t\t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (a8 != null) {\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolver tokenResolver = tokenResolverFactory.createTokenResolver(\"DATE\");\r\n \t\t\t\t\t\t\ttokenResolver.setOptions(getOptions());\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolveResult result = getFreshTokenResolveResult();\r\n \t\t\t\t\t\t\ttokenResolver.resolve(a8.getText(), element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM_LITERAL__VALID_UNTIL), result);\r\n \t\t\t\t\t\t\tObject resolvedObject = result.getResolvedToken();\r\n \t\t\t\t\t\t\tif (resolvedObject == null) {\r\n \t\t\t\t\t\t\t\taddErrorToResource(result.getErrorMessage(), ((CommonToken) a8).getLine(), ((CommonToken) a8).getCharPositionInLine(), ((CommonToken) a8).getStartIndex(), ((CommonToken) a8).getStopIndex());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tjava.util.Date resolved = (java.util.Date) resolvedObject;\r\n \t\t\t\t\t\t\tif (resolved != null) {\r\n \t\t\t\t\t\t\t\tObject value = resolved;\r\n \t\t\t\t\t\t\t\telement.eSet(element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM_LITERAL__VALID_UNTIL), value);\r\n \t\t\t\t\t\t\t\tcompletedElement(value, false);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_5_0_0_1_0_0_2, resolved, true);\r\n \t\t\t\t\t\t\tcopyLocalizationInfos((CommonToken) a8, element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[144]);\r\n \t\t\t\t}\r\n\r\n }\r\n break;\r\n case 2 :\r\n // Hymanifest.g:2716:10: (a9= DATE ) a10= '-' a11= 'eternity'\r\n {\r\n // Hymanifest.g:2716:10: (a9= DATE )\r\n // Hymanifest.g:2717:6: a9= DATE\r\n {\r\n a9=(Token)match(input,DATE,FOLLOW_DATE_in_parse_eu_hyvar_dataValues_HyEnumLiteral3215); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t\tif (terminateParsing) {\r\n \t\t\t\t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (a9 != null) {\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolver tokenResolver = tokenResolverFactory.createTokenResolver(\"DATE\");\r\n \t\t\t\t\t\t\ttokenResolver.setOptions(getOptions());\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolveResult result = getFreshTokenResolveResult();\r\n \t\t\t\t\t\t\ttokenResolver.resolve(a9.getText(), element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM_LITERAL__VALID_SINCE), result);\r\n \t\t\t\t\t\t\tObject resolvedObject = result.getResolvedToken();\r\n \t\t\t\t\t\t\tif (resolvedObject == null) {\r\n \t\t\t\t\t\t\t\taddErrorToResource(result.getErrorMessage(), ((CommonToken) a9).getLine(), ((CommonToken) a9).getCharPositionInLine(), ((CommonToken) a9).getStartIndex(), ((CommonToken) a9).getStopIndex());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tjava.util.Date resolved = (java.util.Date) resolvedObject;\r\n \t\t\t\t\t\t\tif (resolved != null) {\r\n \t\t\t\t\t\t\t\tObject value = resolved;\r\n \t\t\t\t\t\t\t\telement.eSet(element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM_LITERAL__VALID_SINCE), value);\r\n \t\t\t\t\t\t\t\tcompletedElement(value, false);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_5_0_0_1_0_1_0, resolved, true);\r\n \t\t\t\t\t\t\tcopyLocalizationInfos((CommonToken) a9, element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[145]);\r\n \t\t\t\t}\r\n\r\n a10=(Token)match(input,16,FOLLOW_16_in_parse_eu_hyvar_dataValues_HyEnumLiteral3254); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_5_0_0_1_0_1_1, null, true);\r\n \t\t\t\t\tcopyLocalizationInfos((CommonToken)a10, element);\r\n \t\t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[146]);\r\n \t\t\t\t}\r\n\r\n a11=(Token)match(input,27,FOLLOW_27_in_parse_eu_hyvar_dataValues_HyEnumLiteral3277); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_5_0_0_1_0_1_2, null, true);\r\n \t\t\t\t\tcopyLocalizationInfos((CommonToken)a11, element);\r\n \t\t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[147]);\r\n \t\t\t\t}\r\n\r\n }\r\n break;\r\n case 3 :\r\n // Hymanifest.g:2781:10: a12= 'eternity' a13= '-' (a14= DATE )\r\n {\r\n a12=(Token)match(input,27,FOLLOW_27_in_parse_eu_hyvar_dataValues_HyEnumLiteral3310); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_5_0_0_1_0_2_0, null, true);\r\n \t\t\t\t\tcopyLocalizationInfos((CommonToken)a12, element);\r\n \t\t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[148]);\r\n \t\t\t\t}\r\n\r\n a13=(Token)match(input,16,FOLLOW_16_in_parse_eu_hyvar_dataValues_HyEnumLiteral3333); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_5_0_0_1_0_2_1, null, true);\r\n \t\t\t\t\tcopyLocalizationInfos((CommonToken)a13, element);\r\n \t\t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[149]);\r\n \t\t\t\t}\r\n\r\n // Hymanifest.g:2809:5: (a14= DATE )\r\n // Hymanifest.g:2810:6: a14= DATE\r\n {\r\n a14=(Token)match(input,DATE,FOLLOW_DATE_in_parse_eu_hyvar_dataValues_HyEnumLiteral3363); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t\tif (terminateParsing) {\r\n \t\t\t\t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (a14 != null) {\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolver tokenResolver = tokenResolverFactory.createTokenResolver(\"DATE\");\r\n \t\t\t\t\t\t\ttokenResolver.setOptions(getOptions());\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolveResult result = getFreshTokenResolveResult();\r\n \t\t\t\t\t\t\ttokenResolver.resolve(a14.getText(), element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM_LITERAL__VALID_UNTIL), result);\r\n \t\t\t\t\t\t\tObject resolvedObject = result.getResolvedToken();\r\n \t\t\t\t\t\t\tif (resolvedObject == null) {\r\n \t\t\t\t\t\t\t\taddErrorToResource(result.getErrorMessage(), ((CommonToken) a14).getLine(), ((CommonToken) a14).getCharPositionInLine(), ((CommonToken) a14).getStartIndex(), ((CommonToken) a14).getStopIndex());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tjava.util.Date resolved = (java.util.Date) resolvedObject;\r\n \t\t\t\t\t\t\tif (resolved != null) {\r\n \t\t\t\t\t\t\t\tObject value = resolved;\r\n \t\t\t\t\t\t\t\telement.eSet(element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM_LITERAL__VALID_UNTIL), value);\r\n \t\t\t\t\t\t\t\tcompletedElement(value, false);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_5_0_0_1_0_2_2, resolved, true);\r\n \t\t\t\t\t\t\tcopyLocalizationInfos((CommonToken) a14, element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[150]);\r\n \t\t\t\t}\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t// expected elements (follow set)\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[151]);\r\n \t\t\t}\r\n\r\n a15=(Token)match(input,25,FOLLOW_25_in_parse_eu_hyvar_dataValues_HyEnumLiteral3415); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\tif (element == null) {\r\n \t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnumLiteral();\r\n \t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t}\r\n \t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_4_0_0_5_0_0_2, null, true);\r\n \t\t\t\tcopyLocalizationInfos((CommonToken)a15, element);\r\n \t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t// expected elements (follow set)\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[152]);\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[153]);\r\n \t\t\t}\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t// expected elements (follow set)\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[154]);\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[155]);\r\n \t}\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 8, parse_eu_hyvar_dataValues_HyEnumLiteral_StartIndex); }\r\n\r\n }\r\n return element;\r\n }", "IntegerLiteralExp createIntegerLiteralExp();", "public static LocalizedEnumFieldBuilder builder(final LocalizedEnumField template) {\n return LocalizedEnumFieldBuilder.of(template);\n }", "public Enum(String val) \n { \n set(val);\n }", "public final Enumerator ruleAssignmentOperator() throws RecognitionException {\r\n Enumerator current = null;\r\n\r\n Token enumLiteral_0=null;\r\n Token enumLiteral_1=null;\r\n Token enumLiteral_2=null;\r\n Token enumLiteral_3=null;\r\n Token enumLiteral_4=null;\r\n Token enumLiteral_5=null;\r\n Token enumLiteral_6=null;\r\n Token enumLiteral_7=null;\r\n Token enumLiteral_8=null;\r\n Token enumLiteral_9=null;\r\n Token enumLiteral_10=null;\r\n\r\n enterRule(); \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3966:28: ( ( (enumLiteral_0= '=' ) | (enumLiteral_1= '*=' ) | (enumLiteral_2= '/=' ) | (enumLiteral_3= '%=' ) | (enumLiteral_4= '+=' ) | (enumLiteral_5= '-=' ) | (enumLiteral_6= '<<=' ) | (enumLiteral_7= '>>=' ) | (enumLiteral_8= '&=' ) | (enumLiteral_9= '^=' ) | (enumLiteral_10= '|=' ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3967:1: ( (enumLiteral_0= '=' ) | (enumLiteral_1= '*=' ) | (enumLiteral_2= '/=' ) | (enumLiteral_3= '%=' ) | (enumLiteral_4= '+=' ) | (enumLiteral_5= '-=' ) | (enumLiteral_6= '<<=' ) | (enumLiteral_7= '>>=' ) | (enumLiteral_8= '&=' ) | (enumLiteral_9= '^=' ) | (enumLiteral_10= '|=' ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3967:1: ( (enumLiteral_0= '=' ) | (enumLiteral_1= '*=' ) | (enumLiteral_2= '/=' ) | (enumLiteral_3= '%=' ) | (enumLiteral_4= '+=' ) | (enumLiteral_5= '-=' ) | (enumLiteral_6= '<<=' ) | (enumLiteral_7= '>>=' ) | (enumLiteral_8= '&=' ) | (enumLiteral_9= '^=' ) | (enumLiteral_10= '|=' ) )\r\n int alt59=11;\r\n switch ( input.LA(1) ) {\r\n case 22:\r\n {\r\n alt59=1;\r\n }\r\n break;\r\n case 60:\r\n {\r\n alt59=2;\r\n }\r\n break;\r\n case 61:\r\n {\r\n alt59=3;\r\n }\r\n break;\r\n case 62:\r\n {\r\n alt59=4;\r\n }\r\n break;\r\n case 63:\r\n {\r\n alt59=5;\r\n }\r\n break;\r\n case 64:\r\n {\r\n alt59=6;\r\n }\r\n break;\r\n case 65:\r\n {\r\n alt59=7;\r\n }\r\n break;\r\n case 66:\r\n {\r\n alt59=8;\r\n }\r\n break;\r\n case 67:\r\n {\r\n alt59=9;\r\n }\r\n break;\r\n case 68:\r\n {\r\n alt59=10;\r\n }\r\n break;\r\n case 69:\r\n {\r\n alt59=11;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return current;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 59, 0, input);\r\n\r\n throw nvae;\r\n }\r\n\r\n switch (alt59) {\r\n case 1 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3967:2: (enumLiteral_0= '=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3967:2: (enumLiteral_0= '=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3967:4: enumLiteral_0= '='\r\n {\r\n enumLiteral_0=(Token)match(input,22,FOLLOW_22_in_ruleAssignmentOperator9157); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getAssignmentOperatorAccess().getAssignEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_0, grammarAccess.getAssignmentOperatorAccess().getAssignEnumLiteralDeclaration_0()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3973:6: (enumLiteral_1= '*=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3973:6: (enumLiteral_1= '*=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3973:8: enumLiteral_1= '*='\r\n {\r\n enumLiteral_1=(Token)match(input,60,FOLLOW_60_in_ruleAssignmentOperator9174); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getAssignmentOperatorAccess().getMultAssignEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_1, grammarAccess.getAssignmentOperatorAccess().getMultAssignEnumLiteralDeclaration_1()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3979:6: (enumLiteral_2= '/=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3979:6: (enumLiteral_2= '/=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3979:8: enumLiteral_2= '/='\r\n {\r\n enumLiteral_2=(Token)match(input,61,FOLLOW_61_in_ruleAssignmentOperator9191); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getAssignmentOperatorAccess().getDivAssignEnumLiteralDeclaration_2().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_2, grammarAccess.getAssignmentOperatorAccess().getDivAssignEnumLiteralDeclaration_2()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3985:6: (enumLiteral_3= '%=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3985:6: (enumLiteral_3= '%=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3985:8: enumLiteral_3= '%='\r\n {\r\n enumLiteral_3=(Token)match(input,62,FOLLOW_62_in_ruleAssignmentOperator9208); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getAssignmentOperatorAccess().getModAssignEnumLiteralDeclaration_3().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_3, grammarAccess.getAssignmentOperatorAccess().getModAssignEnumLiteralDeclaration_3()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 5 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3991:6: (enumLiteral_4= '+=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3991:6: (enumLiteral_4= '+=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3991:8: enumLiteral_4= '+='\r\n {\r\n enumLiteral_4=(Token)match(input,63,FOLLOW_63_in_ruleAssignmentOperator9225); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getAssignmentOperatorAccess().getAddAssignEnumLiteralDeclaration_4().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_4, grammarAccess.getAssignmentOperatorAccess().getAddAssignEnumLiteralDeclaration_4()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 6 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3997:6: (enumLiteral_5= '-=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3997:6: (enumLiteral_5= '-=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3997:8: enumLiteral_5= '-='\r\n {\r\n enumLiteral_5=(Token)match(input,64,FOLLOW_64_in_ruleAssignmentOperator9242); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getAssignmentOperatorAccess().getSubAssignEnumLiteralDeclaration_5().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_5, grammarAccess.getAssignmentOperatorAccess().getSubAssignEnumLiteralDeclaration_5()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 7 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4003:6: (enumLiteral_6= '<<=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4003:6: (enumLiteral_6= '<<=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4003:8: enumLiteral_6= '<<='\r\n {\r\n enumLiteral_6=(Token)match(input,65,FOLLOW_65_in_ruleAssignmentOperator9259); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getAssignmentOperatorAccess().getLeftShiftAssignEnumLiteralDeclaration_6().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_6, grammarAccess.getAssignmentOperatorAccess().getLeftShiftAssignEnumLiteralDeclaration_6()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 8 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4009:6: (enumLiteral_7= '>>=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4009:6: (enumLiteral_7= '>>=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4009:8: enumLiteral_7= '>>='\r\n {\r\n enumLiteral_7=(Token)match(input,66,FOLLOW_66_in_ruleAssignmentOperator9276); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getAssignmentOperatorAccess().getRightShiftAssignEnumLiteralDeclaration_7().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_7, grammarAccess.getAssignmentOperatorAccess().getRightShiftAssignEnumLiteralDeclaration_7()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 9 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4015:6: (enumLiteral_8= '&=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4015:6: (enumLiteral_8= '&=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4015:8: enumLiteral_8= '&='\r\n {\r\n enumLiteral_8=(Token)match(input,67,FOLLOW_67_in_ruleAssignmentOperator9293); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getAssignmentOperatorAccess().getAndAssignEnumLiteralDeclaration_8().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_8, grammarAccess.getAssignmentOperatorAccess().getAndAssignEnumLiteralDeclaration_8()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 10 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4021:6: (enumLiteral_9= '^=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4021:6: (enumLiteral_9= '^=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4021:8: enumLiteral_9= '^='\r\n {\r\n enumLiteral_9=(Token)match(input,68,FOLLOW_68_in_ruleAssignmentOperator9310); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getAssignmentOperatorAccess().getXorAssignEnumLiteralDeclaration_9().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_9, grammarAccess.getAssignmentOperatorAccess().getXorAssignEnumLiteralDeclaration_9()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 11 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4027:6: (enumLiteral_10= '|=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4027:6: (enumLiteral_10= '|=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4027:8: enumLiteral_10= '|='\r\n {\r\n enumLiteral_10=(Token)match(input,69,FOLLOW_69_in_ruleAssignmentOperator9327); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getAssignmentOperatorAccess().getOrAssignEnumLiteralDeclaration_10().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_10, grammarAccess.getAssignmentOperatorAccess().getOrAssignEnumLiteralDeclaration_10()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final Enumerator ruleAssignmentOperator() throws RecognitionException {\n Enumerator current = null;\n int ruleAssignmentOperator_StartIndex = input.index();\n Token enumLiteral_0=null;\n Token enumLiteral_1=null;\n Token enumLiteral_2=null;\n\n enterRule(); \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 160) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6589:28: ( ( (enumLiteral_0= KEYWORD_15 ) | (enumLiteral_1= KEYWORD_24 ) | (enumLiteral_2= KEYWORD_26 ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6590:1: ( (enumLiteral_0= KEYWORD_15 ) | (enumLiteral_1= KEYWORD_24 ) | (enumLiteral_2= KEYWORD_26 ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6590:1: ( (enumLiteral_0= KEYWORD_15 ) | (enumLiteral_1= KEYWORD_24 ) | (enumLiteral_2= KEYWORD_26 ) )\n int alt121=3;\n switch ( input.LA(1) ) {\n case KEYWORD_15:\n {\n alt121=1;\n }\n break;\n case KEYWORD_24:\n {\n alt121=2;\n }\n break;\n case KEYWORD_26:\n {\n alt121=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 121, 0, input);\n\n throw nvae;\n }\n\n switch (alt121) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6590:2: (enumLiteral_0= KEYWORD_15 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6590:2: (enumLiteral_0= KEYWORD_15 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6590:7: enumLiteral_0= KEYWORD_15\n {\n enumLiteral_0=(Token)match(input,KEYWORD_15,FOLLOW_KEYWORD_15_in_ruleAssignmentOperator14020); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getAssignmentOperatorAccess().getSetEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_0, grammarAccess.getAssignmentOperatorAccess().getSetEnumLiteralDeclaration_0()); \n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6596:6: (enumLiteral_1= KEYWORD_24 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6596:6: (enumLiteral_1= KEYWORD_24 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6596:11: enumLiteral_1= KEYWORD_24\n {\n enumLiteral_1=(Token)match(input,KEYWORD_24,FOLLOW_KEYWORD_24_in_ruleAssignmentOperator14042); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getAssignmentOperatorAccess().getAddEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_1, grammarAccess.getAssignmentOperatorAccess().getAddEnumLiteralDeclaration_1()); \n \n }\n\n }\n\n\n }\n break;\n case 3 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6602:6: (enumLiteral_2= KEYWORD_26 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6602:6: (enumLiteral_2= KEYWORD_26 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6602:11: enumLiteral_2= KEYWORD_26\n {\n enumLiteral_2=(Token)match(input,KEYWORD_26,FOLLOW_KEYWORD_26_in_ruleAssignmentOperator14064); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getAssignmentOperatorAccess().getSubEnumLiteralDeclaration_2().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_2, grammarAccess.getAssignmentOperatorAccess().getSubEnumLiteralDeclaration_2()); \n \n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 160, ruleAssignmentOperator_StartIndex); }\n }\n return current;\n }", "RealLiteralExp createRealLiteralExp();", "public Enum() \n { \n set(\"\");\n }", "public final Enumerator ruleMathOperator() throws RecognitionException {\n Enumerator current = null;\n int ruleMathOperator_StartIndex = input.index();\n Token enumLiteral_0=null;\n Token enumLiteral_1=null;\n Token enumLiteral_2=null;\n Token enumLiteral_3=null;\n\n enterRule(); \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 158) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6539:28: ( ( (enumLiteral_0= KEYWORD_7 ) | (enumLiteral_1= KEYWORD_9 ) | (enumLiteral_2= KEYWORD_6 ) | (enumLiteral_3= KEYWORD_11 ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6540:1: ( (enumLiteral_0= KEYWORD_7 ) | (enumLiteral_1= KEYWORD_9 ) | (enumLiteral_2= KEYWORD_6 ) | (enumLiteral_3= KEYWORD_11 ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6540:1: ( (enumLiteral_0= KEYWORD_7 ) | (enumLiteral_1= KEYWORD_9 ) | (enumLiteral_2= KEYWORD_6 ) | (enumLiteral_3= KEYWORD_11 ) )\n int alt119=4;\n switch ( input.LA(1) ) {\n case KEYWORD_7:\n {\n alt119=1;\n }\n break;\n case KEYWORD_9:\n {\n alt119=2;\n }\n break;\n case KEYWORD_6:\n {\n alt119=3;\n }\n break;\n case KEYWORD_11:\n {\n alt119=4;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 119, 0, input);\n\n throw nvae;\n }\n\n switch (alt119) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6540:2: (enumLiteral_0= KEYWORD_7 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6540:2: (enumLiteral_0= KEYWORD_7 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6540:7: enumLiteral_0= KEYWORD_7\n {\n enumLiteral_0=(Token)match(input,KEYWORD_7,FOLLOW_KEYWORD_7_in_ruleMathOperator13832); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getMathOperatorAccess().getAddEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_0, grammarAccess.getMathOperatorAccess().getAddEnumLiteralDeclaration_0()); \n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6546:6: (enumLiteral_1= KEYWORD_9 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6546:6: (enumLiteral_1= KEYWORD_9 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6546:11: enumLiteral_1= KEYWORD_9\n {\n enumLiteral_1=(Token)match(input,KEYWORD_9,FOLLOW_KEYWORD_9_in_ruleMathOperator13854); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getMathOperatorAccess().getSubEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_1, grammarAccess.getMathOperatorAccess().getSubEnumLiteralDeclaration_1()); \n \n }\n\n }\n\n\n }\n break;\n case 3 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6552:6: (enumLiteral_2= KEYWORD_6 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6552:6: (enumLiteral_2= KEYWORD_6 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6552:11: enumLiteral_2= KEYWORD_6\n {\n enumLiteral_2=(Token)match(input,KEYWORD_6,FOLLOW_KEYWORD_6_in_ruleMathOperator13876); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getMathOperatorAccess().getMulEnumLiteralDeclaration_2().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_2, grammarAccess.getMathOperatorAccess().getMulEnumLiteralDeclaration_2()); \n \n }\n\n }\n\n\n }\n break;\n case 4 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6558:6: (enumLiteral_3= KEYWORD_11 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6558:6: (enumLiteral_3= KEYWORD_11 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6558:11: enumLiteral_3= KEYWORD_11\n {\n enumLiteral_3=(Token)match(input,KEYWORD_11,FOLLOW_KEYWORD_11_in_ruleMathOperator13898); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getMathOperatorAccess().getDivEnumLiteralDeclaration_3().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_3, grammarAccess.getMathOperatorAccess().getDivEnumLiteralDeclaration_3()); \n \n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 158, ruleMathOperator_StartIndex); }\n }\n return current;\n }", "private Enums(String s, int j)\n\t {\n\t System.out.println(3);\n\t }", "public String getElement()\n {\n return \"enum\";\n }", "public Enum(String name, String val) \n { \n super(name); \n set(val);\n }", "private FunctionEnum(String value) {\n\t\tthis.value = value;\n\t}", "<C> InvalidLiteralExp<C> createInvalidLiteralExp();", "public static Enum forInt(int i)\r\n { return (Enum)table.forInt(i); }", "private SheetTraitEnum(int value, String name, String literal) {\r\n\t\tthis.value = value;\r\n\t\tthis.name = name;\r\n\t\tthis.literal = literal;\r\n\t}", "public final EObject ruleEnumStatement() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_name_1_0=null;\n Token otherlv_2=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n Token otherlv_7=null;\n Token otherlv_8=null;\n EObject lv_enums_4_0 = null;\n\n EObject lv_enums_6_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalSafetyParser.g:6341:2: ( (otherlv_0= Enum ( (lv_name_1_0= RULE_ID ) ) otherlv_2= EqualsSign otherlv_3= LeftCurlyBracket ( (lv_enums_4_0= ruleNamedID ) ) (otherlv_5= Comma ( (lv_enums_6_0= ruleNamedID ) ) )* otherlv_7= RightCurlyBracket otherlv_8= Semicolon ) )\n // InternalSafetyParser.g:6342:2: (otherlv_0= Enum ( (lv_name_1_0= RULE_ID ) ) otherlv_2= EqualsSign otherlv_3= LeftCurlyBracket ( (lv_enums_4_0= ruleNamedID ) ) (otherlv_5= Comma ( (lv_enums_6_0= ruleNamedID ) ) )* otherlv_7= RightCurlyBracket otherlv_8= Semicolon )\n {\n // InternalSafetyParser.g:6342:2: (otherlv_0= Enum ( (lv_name_1_0= RULE_ID ) ) otherlv_2= EqualsSign otherlv_3= LeftCurlyBracket ( (lv_enums_4_0= ruleNamedID ) ) (otherlv_5= Comma ( (lv_enums_6_0= ruleNamedID ) ) )* otherlv_7= RightCurlyBracket otherlv_8= Semicolon )\n // InternalSafetyParser.g:6343:3: otherlv_0= Enum ( (lv_name_1_0= RULE_ID ) ) otherlv_2= EqualsSign otherlv_3= LeftCurlyBracket ( (lv_enums_4_0= ruleNamedID ) ) (otherlv_5= Comma ( (lv_enums_6_0= ruleNamedID ) ) )* otherlv_7= RightCurlyBracket otherlv_8= Semicolon\n {\n otherlv_0=(Token)match(input,Enum,FollowSets000.FOLLOW_4); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getEnumStatementAccess().getEnumKeyword_0());\n \t\t\n }\n // InternalSafetyParser.g:6347:3: ( (lv_name_1_0= RULE_ID ) )\n // InternalSafetyParser.g:6348:4: (lv_name_1_0= RULE_ID )\n {\n // InternalSafetyParser.g:6348:4: (lv_name_1_0= RULE_ID )\n // InternalSafetyParser.g:6349:5: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)match(input,RULE_ID,FollowSets000.FOLLOW_16); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewLeafNode(lv_name_1_0, grammarAccess.getEnumStatementAccess().getNameIDTerminalRuleCall_1_0());\n \t\t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getEnumStatementRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_1_0,\n \t\t\t\t\t\t\"org.osate.xtext.aadl2.properties.Properties.ID\");\n \t\t\t\t\n }\n\n }\n\n\n }\n\n otherlv_2=(Token)match(input,EqualsSign,FollowSets000.FOLLOW_7); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_2, grammarAccess.getEnumStatementAccess().getEqualsSignKeyword_2());\n \t\t\n }\n otherlv_3=(Token)match(input,LeftCurlyBracket,FollowSets000.FOLLOW_4); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_3, grammarAccess.getEnumStatementAccess().getLeftCurlyBracketKeyword_3());\n \t\t\n }\n // InternalSafetyParser.g:6373:3: ( (lv_enums_4_0= ruleNamedID ) )\n // InternalSafetyParser.g:6374:4: (lv_enums_4_0= ruleNamedID )\n {\n // InternalSafetyParser.g:6374:4: (lv_enums_4_0= ruleNamedID )\n // InternalSafetyParser.g:6375:5: lv_enums_4_0= ruleNamedID\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getEnumStatementAccess().getEnumsNamedIDParserRuleCall_4_0());\n \t\t\t\t\n }\n pushFollow(FollowSets000.FOLLOW_12);\n lv_enums_4_0=ruleNamedID();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getEnumStatementRule());\n \t\t\t\t\t}\n \t\t\t\t\tadd(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"enums\",\n \t\t\t\t\t\tlv_enums_4_0,\n \t\t\t\t\t\t\"com.rockwellcollins.atc.agree.Agree.NamedID\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n // InternalSafetyParser.g:6392:3: (otherlv_5= Comma ( (lv_enums_6_0= ruleNamedID ) ) )*\n loop86:\n do {\n int alt86=2;\n int LA86_0 = input.LA(1);\n\n if ( (LA86_0==Comma) ) {\n alt86=1;\n }\n\n\n switch (alt86) {\n \tcase 1 :\n \t // InternalSafetyParser.g:6393:4: otherlv_5= Comma ( (lv_enums_6_0= ruleNamedID ) )\n \t {\n \t otherlv_5=(Token)match(input,Comma,FollowSets000.FOLLOW_4); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\tnewLeafNode(otherlv_5, grammarAccess.getEnumStatementAccess().getCommaKeyword_5_0());\n \t \t\t\t\n \t }\n \t // InternalSafetyParser.g:6397:4: ( (lv_enums_6_0= ruleNamedID ) )\n \t // InternalSafetyParser.g:6398:5: (lv_enums_6_0= ruleNamedID )\n \t {\n \t // InternalSafetyParser.g:6398:5: (lv_enums_6_0= ruleNamedID )\n \t // InternalSafetyParser.g:6399:6: lv_enums_6_0= ruleNamedID\n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\tnewCompositeNode(grammarAccess.getEnumStatementAccess().getEnumsNamedIDParserRuleCall_5_1_0());\n \t \t\t\t\t\t\n \t }\n \t pushFollow(FollowSets000.FOLLOW_12);\n \t lv_enums_6_0=ruleNamedID();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getEnumStatementRule());\n \t \t\t\t\t\t\t}\n \t \t\t\t\t\t\tadd(\n \t \t\t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\t\"enums\",\n \t \t\t\t\t\t\t\tlv_enums_6_0,\n \t \t\t\t\t\t\t\t\"com.rockwellcollins.atc.agree.Agree.NamedID\");\n \t \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\t\n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop86;\n }\n } while (true);\n\n otherlv_7=(Token)match(input,RightCurlyBracket,FollowSets000.FOLLOW_14); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_7, grammarAccess.getEnumStatementAccess().getRightCurlyBracketKeyword_6());\n \t\t\n }\n otherlv_8=(Token)match(input,Semicolon,FollowSets000.FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_8, grammarAccess.getEnumStatementAccess().getSemicolonKeyword_7());\n \t\t\n }\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }", "public Expression asExpression() {\n switch (TYPE) {\n case EXPRESSION:\n return EXPRESSION;\n case IDENTIFIER:\n return new Variable(VALUE);\n case LITERAL:\n if (VALUE.matches(\"\\\\d+\")) {\n return new LInteger(Integer.parseInt(VALUE));\n } else if (VALUE.equals(\"true\") || VALUE.equals(\"false\")) {\n return LBoolean.resolve(VALUE.equals(\"true\"));\n } else if (VALUE.equals(\"null\")) {\n return LNull.NULL;\n } else {\n return new LString(VALUE);\n }\n default:\n throw ErrorLog.get(\"Unexpected symbol '%s'\", VALUE);\n }\n }", "public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }", "public final Enumerator ruleVisibilityModifier() throws RecognitionException {\n Enumerator current = null;\n int ruleVisibilityModifier_StartIndex = input.index();\n Token enumLiteral_0=null;\n Token enumLiteral_1=null;\n\n enterRule(); \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 149) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6272:28: ( ( (enumLiteral_0= KEYWORD_72 ) | (enumLiteral_1= KEYWORD_80 ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6273:1: ( (enumLiteral_0= KEYWORD_72 ) | (enumLiteral_1= KEYWORD_80 ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6273:1: ( (enumLiteral_0= KEYWORD_72 ) | (enumLiteral_1= KEYWORD_80 ) )\n int alt110=2;\n int LA110_0 = input.LA(1);\n\n if ( (LA110_0==KEYWORD_72) ) {\n alt110=1;\n }\n else if ( (LA110_0==KEYWORD_80) ) {\n alt110=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 110, 0, input);\n\n throw nvae;\n }\n switch (alt110) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6273:2: (enumLiteral_0= KEYWORD_72 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6273:2: (enumLiteral_0= KEYWORD_72 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6273:7: enumLiteral_0= KEYWORD_72\n {\n enumLiteral_0=(Token)match(input,KEYWORD_72,FOLLOW_KEYWORD_72_in_ruleVisibilityModifier12832); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getVisibilityModifierAccess().getPublicEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_0, grammarAccess.getVisibilityModifierAccess().getPublicEnumLiteralDeclaration_0()); \n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6279:6: (enumLiteral_1= KEYWORD_80 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6279:6: (enumLiteral_1= KEYWORD_80 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6279:11: enumLiteral_1= KEYWORD_80\n {\n enumLiteral_1=(Token)match(input,KEYWORD_80,FOLLOW_KEYWORD_80_in_ruleVisibilityModifier12854); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getVisibilityModifierAccess().getPrivateEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_1, grammarAccess.getVisibilityModifierAccess().getPrivateEnumLiteralDeclaration_1()); \n \n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 149, ruleVisibilityModifier_StartIndex); }\n }\n return current;\n }", "public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }", "public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }", "public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }", "private Enums(int i)\n\t {\n\t System.out.println(2);\n\t }", "Literal createLiteral();", "Literal createLiteral();", "public EnumTypeDefinition(String simpleName, String fullQualifiedName, SourceCodeLocation location, \n\t\t\tNameScope scope, SourceCodeLocation endLocation) {\n\t\tsuper(simpleName, fullQualifiedName, location, scope);\n\t\tthis.endLocation = endLocation;\n\t}", "@Unreachable\n private Enums()\n {\n // Empty default ctor, defined to override access scope.\n }", "public final Enumerator rulePrimitiveTypeSpec() throws RecognitionException {\n Enumerator current = null;\n int rulePrimitiveTypeSpec_StartIndex = input.index();\n Token enumLiteral_0=null;\n Token enumLiteral_1=null;\n Token enumLiteral_2=null;\n Token enumLiteral_3=null;\n Token enumLiteral_4=null;\n Token enumLiteral_5=null;\n Token enumLiteral_6=null;\n\n enterRule(); \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 153) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6372:28: ( ( (enumLiteral_0= KEYWORD_56 ) | (enumLiteral_1= KEYWORD_39 ) | (enumLiteral_2= KEYWORD_66 ) | (enumLiteral_3= KEYWORD_41 ) | (enumLiteral_4= KEYWORD_75 ) | (enumLiteral_5= KEYWORD_52 ) | (enumLiteral_6= KEYWORD_45 ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6373:1: ( (enumLiteral_0= KEYWORD_56 ) | (enumLiteral_1= KEYWORD_39 ) | (enumLiteral_2= KEYWORD_66 ) | (enumLiteral_3= KEYWORD_41 ) | (enumLiteral_4= KEYWORD_75 ) | (enumLiteral_5= KEYWORD_52 ) | (enumLiteral_6= KEYWORD_45 ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6373:1: ( (enumLiteral_0= KEYWORD_56 ) | (enumLiteral_1= KEYWORD_39 ) | (enumLiteral_2= KEYWORD_66 ) | (enumLiteral_3= KEYWORD_41 ) | (enumLiteral_4= KEYWORD_75 ) | (enumLiteral_5= KEYWORD_52 ) | (enumLiteral_6= KEYWORD_45 ) )\n int alt114=7;\n switch ( input.LA(1) ) {\n case KEYWORD_56:\n {\n alt114=1;\n }\n break;\n case KEYWORD_39:\n {\n alt114=2;\n }\n break;\n case KEYWORD_66:\n {\n alt114=3;\n }\n break;\n case KEYWORD_41:\n {\n alt114=4;\n }\n break;\n case KEYWORD_75:\n {\n alt114=5;\n }\n break;\n case KEYWORD_52:\n {\n alt114=6;\n }\n break;\n case KEYWORD_45:\n {\n alt114=7;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 114, 0, input);\n\n throw nvae;\n }\n\n switch (alt114) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6373:2: (enumLiteral_0= KEYWORD_56 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6373:2: (enumLiteral_0= KEYWORD_56 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6373:7: enumLiteral_0= KEYWORD_56\n {\n enumLiteral_0=(Token)match(input,KEYWORD_56,FOLLOW_KEYWORD_56_in_rulePrimitiveTypeSpec13208); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getPrimitiveTypeSpecAccess().getVoidEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_0, grammarAccess.getPrimitiveTypeSpecAccess().getVoidEnumLiteralDeclaration_0()); \n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6379:6: (enumLiteral_1= KEYWORD_39 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6379:6: (enumLiteral_1= KEYWORD_39 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6379:11: enumLiteral_1= KEYWORD_39\n {\n enumLiteral_1=(Token)match(input,KEYWORD_39,FOLLOW_KEYWORD_39_in_rulePrimitiveTypeSpec13230); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getPrimitiveTypeSpecAccess().getAnyEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_1, grammarAccess.getPrimitiveTypeSpecAccess().getAnyEnumLiteralDeclaration_1()); \n \n }\n\n }\n\n\n }\n break;\n case 3 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6385:6: (enumLiteral_2= KEYWORD_66 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6385:6: (enumLiteral_2= KEYWORD_66 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6385:11: enumLiteral_2= KEYWORD_66\n {\n enumLiteral_2=(Token)match(input,KEYWORD_66,FOLLOW_KEYWORD_66_in_rulePrimitiveTypeSpec13252); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getPrimitiveTypeSpecAccess().getStringEnumLiteralDeclaration_2().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_2, grammarAccess.getPrimitiveTypeSpecAccess().getStringEnumLiteralDeclaration_2()); \n \n }\n\n }\n\n\n }\n break;\n case 4 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6391:6: (enumLiteral_3= KEYWORD_41 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6391:6: (enumLiteral_3= KEYWORD_41 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6391:11: enumLiteral_3= KEYWORD_41\n {\n enumLiteral_3=(Token)match(input,KEYWORD_41,FOLLOW_KEYWORD_41_in_rulePrimitiveTypeSpec13274); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getPrimitiveTypeSpecAccess().getIntEnumLiteralDeclaration_3().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_3, grammarAccess.getPrimitiveTypeSpecAccess().getIntEnumLiteralDeclaration_3()); \n \n }\n\n }\n\n\n }\n break;\n case 5 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6397:6: (enumLiteral_4= KEYWORD_75 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6397:6: (enumLiteral_4= KEYWORD_75 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6397:11: enumLiteral_4= KEYWORD_75\n {\n enumLiteral_4=(Token)match(input,KEYWORD_75,FOLLOW_KEYWORD_75_in_rulePrimitiveTypeSpec13296); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getPrimitiveTypeSpecAccess().getBooleanEnumLiteralDeclaration_4().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_4, grammarAccess.getPrimitiveTypeSpecAccess().getBooleanEnumLiteralDeclaration_4()); \n \n }\n\n }\n\n\n }\n break;\n case 6 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6403:6: (enumLiteral_5= KEYWORD_52 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6403:6: (enumLiteral_5= KEYWORD_52 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6403:11: enumLiteral_5= KEYWORD_52\n {\n enumLiteral_5=(Token)match(input,KEYWORD_52,FOLLOW_KEYWORD_52_in_rulePrimitiveTypeSpec13318); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getPrimitiveTypeSpecAccess().getRealEnumLiteralDeclaration_5().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_5, grammarAccess.getPrimitiveTypeSpecAccess().getRealEnumLiteralDeclaration_5()); \n \n }\n\n }\n\n\n }\n break;\n case 7 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6409:6: (enumLiteral_6= KEYWORD_45 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6409:6: (enumLiteral_6= KEYWORD_45 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6409:11: enumLiteral_6= KEYWORD_45\n {\n enumLiteral_6=(Token)match(input,KEYWORD_45,FOLLOW_KEYWORD_45_in_rulePrimitiveTypeSpec13340); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getPrimitiveTypeSpecAccess().getTypeEnumLiteralDeclaration_6().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_6, grammarAccess.getPrimitiveTypeSpecAccess().getTypeEnumLiteralDeclaration_6()); \n \n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 153, rulePrimitiveTypeSpec_StartIndex); }\n }\n return current;\n }", "public T caseEnumLiteralOrStaticPropertyExpCS(EnumLiteralOrStaticPropertyExpCS object) {\r\n return null;\r\n }", "public static String enumDecl()\n {\n read_if_needed_();\n \n return _enum_decl;\n }", "LetExp createLetExp();", "public static RequirementType create(String name) {\n throw new IllegalStateException(\"Enum not extended\");\n }", "public final Enumerator ruleExecutionModifier() throws RecognitionException {\n Enumerator current = null;\n int ruleExecutionModifier_StartIndex = input.index();\n Token enumLiteral_0=null;\n Token enumLiteral_1=null;\n Token enumLiteral_2=null;\n Token enumLiteral_3=null;\n Token enumLiteral_4=null;\n\n enterRule(); \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 150) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6291:28: ( ( (enumLiteral_0= KEYWORD_67 ) | (enumLiteral_1= KEYWORD_85 ) | (enumLiteral_2= KEYWORD_70 ) | (enumLiteral_3= KEYWORD_46 ) | (enumLiteral_4= KEYWORD_76 ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6292:1: ( (enumLiteral_0= KEYWORD_67 ) | (enumLiteral_1= KEYWORD_85 ) | (enumLiteral_2= KEYWORD_70 ) | (enumLiteral_3= KEYWORD_46 ) | (enumLiteral_4= KEYWORD_76 ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6292:1: ( (enumLiteral_0= KEYWORD_67 ) | (enumLiteral_1= KEYWORD_85 ) | (enumLiteral_2= KEYWORD_70 ) | (enumLiteral_3= KEYWORD_46 ) | (enumLiteral_4= KEYWORD_76 ) )\n int alt111=5;\n switch ( input.LA(1) ) {\n case KEYWORD_67:\n {\n alt111=1;\n }\n break;\n case KEYWORD_85:\n {\n alt111=2;\n }\n break;\n case KEYWORD_70:\n {\n alt111=3;\n }\n break;\n case KEYWORD_46:\n {\n alt111=4;\n }\n break;\n case KEYWORD_76:\n {\n alt111=5;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 111, 0, input);\n\n throw nvae;\n }\n\n switch (alt111) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6292:2: (enumLiteral_0= KEYWORD_67 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6292:2: (enumLiteral_0= KEYWORD_67 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6292:7: enumLiteral_0= KEYWORD_67\n {\n enumLiteral_0=(Token)match(input,KEYWORD_67,FOLLOW_KEYWORD_67_in_ruleExecutionModifier12904); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getExecutionModifierAccess().getCalledEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_0, grammarAccess.getExecutionModifierAccess().getCalledEnumLiteralDeclaration_0()); \n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6298:6: (enumLiteral_1= KEYWORD_85 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6298:6: (enumLiteral_1= KEYWORD_85 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6298:11: enumLiteral_1= KEYWORD_85\n {\n enumLiteral_1=(Token)match(input,KEYWORD_85,FOLLOW_KEYWORD_85_in_ruleExecutionModifier12926); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getExecutionModifierAccess().getAbstractEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_1, grammarAccess.getExecutionModifierAccess().getAbstractEnumLiteralDeclaration_1()); \n \n }\n\n }\n\n\n }\n break;\n case 3 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6304:6: (enumLiteral_2= KEYWORD_70 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6304:6: (enumLiteral_2= KEYWORD_70 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6304:11: enumLiteral_2= KEYWORD_70\n {\n enumLiteral_2=(Token)match(input,KEYWORD_70,FOLLOW_KEYWORD_70_in_ruleExecutionModifier12948); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getExecutionModifierAccess().getManualEnumLiteralDeclaration_2().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_2, grammarAccess.getExecutionModifierAccess().getManualEnumLiteralDeclaration_2()); \n \n }\n\n }\n\n\n }\n break;\n case 4 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6310:6: (enumLiteral_3= KEYWORD_46 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6310:6: (enumLiteral_3= KEYWORD_46 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6310:11: enumLiteral_3= KEYWORD_46\n {\n enumLiteral_3=(Token)match(input,KEYWORD_46,FOLLOW_KEYWORD_46_in_ruleExecutionModifier12970); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getExecutionModifierAccess().getAutoEnumLiteralDeclaration_3().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_3, grammarAccess.getExecutionModifierAccess().getAutoEnumLiteralDeclaration_3()); \n \n }\n\n }\n\n\n }\n break;\n case 5 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6316:6: (enumLiteral_4= KEYWORD_76 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6316:6: (enumLiteral_4= KEYWORD_76 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6316:11: enumLiteral_4= KEYWORD_76\n {\n enumLiteral_4=(Token)match(input,KEYWORD_76,FOLLOW_KEYWORD_76_in_ruleExecutionModifier12992); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getExecutionModifierAccess().getConfirmEnumLiteralDeclaration_4().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_4, grammarAccess.getExecutionModifierAccess().getConfirmEnumLiteralDeclaration_4()); \n \n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 150, ruleExecutionModifier_StartIndex); }\n }\n return current;\n }", "CommandEnum() {}", "@Test\n public void operator_enum() {\n OutputNode output = new OutputNode(\"testing\", typeOf(Result.class), typeOf(String.class));\n OperatorNode operator = new OperatorNode(\n classOf(SimpleOp.class), typeOf(Result.class), typeOf(String.class),\n output, new ValueElement(valueOf(BasicTypeKind.VOID), typeOf(Enum.class)));\n InputNode root = new InputNode(operator);\n MockContext context = new MockContext();\n testing(root, context, op -> {\n op.process(\"Hello, world!\");\n });\n assertThat(context.get(\"testing\"), contains(\"Hello, world!VOID\"));\n }", "public final Enumerator ruleRelationalOperator() throws RecognitionException {\n Enumerator current = null;\n int ruleRelationalOperator_StartIndex = input.index();\n Token enumLiteral_0=null;\n Token enumLiteral_1=null;\n Token enumLiteral_2=null;\n Token enumLiteral_3=null;\n\n enterRule(); \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 157) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6508:28: ( ( (enumLiteral_0= KEYWORD_14 ) | (enumLiteral_1= KEYWORD_16 ) | (enumLiteral_2= KEYWORD_30 ) | (enumLiteral_3= KEYWORD_32 ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6509:1: ( (enumLiteral_0= KEYWORD_14 ) | (enumLiteral_1= KEYWORD_16 ) | (enumLiteral_2= KEYWORD_30 ) | (enumLiteral_3= KEYWORD_32 ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6509:1: ( (enumLiteral_0= KEYWORD_14 ) | (enumLiteral_1= KEYWORD_16 ) | (enumLiteral_2= KEYWORD_30 ) | (enumLiteral_3= KEYWORD_32 ) )\n int alt118=4;\n switch ( input.LA(1) ) {\n case KEYWORD_14:\n {\n alt118=1;\n }\n break;\n case KEYWORD_16:\n {\n alt118=2;\n }\n break;\n case KEYWORD_30:\n {\n alt118=3;\n }\n break;\n case KEYWORD_32:\n {\n alt118=4;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 118, 0, input);\n\n throw nvae;\n }\n\n switch (alt118) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6509:2: (enumLiteral_0= KEYWORD_14 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6509:2: (enumLiteral_0= KEYWORD_14 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6509:7: enumLiteral_0= KEYWORD_14\n {\n enumLiteral_0=(Token)match(input,KEYWORD_14,FOLLOW_KEYWORD_14_in_ruleRelationalOperator13716); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getRelationalOperatorAccess().getLtEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_0, grammarAccess.getRelationalOperatorAccess().getLtEnumLiteralDeclaration_0()); \n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6515:6: (enumLiteral_1= KEYWORD_16 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6515:6: (enumLiteral_1= KEYWORD_16 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6515:11: enumLiteral_1= KEYWORD_16\n {\n enumLiteral_1=(Token)match(input,KEYWORD_16,FOLLOW_KEYWORD_16_in_ruleRelationalOperator13738); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getRelationalOperatorAccess().getGtEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_1, grammarAccess.getRelationalOperatorAccess().getGtEnumLiteralDeclaration_1()); \n \n }\n\n }\n\n\n }\n break;\n case 3 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6521:6: (enumLiteral_2= KEYWORD_30 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6521:6: (enumLiteral_2= KEYWORD_30 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6521:11: enumLiteral_2= KEYWORD_30\n {\n enumLiteral_2=(Token)match(input,KEYWORD_30,FOLLOW_KEYWORD_30_in_ruleRelationalOperator13760); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getRelationalOperatorAccess().getLeqEnumLiteralDeclaration_2().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_2, grammarAccess.getRelationalOperatorAccess().getLeqEnumLiteralDeclaration_2()); \n \n }\n\n }\n\n\n }\n break;\n case 4 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6527:6: (enumLiteral_3= KEYWORD_32 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6527:6: (enumLiteral_3= KEYWORD_32 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6527:11: enumLiteral_3= KEYWORD_32\n {\n enumLiteral_3=(Token)match(input,KEYWORD_32,FOLLOW_KEYWORD_32_in_ruleRelationalOperator13782); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getRelationalOperatorAccess().getGeqEnumLiteralDeclaration_3().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_3, grammarAccess.getRelationalOperatorAccess().getGeqEnumLiteralDeclaration_3()); \n \n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 157, ruleRelationalOperator_StartIndex); }\n }\n return current;\n }", "public static <T extends Enum<T>> Function<CharSequence, T> literalMatcher(Class<T> enumType) {\n return MultiLiteralPattern.forEnums(enumType);\n }", "public static String startEnum(String enumName, String enumComment, int sloc) {\n\t\treturn \"\\t\\t<enum name=\\\"\" + enumName + \"\\\" sloc=\\\"\" + sloc + \"\\\" jdoc=\\\"\" + enumComment + \"\\\">\" + \"\\n\";\n\t}", "<C> RealLiteralExp<C> createRealLiteralExp();", "<C> IntegerLiteralExp<C> createIntegerLiteralExp();", "Rule EnumConst() {\n return Sequence(\n \"= \",\n IntConstant(),\n WhiteSpace());\n }", "public final FieldReference enum_literal() throws RecognitionException {\n FieldReference value = null;\n\n\n ImmutableFieldReference fully_qualified_field210 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1274:3: ( ^( I_ENCODED_ENUM fully_qualified_field ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1274:5: ^( I_ENCODED_ENUM fully_qualified_field )\n {\n match(input, I_ENCODED_ENUM, FOLLOW_I_ENCODED_ENUM_in_enum_literal3615);\n match(input, Token.DOWN, null);\n pushFollow(FOLLOW_fully_qualified_field_in_enum_literal3617);\n fully_qualified_field210 = fully_qualified_field();\n state._fsp--;\n\n match(input, Token.UP, null);\n\n\n value = fully_qualified_field210;\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return value;\n }", "public static Enum forString(java.lang.String s)\r\n { return (Enum)table.forString(s); }", "public final eu.hyvar.dataValues.HyEnum parse_eu_hyvar_dataValues_HyEnum() throws RecognitionException {\r\n eu.hyvar.dataValues.HyEnum element = null;\r\n\r\n int parse_eu_hyvar_dataValues_HyEnum_StartIndex = input.index();\r\n\r\n Token a0=null;\r\n Token a1=null;\r\n Token a2=null;\r\n Token a4=null;\r\n Token a6=null;\r\n Token a7=null;\r\n Token a8=null;\r\n Token a9=null;\r\n Token a10=null;\r\n Token a11=null;\r\n Token a12=null;\r\n Token a13=null;\r\n Token a14=null;\r\n Token a15=null;\r\n Token a16=null;\r\n eu.hyvar.dataValues.HyEnumLiteral a3_0 =null;\r\n\r\n eu.hyvar.dataValues.HyEnumLiteral a5_0 =null;\r\n\r\n\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 7) ) { return element; }\r\n\r\n // Hymanifest.g:2075:2: (a0= 'Enum(' (a1= IDENTIFIER_TOKEN ) a2= ',' ( ( (a3_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ( (a4= ',' (a5_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ) )* ) )? a6= ')' ( (a7= '[' ( (a8= DATE ) a9= '-' (a10= DATE ) | (a11= DATE ) a12= '-' |a13= 'eternity' a14= '-' (a15= DATE ) ) a16= ']' ) )? )\r\n // Hymanifest.g:2076:2: a0= 'Enum(' (a1= IDENTIFIER_TOKEN ) a2= ',' ( ( (a3_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ( (a4= ',' (a5_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ) )* ) )? a6= ')' ( (a7= '[' ( (a8= DATE ) a9= '-' (a10= DATE ) | (a11= DATE ) a12= '-' |a13= 'eternity' a14= '-' (a15= DATE ) ) a16= ']' ) )?\r\n {\r\n a0=(Token)match(input,20,FOLLOW_20_in_parse_eu_hyvar_dataValues_HyEnum2333); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\tif (element == null) {\r\n \t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\tstartIncompleteElement(element);\r\n \t\t}\r\n \t\tcollectHiddenTokens(element);\r\n \t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_0, null, true);\r\n \t\tcopyLocalizationInfos((CommonToken)a0, element);\r\n \t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t// expected elements (follow set)\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[107]);\r\n \t}\r\n\r\n // Hymanifest.g:2090:2: (a1= IDENTIFIER_TOKEN )\r\n // Hymanifest.g:2091:3: a1= IDENTIFIER_TOKEN\r\n {\r\n a1=(Token)match(input,IDENTIFIER_TOKEN,FOLLOW_IDENTIFIER_TOKEN_in_parse_eu_hyvar_dataValues_HyEnum2351); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\tif (terminateParsing) {\r\n \t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t\t\t}\r\n \t\t\tif (element == null) {\r\n \t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\t\tstartIncompleteElement(element);\r\n \t\t\t}\r\n \t\t\tif (a1 != null) {\r\n \t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolver tokenResolver = tokenResolverFactory.createTokenResolver(\"IDENTIFIER_TOKEN\");\r\n \t\t\t\ttokenResolver.setOptions(getOptions());\r\n \t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolveResult result = getFreshTokenResolveResult();\r\n \t\t\t\ttokenResolver.resolve(a1.getText(), element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM__NAME), result);\r\n \t\t\t\tObject resolvedObject = result.getResolvedToken();\r\n \t\t\t\tif (resolvedObject == null) {\r\n \t\t\t\t\taddErrorToResource(result.getErrorMessage(), ((CommonToken) a1).getLine(), ((CommonToken) a1).getCharPositionInLine(), ((CommonToken) a1).getStartIndex(), ((CommonToken) a1).getStopIndex());\r\n \t\t\t\t}\r\n \t\t\t\tjava.lang.String resolved = (java.lang.String) resolvedObject;\r\n \t\t\t\tif (resolved != null) {\r\n \t\t\t\t\tObject value = resolved;\r\n \t\t\t\t\telement.eSet(element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM__NAME), value);\r\n \t\t\t\t\tcompletedElement(value, false);\r\n \t\t\t\t}\r\n \t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_1, resolved, true);\r\n \t\t\t\tcopyLocalizationInfos((CommonToken) a1, element);\r\n \t\t\t}\r\n \t\t}\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t// expected elements (follow set)\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[108]);\r\n \t}\r\n\r\n a2=(Token)match(input,15,FOLLOW_15_in_parse_eu_hyvar_dataValues_HyEnum2372); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\tif (element == null) {\r\n \t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\tstartIncompleteElement(element);\r\n \t\t}\r\n \t\tcollectHiddenTokens(element);\r\n \t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_2, null, true);\r\n \t\tcopyLocalizationInfos((CommonToken)a2, element);\r\n \t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t// expected elements (follow set)\r\n \t\taddExpectedElement(eu.hyvar.dataValues.HyDataValuesPackage.eINSTANCE.getHyEnum(), eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[109]);\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[110]);\r\n \t}\r\n\r\n // Hymanifest.g:2141:2: ( ( (a3_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ( (a4= ',' (a5_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ) )* ) )?\r\n int alt18=2;\r\n int LA18_0 = input.LA(1);\r\n\r\n if ( (LA18_0==21) ) {\r\n alt18=1;\r\n }\r\n switch (alt18) {\r\n case 1 :\r\n // Hymanifest.g:2142:3: ( (a3_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ( (a4= ',' (a5_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ) )* )\r\n {\r\n // Hymanifest.g:2142:3: ( (a3_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ( (a4= ',' (a5_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ) )* )\r\n // Hymanifest.g:2143:4: (a3_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ( (a4= ',' (a5_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ) )*\r\n {\r\n // Hymanifest.g:2143:4: (a3_0= parse_eu_hyvar_dataValues_HyEnumLiteral )\r\n // Hymanifest.g:2144:5: a3_0= parse_eu_hyvar_dataValues_HyEnumLiteral\r\n {\r\n pushFollow(FOLLOW_parse_eu_hyvar_dataValues_HyEnumLiteral_in_parse_eu_hyvar_dataValues_HyEnum2401);\r\n a3_0=parse_eu_hyvar_dataValues_HyEnumLiteral();\r\n\r\n state._fsp--;\r\n if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\tif (terminateParsing) {\r\n \t\t\t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (a3_0 != null) {\r\n \t\t\t\t\t\tif (a3_0 != null) {\r\n \t\t\t\t\t\t\tObject value = a3_0;\r\n \t\t\t\t\t\t\taddObjectToList(element, eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM__LITERALS, value);\r\n \t\t\t\t\t\t\tcompletedElement(value, true);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_3_0_0_0, a3_0, true);\r\n \t\t\t\t\t\tcopyLocalizationInfos(a3_0, element);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t// expected elements (follow set)\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[111]);\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[112]);\r\n \t\t\t}\r\n\r\n // Hymanifest.g:2170:4: ( (a4= ',' (a5_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) ) )*\r\n loop17:\r\n do {\r\n int alt17=2;\r\n int LA17_0 = input.LA(1);\r\n\r\n if ( (LA17_0==15) ) {\r\n alt17=1;\r\n }\r\n\r\n\r\n switch (alt17) {\r\n \tcase 1 :\r\n \t // Hymanifest.g:2171:5: (a4= ',' (a5_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) )\r\n \t {\r\n \t // Hymanifest.g:2171:5: (a4= ',' (a5_0= parse_eu_hyvar_dataValues_HyEnumLiteral ) )\r\n \t // Hymanifest.g:2172:6: a4= ',' (a5_0= parse_eu_hyvar_dataValues_HyEnumLiteral )\r\n \t {\r\n \t a4=(Token)match(input,15,FOLLOW_15_in_parse_eu_hyvar_dataValues_HyEnum2442); if (state.failed) return element;\r\n\r\n \t if ( state.backtracking==0 ) {\r\n \t \t\t\t\t\t\tif (element == null) {\r\n \t \t\t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t \t\t\t\t\t\t\tstartIncompleteElement(element);\r\n \t \t\t\t\t\t\t}\r\n \t \t\t\t\t\t\tcollectHiddenTokens(element);\r\n \t \t\t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_3_0_0_1_0_0_0, null, true);\r\n \t \t\t\t\t\t\tcopyLocalizationInfos((CommonToken)a4, element);\r\n \t \t\t\t\t\t}\r\n\r\n \t if ( state.backtracking==0 ) {\r\n \t \t\t\t\t\t\t// expected elements (follow set)\r\n \t \t\t\t\t\t\taddExpectedElement(eu.hyvar.dataValues.HyDataValuesPackage.eINSTANCE.getHyEnum(), eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[113]);\r\n \t \t\t\t\t\t}\r\n\r\n \t // Hymanifest.g:2186:6: (a5_0= parse_eu_hyvar_dataValues_HyEnumLiteral )\r\n \t // Hymanifest.g:2187:7: a5_0= parse_eu_hyvar_dataValues_HyEnumLiteral\r\n \t {\r\n \t pushFollow(FOLLOW_parse_eu_hyvar_dataValues_HyEnumLiteral_in_parse_eu_hyvar_dataValues_HyEnum2476);\r\n \t a5_0=parse_eu_hyvar_dataValues_HyEnumLiteral();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return element;\r\n\r\n \t if ( state.backtracking==0 ) {\r\n \t \t\t\t\t\t\t\tif (terminateParsing) {\r\n \t \t\t\t\t\t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t \t\t\t\t\t\t\t}\r\n \t \t\t\t\t\t\t\tif (element == null) {\r\n \t \t\t\t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t \t\t\t\t\t\t\t\tstartIncompleteElement(element);\r\n \t \t\t\t\t\t\t\t}\r\n \t \t\t\t\t\t\t\tif (a5_0 != null) {\r\n \t \t\t\t\t\t\t\t\tif (a5_0 != null) {\r\n \t \t\t\t\t\t\t\t\t\tObject value = a5_0;\r\n \t \t\t\t\t\t\t\t\t\taddObjectToList(element, eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM__LITERALS, value);\r\n \t \t\t\t\t\t\t\t\t\tcompletedElement(value, true);\r\n \t \t\t\t\t\t\t\t\t}\r\n \t \t\t\t\t\t\t\t\tcollectHiddenTokens(element);\r\n \t \t\t\t\t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_3_0_0_1_0_0_1, a5_0, true);\r\n \t \t\t\t\t\t\t\t\tcopyLocalizationInfos(a5_0, element);\r\n \t \t\t\t\t\t\t\t}\r\n \t \t\t\t\t\t\t}\r\n\r\n \t }\r\n\r\n\r\n \t if ( state.backtracking==0 ) {\r\n \t \t\t\t\t\t\t// expected elements (follow set)\r\n \t \t\t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[114]);\r\n \t \t\t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[115]);\r\n \t \t\t\t\t\t}\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop17;\r\n }\r\n } while (true);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t// expected elements (follow set)\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[116]);\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[117]);\r\n \t\t\t}\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t// expected elements (follow set)\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[118]);\r\n \t}\r\n\r\n a6=(Token)match(input,14,FOLLOW_14_in_parse_eu_hyvar_dataValues_HyEnum2550); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\tif (element == null) {\r\n \t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\tstartIncompleteElement(element);\r\n \t\t}\r\n \t\tcollectHiddenTokens(element);\r\n \t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_4, null, true);\r\n \t\tcopyLocalizationInfos((CommonToken)a6, element);\r\n \t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t// expected elements (follow set)\r\n \t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[119]);\r\n \t}\r\n\r\n // Hymanifest.g:2242:2: ( (a7= '[' ( (a8= DATE ) a9= '-' (a10= DATE ) | (a11= DATE ) a12= '-' |a13= 'eternity' a14= '-' (a15= DATE ) ) a16= ']' ) )?\r\n int alt20=2;\r\n int LA20_0 = input.LA(1);\r\n\r\n if ( (LA20_0==24) ) {\r\n alt20=1;\r\n }\r\n switch (alt20) {\r\n case 1 :\r\n // Hymanifest.g:2243:3: (a7= '[' ( (a8= DATE ) a9= '-' (a10= DATE ) | (a11= DATE ) a12= '-' |a13= 'eternity' a14= '-' (a15= DATE ) ) a16= ']' )\r\n {\r\n // Hymanifest.g:2243:3: (a7= '[' ( (a8= DATE ) a9= '-' (a10= DATE ) | (a11= DATE ) a12= '-' |a13= 'eternity' a14= '-' (a15= DATE ) ) a16= ']' )\r\n // Hymanifest.g:2244:4: a7= '[' ( (a8= DATE ) a9= '-' (a10= DATE ) | (a11= DATE ) a12= '-' |a13= 'eternity' a14= '-' (a15= DATE ) ) a16= ']'\r\n {\r\n a7=(Token)match(input,24,FOLLOW_24_in_parse_eu_hyvar_dataValues_HyEnum2573); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\tif (element == null) {\r\n \t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t}\r\n \t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_5_0_0_0, null, true);\r\n \t\t\t\tcopyLocalizationInfos((CommonToken)a7, element);\r\n \t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t// expected elements (follow set)\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[120]);\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[121]);\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[122]);\r\n \t\t\t}\r\n\r\n // Hymanifest.g:2260:4: ( (a8= DATE ) a9= '-' (a10= DATE ) | (a11= DATE ) a12= '-' |a13= 'eternity' a14= '-' (a15= DATE ) )\r\n int alt19=3;\r\n int LA19_0 = input.LA(1);\r\n\r\n if ( (LA19_0==DATE) ) {\r\n int LA19_1 = input.LA(2);\r\n\r\n if ( (LA19_1==16) ) {\r\n int LA19_3 = input.LA(3);\r\n\r\n if ( (LA19_3==DATE) ) {\r\n alt19=1;\r\n }\r\n else if ( (LA19_3==25) ) {\r\n alt19=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return element;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 19, 3, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return element;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 19, 1, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n else if ( (LA19_0==27) ) {\r\n alt19=3;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return element;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 19, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt19) {\r\n case 1 :\r\n // Hymanifest.g:2261:5: (a8= DATE ) a9= '-' (a10= DATE )\r\n {\r\n // Hymanifest.g:2261:5: (a8= DATE )\r\n // Hymanifest.g:2262:6: a8= DATE\r\n {\r\n a8=(Token)match(input,DATE,FOLLOW_DATE_in_parse_eu_hyvar_dataValues_HyEnum2606); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t\tif (terminateParsing) {\r\n \t\t\t\t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (a8 != null) {\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolver tokenResolver = tokenResolverFactory.createTokenResolver(\"DATE\");\r\n \t\t\t\t\t\t\ttokenResolver.setOptions(getOptions());\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolveResult result = getFreshTokenResolveResult();\r\n \t\t\t\t\t\t\ttokenResolver.resolve(a8.getText(), element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM__VALID_SINCE), result);\r\n \t\t\t\t\t\t\tObject resolvedObject = result.getResolvedToken();\r\n \t\t\t\t\t\t\tif (resolvedObject == null) {\r\n \t\t\t\t\t\t\t\taddErrorToResource(result.getErrorMessage(), ((CommonToken) a8).getLine(), ((CommonToken) a8).getCharPositionInLine(), ((CommonToken) a8).getStartIndex(), ((CommonToken) a8).getStopIndex());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tjava.util.Date resolved = (java.util.Date) resolvedObject;\r\n \t\t\t\t\t\t\tif (resolved != null) {\r\n \t\t\t\t\t\t\t\tObject value = resolved;\r\n \t\t\t\t\t\t\t\telement.eSet(element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM__VALID_SINCE), value);\r\n \t\t\t\t\t\t\t\tcompletedElement(value, false);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_5_0_0_1_0_0_0, resolved, true);\r\n \t\t\t\t\t\t\tcopyLocalizationInfos((CommonToken) a8, element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[123]);\r\n \t\t\t\t}\r\n\r\n a9=(Token)match(input,16,FOLLOW_16_in_parse_eu_hyvar_dataValues_HyEnum2645); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_5_0_0_1_0_0_1, null, true);\r\n \t\t\t\t\tcopyLocalizationInfos((CommonToken)a9, element);\r\n \t\t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[124]);\r\n \t\t\t\t}\r\n\r\n // Hymanifest.g:2311:5: (a10= DATE )\r\n // Hymanifest.g:2312:6: a10= DATE\r\n {\r\n a10=(Token)match(input,DATE,FOLLOW_DATE_in_parse_eu_hyvar_dataValues_HyEnum2675); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t\tif (terminateParsing) {\r\n \t\t\t\t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (a10 != null) {\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolver tokenResolver = tokenResolverFactory.createTokenResolver(\"DATE\");\r\n \t\t\t\t\t\t\ttokenResolver.setOptions(getOptions());\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolveResult result = getFreshTokenResolveResult();\r\n \t\t\t\t\t\t\ttokenResolver.resolve(a10.getText(), element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM__VALID_UNTIL), result);\r\n \t\t\t\t\t\t\tObject resolvedObject = result.getResolvedToken();\r\n \t\t\t\t\t\t\tif (resolvedObject == null) {\r\n \t\t\t\t\t\t\t\taddErrorToResource(result.getErrorMessage(), ((CommonToken) a10).getLine(), ((CommonToken) a10).getCharPositionInLine(), ((CommonToken) a10).getStartIndex(), ((CommonToken) a10).getStopIndex());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tjava.util.Date resolved = (java.util.Date) resolvedObject;\r\n \t\t\t\t\t\t\tif (resolved != null) {\r\n \t\t\t\t\t\t\t\tObject value = resolved;\r\n \t\t\t\t\t\t\t\telement.eSet(element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM__VALID_UNTIL), value);\r\n \t\t\t\t\t\t\t\tcompletedElement(value, false);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_5_0_0_1_0_0_2, resolved, true);\r\n \t\t\t\t\t\t\tcopyLocalizationInfos((CommonToken) a10, element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[125]);\r\n \t\t\t\t}\r\n\r\n }\r\n break;\r\n case 2 :\r\n // Hymanifest.g:2348:10: (a11= DATE ) a12= '-'\r\n {\r\n // Hymanifest.g:2348:10: (a11= DATE )\r\n // Hymanifest.g:2349:6: a11= DATE\r\n {\r\n a11=(Token)match(input,DATE,FOLLOW_DATE_in_parse_eu_hyvar_dataValues_HyEnum2731); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t\tif (terminateParsing) {\r\n \t\t\t\t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (a11 != null) {\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolver tokenResolver = tokenResolverFactory.createTokenResolver(\"DATE\");\r\n \t\t\t\t\t\t\ttokenResolver.setOptions(getOptions());\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolveResult result = getFreshTokenResolveResult();\r\n \t\t\t\t\t\t\ttokenResolver.resolve(a11.getText(), element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM__VALID_SINCE), result);\r\n \t\t\t\t\t\t\tObject resolvedObject = result.getResolvedToken();\r\n \t\t\t\t\t\t\tif (resolvedObject == null) {\r\n \t\t\t\t\t\t\t\taddErrorToResource(result.getErrorMessage(), ((CommonToken) a11).getLine(), ((CommonToken) a11).getCharPositionInLine(), ((CommonToken) a11).getStartIndex(), ((CommonToken) a11).getStopIndex());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tjava.util.Date resolved = (java.util.Date) resolvedObject;\r\n \t\t\t\t\t\t\tif (resolved != null) {\r\n \t\t\t\t\t\t\t\tObject value = resolved;\r\n \t\t\t\t\t\t\t\telement.eSet(element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM__VALID_SINCE), value);\r\n \t\t\t\t\t\t\t\tcompletedElement(value, false);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_5_0_0_1_0_1_0, resolved, true);\r\n \t\t\t\t\t\t\tcopyLocalizationInfos((CommonToken) a11, element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[126]);\r\n \t\t\t\t}\r\n\r\n a12=(Token)match(input,16,FOLLOW_16_in_parse_eu_hyvar_dataValues_HyEnum2770); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_5_0_0_1_0_1_1, null, true);\r\n \t\t\t\t\tcopyLocalizationInfos((CommonToken)a12, element);\r\n \t\t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[127]);\r\n \t\t\t\t}\r\n\r\n }\r\n break;\r\n case 3 :\r\n // Hymanifest.g:2399:10: a13= 'eternity' a14= '-' (a15= DATE )\r\n {\r\n a13=(Token)match(input,27,FOLLOW_27_in_parse_eu_hyvar_dataValues_HyEnum2803); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_5_0_0_1_0_2_0, null, true);\r\n \t\t\t\t\tcopyLocalizationInfos((CommonToken)a13, element);\r\n \t\t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[128]);\r\n \t\t\t\t}\r\n\r\n a14=(Token)match(input,16,FOLLOW_16_in_parse_eu_hyvar_dataValues_HyEnum2826); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_5_0_0_1_0_2_1, null, true);\r\n \t\t\t\t\tcopyLocalizationInfos((CommonToken)a14, element);\r\n \t\t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[129]);\r\n \t\t\t\t}\r\n\r\n // Hymanifest.g:2427:5: (a15= DATE )\r\n // Hymanifest.g:2428:6: a15= DATE\r\n {\r\n a15=(Token)match(input,DATE,FOLLOW_DATE_in_parse_eu_hyvar_dataValues_HyEnum2856); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t\tif (terminateParsing) {\r\n \t\t\t\t\t\t\tthrow new eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestTerminateParsingException();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (element == null) {\r\n \t\t\t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (a15 != null) {\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolver tokenResolver = tokenResolverFactory.createTokenResolver(\"DATE\");\r\n \t\t\t\t\t\t\ttokenResolver.setOptions(getOptions());\r\n \t\t\t\t\t\t\teu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestTokenResolveResult result = getFreshTokenResolveResult();\r\n \t\t\t\t\t\t\ttokenResolver.resolve(a15.getText(), element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM__VALID_UNTIL), result);\r\n \t\t\t\t\t\t\tObject resolvedObject = result.getResolvedToken();\r\n \t\t\t\t\t\t\tif (resolvedObject == null) {\r\n \t\t\t\t\t\t\t\taddErrorToResource(result.getErrorMessage(), ((CommonToken) a15).getLine(), ((CommonToken) a15).getCharPositionInLine(), ((CommonToken) a15).getStartIndex(), ((CommonToken) a15).getStopIndex());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tjava.util.Date resolved = (java.util.Date) resolvedObject;\r\n \t\t\t\t\t\t\tif (resolved != null) {\r\n \t\t\t\t\t\t\t\tObject value = resolved;\r\n \t\t\t\t\t\t\t\telement.eSet(element.eClass().getEStructuralFeature(eu.hyvar.dataValues.HyDataValuesPackage.HY_ENUM__VALID_UNTIL), value);\r\n \t\t\t\t\t\t\t\tcompletedElement(value, false);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_5_0_0_1_0_2_2, resolved, true);\r\n \t\t\t\t\t\t\tcopyLocalizationInfos((CommonToken) a15, element);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t\t// expected elements (follow set)\r\n \t\t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[130]);\r\n \t\t\t\t}\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t// expected elements (follow set)\r\n \t\t\t\taddExpectedElement(null, eu.hyvar.mspl.manifest.resource.hymanifest.mopp.HymanifestExpectationConstants.EXPECTATIONS[131]);\r\n \t\t\t}\r\n\r\n a16=(Token)match(input,25,FOLLOW_25_in_parse_eu_hyvar_dataValues_HyEnum2908); if (state.failed) return element;\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\tif (element == null) {\r\n \t\t\t\t\telement = eu.hyvar.dataValues.HyDataValuesFactory.eINSTANCE.createHyEnum();\r\n \t\t\t\t\tstartIncompleteElement(element);\r\n \t\t\t\t}\r\n \t\t\t\tcollectHiddenTokens(element);\r\n \t\t\t\tretrieveLayoutInformation(element, eu.hyvar.mspl.manifest.resource.hymanifest.grammar.HymanifestGrammarInformationProvider.HYDATAVALUE_3_0_0_5_0_0_2, null, true);\r\n \t\t\t\tcopyLocalizationInfos((CommonToken)a16, element);\r\n \t\t\t}\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t\t\t// expected elements (follow set)\r\n \t\t\t}\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n \t\t// expected elements (follow set)\r\n \t}\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 7, parse_eu_hyvar_dataValues_HyEnum_StartIndex); }\r\n\r\n }\r\n return element;\r\n }", "public final Enumerator ruleCapacityType() throws RecognitionException {\r\n Enumerator current = null;\r\n\r\n Token enumLiteral_0=null;\r\n Token enumLiteral_1=null;\r\n Token enumLiteral_2=null;\r\n Token enumLiteral_3=null;\r\n Token enumLiteral_4=null;\r\n Token enumLiteral_5=null;\r\n Token enumLiteral_6=null;\r\n Token enumLiteral_7=null;\r\n Token enumLiteral_8=null;\r\n Token enumLiteral_9=null;\r\n Token enumLiteral_10=null;\r\n Token enumLiteral_11=null;\r\n Token enumLiteral_12=null;\r\n Token enumLiteral_13=null;\r\n Token enumLiteral_14=null;\r\n Token enumLiteral_15=null;\r\n Token enumLiteral_16=null;\r\n\r\n\r\n \tenterRule();\r\n\r\n try {\r\n // InternalEsportDsl.g:2546:2: ( ( (enumLiteral_0= 'positioning' ) | (enumLiteral_1= 'stressManagement' ) | (enumLiteral_2= 'playmakingMechanics' ) | (enumLiteral_3= 'escapeMechanics' ) | (enumLiteral_4= 'patience' ) | (enumLiteral_5= 'farm' ) | (enumLiteral_6= 'steal' ) | (enumLiteral_7= 'splitPush' ) | (enumLiteral_8= 'teamPlay' ) | (enumLiteral_9= 'aggressivity' ) | (enumLiteral_10= 'leadership' ) | (enumLiteral_11= 'draft' ) | (enumLiteral_12= 'pathing' ) | (enumLiteral_13= 'awareness' ) | (enumLiteral_14= 'experience' ) | (enumLiteral_15= 'objectivePlay' ) | (enumLiteral_16= 'metaGame' ) ) )\r\n // InternalEsportDsl.g:2547:2: ( (enumLiteral_0= 'positioning' ) | (enumLiteral_1= 'stressManagement' ) | (enumLiteral_2= 'playmakingMechanics' ) | (enumLiteral_3= 'escapeMechanics' ) | (enumLiteral_4= 'patience' ) | (enumLiteral_5= 'farm' ) | (enumLiteral_6= 'steal' ) | (enumLiteral_7= 'splitPush' ) | (enumLiteral_8= 'teamPlay' ) | (enumLiteral_9= 'aggressivity' ) | (enumLiteral_10= 'leadership' ) | (enumLiteral_11= 'draft' ) | (enumLiteral_12= 'pathing' ) | (enumLiteral_13= 'awareness' ) | (enumLiteral_14= 'experience' ) | (enumLiteral_15= 'objectivePlay' ) | (enumLiteral_16= 'metaGame' ) )\r\n {\r\n // InternalEsportDsl.g:2547:2: ( (enumLiteral_0= 'positioning' ) | (enumLiteral_1= 'stressManagement' ) | (enumLiteral_2= 'playmakingMechanics' ) | (enumLiteral_3= 'escapeMechanics' ) | (enumLiteral_4= 'patience' ) | (enumLiteral_5= 'farm' ) | (enumLiteral_6= 'steal' ) | (enumLiteral_7= 'splitPush' ) | (enumLiteral_8= 'teamPlay' ) | (enumLiteral_9= 'aggressivity' ) | (enumLiteral_10= 'leadership' ) | (enumLiteral_11= 'draft' ) | (enumLiteral_12= 'pathing' ) | (enumLiteral_13= 'awareness' ) | (enumLiteral_14= 'experience' ) | (enumLiteral_15= 'objectivePlay' ) | (enumLiteral_16= 'metaGame' ) )\r\n int alt45=17;\r\n switch ( input.LA(1) ) {\r\n case 58:\r\n {\r\n alt45=1;\r\n }\r\n break;\r\n case 59:\r\n {\r\n alt45=2;\r\n }\r\n break;\r\n case 60:\r\n {\r\n alt45=3;\r\n }\r\n break;\r\n case 61:\r\n {\r\n alt45=4;\r\n }\r\n break;\r\n case 62:\r\n {\r\n alt45=5;\r\n }\r\n break;\r\n case 63:\r\n {\r\n alt45=6;\r\n }\r\n break;\r\n case 64:\r\n {\r\n alt45=7;\r\n }\r\n break;\r\n case 65:\r\n {\r\n alt45=8;\r\n }\r\n break;\r\n case 66:\r\n {\r\n alt45=9;\r\n }\r\n break;\r\n case 67:\r\n {\r\n alt45=10;\r\n }\r\n break;\r\n case 68:\r\n {\r\n alt45=11;\r\n }\r\n break;\r\n case 69:\r\n {\r\n alt45=12;\r\n }\r\n break;\r\n case 70:\r\n {\r\n alt45=13;\r\n }\r\n break;\r\n case 71:\r\n {\r\n alt45=14;\r\n }\r\n break;\r\n case 72:\r\n {\r\n alt45=15;\r\n }\r\n break;\r\n case 73:\r\n {\r\n alt45=16;\r\n }\r\n break;\r\n case 74:\r\n {\r\n alt45=17;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 45, 0, input);\r\n\r\n throw nvae;\r\n }\r\n\r\n switch (alt45) {\r\n case 1 :\r\n // InternalEsportDsl.g:2548:3: (enumLiteral_0= 'positioning' )\r\n {\r\n // InternalEsportDsl.g:2548:3: (enumLiteral_0= 'positioning' )\r\n // InternalEsportDsl.g:2549:4: enumLiteral_0= 'positioning'\r\n {\r\n enumLiteral_0=(Token)match(input,58,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getPositioningEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_0, grammarAccess.getCapacityTypeAccess().getPositioningEnumLiteralDeclaration_0());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalEsportDsl.g:2556:3: (enumLiteral_1= 'stressManagement' )\r\n {\r\n // InternalEsportDsl.g:2556:3: (enumLiteral_1= 'stressManagement' )\r\n // InternalEsportDsl.g:2557:4: enumLiteral_1= 'stressManagement'\r\n {\r\n enumLiteral_1=(Token)match(input,59,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getStressManagementEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_1, grammarAccess.getCapacityTypeAccess().getStressManagementEnumLiteralDeclaration_1());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // InternalEsportDsl.g:2564:3: (enumLiteral_2= 'playmakingMechanics' )\r\n {\r\n // InternalEsportDsl.g:2564:3: (enumLiteral_2= 'playmakingMechanics' )\r\n // InternalEsportDsl.g:2565:4: enumLiteral_2= 'playmakingMechanics'\r\n {\r\n enumLiteral_2=(Token)match(input,60,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getPlaymakingMechanicsEnumLiteralDeclaration_2().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_2, grammarAccess.getCapacityTypeAccess().getPlaymakingMechanicsEnumLiteralDeclaration_2());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // InternalEsportDsl.g:2572:3: (enumLiteral_3= 'escapeMechanics' )\r\n {\r\n // InternalEsportDsl.g:2572:3: (enumLiteral_3= 'escapeMechanics' )\r\n // InternalEsportDsl.g:2573:4: enumLiteral_3= 'escapeMechanics'\r\n {\r\n enumLiteral_3=(Token)match(input,61,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getEscapeMechanicsEnumLiteralDeclaration_3().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_3, grammarAccess.getCapacityTypeAccess().getEscapeMechanicsEnumLiteralDeclaration_3());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 5 :\r\n // InternalEsportDsl.g:2580:3: (enumLiteral_4= 'patience' )\r\n {\r\n // InternalEsportDsl.g:2580:3: (enumLiteral_4= 'patience' )\r\n // InternalEsportDsl.g:2581:4: enumLiteral_4= 'patience'\r\n {\r\n enumLiteral_4=(Token)match(input,62,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getPatienceEnumLiteralDeclaration_4().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_4, grammarAccess.getCapacityTypeAccess().getPatienceEnumLiteralDeclaration_4());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 6 :\r\n // InternalEsportDsl.g:2588:3: (enumLiteral_5= 'farm' )\r\n {\r\n // InternalEsportDsl.g:2588:3: (enumLiteral_5= 'farm' )\r\n // InternalEsportDsl.g:2589:4: enumLiteral_5= 'farm'\r\n {\r\n enumLiteral_5=(Token)match(input,63,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getFarmEnumLiteralDeclaration_5().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_5, grammarAccess.getCapacityTypeAccess().getFarmEnumLiteralDeclaration_5());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 7 :\r\n // InternalEsportDsl.g:2596:3: (enumLiteral_6= 'steal' )\r\n {\r\n // InternalEsportDsl.g:2596:3: (enumLiteral_6= 'steal' )\r\n // InternalEsportDsl.g:2597:4: enumLiteral_6= 'steal'\r\n {\r\n enumLiteral_6=(Token)match(input,64,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getStealEnumLiteralDeclaration_6().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_6, grammarAccess.getCapacityTypeAccess().getStealEnumLiteralDeclaration_6());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 8 :\r\n // InternalEsportDsl.g:2604:3: (enumLiteral_7= 'splitPush' )\r\n {\r\n // InternalEsportDsl.g:2604:3: (enumLiteral_7= 'splitPush' )\r\n // InternalEsportDsl.g:2605:4: enumLiteral_7= 'splitPush'\r\n {\r\n enumLiteral_7=(Token)match(input,65,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getSplitPushEnumLiteralDeclaration_7().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_7, grammarAccess.getCapacityTypeAccess().getSplitPushEnumLiteralDeclaration_7());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 9 :\r\n // InternalEsportDsl.g:2612:3: (enumLiteral_8= 'teamPlay' )\r\n {\r\n // InternalEsportDsl.g:2612:3: (enumLiteral_8= 'teamPlay' )\r\n // InternalEsportDsl.g:2613:4: enumLiteral_8= 'teamPlay'\r\n {\r\n enumLiteral_8=(Token)match(input,66,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getTeamPlayEnumLiteralDeclaration_8().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_8, grammarAccess.getCapacityTypeAccess().getTeamPlayEnumLiteralDeclaration_8());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 10 :\r\n // InternalEsportDsl.g:2620:3: (enumLiteral_9= 'aggressivity' )\r\n {\r\n // InternalEsportDsl.g:2620:3: (enumLiteral_9= 'aggressivity' )\r\n // InternalEsportDsl.g:2621:4: enumLiteral_9= 'aggressivity'\r\n {\r\n enumLiteral_9=(Token)match(input,67,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getAggressivityEnumLiteralDeclaration_9().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_9, grammarAccess.getCapacityTypeAccess().getAggressivityEnumLiteralDeclaration_9());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 11 :\r\n // InternalEsportDsl.g:2628:3: (enumLiteral_10= 'leadership' )\r\n {\r\n // InternalEsportDsl.g:2628:3: (enumLiteral_10= 'leadership' )\r\n // InternalEsportDsl.g:2629:4: enumLiteral_10= 'leadership'\r\n {\r\n enumLiteral_10=(Token)match(input,68,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getLeadershipEnumLiteralDeclaration_10().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_10, grammarAccess.getCapacityTypeAccess().getLeadershipEnumLiteralDeclaration_10());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 12 :\r\n // InternalEsportDsl.g:2636:3: (enumLiteral_11= 'draft' )\r\n {\r\n // InternalEsportDsl.g:2636:3: (enumLiteral_11= 'draft' )\r\n // InternalEsportDsl.g:2637:4: enumLiteral_11= 'draft'\r\n {\r\n enumLiteral_11=(Token)match(input,69,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getDraftEnumLiteralDeclaration_11().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_11, grammarAccess.getCapacityTypeAccess().getDraftEnumLiteralDeclaration_11());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 13 :\r\n // InternalEsportDsl.g:2644:3: (enumLiteral_12= 'pathing' )\r\n {\r\n // InternalEsportDsl.g:2644:3: (enumLiteral_12= 'pathing' )\r\n // InternalEsportDsl.g:2645:4: enumLiteral_12= 'pathing'\r\n {\r\n enumLiteral_12=(Token)match(input,70,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getPathingEnumLiteralDeclaration_12().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_12, grammarAccess.getCapacityTypeAccess().getPathingEnumLiteralDeclaration_12());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 14 :\r\n // InternalEsportDsl.g:2652:3: (enumLiteral_13= 'awareness' )\r\n {\r\n // InternalEsportDsl.g:2652:3: (enumLiteral_13= 'awareness' )\r\n // InternalEsportDsl.g:2653:4: enumLiteral_13= 'awareness'\r\n {\r\n enumLiteral_13=(Token)match(input,71,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getAwarenessEnumLiteralDeclaration_13().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_13, grammarAccess.getCapacityTypeAccess().getAwarenessEnumLiteralDeclaration_13());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 15 :\r\n // InternalEsportDsl.g:2660:3: (enumLiteral_14= 'experience' )\r\n {\r\n // InternalEsportDsl.g:2660:3: (enumLiteral_14= 'experience' )\r\n // InternalEsportDsl.g:2661:4: enumLiteral_14= 'experience'\r\n {\r\n enumLiteral_14=(Token)match(input,72,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getExperienceEnumLiteralDeclaration_14().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_14, grammarAccess.getCapacityTypeAccess().getExperienceEnumLiteralDeclaration_14());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 16 :\r\n // InternalEsportDsl.g:2668:3: (enumLiteral_15= 'objectivePlay' )\r\n {\r\n // InternalEsportDsl.g:2668:3: (enumLiteral_15= 'objectivePlay' )\r\n // InternalEsportDsl.g:2669:4: enumLiteral_15= 'objectivePlay'\r\n {\r\n enumLiteral_15=(Token)match(input,73,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getObjectivePlayEnumLiteralDeclaration_15().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_15, grammarAccess.getCapacityTypeAccess().getObjectivePlayEnumLiteralDeclaration_15());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 17 :\r\n // InternalEsportDsl.g:2676:3: (enumLiteral_16= 'metaGame' )\r\n {\r\n // InternalEsportDsl.g:2676:3: (enumLiteral_16= 'metaGame' )\r\n // InternalEsportDsl.g:2677:4: enumLiteral_16= 'metaGame'\r\n {\r\n enumLiteral_16=(Token)match(input,74,FOLLOW_2); \r\n\r\n \t\t\t\tcurrent = grammarAccess.getCapacityTypeAccess().getMetaGameEnumLiteralDeclaration_16().getEnumLiteral().getInstance();\r\n \t\t\t\tnewLeafNode(enumLiteral_16, grammarAccess.getCapacityTypeAccess().getMetaGameEnumLiteralDeclaration_16());\r\n \t\t\t\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n \tleaveRule();\r\n\r\n }\r\n\r\n catch (RecognitionException re) {\r\n recover(input,re);\r\n appendSkippedTokens();\r\n }\r\n finally {\r\n }\r\n return current;\r\n }", "public final Enumerator ruleEqualityOperator() throws RecognitionException {\n Enumerator current = null;\n int ruleEqualityOperator_StartIndex = input.index();\n Token enumLiteral_0=null;\n Token enumLiteral_1=null;\n\n enterRule(); \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 156) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6489:28: ( ( (enumLiteral_0= KEYWORD_31 ) | (enumLiteral_1= KEYWORD_21 ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6490:1: ( (enumLiteral_0= KEYWORD_31 ) | (enumLiteral_1= KEYWORD_21 ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6490:1: ( (enumLiteral_0= KEYWORD_31 ) | (enumLiteral_1= KEYWORD_21 ) )\n int alt117=2;\n int LA117_0 = input.LA(1);\n\n if ( (LA117_0==KEYWORD_31) ) {\n alt117=1;\n }\n else if ( (LA117_0==KEYWORD_21) ) {\n alt117=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 117, 0, input);\n\n throw nvae;\n }\n switch (alt117) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6490:2: (enumLiteral_0= KEYWORD_31 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6490:2: (enumLiteral_0= KEYWORD_31 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6490:7: enumLiteral_0= KEYWORD_31\n {\n enumLiteral_0=(Token)match(input,KEYWORD_31,FOLLOW_KEYWORD_31_in_ruleEqualityOperator13644); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getEqualityOperatorAccess().getEqEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_0, grammarAccess.getEqualityOperatorAccess().getEqEnumLiteralDeclaration_0()); \n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6496:6: (enumLiteral_1= KEYWORD_21 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6496:6: (enumLiteral_1= KEYWORD_21 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6496:11: enumLiteral_1= KEYWORD_21\n {\n enumLiteral_1=(Token)match(input,KEYWORD_21,FOLLOW_KEYWORD_21_in_ruleEqualityOperator13666); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getEqualityOperatorAccess().getNeqEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_1, grammarAccess.getEqualityOperatorAccess().getNeqEnumLiteralDeclaration_1()); \n \n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 156, ruleEqualityOperator_StartIndex); }\n }\n return current;\n }", "public final Enumerator ruleUnaryOperator() throws RecognitionException {\r\n Enumerator current = null;\r\n\r\n Token enumLiteral_0=null;\r\n Token enumLiteral_1=null;\r\n Token enumLiteral_2=null;\r\n\r\n enterRule(); \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4102:28: ( ( (enumLiteral_0= '+' ) | (enumLiteral_1= '-' ) | (enumLiteral_2= '~' ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4103:1: ( (enumLiteral_0= '+' ) | (enumLiteral_1= '-' ) | (enumLiteral_2= '~' ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4103:1: ( (enumLiteral_0= '+' ) | (enumLiteral_1= '-' ) | (enumLiteral_2= '~' ) )\r\n int alt63=3;\r\n switch ( input.LA(1) ) {\r\n case 72:\r\n {\r\n alt63=1;\r\n }\r\n break;\r\n case 73:\r\n {\r\n alt63=2;\r\n }\r\n break;\r\n case 76:\r\n {\r\n alt63=3;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return current;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 63, 0, input);\r\n\r\n throw nvae;\r\n }\r\n\r\n switch (alt63) {\r\n case 1 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4103:2: (enumLiteral_0= '+' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4103:2: (enumLiteral_0= '+' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4103:4: enumLiteral_0= '+'\r\n {\r\n enumLiteral_0=(Token)match(input,72,FOLLOW_72_in_ruleUnaryOperator9575); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getUnaryOperatorAccess().getPositiveEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_0, grammarAccess.getUnaryOperatorAccess().getPositiveEnumLiteralDeclaration_0()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4109:6: (enumLiteral_1= '-' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4109:6: (enumLiteral_1= '-' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4109:8: enumLiteral_1= '-'\r\n {\r\n enumLiteral_1=(Token)match(input,73,FOLLOW_73_in_ruleUnaryOperator9592); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getUnaryOperatorAccess().getNegativeEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_1, grammarAccess.getUnaryOperatorAccess().getNegativeEnumLiteralDeclaration_1()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4115:6: (enumLiteral_2= '~' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4115:6: (enumLiteral_2= '~' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4115:8: enumLiteral_2= '~'\r\n {\r\n enumLiteral_2=(Token)match(input,76,FOLLOW_76_in_ruleUnaryOperator9609); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getUnaryOperatorAccess().getComplementEnumLiteralDeclaration_2().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_2, grammarAccess.getUnaryOperatorAccess().getComplementEnumLiteralDeclaration_2()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public void testEnum() {\n assertNotNull(MazeCell.valueOf(MazeCell.UNEXPLORED.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.INVALID_CELL.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.CURRENT_PATH.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.FAILED_PATH.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.WALL.toString()));\n }", "private EnumButton(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public JExpression createConstant(Outline outline, XmlString literal) {\n/* 237 */ JClass type = toType(outline, Aspect.EXPOSED);\n/* 238 */ for (CEnumConstant mem : this.members) {\n/* 239 */ if (mem.getLexicalValue().equals(literal.value))\n/* 240 */ return (JExpression)type.staticRef(mem.getName()); \n/* */ } \n/* 242 */ return null;\n/* */ }", "public <T> Element addEnum(List<T> list) {\n\t\tElement simple = document.createElement(ParserConstants.simpleType_prefix.value());\n\t\tElement restriction = document.createElement(ParserConstants.restriction_prefix.value());\n\t\tfor (T option : list) {\n\t\t\tElement en = document.createElement(ParserConstants.enumeration_prefix.value());\n\t\t\ten.setAttribute(ParserConstants.values.toString(), option.toString());\n\t\t\trestriction.appendChild(en);\n\t\t}\n\t\tsimple.appendChild(restriction);\n\t\treturn simple;\n\t}", "public final EObject ruleEnumerationLiteralDeclaration() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:344:6: ( ( (lv_name_0_0= RULE_ID ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:345:1: ( (lv_name_0_0= RULE_ID ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:345:1: ( (lv_name_0_0= RULE_ID ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:346:1: (lv_name_0_0= RULE_ID )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:346:1: (lv_name_0_0= RULE_ID )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:347:3: lv_name_0_0= RULE_ID\n {\n lv_name_0_0=(Token)input.LT(1);\n match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleEnumerationLiteralDeclaration663); \n\n \t\t\tcreateLeafNode(grammarAccess.getEnumerationLiteralDeclarationAccess().getNameIDTerminalRuleCall_0(), \"name\"); \n \t\t\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getEnumerationLiteralDeclarationRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode, current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"name\",\n \t \t\tlv_name_0_0, \n \t \t\t\"ID\", \n \t \t\tlastConsumedNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t \n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "@com.exedio.cope.instrument.Generated\n\tprivate WrapEnumItem(final com.exedio.cope.ActivationParameters ap){super(ap);}", "public final Enumerator rulePPOperator() throws RecognitionException {\n Enumerator current = null;\n int rulePPOperator_StartIndex = input.index();\n Token enumLiteral_0=null;\n Token enumLiteral_1=null;\n\n enterRule(); \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 161) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6614:28: ( ( (enumLiteral_0= KEYWORD_23 ) | (enumLiteral_1= KEYWORD_25 ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6615:1: ( (enumLiteral_0= KEYWORD_23 ) | (enumLiteral_1= KEYWORD_25 ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6615:1: ( (enumLiteral_0= KEYWORD_23 ) | (enumLiteral_1= KEYWORD_25 ) )\n int alt122=2;\n int LA122_0 = input.LA(1);\n\n if ( (LA122_0==KEYWORD_23) ) {\n alt122=1;\n }\n else if ( (LA122_0==KEYWORD_25) ) {\n alt122=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 122, 0, input);\n\n throw nvae;\n }\n switch (alt122) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6615:2: (enumLiteral_0= KEYWORD_23 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6615:2: (enumLiteral_0= KEYWORD_23 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6615:7: enumLiteral_0= KEYWORD_23\n {\n enumLiteral_0=(Token)match(input,KEYWORD_23,FOLLOW_KEYWORD_23_in_rulePPOperator14114); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getPPOperatorAccess().getIncEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_0, grammarAccess.getPPOperatorAccess().getIncEnumLiteralDeclaration_0()); \n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6621:6: (enumLiteral_1= KEYWORD_25 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6621:6: (enumLiteral_1= KEYWORD_25 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6621:11: enumLiteral_1= KEYWORD_25\n {\n enumLiteral_1=(Token)match(input,KEYWORD_25,FOLLOW_KEYWORD_25_in_rulePPOperator14136); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getPPOperatorAccess().getDecEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_1, grammarAccess.getPPOperatorAccess().getDecEnumLiteralDeclaration_1()); \n \n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 161, rulePPOperator_StartIndex); }\n }\n return current;\n }", "public void testAddEmptyEnumsToModel() {\r\n\r\n String source = \"\"\r\n + \"public enum Enum1 {}\\n\"\r\n + \"enum Enum2 {;}\\n\";\r\n\r\n JavaProjectBuilder javaDocBuilder = new JavaProjectBuilder();\r\n javaDocBuilder.addSource(new StringReader(source));\r\n\r\n JavaClass enum1 = javaDocBuilder.getClassByName(\"Enum1\");\r\n assertTrue(enum1.isEnum());\r\n JavaClass enum2 = javaDocBuilder.getClassByName(\"Enum2\");\r\n assertTrue(enum2.isEnum());\r\n }", "UndefinedLiteralExp createUndefinedLiteralExp();", "public ServicesFormatEnum(){\n super();\n }", "Expr createExpr();", "private InterfaceModeType(int value, String name, String literal) {\n\t\tsuper(value, name, literal);\n\t}", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "public final Enumerator ruleBooleanOperator() throws RecognitionException {\n Enumerator current = null;\n int ruleBooleanOperator_StartIndex = input.index();\n Token enumLiteral_0=null;\n Token enumLiteral_1=null;\n Token enumLiteral_2=null;\n Token enumLiteral_3=null;\n\n enterRule(); \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 155) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6458:28: ( ( (enumLiteral_0= KEYWORD_3 ) | (enumLiteral_1= KEYWORD_19 ) | (enumLiteral_2= KEYWORD_22 ) | (enumLiteral_3= KEYWORD_36 ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6459:1: ( (enumLiteral_0= KEYWORD_3 ) | (enumLiteral_1= KEYWORD_19 ) | (enumLiteral_2= KEYWORD_22 ) | (enumLiteral_3= KEYWORD_36 ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6459:1: ( (enumLiteral_0= KEYWORD_3 ) | (enumLiteral_1= KEYWORD_19 ) | (enumLiteral_2= KEYWORD_22 ) | (enumLiteral_3= KEYWORD_36 ) )\n int alt116=4;\n switch ( input.LA(1) ) {\n case KEYWORD_3:\n {\n alt116=1;\n }\n break;\n case KEYWORD_19:\n {\n alt116=2;\n }\n break;\n case KEYWORD_22:\n {\n alt116=3;\n }\n break;\n case KEYWORD_36:\n {\n alt116=4;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 116, 0, input);\n\n throw nvae;\n }\n\n switch (alt116) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6459:2: (enumLiteral_0= KEYWORD_3 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6459:2: (enumLiteral_0= KEYWORD_3 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6459:7: enumLiteral_0= KEYWORD_3\n {\n enumLiteral_0=(Token)match(input,KEYWORD_3,FOLLOW_KEYWORD_3_in_ruleBooleanOperator13528); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getBooleanOperatorAccess().getAndEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_0, grammarAccess.getBooleanOperatorAccess().getAndEnumLiteralDeclaration_0()); \n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6465:6: (enumLiteral_1= KEYWORD_19 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6465:6: (enumLiteral_1= KEYWORD_19 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6465:11: enumLiteral_1= KEYWORD_19\n {\n enumLiteral_1=(Token)match(input,KEYWORD_19,FOLLOW_KEYWORD_19_in_ruleBooleanOperator13550); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getBooleanOperatorAccess().getOrEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_1, grammarAccess.getBooleanOperatorAccess().getOrEnumLiteralDeclaration_1()); \n \n }\n\n }\n\n\n }\n break;\n case 3 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6471:6: (enumLiteral_2= KEYWORD_22 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6471:6: (enumLiteral_2= KEYWORD_22 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6471:11: enumLiteral_2= KEYWORD_22\n {\n enumLiteral_2=(Token)match(input,KEYWORD_22,FOLLOW_KEYWORD_22_in_ruleBooleanOperator13572); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getBooleanOperatorAccess().getAndscEnumLiteralDeclaration_2().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_2, grammarAccess.getBooleanOperatorAccess().getAndscEnumLiteralDeclaration_2()); \n \n }\n\n }\n\n\n }\n break;\n case 4 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6477:6: (enumLiteral_3= KEYWORD_36 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6477:6: (enumLiteral_3= KEYWORD_36 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6477:11: enumLiteral_3= KEYWORD_36\n {\n enumLiteral_3=(Token)match(input,KEYWORD_36,FOLLOW_KEYWORD_36_in_ruleBooleanOperator13594); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getBooleanOperatorAccess().getOrscEnumLiteralDeclaration_3().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_3, grammarAccess.getBooleanOperatorAccess().getOrscEnumLiteralDeclaration_3()); \n \n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 155, ruleBooleanOperator_StartIndex); }\n }\n return current;\n }", "public T caseEnumStatement(EnumStatement object) {\n\t\treturn null;\n\t}", "public final Enumerator ruleRelationalOperator() throws RecognitionException {\r\n Enumerator current = null;\r\n\r\n Token enumLiteral_0=null;\r\n Token enumLiteral_1=null;\r\n Token enumLiteral_2=null;\r\n Token enumLiteral_3=null;\r\n Token enumLiteral_4=null;\r\n Token enumLiteral_5=null;\r\n\r\n enterRule(); \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4127:28: ( ( (enumLiteral_0= '<' ) | (enumLiteral_1= '<=' ) | (enumLiteral_2= '>' ) | (enumLiteral_3= '>=' ) | (enumLiteral_4= '==' ) | (enumLiteral_5= '!=' ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4128:1: ( (enumLiteral_0= '<' ) | (enumLiteral_1= '<=' ) | (enumLiteral_2= '>' ) | (enumLiteral_3= '>=' ) | (enumLiteral_4= '==' ) | (enumLiteral_5= '!=' ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4128:1: ( (enumLiteral_0= '<' ) | (enumLiteral_1= '<=' ) | (enumLiteral_2= '>' ) | (enumLiteral_3= '>=' ) | (enumLiteral_4= '==' ) | (enumLiteral_5= '!=' ) )\r\n int alt64=6;\r\n switch ( input.LA(1) ) {\r\n case 77:\r\n {\r\n alt64=1;\r\n }\r\n break;\r\n case 78:\r\n {\r\n alt64=2;\r\n }\r\n break;\r\n case 38:\r\n {\r\n alt64=3;\r\n }\r\n break;\r\n case 79:\r\n {\r\n alt64=4;\r\n }\r\n break;\r\n case 80:\r\n {\r\n alt64=5;\r\n }\r\n break;\r\n case 81:\r\n {\r\n alt64=6;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return current;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 64, 0, input);\r\n\r\n throw nvae;\r\n }\r\n\r\n switch (alt64) {\r\n case 1 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4128:2: (enumLiteral_0= '<' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4128:2: (enumLiteral_0= '<' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4128:4: enumLiteral_0= '<'\r\n {\r\n enumLiteral_0=(Token)match(input,77,FOLLOW_77_in_ruleRelationalOperator9654); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getRelationalOperatorAccess().getSmallerEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_0, grammarAccess.getRelationalOperatorAccess().getSmallerEnumLiteralDeclaration_0()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4134:6: (enumLiteral_1= '<=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4134:6: (enumLiteral_1= '<=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4134:8: enumLiteral_1= '<='\r\n {\r\n enumLiteral_1=(Token)match(input,78,FOLLOW_78_in_ruleRelationalOperator9671); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getRelationalOperatorAccess().getSmallerEqualEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_1, grammarAccess.getRelationalOperatorAccess().getSmallerEqualEnumLiteralDeclaration_1()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4140:6: (enumLiteral_2= '>' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4140:6: (enumLiteral_2= '>' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4140:8: enumLiteral_2= '>'\r\n {\r\n enumLiteral_2=(Token)match(input,38,FOLLOW_38_in_ruleRelationalOperator9688); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getRelationalOperatorAccess().getGreaterEnumLiteralDeclaration_2().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_2, grammarAccess.getRelationalOperatorAccess().getGreaterEnumLiteralDeclaration_2()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4146:6: (enumLiteral_3= '>=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4146:6: (enumLiteral_3= '>=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4146:8: enumLiteral_3= '>='\r\n {\r\n enumLiteral_3=(Token)match(input,79,FOLLOW_79_in_ruleRelationalOperator9705); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getRelationalOperatorAccess().getGreaterEqualEnumLiteralDeclaration_3().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_3, grammarAccess.getRelationalOperatorAccess().getGreaterEqualEnumLiteralDeclaration_3()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 5 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4152:6: (enumLiteral_4= '==' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4152:6: (enumLiteral_4= '==' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4152:8: enumLiteral_4= '=='\r\n {\r\n enumLiteral_4=(Token)match(input,80,FOLLOW_80_in_ruleRelationalOperator9722); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getRelationalOperatorAccess().getEqualsEnumLiteralDeclaration_4().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_4, grammarAccess.getRelationalOperatorAccess().getEqualsEnumLiteralDeclaration_4()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 6 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4158:6: (enumLiteral_5= '!=' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4158:6: (enumLiteral_5= '!=' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:4158:8: enumLiteral_5= '!='\r\n {\r\n enumLiteral_5=(Token)match(input,81,FOLLOW_81_in_ruleRelationalOperator9739); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n current = grammarAccess.getRelationalOperatorAccess().getNotEqualsEnumLiteralDeclaration_5().getEnumLiteral().getInstance();\r\n newLeafNode(enumLiteral_5, grammarAccess.getRelationalOperatorAccess().getNotEqualsEnumLiteralDeclaration_5()); \r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "@Test\n\tpublic void testNewEnumFromAction() throws Exception {\n\t\t// This test works differently that the others in that it uses the same path as the\n\t\t// GUI action to start the editing process.\n\t\t//\n\t\tDataTypeManager dtm = program.getListing().getDataTypeManager();\n\t\tfinal Category c = dtm.getCategory(new CategoryPath(CategoryPath.ROOT, \"Category1\"));\n\t\tfinal DataTypeEditorManager editorManager = plugin.getEditorManager();\n\n\t\trunSwing(() -> editorManager.createNewEnum(c));\n\t\twaitForSwing();\n\n\t\tfinal EnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\taddEntry(table, model, \"Purple\", 7);\n\t\tsetEditorEnumName(panel, \"Test.\" + testName.getMethodName());\n\n\t\tapply();\n\t}", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "SimpleLiteral createSimpleLiteral();", "public final EObject entryRuleEnumStatement() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEnumStatement = null;\n\n\n try {\n // InternalSafetyParser.g:6328:54: (iv_ruleEnumStatement= ruleEnumStatement EOF )\n // InternalSafetyParser.g:6329:2: iv_ruleEnumStatement= ruleEnumStatement EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getEnumStatementRule()); \n }\n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleEnumStatement=ruleEnumStatement();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleEnumStatement; \n }\n match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public T caseCharEnum(CharEnum object)\n {\n return null;\n }", "private LanguagesEnum(Integer languagesEnumValue)\r\n\t{\r\n\r\n\t\tlanguagesEnum = languagesEnumValue;\r\n\r\n\t}", "public EnumValueConverter() {\n }", "public final void rule__Enum__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:1268:1: ( ( 'Enum' ) )\n // InternalMyDsl.g:1269:1: ( 'Enum' )\n {\n // InternalMyDsl.g:1269:1: ( 'Enum' )\n // InternalMyDsl.g:1270:2: 'Enum'\n {\n before(grammarAccess.getEnumAccess().getEnumKeyword_0()); \n match(input,22,FOLLOW_2); \n after(grammarAccess.getEnumAccess().getEnumKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final Enumerator ruleFormalParameterModifier() throws RecognitionException {\n Enumerator current = null;\n int ruleFormalParameterModifier_StartIndex = input.index();\n Token enumLiteral_0=null;\n Token enumLiteral_1=null;\n Token enumLiteral_2=null;\n\n enterRule(); \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 151) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6328:28: ( ( (enumLiteral_0= KEYWORD_44 ) | (enumLiteral_1= KEYWORD_48 ) | (enumLiteral_2= KEYWORD_49 ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6329:1: ( (enumLiteral_0= KEYWORD_44 ) | (enumLiteral_1= KEYWORD_48 ) | (enumLiteral_2= KEYWORD_49 ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6329:1: ( (enumLiteral_0= KEYWORD_44 ) | (enumLiteral_1= KEYWORD_48 ) | (enumLiteral_2= KEYWORD_49 ) )\n int alt112=3;\n switch ( input.LA(1) ) {\n case KEYWORD_44:\n {\n alt112=1;\n }\n break;\n case KEYWORD_48:\n {\n alt112=2;\n }\n break;\n case KEYWORD_49:\n {\n alt112=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 112, 0, input);\n\n throw nvae;\n }\n\n switch (alt112) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6329:2: (enumLiteral_0= KEYWORD_44 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6329:2: (enumLiteral_0= KEYWORD_44 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6329:7: enumLiteral_0= KEYWORD_44\n {\n enumLiteral_0=(Token)match(input,KEYWORD_44,FOLLOW_KEYWORD_44_in_ruleFormalParameterModifier13042); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getFormalParameterModifierAccess().getUseEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_0, grammarAccess.getFormalParameterModifierAccess().getUseEnumLiteralDeclaration_0()); \n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6335:6: (enumLiteral_1= KEYWORD_48 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6335:6: (enumLiteral_1= KEYWORD_48 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6335:11: enumLiteral_1= KEYWORD_48\n {\n enumLiteral_1=(Token)match(input,KEYWORD_48,FOLLOW_KEYWORD_48_in_ruleFormalParameterModifier13064); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getFormalParameterModifierAccess().getFromEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_1, grammarAccess.getFormalParameterModifierAccess().getFromEnumLiteralDeclaration_1()); \n \n }\n\n }\n\n\n }\n break;\n case 3 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6341:6: (enumLiteral_2= KEYWORD_49 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6341:6: (enumLiteral_2= KEYWORD_49 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:6341:11: enumLiteral_2= KEYWORD_49\n {\n enumLiteral_2=(Token)match(input,KEYWORD_49,FOLLOW_KEYWORD_49_in_ruleFormalParameterModifier13086); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = grammarAccess.getFormalParameterModifierAccess().getIntoEnumLiteralDeclaration_2().getEnumLiteral().getInstance();\n newLeafNode(enumLiteral_2, grammarAccess.getFormalParameterModifierAccess().getIntoEnumLiteralDeclaration_2()); \n \n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 151, ruleFormalParameterModifier_StartIndex); }\n }\n return current;\n }" ]
[ "0.89540976", "0.8177491", "0.75876635", "0.7241704", "0.6923301", "0.69008666", "0.6823899", "0.65899456", "0.6462537", "0.64096636", "0.64096636", "0.64096636", "0.6361351", "0.6318211", "0.630131", "0.61850536", "0.6174399", "0.6057055", "0.60516053", "0.60429174", "0.6005409", "0.6002151", "0.5977446", "0.5911196", "0.58810383", "0.58548194", "0.5842591", "0.58400947", "0.58061486", "0.58021593", "0.5757365", "0.57465374", "0.5739416", "0.5728818", "0.572422", "0.56847453", "0.5684006", "0.5674736", "0.56746", "0.5668073", "0.5630485", "0.5623252", "0.5615367", "0.56152475", "0.5592887", "0.5592887", "0.5592887", "0.557557", "0.5568151", "0.5568151", "0.5564993", "0.5564167", "0.554989", "0.55404264", "0.550891", "0.5485959", "0.54833275", "0.54470485", "0.54384655", "0.543732", "0.543162", "0.53956527", "0.53882676", "0.5378145", "0.5355076", "0.5350107", "0.53214353", "0.5319625", "0.5319513", "0.5314205", "0.5310726", "0.5308902", "0.53088105", "0.5296073", "0.52949935", "0.5294984", "0.5293183", "0.52901983", "0.52791566", "0.527176", "0.52691513", "0.52674025", "0.52486557", "0.52448225", "0.52412695", "0.52373946", "0.5230181", "0.52229655", "0.5221668", "0.5211656", "0.5203864", "0.5203864", "0.5203864", "0.52003556", "0.51980335", "0.5197987", "0.5196431", "0.5195672", "0.51956165", "0.5188577" ]
0.8679655
1
Returns a new object of class 'If Exp'.
<C> IfExp<C> createIfExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IfExp createIfExp();", "If createIf();", "Object getIf();", "public If(Condition con, Statement exp1, Statement exp2)\n {\n this.condition = con;\n this.exp1 = exp1;\n this.exp2 = exp2;\n }", "public IfCondition() {\r\n super();\r\n }", "IfStatement createIfStatement();", "public IfstatementFactoryImpl() {\n\t\tsuper();\n\t}", "IfStmtRule createIfStmtRule();", "private IfElement _if(String expression, CodeElement... body)\n {\n return _ifElse(expression, Arrays.asList(body), null);\n }", "IfPrimaryExpr createIfPrimaryExpr();", "Object getIf1();", "public Element compileIf() throws CloneNotSupportedException {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\t\n\t\t//Unique labels for jumping around\n\t\tString elseLabel = label();\n\t\tString endLabel = label();\n\n\t\tElement ifParent = document.createElement(\"ifStatement\");\n\n\t\t// if\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// (\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// expression\n\t\tjTokenizer.advance();\n\t\tifParent.appendChild(compileExpression());\n\n\t\t// )\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\t\t\n\t\t//If condition fails, go to else part of the block\n\t\twriter.writeArithmetic(\"not\");\n\t\twriter.writeIf(elseLabel);\n\n\t\t// {\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// statement inside the if block\n\t\tjTokenizer.advance();\n\t\tifParent.appendChild(compileStatements());\n\n\t\t// }\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tifParent.appendChild(ele);\n\n\t\t// if done, go to end\n\t\twriter.writeGoto(endLabel);\n\t\t\n\t\t// Else statements start here\n\t\twriter.writeLabel(elseLabel);\n\n\t\t// else\n\n\t\t// Interesting coding challenge. I had to look ahead by one token to\n\t\t// check if there was an else block, but if it didn't exists, I would be\n\t\t// one token ahead of the XML.\n\t\t// Built a clone of the present tokenizer and used it to look ahead,\n\t\t// if an else exists, advance the main tokenizer as well\n\t\tjackTokenizer clone = new jackTokenizer(jTokenizer);\n\t\tclone.advance();\n\n\t\ttoken = clone.returnTokenVal();\n\t\tif (token.equals(\"else\")) {\n\n\t\t\t// else\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tifParent.appendChild(ele);\n\n\t\t\t// {\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tifParent.appendChild(ele);\n\n\t\t\t// statements inside the else block\n\t\t\tjTokenizer.advance();\n\t\t\tifParent.appendChild(compileStatements());\n\n\t\t\t// }\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tifParent.appendChild(ele);\n\n\t\t\t// End of if-else block\n\t\t\twriter.writeLabel(endLabel);\n\n\t\t\treturn ifParent;\n\t\t} \n\t\telse {\n\n\t\t\t// End of if block\n\n\t\t\twriter.writeLabel(endLabel);\n\t\t\treturn ifParent;\n\t\t}\n\t}", "private IfStmt ifstmt(){\n Expr expr=null;\n Stmt thenstmt=null;\n Stmt elsestmt= null;\n \n if(lexer.token == Symbol.IF){\n lexer.nextToken();\n expr = expr();\n\n if(lexer.token == Symbol.THEN){\n lexer.nextToken();\n thenstmt = stmt();\n \n if(lexer.token == Symbol.ELSE){\n lexer.nextToken();\n elsestmt = stmt();\n \n }\n\n \n if(lexer.token == Symbol.ENDIF){\n lexer.nextToken();\n }else{\n lexer.error(\"Missing ENDIF\");\n }\n }else{\n lexer.error(\"Missing THEN\");\n }\n }else{\n lexer.error(\"Missing IF\");\n }\n \n return new IfStmt(expr, thenstmt, elsestmt);\n }", "public T caseIfExpCS(IfExpCS object) {\r\n return null;\r\n }", "private Conditional ifStatement()\n\t{\n\t\t// IfStatement --> if ( Expression ) Statement [ else Statement ]\n\t\tConditional c = null;\n\t\t\n\t\t// if\n\t\tmatch(TokenType.If);\n\t\t// (\n\t\tmatch(TokenType.LeftParen);\n\t\t// <<Expression>>\n\t\tExpression e = expression();\n\t\t// )\n\t\tmatch(TokenType.RightParen);\n\t\t// <<Statement>>\n\t\tStatement s = statement();\n\t\t\n\t\t// else가 나오면\n\t\tif (token.type().equals(TokenType.Else))\n\t\t{\n\t\t\t// else\n\t\t\ttoken = lexer.next();\n\t\t\t\n\t\t\t// <<Statement>>\n\t\t\tStatement elseState = statement();\n\t\t\tc = new Conditional(e, s, elseState);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc = new Conditional(e, s);\n\t\t}\n\t\t\n\t\treturn c; // student exercise\n\t}", "public Conditional(){\n\t\tint m,n;\n\t\tLexer.lex();//skip over \"if\"\n\t\tLexer.lex();//skip over '('\n\t\tcpr=new ComparisonExpr();\n\t\tLexer.lex();//skip over ')'\n\t\tswitch(cpr.op){\n\t\tcase '<':\n\t\t\tCode.gen(\"if_icmpge \");\n\t\t\tbreak;\n\t\tcase '>':\n\t\t\tCode.gen(\"if_icmple \");\n\t\t\tbreak;\n\t\tcase '=':\n\t\t\tCode.gen(\"if_icmpne \");\n\t\t\tbreak;\n\t\tcase '!':\n\t\t\tCode.gen(\"if_icmpeq \");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tn=Code.getPtr();\n\t\tCode.gen(\"\");\n\t\tCode.gen(\"\");\n\t\tstmt=new Statement();\n\t\tif(Lexer.nextToken==Token.KEY_ELSE){//have an else part\n\t\t\tCode.gen(\"goto \");\n\t\t\tm=Code.getPtr();\n\t\t\tCode.gen(\"\");\n\t\t\tCode.gen(\"\");\n\t\t\tCode.backpatch(n, Integer.toString(Code.getPtr()));\n\t\t\tLexer.lex();\n\t\t\tstmtr=new Statement();\n\t\t\tCode.backpatch(m, Integer.toString(Code.getPtr()));\n\t\t}else{\n\t\t\tCode.backpatch(n, Integer.toString(Code.getPtr()));\n\t\t}\n\t\t\n\t}", "String getIf();", "public IfStmt if_stmt() {\n Cond c = null;\n ArrayList<Stmt> ifpart = null;\n ArrayList<Stmt> elsepart = null;\n if (lexer.token == Symbol.IF) {\n\n if (lexer.nextToken() != Symbol.LPAR) {\n error.signal(\"Missing open parantheses for condition at if statement\");\n }\n lexer.nextToken();\n\n c = cond();\n\n if (lexer.token != Symbol.RPAR) {\n error.signal(\"Missing close parantheses for condition at if statement\");\n }\n\n if (lexer.nextToken() != Symbol.THEN) {\n error.signal(\"Missing THEN keyword at if statement\");\n }\n\n lexer.nextToken();\n\n ifpart = stmt_list(ifpart);\n\n elsepart = else_part(elsepart);\n\n if (lexer.token != Symbol.ENDIF) {\n error.signal(\"Missing ENDIF keyword at if statement\");\n }\n\n lexer.nextToken();\n } else {\n error.signal(\"Missing IF keyword at if statement\");\n }\n return new IfStmt(c, (ifpart != null) ? new StmtList(ifpart) : null, (elsepart != null) ? new StmtList(elsepart) : null);\n }", "public MmeS6If() {\n super(Epc.NAMESPACE, \"mme-s6-if\");\n }", "public static IfstatementFactory init() {\n\t\ttry {\n\t\t\tIfstatementFactory theIfstatementFactory = (IfstatementFactory)EPackage.Registry.INSTANCE.getEFactory(IfstatementPackage.eNS_URI);\n\t\t\tif (theIfstatementFactory != null) {\n\t\t\t\treturn theIfstatementFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new IfstatementFactoryImpl();\n\t}", "String getIfFunction(String condition, String exprtrue, String exprfalse);", "ConditionalExpression createConditionalExpression();", "public static ConditionalExpression ifThen(Expression test, Expression ifTrue) { throw Extensions.todo(); }", "public static TreeNode makeIf(TreeNode condition,\n TreeNode thenNode,\n TreeNode elseNode,\n ArrowType retType) {\n return new IfNode(condition, thenNode, elseNode, retType);\n }", "public Stmt createIf(Position pos, Expr cond, Stmt thenStmt, Stmt elseStmt) {\n if (null == elseStmt) return xnf.If(pos, cond, thenStmt);\n return xnf.If(pos, cond, thenStmt, elseStmt);\n }", "public interface IConditionalExpression {\n}", "public final EObject entryRuleIfExpCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleIfExpCS = null;\n\n\n try {\n // InternalMyDsl.g:8834:48: (iv_ruleIfExpCS= ruleIfExpCS EOF )\n // InternalMyDsl.g:8835:2: iv_ruleIfExpCS= ruleIfExpCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getIfExpCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleIfExpCS=ruleIfExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleIfExpCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "@Test\n public void fieldIf() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n builder.write(\"Statement 1: \");\n FieldIf field = (FieldIf) builder.insertField(FieldType.FIELD_IF, true);\n field.setLeftExpression(\"0\");\n field.setComparisonOperator(\"=\");\n field.setRightExpression(\"1\");\n\n // The IF field will display a string from either its \"TrueText\" property,\n // or its \"FalseText\" property, depending on the truth of the statement that we have constructed.\n field.setTrueText(\"True\");\n field.setFalseText(\"False\");\n field.update();\n\n // In this case, \"0 = 1\" is incorrect, so the displayed result will be \"False\".\n Assert.assertEquals(\" IF 0 = 1 True False\", field.getFieldCode());\n Assert.assertEquals(FieldIfComparisonResult.FALSE, field.evaluateCondition());\n Assert.assertEquals(\"False\", field.getResult());\n\n builder.write(\"\\nStatement 2: \");\n field = (FieldIf) builder.insertField(FieldType.FIELD_IF, true);\n field.setLeftExpression(\"5\");\n field.setComparisonOperator(\"=\");\n field.setRightExpression(\"2 + 3\");\n field.setTrueText(\"True\");\n field.setFalseText(\"False\");\n field.update();\n\n // This time the statement is correct, so the displayed result will be \"True\".\n Assert.assertEquals(\" IF 5 = \\\"2 + 3\\\" True False\", field.getFieldCode());\n Assert.assertEquals(FieldIfComparisonResult.TRUE, field.evaluateCondition());\n Assert.assertEquals(\"True\", field.getResult());\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.IF.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.IF.docx\");\n field = (FieldIf) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_IF, \" IF 0 = 1 True False\", \"False\", field);\n Assert.assertEquals(\"0\", field.getLeftExpression());\n Assert.assertEquals(\"=\", field.getComparisonOperator());\n Assert.assertEquals(\"1\", field.getRightExpression());\n Assert.assertEquals(\"True\", field.getTrueText());\n Assert.assertEquals(\"False\", field.getFalseText());\n\n field = (FieldIf) doc.getRange().getFields().get(1);\n\n TestUtil.verifyField(FieldType.FIELD_IF, \" IF 5 = \\\"2 + 3\\\" True False\", \"True\", field);\n Assert.assertEquals(\"5\", field.getLeftExpression());\n Assert.assertEquals(\"=\", field.getComparisonOperator());\n Assert.assertEquals(\"\\\"2 + 3\\\"\", field.getRightExpression());\n Assert.assertEquals(\"True\", field.getTrueText());\n Assert.assertEquals(\"False\", field.getFalseText());\n }", "public T caseExprIf(ExprIf object)\n {\n return null;\n }", "IfEnd createIfEnd();", "Conditional createConditional();", "public static ConditionalExpression ifThenElse(Expression test, Expression ifTrue, Expression ifFalse) { throw Extensions.todo(); }", "public Cond newCond() {\n return new Cond();\n }", "public Type visit(If n) {\n\t\tif (!(n.e.accept(this) instanceof BooleanType)) {\n\t\t\t//Erro:\n\t\t\tSystem.out.println(\"A condição do if deve ser do tipo Boolean\");\n\t\t}\n\n\t\tn.s1.accept(this);\n\t\tn.s2.accept(this);\n\t\treturn new BooleanType();\n\t}", "public Decisao(Expressao expr, Comando cmdIf) {\r\n\t\tthis.expressao = expr;\r\n\t\tthis.comandoIf = cmdIf;\r\n\t}", "@Override\n\tpublic void visit(IfNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * Verificare pentru assert failed\n\t\t */\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam conditia si preluam rezultatul evaluarii fiului corespunzator\n\t\t * branch-ului de then sau de else\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\n\t\t/***\n\t\t * Daca conditia este adevarata, continuam cu evaluarea celui de-al\n\t\t * doiela fiu, iar daca este false evaluam al treilea fiu\n\t\t */\n\t\tif (node.getChild(0).getName().contentEquals(\"true\")) {\n\t\t\tEvaluator.evaluate(node.getChild(1));\n\t\t\tnode.getChild(2).setVisited(true);\n\n\t\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\t\tnode.setName(Evaluator.variables.get(node.getChild(1).getName()));\n\t\t\t} else {\n\t\t\t\tnode.setName(node.getChild(1).getName());\n\t\t\t}\n\t\t} else {\n\t\t\tEvaluator.evaluate(node.getChild(2));\n\t\t\tnode.getChild(1).setVisited(true);\n\n\t\t\tif (node.getChild(2) instanceof Variable) {\n\t\t\t\tnode.setName(Evaluator.variables.get(node.getChild(2).getName()));\n\t\t\t} else {\n\t\t\t\tnode.setName(node.getChild(2).getName());\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n public boolean visit(CssIf x, Context ctx) {\n StringBuilder expr = new StringBuilder(\"/* @if \");\n if (x.getExpression() != null) {\n expr.append(x.getExpression()).append(\" \");\n } else {\n expr.append(x.getPropertyName()).append(\" \");\n for (String v : x.getPropertyValues()) {\n expr.append(v).append(\" \");\n }\n }\n expr.append(\"{ */\");\n out.printOpt(expr.toString());\n out.newlineOpt();\n out.indentIn();\n addSubstitition(x);\n return false;\n }", "private static Object createNewInstance(String implement, String header, String expression) {\n\n\t\t// a feeble attempt at preventing arbitrary code execution\n\t\t// by limiting expressions to a single statement.\n\t\t// Otherwise the expression can be something like:\n\t\t// \tf(); } Object f() { System.exit(0); return null\n\t\tif (expression.contains(\";\"))\n\t\t\treturn null;\n\n\t\t// since we might create multiple expressions, we need their names to be unique\n\t\tString className = \"MyExpression\" + classNum++;\n\n\t\t// if we compile the class susseccfully, try and instantiate it\n\t\tif (writeAndCompile(className, implement, header, expression)) {\n\t\t\ttry {\n\t\t\t\tFile classFile = new File(path + className + \".class\");\n\t\t\t\t// load the class into the JVM, and try and get an instance of it\n\t\t\t\t//Class<?> newClass = ClassLoader.getSystemClassLoader().loadClass(className);\n\n\t\t\t\tURLClassLoader classLoader = URLClassLoader.newInstance(new URL[] { classFile.toURI().toURL() });\n\t\t\t\tClass<?> newClass = Class.forName(className, true, classLoader);\n\n\t\t\t\t// delete the class file, so we leave no trace\n\t\t\t\t// this is okay because we already loaded the class\n\t\t\t\ttry {\n\t\t\t\t\tclassFile.delete();\n\n\t\t\t\t// meh, we tried\n\t\t\t\t} catch (Exception e) {}\n\n\t\t\t\treturn newClass.newInstance();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t//System.out.println(\"Couldn't load class\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Couldn't write / compile source\");\n\t\t}\n\n\t\t// the class didn't compile\n\t\treturn null;\n\t}", "public MmeS6If clone() {\n return (MmeS6If)cloneContent(new MmeS6If());\n }", "public cto.framework.web.action.plugin.schema.If getIf() {\r\n return this._if;\r\n }", "@Override\r\n public boolean evaluate(String expr) {\r\n return translate(\"${If[\" + expr + \",TRUE,FALSE]}\").equals(\"TRUE\");\r\n }", "void compileIf() {\n\n tagBracketPrinter(IF_TAG, OPEN_TAG_BRACKET);\n try {\n compileIfHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(IF_TAG, CLOSE_TAG_BRACKET);\n }", "public Builder<T> If(BooleanSupplier condition) {\n this.ifCond = condition.getAsBoolean();\n return this;\n }", "public void caseAIfStmt(AIfStmt node)\n {\n int initCount = 0;\n //inAIfStmt(node);\n if(node.getStmt() != null)\n {\n newScope();\n initCount++;\n }\n if(node.getIf() != null)\n {\n node.getIf().apply(this);\n }\n if(node.getStmt() != null)\n {\n node.getStmt().apply(this);\n }\n if(node.getExp() != null)\n {\n node.getExp().apply(this);\n }\n {\n List<PStmt> copy = new ArrayList<PStmt>(node.getTrue());\n for(PStmt e : copy)\n {\n e.apply(this);\n }\n }\n {\n List<PElseIf> copy = new ArrayList<PElseIf>(node.getElseIf());\n Iterator<PElseIf> itr = copy.iterator();\n while (itr.hasNext()) {\n PElseIf e = itr.next();\n AElseIf elseIf = (AElseIf) e;\n if(elseIf.getStmt() != null)\n {\n newScope();\n initCount++;\n }\n e.apply(this);\n if(elseIf.getExp() != null)\n {\n Type t = typemap.get(elseIf.getExp());\n t = removeAlias(t);\n if(!(t instanceof BooleanType)) throw new TypeException(\"[line \" + golite.weeder.LineNumber.getLineNumber(elseIf) + \"] If-else statement with non-boolean condition.\");\n }\n }\n }\n {\n List<PStmt> copy = new ArrayList<PStmt>(node.getFalse());\n for(PStmt e : copy)\n {\n e.apply(this);\n }\n }\n //outAIfStmt(node);\n if(node.getExp() != null)\n {\n Node e = node.getExp();\n Type t = typemap.get(e);\n t = removeAlias(t);\n if(!(t instanceof BooleanType)) throw new TypeException(\"[line \" + golite.weeder.LineNumber.getLineNumber(node) + \"] If statement with non-boolean condition.\");\n }\n if (initCount>0) {\n if (dump) {\n List<PStmt> copy = new ArrayList<PStmt>(node.getTrue());\n if (copy.size()>0 && golite.weeder.LineNumber.getLineNumber(copy.get(copy.size()-1))>0)\n {\n Node n = copy.get(copy.size()-1);\n System.out.println(\"[line \" + golite.weeder.LineNumber.getLineNumber(n) + \"]\");\n }\n }\n while (initCount>0) {\n unScope();\n initCount--;\n }\n }\n }", "public MmeS6If cloneShallow() {\n return (MmeS6If)cloneShallowContent(new MmeS6If());\n }", "public T caseIfTag(IfTag object) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void visit(IfStatement ifStatement) {\n\t\tifStatement.cond().accept(this);\n\t\tif(!isOk)\n\t\t\treturn;\n\t\tcheckType(\"boolean\");\n\t\tif(!isOk)\n\t\t\treturn;\n\t\tSet<String> elseClone = new HashSet<String>(uninit);\n\t\tifStatement.thencase().accept(this);\n\t\tif(!isOk)\n\t\t\treturn;\n\t\tSet<String> thenClone = new HashSet<String>(uninit);\n\t\tuninit = elseClone;\n\t\tifStatement.elsecase().accept(this);\n\t\tif(!isOk)\n\t\t\treturn;\n\t\tuninit.addAll(thenClone);\n\t}", "public Object visit(ASTIfStatement node, Object data) {\n \n int boolCompIf = sumExpressionComplexity( (ASTExpression) node.getFirstChildOfType( ASTExpression.class ) );\n \n int complexity = 0;\n \n List statementChildren = new ArrayList();\n for ( int i = 0; i < node.jjtGetNumChildren(); i++ ) {\n if ( node.jjtGetChild( i ).getClass() == ASTStatement.class ) {\n statementChildren.add( node.jjtGetChild( i ) );\n }\n }\n \n if ( statementChildren.isEmpty()\n || ( statementChildren.size() == 1 && node.hasElse() )\n || ( statementChildren.size() != 1 && !node.hasElse() ) ) {\n throw new IllegalStateException( \"If node has wrong number of children\" );\n }\n \n // add path for not taking if\n if ( !node.hasElse() ) {\n complexity++;\n }\n \n for ( Iterator iter = statementChildren.iterator(); iter.hasNext(); ) {\n SimpleJavaNode element = (SimpleJavaNode) iter.next();\n complexity += ( (Integer) element.jjtAccept( this, data ) ).intValue();\n }\n \n return new Integer( boolCompIf + complexity );\n }", "private Branch parseIf(Tokenizer in) {\n\t\tBranch branch = new Branch();\n\t\tToken expectParen = in.next();\n\t\tif (expectParen.type != Token.TokenType.OPEN_PARENTHESIS)\n\t\t\tthrow new SyntaxError(\"Expected ( got: '\"+expectParen+\"'\"+expectParen.generateLineChar());\n\t\tbranch.condition = parseParen(in);\n\t\tbranch.ifTrue = parseStmt(in);\n\t\tToken next = in.next();\n\t\tif (next != null && next.type == Token.TokenType.KEYWORD && ((KeywordToken) next).value == Keyword.ELSE)\n\t\t\tbranch.ifFalse = parseStmt(in);\n\t\telse\n\t\t\tin.pushTokens(next);\n\t\treturn branch;\n\t}", "public Code visitIfNode(StatementNode.IfNode node) {\n beginGen(\"If\");\n /* Generate code to evaluate the condition and then and else parts */\n Code code = node.getCondition().genCode(this);\n Code thenCode = node.getThenStmt().genCode(this);\n Code elseCode = node.getElseStmt().genCode(this);\n /* Append a branch over then part code */\n code.genJumpIfFalse(thenCode.size() + Code.SIZE_JUMP_ALWAYS);\n /* Next append the code for the then part */\n code.append(thenCode);\n /* Append branch over the else part */\n code.genJumpAlways(elseCode.size());\n /* Finally append the code for the else part */\n code.append(elseCode);\n endGen(\"If\");\n return code;\n }", "@Override\n public Object visitIfstatement(TranslationGrammarParser.IfstatementContext ctx) {\n ArrayList<Node<TokenAttributes>> result = new ArrayList<>();\n Boolean cond = (Boolean) magicVisit(ctx.condition(), current_node);\n if (cond == null) {\n return null;\n }\n if (cond) {\n ArrayList<Node<TokenAttributes>> temp = (ArrayList<Node<TokenAttributes>>) magicVisit(ctx.ruleebody(), current_node);\n if (temp == null) {\n return null;\n }\n return temp;\n }\n return result;\n }", "@Override\n public void visitIfStatement(IfStatement node){\n mPrintWriter.println(\"#IFStatement\");\n Label l0 = new Label();\n Label l1 = new Label();\n Label l2 = new Label();\n //mPrintWriter.println(l1 + \":\");\n inIfStatement(node);\n if(node.getExp() != null)\n {\n node.getExp().accept(this);\n }\n mPrintWriter.println(\"pop r24\");\n //#load zero into reg\n mPrintWriter.println(\"ldi r25, 0\");\n\n //#use cp to set SREG\n mPrintWriter.println(\"cp r24, r25\");\n //#WANT breq MJ_L0\n mPrintWriter.println(\"brne \" + l1);\n mPrintWriter.println(\"jmp \" + l0);\n\n //# then label for if\n mPrintWriter.println(l1 + \":\");\n if(node.getThenStatement() != null)\n {\n node.getThenStatement().accept(this);\n }\n mPrintWriter.println(\"jmp \" + l2);\n\n //# else label for if\n mPrintWriter.println(l0 + \":\");\n if(node.getElseStatement() != null)\n {\n node.getElseStatement().accept(this);\n }\n mPrintWriter.println(l2 + \":\");\n\n outIfStatement(node);\n }", "public final void mIF() throws RecognitionException {\r\n try {\r\n int _type = IF;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:259:4: ( '#if' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:259:6: '#if'\r\n {\r\n match(\"#if\"); \r\n\r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "private static ExpSem ifThenElse(ExpSem ifExp, ExpSem thenExp, ExpSem elseExp)\n {\n if (ifExp instanceof ExpSem.Single)\n {\n ExpSem.Single ifExp0 = (ExpSem.Single)ifExp;\n if (thenExp instanceof ExpSem.Single && elseExp instanceof ExpSem.Single)\n {\n ExpSem.Single thenExp0 = (ExpSem.Single)thenExp;\n ExpSem.Single elseExp0 = (ExpSem.Single)elseExp;\n return (ExpSem.Single)(Context c)->\n {\n Value.Bool b = (Value.Bool)ifExp0.apply(c);\n if (b.getValue())\n return thenExp0.apply(c);\n else\n return elseExp0.apply(c);\n };\n }\n else\n {\n ExpSem.Multiple thenExp0 = thenExp.toMultiple();\n ExpSem.Multiple elseExp0 = elseExp.toMultiple();\n return (ExpSem.Multiple)(Context c)->\n {\n Value.Bool b = (Value.Bool)ifExp0.apply(c);\n if (b.getValue())\n return thenExp0.apply(c);\n else\n return elseExp0.apply(c);\n };\n }\n }\n else\n {\n ExpSem.Multiple ifExp0 = (ExpSem.Multiple)ifExp;\n ExpSem.Multiple thenExp0 = thenExp.toMultiple();\n ExpSem.Multiple elseExp0 = elseExp.toMultiple();\n return (ExpSem.Multiple)(Context c)->\n {\n Seq<Value> cond = ifExp0.apply(c);\n return cond.applyJoin((Value v)->\n {\n Value.Bool b = (Value.Bool)v;\n return b.getValue() ? \n thenExp0.apply(c) : \n elseExp0.apply(c);\n });\n };\n }\n }", "public T caseIfDefConditional(IfDefConditional object)\n\t{\n\t\treturn null;\n\t}", "public final void mIF() throws RecognitionException {\n try {\n int _type = IF;\n // /Users/benjamincoe/HackWars/C.g:177:4: ( 'if' )\n // /Users/benjamincoe/HackWars/C.g:177:6: 'if'\n {\n match(\"if\"); \n\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }", "public final BB iff(Condition test)\n {\n Validate.notNull(test,What.CRITERIA);\n IfAction branch = BAL().newIf();\n branch.setTest(test);\n return autoblock(new BALFinishers.ForIf(branch));\n }", "public final void rule__XIfExpression__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7212:1: ( ( 'if' ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7213:1: ( 'if' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7213:1: ( 'if' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7214:1: 'if'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXIfExpressionAccess().getIfKeyword_1()); \n }\n match(input,45,FOLLOW_45_in_rule__XIfExpression__Group__1__Impl14655); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXIfExpressionAccess().getIfKeyword_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\r\n\tpublic Object visitIfStatement(IfStatement ifStatement, Object arg)\r\n\t\t\tthrows Exception {\r\n\t\tString condType = (String) ifStatement.expression.visit(this, arg);\r\n\t\tcheck(condType.equals(booleanType), \"uncompatible If condition\", ifStatement);\r\n\t\tifStatement.block.visit(this, arg);\r\n\t\treturn null;\r\n\t}", "IfStart createIfStart();", "public final void mIF() throws RecognitionException {\n try {\n int _type = IF;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/dannluciano/Sources/MyLanguage/expr.g:145:4: ( 'if' )\n // /Users/dannluciano/Sources/MyLanguage/expr.g:145:6: 'if'\n {\n match(\"if\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public MType visit(IfStatement n, MType argu) {\n \tMType _ret=null;\n \t\n \tn.f2.accept(this, argu);\n \t\n \tn.f4.accept(this, argu);\n \t\n \tn.f6.accept(this, argu);\n \t\n \treturn _ret;\n \t}", "String getIfElse();", "@Override\n\t\tpublic String visitIfST(IfSTContext ctx) {\n\t\t\tString type = visit(ctx.getChild(2));\n\t\t\tif(!type.equals(\"boolean\")) throw new RuntimeException(\"Expecting type Boolean in If \"+ctx.getChild(2)+\" is not boolean\");\n\t\t\tvisit(ctx.getChild(4));\n\t\t\tif(ctx.getChildCount()>5){\n\t\t\t\tvisit(ctx.getChild(6));\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public Cond cond() {\n Cond c = new Cond();\n c.setExpr1(expr());\n c.setOp(compop());\n c.setExpr2(expr());\n \n String type1 = c.getExpr1().getType(symbolTable);\n String type2 = c.getExpr2().getType(symbolTable);\n \n if(type1 != null && type2 != null){\n if(!type1.equals(type2)){\n error.warning(\"Trying to compare a \"+type1+\" with a \"+type2);\n }\n } else\n error.show(\"Trying to make comparison with a variable(s) that hasn't been declared\");\n \n return c;\n }", "public interface\nExp extends HIR\n{\n\n/** ConstNode (##3)\n * Build HIR constant node.\n * @param pConstSym constant symbol to be attached to the node.\n * @return constant leaf node having operation code opConst.\n**/\n// Constructor (##3)\n// ConstNode( Const pConstSym );\n\n/** getConstSym\n * Get constant symbol attached to this node.\n * \"this\" should be a constant node.\n * @return constant symbol attached to this node.\n**/\nConst\ngetConstSym();\n\n/** SymNode (##3)\n * Build an HIR symbol name node from a symbol name.\n * @param pVar variable name symbol to be attached to the node.\n * @param pSubp subprogram name symbol to be attached to the node.\n * @param pLabel label name symbol to be attached to the node.\n * @param pElem struct/union element name to be attached to the node.\n * @param pField class field name to be attached to the node.\n * @return symbol name node of corresponding class (##2)\n * having operation code opSym.\n**/\n// Constructor (##3)\n// VarNode( Var pVar ); (##3)\n// SubpNode( Subp pSubp ); (##3)\n// LabelNode( Label pLabel ); (##3)\n// ElemNode( Elem pElem ); (##3)\n// FieldNode( Field pField ); (##3)\n\n/** getSym\n * Get symbol from SymNode. (##2)\n * \"this\" should be a SymNode (##2)\n * (either VarNode, SubpNode, LabelNode, ElemNode, or FieldNode). (##2)\n * @return the symbol attached to the node\n * (either Var, Subp, Label, Elem, or Field). (##2)\n**/\n//## Sym\n//## getSym();\n\n/** getVar\n * Get symbol of specified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nVar getVar();\n\n/** getSubp\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nSubp getSubp();\n\n/**\n * getLabel\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nLabel getLabel();\n\n/**\n * getElem\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nElem getElem();\n// Field getField();\n\n/** UnaryExp (##3)\n * Build an unary expression having pOperator as its operator\n * and pExp as its source operand.\n * @param pOperator unary operator.\n * @param pExp source operand expression.\n * @return unary expression using pOperator and pExp as its\n * operator and operand.\n**/\n// Constructor (##3)\n// UnaryExp( int pOperator, Exp pExp );\n\n/** BinaryExp (##3)\n * Build a binary expression having pOperator as its operator\n * and pExp1, pExp2 as its source operand 1 and 2.\n * @param pOperator binary operator.\n * @param pExp1 source operand 1 expression.\n * @param pExp2 source operand 2 expression.\n * @return binary expression using pOperator and\n * pExp1 and pExp2 as its operator and operands.\n**/\n// Constructor (##3)\n// BinaryExp( int pOperator, Exp pExp1, Exp pExp2 );\n\n/** getExp1\n * Get source operand 1 from unary or binary expression.\n * \"this\" should be either unary or binary expression.\n * @return the source operand 1 expression of this node.\n**/\nExp\ngetExp1();\n\n/** getExp2\n * Get source operand 2 from binary expression.\n * \"this\" should be a binary expression.\n * @return the source operand 2 expression of this node.\n**/\nExp\ngetExp2();\n\n/** getArrayExp (##2)\n * getSubscriptExp\n * getElemSizeExp (##2)\n * Get a component of a subscripted variable.\n * \"this\" should be a node built by buildSubscriptedVar method.\n * @return a component expression of this subscripted variable.\n**/\nExp getArrayExp(); // return array expression part (pArrayExp).\nExp getSubscriptExp(); // return subscript expression part (pSubscript).\nExp getElemSizeExp(); // return element size part (pElemSize).\n\n/** PointedVar (##3)\n * Build a pointed variable node.\n * @param pPointer pointer expression which may be a compond variable.\n(##2)\n * @param pElement struct/union element name pointed by pPointer.\n * @return pointed variable node having operation code opArrow.\n**/\n// Constructor (##3)\n// PointedVar( Exp pPointer, Elem pElement ); // (##2)\n\n/** getPointerExp\n * getPointedElem\n * Get a component of pointed variable expression.\n * \"this\" should be a node built by buildPointedVar method.\n * @return a component expression of this pointed variable.\n**/\nExp getPointerExp(); // return the pointer expression part (pPointer).\nElem getPointedElem(); // return the pointed element part (pElem).\n\n/** QualifiedVar (##3)\n * Build qualified variable node that represents an element\n * of structure or union.\n * @param pQualifier struct/union variable having elements.\n * @param pElement struct/union element name to be represented.\n * @return qualified variable node having operation code opQual.\n**/\n// Constructor (##3)\n// QualifiedVar( Exp pQualifier, Elem pElement );\n\n/** getQualifier\n * getQualifiedElem\n * Get a component of qualified variable expression.\n * \"this\" should be a node built by BuildQualifiedVar method.\n * @return a component of \"this\" QualifiedVar expression. (##2)\n**/\nExp getQualifierExp(); // return qualifier part (pQualifier).\nElem getQualifiedElem(); // return qualified element part (pelement).\n\n/** FunctionExp (##3)\n * Build a function expression node that computes function value.\n * @param pSubpExp function specification part which may be either\n * a function name, or an expression specifying a function name.\n * @param pParamList actual parameter list.\n * @return function expression node having operation code opCall.\n * @see IrList.\n**/\n// Constructor (##3)\n// FunctionExp( Subp pSubpSpec, IrList pParamList );\n\n/** getSubpSpec (##2)\n * getActualParamList\n * Get a component expression of the function expression. (##2)\n * \"this\" should be a node built by buildFunctionExp.\n * getSubpSpec return the expression specifying the subprogram\n * to be called (pSubpSpec). (##2)\n * getActualParamList return the actual parameter list (pParamList).\n * If this has no parameter, then return null.\n**/\nExp getSubpSpec();\nIrList getActualParamList();\n\n/** findSubpType\n * Find SubpType represented by this expression.\n * If this is SubpNode then return SubpType pointed by this node type,\n * else decompose this expression to find Subpnode.\n * If illegal type is encountered, return null.\n**/\npublic SubpType // (##6)\nfindSubpType();\n\n/** isEvaluable\n * See if \"this\" expression can be evaluated or not.\n * Following expressions are evaluable expression: //##14\n * constant expression,\n * expression whose operands are all evaluable expressions.\n * Expressions with OP_ADDR or OP_NULL are treated as non evaluable.\n * Variable with initial value is also treated as non evaluable\n * because its value may change. //##43\n * @return true if this expression can be evaluated as constant value\n * at the invocation of this method, false otherwise.\n**/\nboolean isEvaluable();\n\n//SF050111[\n///** evaluate\n// * Evaluate \"this\" expression.\n// * \"this\" should be an evaluable expression.\n// * If not, this method returns null.\n// * It is strongly recommended to confirm isEvaluable() returns true\n// * for this expression before calling this method.\n// * @return constant node as the result of evaluation.\n//**/\n//ConstNode evaluate();\n\n/**\n * Evaluate \"this\" expression.\n * @return constant as the result of evaluation or null(when failing in the\n * evaluation)\n**/\npublic Const evaluate();\n\n/**\n * Fold \"this\" expression.\n * evaluate() is called by recursive. If the evaluation succeeded, former node\n * is substituted for the constant node generated as evaluation result.\n * @return constant as the result of evaluation or null (when failing in the\n * evaluation)\n**/\npublic Exp fold();\n//SF050111]\n\n/** evaluateAsInt\n * Evaluate \"this\" expression as int.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return integer value as the result of evaluation.\n**/\n//SF050111 int evaluateAsInt();\npublic int evaluateAsInt(); //SF050111\n\n/**\n * Evaluate \"this\" expression as long.\n * \"this\" should be an evaluable expression. If not, this method returns 0.\n * @return long value as the result of evaluation.\n**/\npublic long evaluateAsLong(); //SF050111\n\n/** evaluateAsFloat\n * Evaluate \"this\" expression as float.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return float value as the result of evaluation.\n**/\n//SF050111 float evaluateAsFloat();\npublic float evaluateAsFloat(); //SF050111\n\n/** evaluateAsDouble\n * Evaluate \"this\" expression as double.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return float value as the result of evaluation.\n**/\n//SF050111 double evaluateAsDouble();\npublic double evaluateAsDouble(); //SF050111\n\n/** getValueString //##40\n * Evaluate this subtree and return the result as a string.\n * If the result is constant, then return the string representing\n * the constant.\n * If the result is not a constant, then return a string\n * representing the resultant expression.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return a string representing the evaluated result.\n**/\npublic String\ngetValueString();\n\n//##84 BEGIN\n/**\n * Adjust the types of binary operands according to the\n * C language specifications\n * (See ISO/IEC 9899-1999 Programming language C section 6.3.1.8).\n * The result is an expression\n * (HIR.OP_SEQ, adjusted_operand1, adjusted_operand2).\n * The operands can be get by\n * ((HIR)lResult.getChild1()).copyWithOperands()\n * ((HIR)lResult.getChild2()).copyWithOperands()\n * @param pExp1 operand 1.\n * @param pExp2 operand 2.\n * @return (HIR.OP_SEQ, adjusted_operand1, adjusted_operand2)\n */\npublic Exp\nadjustTypesOfBinaryOperands( Exp pExp1, Exp pExp2 );\n//##84 END\n\n/** initiateArray //##15\n * Create loop statement to initiate all elements of\n * the array pArray and append it to the initiation block\n * of subprogram pSubp.\n * The initiation statement to be created for pSubp is\n * for (i = pFrom; i <= pTo; i++)\n * pArray[i] = pInitExp;\n * If pSubp is null, set-data statement is generated.\n * @param pArray array variable expression.\n * @param pInitExp initial value to be set.\n * @param pFrom array index start position\n * @param pTo array index end position\n * @param pSubp subprogram containing the initiation statement.\n * null for global variable initiation.\n * @return the loop statement to set initial value.\n**/\npublic Stmt\ninitiateArray(\n Exp pArray, Exp pInitExp,\n Exp pFrom, Exp pTo, Subp pSubp ); //##15\n\n}", "static boolean translateIF() {\n index++;\r\n lex();\r\n\r\n //Skip adding \"(\" to stack\r\n lex();\r\n\r\n while (!lexeme.equals(\")\")) {\r\n\r\n if (lexeme.equals(\"(\")) {\r\n tParen();\r\n } else if (token.equals(\"PLUS\") || token.equals(\"MINUS\") || token.equals(\"STAR\") || token.equals(\"DIVOP\") || token.equals(\"MOD\") ||\r\n token.equals(\"GREATER_THAN\") || token.equals(\"LESS_THAN\") || token.equals(\"EQUALS\") || token.equals(\"LESS_OR_EQUAL\") ||\r\n token.equals(\"GRETER_OR_EQUAL\") || token.equals(\"NOT_EQUAL\")) {\r\n stack.add(index, lexeme);\r\n index++;\r\n\r\n lex();\r\n if (lexeme.equals(\"(\")) {\r\n tParen();\r\n } else {\r\n index--;\r\n stack.add(index, lexeme);\r\n index++;\r\n index++;\r\n }\r\n } else {\r\n index--;\r\n stack.add(index, lexeme);\r\n index++;\r\n }\r\n\r\n lex();\r\n\r\n if (token.equals(\"END\"))\r\n break;\r\n\r\n if (token.equals(\"IDENTIFIER\")) {\r\n index++;\r\n break;\r\n }\r\n }\r\n\r\n //Skip the \")\"\r\n lex();\r\n\r\n // Beginning the execution and evaluation of the translated code.\r\n index = 0;\r\n\r\n while (!stack.get(index).equals(\"=\") && !stack.get(index).equals(\"!=\") && !stack.get(index).equals(\">=\") &&\r\n !stack.get(index).equals(\"<=\") && !stack.get(index).equals(\">\") && !stack.get(index).equals(\"<\")) {\r\n index ++;\r\n }\r\n\r\n int operand1 = 0;\r\n int operand2 = 0;\r\n String operator = stack.get(index);\r\n stack.remove(index);\r\n index--;\r\n\r\n if (operator.equals(\"=\") || operator.equals(\"!=\") || operator.equals(\">=\") ||\r\n operator.equals(\"<=\") || operator.equals(\">\") || operator.equals(\"<\")) {\r\n\r\n try {\r\n operand2 = Integer.parseInt(stack.get(index));\r\n }\r\n catch (NumberFormatException e) {\r\n operand2 = Integer.parseInt(varList.get(search(stack.get(index)) + 1));\r\n }\r\n\r\n stack.remove(index);\r\n index--;\r\n\r\n try {\r\n operand1 = Integer.parseInt(stack.get(index));\r\n }\r\n catch (NumberFormatException e) {\r\n operand1 = Integer.parseInt(varList.get(search(stack.get(index)) + 1));\r\n }\r\n\r\n stack.remove(index);\r\n\r\n if (evaluateCon(operand1, operand2, operator))\r\n return true;\r\n else\r\n return false;\r\n }\r\n\r\n else {\r\n try {\r\n operand2 = Integer.parseInt(stack.get(index));\r\n }\r\n catch (NumberFormatException e) {\r\n operand2 = Integer.parseInt(varList.get(search(stack.get(index)) + 1));\r\n }\r\n stack.remove(index);\r\n index--;\r\n\r\n try {\r\n operand1 = Integer.parseInt(stack.get(index));\r\n }\r\n catch (NumberFormatException e) {\r\n operand1 = Integer.parseInt(varList.get(search(stack.get(index)) + 1));\r\n }\r\n stack.remove(index);\r\n\r\n execute(evaluate(operand1, operand2, operator));\r\n }\r\n\r\n return false;\r\n }", "public VariType visit(IfStatement n, Table argu) {\n\t VariType _ret=null;\n\t n.f0.accept(this, argu);\n\t n.f1.accept(this, argu);\n\t VariType t2 = n.f2.accept(this, argu);\n\t if(t2.type != \"Boolean\") {\n\t \t PrintError.errorexist = true;\n\t \t String emsg = \"expression in If Statement does not match type Boolean\";\n\t \t PrintError.print(emsg, n.f1.beginLine, n.f1.beginColumn, 1);\n\t }\n\t n.f3.accept(this, argu);\n\t n.f4.accept(this, argu);\n\t n.f5.accept(this, argu);\n\t n.f6.accept(this, argu);\n\t return _ret;\n\t }", "@Override\n\tpublic String getType() {\n\t\treturn \"ifelse\";\n\t}", "@Override\n\tpublic Void visit(If iff) {\n\t\tprintIndent(\"if\");\n\t\tindent++;\n\t\tiff.cond.accept(this);\n\t\tiff.thenBranch.accept(this);\n\t\tiff.elseBranch.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "@Override\n\tpublic Object visitIfStatement(IfStatement ifStatement, Object arg) throws Exception {\n\t\tifStatement.getE().visit(this, arg);\n\t\tLabel if_false = new Label();\n\t\tmv.visitJumpInsn(IFEQ, if_false);\n\t\tLabel if_true = new Label();\n\t\tmv.visitLabel(if_true);\n\t\tifStatement.getB().visit(this, arg);\n\t\tmv.visitLabel(if_false);\n\t\t//System.out.println(\"leaving if statement\");\n\t\treturn null;\n\t}", "protected void ifStatement(INestedIfElseClauseContainer upperIf) \r\n\t\t\t\t\t\t\t throws NoDefaultDistributionDeclaredException,\r\n\t\t\t\t\t\t\t\t\t InvalidConditionantException,\r\n\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException,\r\n\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t TableFunctionMalformedException{\r\n\t\t// Debug.println(\"PARSING IF STATEMENT\");\r\n\t\t// SCAN FOR IF. Note that any blank spaces were already skipped\r\n\t\tscan();\r\n\t\tmatchString(\"IF\");\r\n\t\t\r\n\t\t\r\n\t\t// SCAN FOR ALL/ANY\r\n\t\tscan();\r\n\t\tswitch (token) {\r\n\t\tcase 'a':\r\n\t\t\t// Debug.println(\"ALL VERIFIED\");\r\n\t\t\t// sets the table header w/ this parameters (empty list,false,false): empty list (no verified parents), is not ANY and is not default\r\n\t\t\tthis.currentHeader = new TempTableHeaderCell(new ArrayList<TempTableHeader>(), false, false, this.ssbnnode);\r\n\t\t\tbreak;\r\n\t\tcase 'y':\r\n\t\t\t// Debug.println(\"ANY VERIFIED\");\r\n\t\t\t//\tsets the table header w/ this parameters (empty list,true,false): empty list (no verified parents), is ANY and is not default\r\n\t\t\tthis.currentHeader = new TempTableHeaderCell(new ArrayList<TempTableHeader>(), true, false, this.ssbnnode);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\texpected(\"ALL or ANY\");\r\n\t\t}\r\n\r\n\t\t// stores this.currentHeader in order to become an upper clause of any further nested if/else clause\r\n\t\tINestedIfElseClauseContainer currentIfContainer = this.currentHeader;\r\n\r\n\t\t\r\n\t\t// adds the header to the container (table or upper if/else-clause) before it is changed to another header.\r\n\t\tif (upperIf == null) {\r\n\t\t\t// No upper container identified. Let's assume to be the upper-most container (the temporary table)\r\n\t\t\tupperIf = this.tempTable;\t\t\t\r\n\t\t} \t\t\r\n\t\tupperIf.addNestedClause(this.currentHeader);\r\n\t\t\r\n\t\t// SCAN FOR varsetname\r\n\t\tString varSetName = this.varsetname();\r\n\t\tthis.currentHeader.setVarsetname(varSetName);\r\n\t\t// Debug.println(\"SCANNED VARSETNAME := \" + varSetName);\r\n\r\n\t\t// SCAN FOR HAVE\r\n\t\t// Debug.println(\"SCAN FOR HAVE\");\r\n\t\tscan();\r\n\t\tmatchString(\"HAVE\");\r\n\r\n\t\t// ( EXPECTED\r\n\t\tmatch('(');\r\n\t\t// if we catch sintax error here, it may be conditionant error\r\n\t\t\r\n\t\t// Now, parsing a boolean expression - tree format (we'll store it inside this variable)\r\n\t\tICompilerBooleanValue expressionTree = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\texpressionTree = bExpression();\r\n\t\t} catch (TableFunctionMalformedException e) {\r\n\t\t\tthrow new InvalidConditionantException(getNode().toString() , e);\r\n\t\t}\r\n\t\t//this.nextChar();\r\n\t\t//this.skipWhite();\r\n\t\t// Debug.println(\"LOOKAHEAD = \" + look);\r\n\t\t// ) EXPECTED\r\n\t\tmatch(')');\r\n\t\t\r\n\t\t// since we extracted the expression tree, store it inside the current header in temporary table\r\n\t\tif (expressionTree != null) {\r\n\t\t\tthis.currentHeader.setBooleanExpressionTree(expressionTree);\r\n\t\t} else {\r\n\t\t\tthrow new InvalidConditionantException(this.node.toString());\r\n\t\t}\r\n\t\t\r\n\t\t// Debug.println(\"STARTING STATEMENTS\");\r\n\t\t\r\n\t\t// if we catch a sintax error here, it may be a value error\r\n//\t\ttry {\r\n\t\t\t// if there is a nested if, this if should be the upper clause (set currentHeader as upper clause).\r\n\t\t\tstatement(currentIfContainer);\r\n//\t\t} catch (TableFunctionMalformedException e) {\r\n//\t\t\t// Debug.println(\"->\" + getNode());\r\n//\t\t\tthrow new InvalidProbabilityRangeException(\"[\"+this.getNode().getName()+\"]\",e);\r\n//\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Debug.println(\"LOOKING FOR ELSE STATEMENT\");\r\n\t\t// LOOK FOR ELSE\r\n\t\t// Consistency check C09: the grammar \"may\" state else as optional,\r\n\t\t// but semantically every table must have a default distribution, which is\r\n\t\t// declared within an else clause.\r\n\t\t\r\n\t\t// We dont have to create a new temp table header, because else_statement would do so.\r\n\t\t\r\n\t\t//\tThis test is necessary to verify if there is an else clause\r\n\t\tif (this.index < this.text.length) {\r\n\t\t\ttry {\r\n\t\t\t\tscan();\r\n\t\t\t} catch (TableFunctionMalformedException e) {\r\n\t\t\t\t// a sintax error here represents a statement other than an else statement\r\n\t\t\t\tthrow new NoDefaultDistributionDeclaredException(e);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// No statement was found at all (that means no else statement).\r\n\t\t\t// Debug.println(\"END OF TABLE\");\r\n\t\t\tthrow new NoDefaultDistributionDeclaredException(getNode().toString());\r\n\t\t}\r\n\t\t\r\n\t\tif (token == 'l') {\r\n\t\t\t// The else statement should be a child statement of the upper container,\r\n\t\t\t// that means, it is on the same level of currently evaluated IF clause\r\n\t\t\telse_statement(upperIf);\r\n\t\t} else {\r\n\t\t\t// The statement found was not an else statement\r\n\t\t\tthrow new NoDefaultDistributionDeclaredException(getNode().toString());\r\n\t\t}\r\n\t\t\r\n\t\t// we may have another if/else clause after this...\r\n\t\t\r\n\t}", "public BlockIfStmt(Node pIfPart, FirList pOptElseIfs, FirList pOptElse, int line, FirToHir pfHir){\n super(line, pfHir);\n fIfPart = (Pair)pIfPart;\n fOptElseIfs = pOptElseIfs;\n fOptElse = pOptElse;\n }", "private void parseIfStatement() {\n check(Token.IF);\n check(Token.LPAR);\n\n parseCondition();\n\n int elseFixup = code.pc - 2;\n\n check(Token.RPAR);\n\n parseStatement();\n\n code.putJump(42); // Any value is fine, this will be fixed up later\n int endifFixup = code.pc - 2;\n\n code.fixup(elseFixup);\n\n if (nextToken.kind == Token.ELSE) {\n check(Token.ELSE);\n parseStatement();\n }\n\n code.fixup(endifFixup);\n }", "@Override\n public Object visitIfelsestatement(TranslationGrammarParser.IfelsestatementContext ctx) {\n Boolean cond = (Boolean) magicVisit(ctx.condition(), current_node);\n if (cond == null) {\n return null;\n }\n ArrayList<Node<TokenAttributes>> temp;\n if (cond) {\n temp = (ArrayList<Node<TokenAttributes>>) magicVisit(ctx.t, current_node);\n } else {\n temp = (ArrayList<Node<TokenAttributes>>) magicVisit(ctx.f, current_node);\n }\n if (temp == null) {\n return null;\n }\n return temp;\n }", "public T caseElIfConditional(ElIfConditional object)\n\t{\n\t\treturn null;\n\t}", "public Snippet visit(IfStatement n, Snippet argu) {\n\t\t Snippet _ret=new Snippet(\"\",\"\",null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.identifier.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret.returnTemp = generateTabs(blockDepth)+\"if(\"+f2.returnTemp+\")\\n\";\n\t\t\ttPlasmaCode+=_ret.returnTemp;\n\t n.block.accept(this, argu);\n\t Snippet f5 = n.nodeOptional.accept(this, argu);\n\t if(f5!=null){\n\t \t\ttPlasmaCode+=f5.returnTemp;\n\t \t\t}\n\t return _ret;\n\t }", "private Data iff(Node line, Namespace namespace) {\n\n\t\tNode cond = line.next;\n\t\tNode a = cond.next;\n\t\tNode b = a.next;\n\t\t\n\t\tif (Boolean.TRUE.equals(e.eval(cond, namespace).value)) {\n\t\t\treturn e.eval(a, namespace);\n\t\t} else if (b != null) {\n\t\t\treturn e.eval(b, namespace);\n\t\t}\n\t\t\n\t\treturn NO_RESULT;\n\t}", "public void setIfType(String ifType) {\r\n this.ifType = ifType;\r\n }", "public String visit(IfStatement n, LLVMRedux argu) throws Exception {\n String[] array =u.getConditionTags();\n u.println(\"br i1 \"+ n.f2.accept(this, argu)+\", label %\"+array[0]+\", label %\"+array[1]);\n u.increaseIndentation();\n u.println(array[0]+\":\");\n n.f4.accept(this, argu);\n u.println(\"br label %\"+array[2]);\n u.println(array[1]+\":\");\n n.f6.accept(this, argu);\n u.println(\"br label %\"+array[2]);\n u.println(array[2]+\":\");\n u.decreaseIndentation();\n return null;\n }", "public T caseIfConditional(IfConditional object)\n\t{\n\t\treturn null;\n\t}", "Condition createCondition();", "public Arginfo visit(IfStatement n, Arginfo argu) {\n Arginfo _ret=null;\n n.f0.accept(this, argu);\n return _ret;\n }", "public final void rule__XIfExpression__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:10690:1: ( ( 'if' ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:10691:1: ( 'if' )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:10691:1: ( 'if' )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:10692:1: 'if'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXIfExpressionAccess().getIfKeyword_1()); \r\n }\r\n match(input,107,FOLLOW_107_in_rule__XIfExpression__Group__1__Impl21888); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXIfExpressionAccess().getIfKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "private TntIfImpIp makeNewWhsTransferIfip(TntMgImpIpEx mgIpInfo) {\n\n // prepare If IP information\n TntIfImpIp inbIp = new TntIfImpIp();\n\n // DATA SOURCE\n inbIp.setDataSource(\"WEST\");\n // detail informations\n inbIp.setSeqNo(StringUtil.toString(IntDef.INT_ONE));\n // OFFICE_CODE\n inbIp.setOfficeCode(mgIpInfo.getOfficeCode());\n // source IP No\n inbIp.setSourceIpNo(mgIpInfo.getSourceIpNo());\n // PID_NO\n inbIp.setPidNo(mgIpInfo.getPidNo());\n // WHS_CODE\n inbIp.setWhsCode(mgIpInfo.getWhsCode());\n // TTC_PARTS_NO\n inbIp.setTtcPartsNo(mgIpInfo.getTtcPartsNo());\n // STATUS\n inbIp.setStatus(StringUtil.toString(mgIpInfo.getStatus()));\n // IF_DATE_TIME\n inbIp.setIfDateTime(mgIpInfo.getIfDateTime());\n // VALID_FLAG\n inbIp.setValidFlag(ValidFlag.OTHER);\n // HANDLE_FLAG\n inbIp.setHandleFlag(HandleFlag.UNPROCESS);\n\n // ACTION_TYPE\n inbIp.setActionType(String.valueOf(ActionType.WHS_TRANSFER));\n // set as inbound date\n inbIp.setWhsTransferDate(mgIpInfo.getInboundDate());\n // set\n inbIp.setFromWhsCode(mgIpInfo.getOriginalWhsCode());\n // set process date\n inbIp.setProcessDate(DateTimeUtil.parseDateTime(inbIp.getWhsTransferDate(), DateTimeUtil.FORMAT_IP_DATE));\n // set customer code\n if (mgIpInfo.getOriginalCustCode() != null) {\n inbIp.setWhsCustomerCode(mgIpInfo.getOriginalCustCode());\n } else {\n inbIp.setWhsCustomerCode(mgIpInfo.getCustomerCode());\n }\n // set QTY\n if (mgIpInfo.getOriginalQty() != null) {\n inbIp.setQty(mgIpInfo.getOriginalQty());\n } else {\n inbIp.setQty(mgIpInfo.getQty());\n }\n\n return inbIp;\n }", "public final void rule__AstExpressionIf__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19028:1: ( ( 'if' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19029:1: ( 'if' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19029:1: ( 'if' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19030:1: 'if'\n {\n before(grammarAccess.getAstExpressionIfAccess().getIfKeyword_0()); \n match(input,86,FOLLOW_86_in_rule__AstExpressionIf__Group__0__Impl38224); \n after(grammarAccess.getAstExpressionIfAccess().getIfKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "Expression getExp();", "public final void rule__XIfExpression__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:10209:1: ( ( 'if' ) )\r\n // InternalDroneScript.g:10210:1: ( 'if' )\r\n {\r\n // InternalDroneScript.g:10210:1: ( 'if' )\r\n // InternalDroneScript.g:10211:2: 'if'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXIfExpressionAccess().getIfKeyword_1()); \r\n }\r\n match(input,77,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXIfExpressionAccess().getIfKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final PythonParser.if_stmt_return if_stmt() throws RecognitionException {\n PythonParser.if_stmt_return retval = new PythonParser.if_stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token IF136=null;\n Token COLON138=null;\n PythonParser.suite_return ifsuite = null;\n\n PythonParser.test_return test137 = null;\n\n PythonParser.elif_clause_return elif_clause139 = null;\n\n\n PythonTree IF136_tree=null;\n PythonTree COLON138_tree=null;\n RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,\"token COLON\");\n RewriteRuleTokenStream stream_IF=new RewriteRuleTokenStream(adaptor,\"token IF\");\n RewriteRuleSubtreeStream stream_elif_clause=new RewriteRuleSubtreeStream(adaptor,\"rule elif_clause\");\n RewriteRuleSubtreeStream stream_test=new RewriteRuleSubtreeStream(adaptor,\"rule test\");\n RewriteRuleSubtreeStream stream_suite=new RewriteRuleSubtreeStream(adaptor,\"rule suite\");\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:887:5: ( IF test[expr_contextType.Load] COLON ifsuite= suite[false] ( elif_clause[$test.start] )? -> ^( IF[$IF, actions.castExpr($test.tree), actions.castStmts($ifsuite.stypes),\\n actions.makeElse($elif_clause.stypes, $elif_clause.tree)] ) )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:887:7: IF test[expr_contextType.Load] COLON ifsuite= suite[false] ( elif_clause[$test.start] )?\n {\n IF136=(Token)match(input,IF,FOLLOW_IF_in_if_stmt3489); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_IF.add(IF136);\n\n pushFollow(FOLLOW_test_in_if_stmt3491);\n test137=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_test.add(test137.getTree());\n COLON138=(Token)match(input,COLON,FOLLOW_COLON_in_if_stmt3494); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_COLON.add(COLON138);\n\n pushFollow(FOLLOW_suite_in_if_stmt3498);\n ifsuite=suite(false);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_suite.add(ifsuite.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:887:65: ( elif_clause[$test.start] )?\n int alt64=2;\n int LA64_0 = input.LA(1);\n\n if ( (LA64_0==ELIF||LA64_0==ORELSE) ) {\n alt64=1;\n }\n switch (alt64) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:887:65: elif_clause[$test.start]\n {\n pushFollow(FOLLOW_elif_clause_in_if_stmt3501);\n elif_clause139=elif_clause((test137!=null?((Token)test137.start):null));\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_elif_clause.add(elif_clause139.getTree());\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: IF\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 888:4: -> ^( IF[$IF, actions.castExpr($test.tree), actions.castStmts($ifsuite.stypes),\\n actions.makeElse($elif_clause.stypes, $elif_clause.tree)] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:888:7: ^( IF[$IF, actions.castExpr($test.tree), actions.castStmts($ifsuite.stypes),\\n actions.makeElse($elif_clause.stypes, $elif_clause.tree)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new If(IF, IF136, actions.castExpr((test137!=null?((PythonTree)test137.tree):null)), actions.castStmts((ifsuite!=null?ifsuite.stypes:null)), actions.makeElse((elif_clause139!=null?elif_clause139.stypes:null), (elif_clause139!=null?((PythonTree)elif_clause139.tree):null))), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "public void visit(IfStatement n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n n.f3.accept(this);\n n.f4.accept(this);\n n.f5.accept(this);\n }", "public final PythonParser.gen_if_return gen_if(List gens, List ifs) throws RecognitionException {\n PythonParser.gen_if_return retval = new PythonParser.gen_if_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token IF309=null;\n PythonParser.test_return test310 = null;\n\n PythonParser.gen_iter_return gen_iter311 = null;\n\n\n PythonTree IF309_tree=null;\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1689:5: ( IF test[expr_contextType.Load] ( gen_iter[gens, ifs] )? )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1689:7: IF test[expr_contextType.Load] ( gen_iter[gens, ifs] )?\n {\n root_0 = (PythonTree)adaptor.nil();\n\n IF309=(Token)match(input,IF,FOLLOW_IF_in_gen_if7891); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n IF309_tree = (PythonTree)adaptor.create(IF309);\n adaptor.addChild(root_0, IF309_tree);\n }\n pushFollow(FOLLOW_test_in_gen_if7893);\n test310=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, test310.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1689:38: ( gen_iter[gens, ifs] )?\n int alt154=2;\n int LA154_0 = input.LA(1);\n\n if ( (LA154_0==FOR||LA154_0==IF) ) {\n alt154=1;\n }\n switch (alt154) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1689:38: gen_iter[gens, ifs]\n {\n pushFollow(FOLLOW_gen_iter_in_gen_if7896);\n gen_iter311=gen_iter(gens, ifs);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, gen_iter311.getTree());\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n\n ifs.add(actions.castExpr((test310!=null?((PythonTree)test310.tree):null)));\n \n }\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "<C> BooleanLiteralExp<C> createBooleanLiteralExp();", "public final JavaliParser.ifStmt_return ifStmt() throws RecognitionException {\n\t\tJavaliParser.ifStmt_return retval = new JavaliParser.ifStmt_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken ifStart=null;\n\t\tToken char_literal66=null;\n\t\tToken char_literal68=null;\n\t\tToken string_literal69=null;\n\t\tParserRuleReturnScope then =null;\n\t\tParserRuleReturnScope otherwise =null;\n\t\tParserRuleReturnScope expr67 =null;\n\n\t\tObject ifStart_tree=null;\n\t\tObject char_literal66_tree=null;\n\t\tObject char_literal68_tree=null;\n\t\tObject string_literal69_tree=null;\n\t\tRewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,\"token 69\");\n\t\tRewriteRuleTokenStream stream_91=new RewriteRuleTokenStream(adaptor,\"token 91\");\n\t\tRewriteRuleTokenStream stream_70=new RewriteRuleTokenStream(adaptor,\"token 70\");\n\t\tRewriteRuleTokenStream stream_88=new RewriteRuleTokenStream(adaptor,\"token 88\");\n\t\tRewriteRuleSubtreeStream stream_stmtBlock=new RewriteRuleSubtreeStream(adaptor,\"rule stmtBlock\");\n\t\tRewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,\"rule expr\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:382:2: (ifStart= 'if' '(' expr ')' then= stmtBlock ( -> ^( IfElse[$ifStart, \\\"IfElse\\\"] expr $then ^( Nop[$then.start, \\\"Nop\\\"] ) ) | 'else' otherwise= stmtBlock -> ^( IfElse[$ifStart, \\\"IfElse\\\"] expr $then $otherwise) ) )\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:382:4: ifStart= 'if' '(' expr ')' then= stmtBlock ( -> ^( IfElse[$ifStart, \\\"IfElse\\\"] expr $then ^( Nop[$then.start, \\\"Nop\\\"] ) ) | 'else' otherwise= stmtBlock -> ^( IfElse[$ifStart, \\\"IfElse\\\"] expr $then $otherwise) )\n\t\t\t{\n\t\t\tifStart=(Token)match(input,91,FOLLOW_91_in_ifStmt1177); \n\t\t\tstream_91.add(ifStart);\n\n\t\t\tchar_literal66=(Token)match(input,69,FOLLOW_69_in_ifStmt1179); \n\t\t\tstream_69.add(char_literal66);\n\n\t\t\tpushFollow(FOLLOW_expr_in_ifStmt1181);\n\t\t\texpr67=expr();\n\t\t\tstate._fsp--;\n\n\t\t\tstream_expr.add(expr67.getTree());\n\t\t\tchar_literal68=(Token)match(input,70,FOLLOW_70_in_ifStmt1183); \n\t\t\tstream_70.add(char_literal68);\n\n\t\t\tpushFollow(FOLLOW_stmtBlock_in_ifStmt1187);\n\t\t\tthen=stmtBlock();\n\t\t\tstate._fsp--;\n\n\t\t\tstream_stmtBlock.add(then.getTree());\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:383:3: ( -> ^( IfElse[$ifStart, \\\"IfElse\\\"] expr $then ^( Nop[$then.start, \\\"Nop\\\"] ) ) | 'else' otherwise= stmtBlock -> ^( IfElse[$ifStart, \\\"IfElse\\\"] expr $then $otherwise) )\n\t\t\tint alt21=2;\n\t\t\tint LA21_0 = input.LA(1);\n\t\t\tif ( (LA21_0==Identifier||LA21_0==91||(LA21_0 >= 97 && LA21_0 <= 98)||(LA21_0 >= 100 && LA21_0 <= 103)||LA21_0==106) ) {\n\t\t\t\talt21=1;\n\t\t\t}\n\t\t\telse if ( (LA21_0==88) ) {\n\t\t\t\talt21=2;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 21, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt21) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:384:4: \n\t\t\t\t\t{\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: expr, then\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval, then\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_then=new RewriteRuleSubtreeStream(adaptor,\"rule then\",then!=null?then.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 384:4: -> ^( IfElse[$ifStart, \\\"IfElse\\\"] expr $then ^( Nop[$then.start, \\\"Nop\\\"] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:384:7: ^( IfElse[$ifStart, \\\"IfElse\\\"] expr $then ^( Nop[$then.start, \\\"Nop\\\"] ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(IfElse, ifStart, \"IfElse\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_expr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_then.nextTree());\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:384:48: ^( Nop[$then.start, \\\"Nop\\\"] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_2 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(Nop, (then!=null?(then.start):null), \"Nop\"), root_2);\n\t\t\t\t\t\tadaptor.addChild(root_1, root_2);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:385:5: 'else' otherwise= stmtBlock\n\t\t\t\t\t{\n\t\t\t\t\tstring_literal69=(Token)match(input,88,FOLLOW_88_in_ifStmt1222); \n\t\t\t\t\tstream_88.add(string_literal69);\n\n\t\t\t\t\tpushFollow(FOLLOW_stmtBlock_in_ifStmt1226);\n\t\t\t\t\totherwise=stmtBlock();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_stmtBlock.add(otherwise.getTree());\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: then, expr, otherwise\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval, then, otherwise\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_then=new RewriteRuleSubtreeStream(adaptor,\"rule then\",then!=null?then.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_otherwise=new RewriteRuleSubtreeStream(adaptor,\"rule otherwise\",otherwise!=null?otherwise.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 386:4: -> ^( IfElse[$ifStart, \\\"IfElse\\\"] expr $then $otherwise)\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:386:7: ^( IfElse[$ifStart, \\\"IfElse\\\"] expr $then $otherwise)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(IfElse, ifStart, \"IfElse\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_expr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_then.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_otherwise.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public final EObject entryRuleIfExpression() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleIfExpression = null;\n\n\n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2772:2: (iv_ruleIfExpression= ruleIfExpression EOF )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2773:2: iv_ruleIfExpression= ruleIfExpression EOF\n {\n currentNode = createCompositeNode(grammarAccess.getIfExpressionRule(), currentNode); \n pushFollow(FOLLOW_ruleIfExpression_in_entryRuleIfExpression4807);\n iv_ruleIfExpression=ruleIfExpression();\n _fsp--;\n\n current =iv_ruleIfExpression; \n match(input,EOF,FOLLOW_EOF_in_entryRuleIfExpression4817); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public String getIfType() {\r\n return ifType;\r\n }", "@Override\n\tpublic String visitIfstatement(IfstatementContext ctx) {\n\t\t\n\t\tfor(int i =0; i< ctx.getChildCount(); i++)\n\t\t{\n\t\t\n\t\tif(ctx.getChild(i).getText().equals(\"if\"))\t\n\t\t sb.append(\"CHECK \\n\");\n\t\telse if (ctx.getChild(i).getText().equals(\"else\"))\n\t\t sb.append(\"OR \\n\");\n\t\telse if (ctx.getChild(i).getText().equals(\"stop\"))\n\t\t\t sb.append(\"STOP\");\n\t\telse if(!ctx.getChild(i).getText().equals(\":\"))\n\t\t{\n\t\t\tString str =visit(ctx.getChild(i));\n\t\t\tif(str.length()>0)\n\t\t\t\tsb.append(str+\"\\n\");\n\t\t}\n\t\t}\n\t\t\n\t\treturn \"\";\n\t}", "InOper createInOper();", "public final void mT__25() throws RecognitionException {\n try {\n int _type = T__25;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalReqLNG.g:24:7: ( 'If' )\n // InternalReqLNG.g:24:9: 'If'\n {\n match(\"If\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "Expression() { }", "ExpOperand createExpOperand();" ]
[ "0.879057", "0.7737112", "0.69414675", "0.6842301", "0.66904515", "0.66899973", "0.6666346", "0.65773356", "0.65358067", "0.6510814", "0.6428469", "0.63798463", "0.6320719", "0.62763894", "0.6232469", "0.6178132", "0.6114364", "0.60972327", "0.60230905", "0.59669507", "0.5830425", "0.5737591", "0.5674816", "0.5646728", "0.55809975", "0.5561321", "0.5555879", "0.5553251", "0.5546646", "0.55168015", "0.55157614", "0.54442155", "0.5441433", "0.54049283", "0.53977984", "0.538258", "0.53766006", "0.53624034", "0.5353533", "0.5348998", "0.53484035", "0.5336469", "0.5330929", "0.5322338", "0.52967674", "0.52840847", "0.5235695", "0.52159476", "0.52058774", "0.5189462", "0.5188983", "0.51746047", "0.51686513", "0.5157388", "0.51404715", "0.5127486", "0.51158655", "0.510232", "0.5082445", "0.5075743", "0.5062225", "0.50590354", "0.5058272", "0.50546616", "0.50486565", "0.5039082", "0.5035102", "0.50304234", "0.5023505", "0.4984184", "0.49729908", "0.497143", "0.4963143", "0.49594977", "0.49537745", "0.49520484", "0.49496055", "0.49457094", "0.49405304", "0.49245209", "0.49224806", "0.49134228", "0.49134082", "0.49125156", "0.4898775", "0.48904037", "0.48842347", "0.48755956", "0.4866352", "0.48579416", "0.48537982", "0.48522985", "0.48341236", "0.47944245", "0.4783474", "0.47772476", "0.47729346", "0.4761386", "0.4760218", "0.47526723" ]
0.8303266
1
Returns a new object of class 'Integer Literal Exp'.
<C> IntegerLiteralExp<C> createIntegerLiteralExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IntegerLiteralExp createIntegerLiteralExp();", "public IntegerLiteral(Integer number)\n {\n this.literal = number; \n }", "public Exp transIntExp(int value){\r\n\t\treturn new Ex(new CONST(value));\r\n\t}", "public LlvmValue visit(IntegerLiteral n) {\n return new LlvmIntegerLiteral(n.value);\n }", "public T caseIntegerLiteralExpCS(IntegerLiteralExpCS object) {\r\n return null;\r\n }", "RealLiteralExp createRealLiteralExp();", "public static LiteralIntNode parse(Parser parser) {\r\n\t\tLocation location = parser.expect(token -> token instanceof LiteralIntToken, \"Int literal expected.\");\r\n\t\tLiteralIntToken current = (LiteralIntToken)parser.current();\r\n\t\treturn new LiteralIntNode(location, current.getValue(), current.getBase());\r\n\t}", "public IntLit createIntLit(int val) {\n try {\n return (IntLit) xnf.IntLit(Position.COMPILER_GENERATED, IntLit.INT, val).typeCheck(this);\n } catch (SemanticException e) {\n throw new InternalCompilerError(\"Int literal with value \"+val+\" would not typecheck\", e);\n }\n }", "IntegerValue createIntegerValue();", "IntegerValue createIntegerValue();", "@Override\n public void visitIntLiteral(IntLiteral node){\n mPrintWriter.println(\"#Integer\");\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getIntValue()+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getIntValue()+\")\");\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }", "IntValue createIntValue();", "IntValue createIntValue();", "InvalidLiteralExp createInvalidLiteralExp();", "<C> RealLiteralExp<C> createRealLiteralExp();", "private XMLTreeIntExpressionEvaluator() {\n }", "@Override\r\n\tpublic Object visitIntegerLiteralExpression(\r\n\t\t\tIntegerLiteralExpression integerLiteralExpression, Object arg)\r\n\t\t\tthrows Exception {\n\t\tmv.visitLdcInsn(integerLiteralExpression.integerLiteral.getIntVal());\r\n\t\tif(arg != null)\r\n\t\t{\r\n//\t\t mv.visitMethodInsn(INVOKESTATIC, \"java/lang/Integer\", \"valueOf\", \"(I)Ljava/lang/Integer;\");\r\n\t\t}\r\n\t\treturn \"I\";\r\n\t}", "public Int() {\n this(0);\n }", "public MutableInt() {}", "public IntegerLiteral(String number)\n {\n try\n {\n this.literal = Integer.parseInt(number);\n }\n catch(NumberFormatException e)\n {\n throw new IllegalArgumentException(e.getMessage());\n }\n }", "LetExp createLetExp();", "javascriptInt(Context c) {\n this.c = c;\n }", "<C> InvalidLiteralExp<C> createInvalidLiteralExp();", "public a(IntegerLiteralTypeConstructor integerLiteralTypeConstructor) {\n super(0);\n this.a = integerLiteralTypeConstructor;\n }", "public Int() {\n super(Expression.X_IS_UNDEFINED);\n this.value = 0;\n }", "protected Int() {}", "<C> UnlimitedNaturalLiteralExp<C> createUnlimitedNaturalLiteralExp();", "@Override\r\n\tpublic Object visitIntLitExpression(IntLitExpression intLitExpression,\r\n\t\t\tObject arg) throws Exception {\r\n\t\tintLitExpression.setType(intType);\r\n\t\treturn intType;\r\n\t}", "ExpOperand createExpOperand();", "VariableExp createVariableExp();", "public T caseIntegerLiteral(IntegerLiteral object)\n {\n return null;\n }", "Rule IntConstant() {\n // Push 1 IntConstNode onto the value stack\n return Sequence(\n Sequence(\n Optional(NumericSign()),\n OneOrMore(Digit())),\n actions.pushIntConstNode());\n }", "public NestedInteger(int value) { }", "public MyInteger( )\n {\n this( 0 );\n }", "public void outAIntExp(AIntExp node) throws TypeException{\n\ttypemap.put(node,new IntType());\n }", "public Literal createLiteral(int b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "public IntegerIdentifier(String name, int type, int value) {\n super(name, type); //String and integer declaration\n this.value = value;//set this.value to value\n }", "NumericExpression createNumericExpression();", "public Value(int i) {\n integer = i;\n itemClass = Integer.class;\n type = DataType.INT;\n }", "public Snippet visit(CoercionToIntExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret = n.expression.accept(this, argu);\n\t \n\t\t\t_ret.returnTemp = \"(\" + \"int\" + \")\" + _ret.returnTemp;\n\t\t\t_ret.expType = new X10Integer();\n\t return _ret;\n\t }", "private FinalIntegerNode() { }", "IntConstant createIntConstant();", "TypeLiteralExp createTypeLiteralExp();", "public final EObject ruleIntLiteral() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token lv_value_1_0=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3797:28: ( ( () ( (lv_value_1_0= RULE_INT ) ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3798:1: ( () ( (lv_value_1_0= RULE_INT ) ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3798:1: ( () ( (lv_value_1_0= RULE_INT ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3798:2: () ( (lv_value_1_0= RULE_INT ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3798:2: ()\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3799:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getIntLiteralAccess().getIntLiteralAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3804:2: ( (lv_value_1_0= RULE_INT ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3805:1: (lv_value_1_0= RULE_INT )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3805:1: (lv_value_1_0= RULE_INT )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3806:3: lv_value_1_0= RULE_INT\r\n {\r\n lv_value_1_0=(Token)match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleIntLiteral8757); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t\t\tnewLeafNode(lv_value_1_0, grammarAccess.getIntLiteralAccess().getValueINTTerminalRuleCall_1_0()); \r\n \t\t\r\n }\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElement(grammarAccess.getIntLiteralRule());\r\n \t }\r\n \t\tsetWithLastConsumed(\r\n \t\t\tcurrent, \r\n \t\t\t\"value\",\r\n \t\tlv_value_1_0, \r\n \t\t\"INT\");\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "@Override\n public Type evaluateType() throws Exception {\n return new IntegerType();\n }", "public T caseIntLiteral(IntLiteral object)\n {\n return null;\n }", "Expression() { }", "String getInt_lit();", "public NestedInteger() { }", "Expression createExpression();", "Expression getExp();", "Int(int v){\n val = v;\n }", "Literal createLiteral();", "Literal createLiteral();", "private Token number() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\twhile(isDigit(this.currentChar) && this.pos != Integer.MIN_VALUE) {\n\t\t\tsb.append(this.currentChar);\n\t\t\tnext_char();\n\t\t}\n\t\t//处理小数\n\t\tif(this.currentChar == '.') {\n\t\t\tsb.append(this.currentChar);\n\t\t\tnext_char();\n\t\t\t\n\t\t\twhile(isDigit(this.currentChar) && this.pos != Integer.MIN_VALUE) {\n\t\t\t\tsb.append(this.currentChar);\n\t\t\t\tnext_char();\n\t\t\t}\n\t\t\treturn new Token(Type.REAL_CONST, sb.toString());\n\t\t}else {\n\t\t\treturn new Token(Type.INTEGER_CONST, sb.toString());\n\t\t}\n\t}", "@Override\n\tpublic String generateJavaCode() {\n\t\treturn id + \" = \"+(tam>0? \"new int[]\": \"\")+expr+\";\";\n\t}", "public static final SourceModel.Expr showInt(SourceModel.Expr i) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showInt), i});\n\t\t}", "<C, PM> VariableExp<C, PM> createVariableExp();", "public final void integerLiteral() throws RecognitionException {\n int integerLiteral_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"integerLiteral\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(514, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 68) ) { return ; }\n // Java.g:515:5: ( HexLiteral | OctalLiteral | DecimalLiteral )\n dbg.enterAlt(1);\n\n // Java.g:\n {\n dbg.location(515,5);\n if ( (input.LA(1)>=HexLiteral && input.LA(1)<=DecimalLiteral) ) {\n input.consume();\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n dbg.recognitionException(mse);\n throw mse;\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 68, integerLiteral_StartIndex); }\n }\n dbg.location(518, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"integerLiteral\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public int intVal() {\r\n\t\t\tassert kind == Kind.INTEGER_LITERAL;\r\n\t\t\treturn Integer.valueOf(String.copyValueOf(chars, pos, length));\r\n\t\t}", "public void testJavaInc2() throws Exception\r\n {\r\n Inc2.id = 0;\r\n Eval exec = new Inc2();\r\n\r\n assertEquals(\"myObj.id should be 0\", 0, getIntField(Inc2.class, exec, \"id\"));\r\n assertEquals(\"Wrong incremented value\", 2, exec.eval());\r\n assertEquals(\"Wrong incremented value\", 4, exec.eval());\r\n assertEquals(\"Wrong incremented value\", 6, exec.eval());\r\n }", "UndefinedLiteralExp createUndefinedLiteralExp();", "public T caseExpression_Integer(Expression_Integer object)\r\n {\r\n return null;\r\n }", "public final EObject ruleIntLiteral() throws RecognitionException {\n EObject current = null;\n\n Token lv_value_1_0=null;\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1648:28: ( ( () ( (lv_value_1_0= RULE_INT ) ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1649:1: ( () ( (lv_value_1_0= RULE_INT ) ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1649:1: ( () ( (lv_value_1_0= RULE_INT ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1649:2: () ( (lv_value_1_0= RULE_INT ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1649:2: ()\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1650:5: \n {\n if ( state.backtracking==0 ) {\n\n current = forceCreateModelElement(\n grammarAccess.getIntLiteralAccess().getIntLiteralAction_0(),\n current);\n \n }\n\n }\n\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1655:2: ( (lv_value_1_0= RULE_INT ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1656:1: (lv_value_1_0= RULE_INT )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1656:1: (lv_value_1_0= RULE_INT )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1657:3: lv_value_1_0= RULE_INT\n {\n lv_value_1_0=(Token)match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleIntLiteral3956); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(lv_value_1_0, grammarAccess.getIntLiteralAccess().getValueINTTerminalRuleCall_1_0()); \n \t\t\n }\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getIntLiteralRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"value\",\n \t\tlv_value_1_0, \n \t\t\"INT\");\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final EObject ruleIntLiteral() throws RecognitionException {\n EObject current = null;\n int ruleIntLiteral_StartIndex = input.index();\n Token lv_intValue_0_0=null;\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 110) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4675:28: ( ( (lv_intValue_0_0= RULE_INT ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4676:1: ( (lv_intValue_0_0= RULE_INT ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4676:1: ( (lv_intValue_0_0= RULE_INT ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4677:1: (lv_intValue_0_0= RULE_INT )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4677:1: (lv_intValue_0_0= RULE_INT )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4678:3: lv_intValue_0_0= RULE_INT\n {\n lv_intValue_0_0=(Token)match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleIntLiteral9517); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(lv_intValue_0_0, grammarAccess.getIntLiteralAccess().getIntValueINTTerminalRuleCall_0()); \n \t\t\n }\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getIntLiteralRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"intValue\",\n \t\tlv_intValue_0_0, \n \t\t\"INT\");\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 110, ruleIntLiteral_StartIndex); }\n }\n return current;\n }", "public Int(int value) { \n this.value = value; \n }", "StringLiteralExp createStringLiteralExp();", "public IntegerField() {\r this(3, 0, 0, 0);\r }", "@Override\n\tpublic String getValue() {\n\t\treturn integerLiteral;\n\t}", "public Int(int v) {\n value = v;\n }", "public IncrementableAssignment(Literal lit) {\n super(lit, false);\n variableOrdering.add(lit.variable());\n }", "@Override\n public OperandWithCode generateIntermediateCode(Executable executable) {\n \treturn integerExpression.generateIntermediateCode(executable);\n }", "public static final Placeholder<Integer> anInteger(String name) {\n return new Placeholder<>(Integer.class, name);\n }", "public LiteralIntNode(Location location, int value) {\r\n\t\tthis(location, value, LiteralIntTokenBase.DECIMAL);\r\n\t}", "public final EObject ruleIntegerLiteral() throws RecognitionException {\n EObject current = null;\n\n Token lv_value_0_0=null;\n Token lv_modifier_1_0=null;\n EObject lv_unit_3_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4556:6: ( ( ( (lv_value_0_0= RULE_INTEGER ) ) ( (lv_modifier_1_0= RULE_ID ) )? ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4557:1: ( ( (lv_value_0_0= RULE_INTEGER ) ) ( (lv_modifier_1_0= RULE_ID ) )? ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4557:1: ( ( (lv_value_0_0= RULE_INTEGER ) ) ( (lv_modifier_1_0= RULE_ID ) )? ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4557:2: ( (lv_value_0_0= RULE_INTEGER ) ) ( (lv_modifier_1_0= RULE_ID ) )? ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )?\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4557:2: ( (lv_value_0_0= RULE_INTEGER ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4558:1: (lv_value_0_0= RULE_INTEGER )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4558:1: (lv_value_0_0= RULE_INTEGER )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4559:3: lv_value_0_0= RULE_INTEGER\n {\n lv_value_0_0=(Token)input.LT(1);\n match(input,RULE_INTEGER,FOLLOW_RULE_INTEGER_in_ruleIntegerLiteral7978); \n\n \t\t\tcreateLeafNode(grammarAccess.getIntegerLiteralAccess().getValueINTEGERTerminalRuleCall_0_0(), \"value\"); \n \t\t\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getIntegerLiteralRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode, current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"value\",\n \t \t\tlv_value_0_0, \n \t \t\t\"INTEGER\", \n \t \t\tlastConsumedNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t \n\n }\n\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4581:2: ( (lv_modifier_1_0= RULE_ID ) )?\n int alt68=2;\n int LA68_0 = input.LA(1);\n\n if ( (LA68_0==RULE_ID) ) {\n alt68=1;\n }\n switch (alt68) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4582:1: (lv_modifier_1_0= RULE_ID )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4582:1: (lv_modifier_1_0= RULE_ID )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4583:3: lv_modifier_1_0= RULE_ID\n {\n lv_modifier_1_0=(Token)input.LT(1);\n match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleIntegerLiteral8000); \n\n \t\t\tcreateLeafNode(grammarAccess.getIntegerLiteralAccess().getModifierIDTerminalRuleCall_1_0(), \"modifier\"); \n \t\t\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getIntegerLiteralRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode, current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"modifier\",\n \t \t\tlv_modifier_1_0, \n \t \t\t\"ID\", \n \t \t\tlastConsumedNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t \n\n }\n\n\n }\n break;\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4605:3: ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )?\n int alt69=2;\n int LA69_0 = input.LA(1);\n\n if ( (LA69_0==25) ) {\n alt69=1;\n }\n switch (alt69) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4605:5: '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')'\n {\n match(input,25,FOLLOW_25_in_ruleIntegerLiteral8017); \n\n createLeafNode(grammarAccess.getIntegerLiteralAccess().getLeftParenthesisKeyword_2_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4609:1: ( (lv_unit_3_0= ruleUnitExpression ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4610:1: (lv_unit_3_0= ruleUnitExpression )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4610:1: (lv_unit_3_0= ruleUnitExpression )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4611:3: lv_unit_3_0= ruleUnitExpression\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getIntegerLiteralAccess().getUnitUnitExpressionParserRuleCall_2_1_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleUnitExpression_in_ruleIntegerLiteral8038);\n lv_unit_3_0=ruleUnitExpression();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getIntegerLiteralRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"unit\",\n \t \t\tlv_unit_3_0, \n \t \t\t\"UnitExpression\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n match(input,26,FOLLOW_26_in_ruleIntegerLiteral8048); \n\n createLeafNode(grammarAccess.getIntegerLiteralAccess().getRightParenthesisKeyword_2_2(), null); \n \n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public MyInteger(){\n //initialize to 0\n Integer myint = new Integer(0);\n }", "public IntegerParserTest() {\n super(new IntegerParser());\n }", "public Int(int value) {\n super(Expression.X_IS_UNDEFINED);\n this.value = value;\n }", "UnlimitedNaturalExp createUnlimitedNaturalExp();", "<C, PM> LetExp<C, PM> createLetExp();", "public IntHolder() {\r\n\t}", "public MyInteger( int x )\n {\n value = x;\n }", "public Literal(int ID, boolean isNot) {\n\t\tthis.ID = ID;\n\t\tthis.isNot = isNot;\n\t}", "public InfixField(int num, String val) {\n tagNum = num + \"\";\n tagVal = val;\n }", "public Object visitIntegerConstant(GNode n) {\n xtc.type.Type result;\n \n result = cops.typeInteger(n.getString(0));\n \n return result.getConstant().bigIntValue().longValue();\n }", "@Override\n public String visit(IntegerLiteralExpr n, Object arg) {\n return null;\n }", "public final EObject entryRuleIntLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleIntLiteral = null;\n\n\n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1637:2: (iv_ruleIntLiteral= ruleIntLiteral EOF )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1638:2: iv_ruleIntLiteral= ruleIntLiteral EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getIntLiteralRule()); \n }\n pushFollow(FOLLOW_ruleIntLiteral_in_entryRuleIntLiteral3895);\n iv_ruleIntLiteral=ruleIntLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleIntLiteral; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleIntLiteral3905); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public T caseIntegerExpression(IntegerExpression object) {\n\t\treturn null;\n\t}", "JavaExpression createJavaExpression();", "public IntegerEditor() {\r\n\t super();\r\n\t}", "public final int integral_literal() throws RecognitionException {\n int value = 0;\n\n\n long long_literal187 = 0;\n int integer_literal188 = 0;\n short short_literal189 = 0;\n byte byte_literal190 = 0;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1173:3: ( long_literal | integer_literal | short_literal | byte_literal )\n int alt37 = 4;\n switch (input.LA(1)) {\n case LONG_LITERAL: {\n alt37 = 1;\n }\n break;\n case INTEGER_LITERAL: {\n alt37 = 2;\n }\n break;\n case SHORT_LITERAL: {\n alt37 = 3;\n }\n break;\n case BYTE_LITERAL: {\n alt37 = 4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 37, 0, input);\n throw nvae;\n }\n switch (alt37) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1173:5: long_literal\n {\n pushFollow(FOLLOW_long_literal_in_integral_literal3203);\n long_literal187 = long_literal();\n state._fsp--;\n\n\n LiteralTools.checkInt(long_literal187);\n value = (int) long_literal187;\n\n }\n break;\n case 2:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1178:5: integer_literal\n {\n pushFollow(FOLLOW_integer_literal_in_integral_literal3215);\n integer_literal188 = integer_literal();\n state._fsp--;\n\n value = integer_literal188;\n }\n break;\n case 3:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1179:5: short_literal\n {\n pushFollow(FOLLOW_short_literal_in_integral_literal3223);\n short_literal189 = short_literal();\n state._fsp--;\n\n value = short_literal189;\n }\n break;\n case 4:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1180:5: byte_literal\n {\n pushFollow(FOLLOW_byte_literal_in_integral_literal3231);\n byte_literal190 = byte_literal();\n state._fsp--;\n\n value = byte_literal190;\n }\n break;\n\n }\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return value;\n }", "private Template(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "@Override\n\tpublic Object visitIntLiteral(IntLiteral literal) {\n\t\treturn null;\n\t}", "public T caseExprInt(ExprInt object)\n {\n return null;\n }", "public final EObject entryRuleIntegerLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleIntegerLiteral = null;\n\n\n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4543:2: (iv_ruleIntegerLiteral= ruleIntegerLiteral EOF )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4544:2: iv_ruleIntegerLiteral= ruleIntegerLiteral EOF\n {\n currentNode = createCompositeNode(grammarAccess.getIntegerLiteralRule(), currentNode); \n pushFollow(FOLLOW_ruleIntegerLiteral_in_entryRuleIntegerLiteral7926);\n iv_ruleIntegerLiteral=ruleIntegerLiteral();\n _fsp--;\n\n current =iv_ruleIntegerLiteral; \n match(input,EOF,FOLLOW_EOF_in_entryRuleIntegerLiteral7936); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public LiteralExpression (String str){\n _value = str;\n }", "public NestedInteger() {\n\t\tthis.list = new ArrayList<>();\n\t}", "IterateExp createIterateExp();", "<C> StringLiteralExp<C> createStringLiteralExp();", "public Object visitExpVar(ExpVar exp, Object arg)\n\tthrows Exception\n {\n\tEnvironment env = (Environment) arg;\n\tint val = env.get(exp.getVar());\n\treturn new Integer(val);\n }" ]
[ "0.8829362", "0.70440066", "0.66121155", "0.65393734", "0.63526374", "0.6343571", "0.6226481", "0.6149584", "0.613542", "0.613542", "0.6074064", "0.6063064", "0.6063064", "0.6021718", "0.6013141", "0.6011218", "0.5997955", "0.5927467", "0.59108067", "0.5910741", "0.5813124", "0.5794189", "0.57930535", "0.57575494", "0.57520705", "0.57315844", "0.57081234", "0.5695413", "0.5693901", "0.56915987", "0.56898576", "0.5683888", "0.5673068", "0.56531626", "0.5635011", "0.56273013", "0.5602248", "0.5592742", "0.5591514", "0.55832773", "0.55807865", "0.55679476", "0.5557197", "0.55535895", "0.5544276", "0.5526476", "0.54907185", "0.5487855", "0.5469731", "0.5426089", "0.54229784", "0.5420929", "0.5419291", "0.5419291", "0.5404002", "0.53722835", "0.5360874", "0.53523606", "0.53355104", "0.53329444", "0.5318756", "0.5312962", "0.5310039", "0.5309481", "0.5307805", "0.53000206", "0.5295787", "0.529535", "0.5293701", "0.52927554", "0.52694297", "0.5255669", "0.52515846", "0.5247912", "0.5242579", "0.52416813", "0.5232602", "0.52319634", "0.52265745", "0.52256685", "0.52248037", "0.52243006", "0.521923", "0.5210863", "0.5210197", "0.52023405", "0.5182476", "0.5178255", "0.5173374", "0.5157752", "0.5157152", "0.51484776", "0.5144385", "0.51312554", "0.5126857", "0.5121341", "0.5116711", "0.5111142", "0.5108776", "0.5108522" ]
0.84659547
1
Returns a new object of class 'Unlimited Natural Literal Exp'.
<C> UnlimitedNaturalLiteralExp<C> createUnlimitedNaturalLiteralExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UnlimitedNaturalExp createUnlimitedNaturalExp();", "RealLiteralExp createRealLiteralExp();", "IntegerLiteralExp createIntegerLiteralExp();", "InvalidLiteralExp createInvalidLiteralExp();", "<C> RealLiteralExp<C> createRealLiteralExp();", "UndefinedLiteralExp createUndefinedLiteralExp();", "LetExp createLetExp();", "Literal createLiteral();", "Literal createLiteral();", "VariableExp createVariableExp();", "<C> IntegerLiteralExp<C> createIntegerLiteralExp();", "<C> InvalidLiteralExp<C> createInvalidLiteralExp();", "SimpleLiteral createSimpleLiteral();", "StringLiteralExp createStringLiteralExp();", "TypeLiteralExp createTypeLiteralExp();", "CollectionLiteralExp createCollectionLiteralExp();", "public final EObject ruleUnlimitedLiteral() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token lv_value_0_0=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4360:28: ( ( (lv_value_0_0= '*' ) ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4361:1: ( (lv_value_0_0= '*' ) )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4361:1: ( (lv_value_0_0= '*' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4362:1: (lv_value_0_0= '*' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4362:1: (lv_value_0_0= '*' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4363:3: lv_value_0_0= '*'\r\n {\r\n lv_value_0_0=(Token)match(input,46,FOLLOW_46_in_ruleUnlimitedLiteral9421); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n newLeafNode(lv_value_0_0, grammarAccess.getUnlimitedLiteralAccess().getValueAsteriskKeyword_0());\r\n \r\n }\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElement(grammarAccess.getUnlimitedLiteralRule());\r\n \t }\r\n \t\tsetWithLastConsumed(current, \"value\", lv_value_0_0, \"*\");\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final EObject entryRuleUnlimitedLiteral() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleUnlimitedLiteral = null;\r\n\r\n\r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4349:2: (iv_ruleUnlimitedLiteral= ruleUnlimitedLiteral EOF )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4350:2: iv_ruleUnlimitedLiteral= ruleUnlimitedLiteral EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getUnlimitedLiteralRule()); \r\n }\r\n pushFollow(FOLLOW_ruleUnlimitedLiteral_in_entryRuleUnlimitedLiteral9369);\r\n iv_ruleUnlimitedLiteral=ruleUnlimitedLiteral();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleUnlimitedLiteral; \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleUnlimitedLiteral9379); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "@Override\r\n public Literal newLiteral(PObj[] data) {\r\n String symbol = ((Constant) data[0]).getObject().toString();\r\n PObj[] fixed = new PObj[data.length - 1];\r\n System.arraycopy(data, 1, fixed, 0, fixed.length);\r\n PList terms = ProvaListImpl.create(fixed);\r\n return newLiteral(symbol, terms);\r\n }", "<C> CollectionLiteralExp<C> createCollectionLiteralExp();", "public final EObject ruleUnlimitedNaturalLiteralExpCS() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:7114:2: ( ( () otherlv_1= '*' ) )\n // InternalMyDsl.g:7115:2: ( () otherlv_1= '*' )\n {\n // InternalMyDsl.g:7115:2: ( () otherlv_1= '*' )\n // InternalMyDsl.g:7116:3: () otherlv_1= '*'\n {\n // InternalMyDsl.g:7116:3: ()\n // InternalMyDsl.g:7117:4: \n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t/* */\n \t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getUnlimitedNaturalLiteralExpCSAccess().getUnlimitedNaturalLiteralExpCSAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n }\n\n }\n\n otherlv_1=(Token)match(input,44,FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getUnlimitedNaturalLiteralExpCSAccess().getAsteriskKeyword_1());\n \t\t\n }\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public UnaryExpNode() {\n }", "public final EObject entryRuleUnlimitedNaturalLiteralExpCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleUnlimitedNaturalLiteralExpCS = null;\n\n\n try {\n // InternalMyDsl.g:7101:69: (iv_ruleUnlimitedNaturalLiteralExpCS= ruleUnlimitedNaturalLiteralExpCS EOF )\n // InternalMyDsl.g:7102:2: iv_ruleUnlimitedNaturalLiteralExpCS= ruleUnlimitedNaturalLiteralExpCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getUnlimitedNaturalLiteralExpCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleUnlimitedNaturalLiteralExpCS=ruleUnlimitedNaturalLiteralExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleUnlimitedNaturalLiteralExpCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "FullExpression createFullExpression();", "public Literal getLiteral();", "public Literal getLiteral();", "<C> StringLiteralExp<C> createStringLiteralExp();", "Lexpr createLexpr();", "ExpOperand createExpOperand();", "private Operation classCreatorRest(Token t, Scope scope, Vector queue)\r\n {\r\n Vector v = new Vector();\r\n String s = \"super\";\r\n Operation root = new Operation();\r\n\r\n root.type.type = Keyword.NONESY;\r\n root.type.ident = t;\r\n traceOn(v);\r\n root.left = arguments(scope, v, queue);\r\n traceOff(v);\r\n\r\n for(int i = 0; i < v.size(); i++)\r\n {\r\n Token pt = (Token)v.get(i);\r\n\r\n if (pt.kind == Keyword.NUMBERSY)\r\n s += pt.val;\r\n else if (pt.kind == Keyword.LNUMBERSY)\r\n s += pt.val + \"L\";\r\n else if (pt.kind == Keyword.DNUMBERSY)\r\n s += pt.fval;\r\n else if (pt.kind == Keyword.IDENTSY)\r\n s += pt.string;\r\n else\r\n s += pt.kind.string;\r\n }\r\n if (s.endsWith(\"()\"))\r\n s = \"\";\r\n else\r\n s += ';';\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n ClassType x = new ClassType();\r\n x.name = new Token();\r\n x.name.kind = Keyword.IDENTSY;\r\n x.name.string = \"Anonymous\" + anonymous++;\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n x.extend = new ClassType(t.string.substring(t.string.lastIndexOf('.') + 1));\r\n x.implement = new ClassType[1];\r\n x.implement[0] = x.extend;\r\n declMember(scope, x);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n root.type.ident = x.name;\r\n root.type.type = Keyword.NONESY;\r\n root.left.left = null;\r\n Vector old = queue;\r\n queue = new Vector();\r\n HashSet dummy = unresolved;\r\n unresolved = x.unresolved;\r\n unresolved.add(t.string);\r\n classBody(x, new Modifier(), s, queue);\r\n addToConstructor(x, queue);\r\n queue = old;\r\n unresolved = dummy;\r\n writeList(x);\r\n }\r\n\r\n return root;\r\n }", "public LiteralExpression (String str){\n _value = str;\n }", "<C, PM> VariableExp<C, PM> createVariableExp();", "public Literal createLiteral(char b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "public Literal createLiteral(int b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "NumericExpression createNumericExpression();", "Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n SingleQuotedLiteral(),\n DoubleQuotedLiteral()),\n actions.pushLiteralNode());\n }", "public IntegerLiteral(Integer number)\n {\n this.literal = number; \n }", "Expression() { }", "public Literal createLiteral(double b) throws ModelException{\n\n return createLiteral(String.valueOf(b));\n }", "public Expression(String pExpStr) {\n Queue<Token> tokenQueue = new Queue<>();\n setTokenQueue(tokenQueue);\n Tokenizer tokenizer = new Tokenizer(pExpStr);\n Token prevToken = null;\n Token token = tokenizer.nextToken();\n while (token != null) {\n if (token instanceof SubOperator) {\n token = negationCheck(token, prevToken);\n }\n getTokenQueue().enqueue(token);\n prevToken = token;\n token = tokenizer.nextToken();\n }\n }", "public Literal createLiteral(long b) throws ModelException{\n\n return createLiteral(String.valueOf(b));\n }", "public Literal createLiteral(short b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "Expression getExp();", "<C> UnspecifiedValueExp<C> createUnspecifiedValueExp();", "<C> NullLiteralExp<C> createNullLiteralExp();", "public LiteralOPToken(String s, int nTypeCode)\n {\n super(s);\n m_nType = nTypeCode;\n setBindingPower(OPToken.PRECEDENCE_IDENTIFIER);\n }", "Expression createExpression();", "private LiteralToken nextRegularExpressionLiteralToken() {\n LiteralToken token = scanner.nextRegularExpressionLiteralToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "public Expression() {\r\n\t\ttext = new StringBuffer();\r\n\t\txttext = new StringBuffer();\r\n\t}", "IterateExp createIterateExp();", "public Tokenizer() {\r\n tokenList = new ArrayList<>();\r\n\r\n mathOperations = new ArrayList<>(5);\r\n mathOperations.add(\"+\");\r\n mathOperations.add(\"-\");\r\n mathOperations.add(\"*\");\r\n mathOperations.add(\"/\");\r\n mathOperations.add(\"%\");\r\n theBuilder = new TokenBuilder(\"\\\\s+\", mathOperations);\r\n }", "public Competence(){\n this(1,new BigValue(Constant.EXP_CHAR));\n }", "private Clause make(Literal... e) {\n Clause c = new Clause();\n for (int i = 0; i < e.length; ++i) {\n c = c.add(e[i]);\n }\n return c;\n }", "LWordConstant createLWordConstant();", "TupleLiteralExp createTupleLiteralExp();", "Exp getArrayExp();", "<C, PM> LetExp<C, PM> createLetExp();", "private Operand parseFactor() {\n Operand operand = new Operand(SymbolTable.OBJECT_NONE);\n switch (nextToken.kind) {\n case Token.IDENT:\n operand = parseDesignator();\n\n if (nextToken.kind == Token.LPAR) {\n if (operand.kind != Operand.KIND_METHOD) {\n error(\"Illegal method call\");\n }\n parseActPars(operand.object);\n if (operand.object == SymbolTable.OBJECT_LEN) {\n code.put(Code.OP_ARRAYLENGTH);\n } else if(operand.object != SymbolTable.OBJECT_CHR\n && operand.object != SymbolTable.OBJECT_ORD) {\n code.put(Code.OP_CALL);\n code.put2(operand.address);\n }\n } else {\n code.load(operand);\n }\n\n break;\n case Token.NUMBER:\n check(Token.NUMBER);\n operand = new Operand(token.value);\n operand.type = SymbolTable.STRUCT_INT;\n code.load(new Operand(token.value));\n break;\n case Token.CHAR_CONST:\n check(Token.CHAR_CONST);\n operand = new Operand(token.value);\n operand.type = SymbolTable.STRUCT_CHAR;\n code.load(new Operand(token.value));\n break;\n case Token.NEW:\n check(Token.NEW);\n check(Token.IDENT);\n SymObject object = find(token.string);\n assertIsType(object);\n Struct type = object.type;\n if (nextToken.kind == Token.LBRACK) {\n check(Token.LBRACK);\n Struct sizeType = parseExpr().type;\n if (sizeType != SymbolTable.STRUCT_INT) {\n error(\"Array size must be an int\");\n }\n check(Token.RBRACK);\n type = new Struct(Struct.KIND_ARRAY, type);\n\n code.put(Code.OP_NEWARRAY);\n if (type.elementsType == SymbolTable.STRUCT_CHAR) {\n code.put(0);\n } else {\n code.put(1);\n }\n } else {\n if (type.kind != Struct.KIND_CLASS) {\n error(\"Illegal instantiation: type isn't a class\");\n }\n\n code.put(Code.OP_NEW);\n code.put2(type.fields.size());\n }\n operand = new Operand(Operand.KIND_EXPR, -1, type);\n break;\n case Token.LPAR:\n check(Token.LPAR);\n operand = parseExpr();\n check(Token.RPAR);\n break;\n }\n\n return operand;\n }", "public WxpUnlimitCode() {\n this(DSL.name(\"b2c_wxp_unlimit_code\"), null);\n }", "public Literal setLiteralNumber(Double literalData);", "public Model() {\n operation = new DecimalOperation();\n base = 10;\n newnum = true;\n memory = new Stack<>();\n }", "public interface PerlTokenSets extends PerlElementTypes, MooseElementTypes {\n TokenSet OPERATORS_TOKENSET = TokenSet.create(\n OPERATOR_CMP_NUMERIC,\n OPERATOR_LT_NUMERIC,\n OPERATOR_GT_NUMERIC,\n\n OPERATOR_CMP_STR,\n OPERATOR_LE_STR,\n OPERATOR_GE_STR,\n OPERATOR_EQ_STR,\n OPERATOR_NE_STR,\n OPERATOR_LT_STR,\n OPERATOR_GT_STR,\n\n OPERATOR_HELLIP,\n OPERATOR_FLIP_FLOP,\n OPERATOR_CONCAT,\n\n OPERATOR_PLUS_PLUS,\n OPERATOR_MINUS_MINUS,\n OPERATOR_POW,\n\n OPERATOR_RE,\n OPERATOR_NOT_RE,\n\n //\t\t\tOPERATOR_HEREDOC, // this is an artificial operator, not the real one; fixme uncommenting breaks parsing of print $of <<EOM\n OPERATOR_SHIFT_LEFT,\n OPERATOR_SHIFT_RIGHT,\n\n OPERATOR_AND,\n OPERATOR_OR,\n OPERATOR_OR_DEFINED,\n OPERATOR_NOT,\n\n OPERATOR_ASSIGN,\n\n QUESTION,\n COLON,\n\n OPERATOR_REFERENCE,\n\n OPERATOR_DIV,\n OPERATOR_MUL,\n OPERATOR_MOD,\n OPERATOR_PLUS,\n OPERATOR_MINUS,\n\n OPERATOR_BITWISE_NOT,\n OPERATOR_BITWISE_AND,\n OPERATOR_BITWISE_OR,\n OPERATOR_BITWISE_XOR,\n\n OPERATOR_AND_LP,\n OPERATOR_OR_LP,\n OPERATOR_XOR_LP,\n OPERATOR_NOT_LP,\n\n COMMA,\n FAT_COMMA,\n\n OPERATOR_DEREFERENCE,\n\n OPERATOR_X,\n OPERATOR_FILETEST,\n\n // syntax operators\n OPERATOR_POW_ASSIGN,\n OPERATOR_PLUS_ASSIGN,\n OPERATOR_MINUS_ASSIGN,\n OPERATOR_MUL_ASSIGN,\n OPERATOR_DIV_ASSIGN,\n OPERATOR_MOD_ASSIGN,\n OPERATOR_CONCAT_ASSIGN,\n OPERATOR_X_ASSIGN,\n OPERATOR_BITWISE_AND_ASSIGN,\n OPERATOR_BITWISE_OR_ASSIGN,\n OPERATOR_BITWISE_XOR_ASSIGN,\n OPERATOR_SHIFT_LEFT_ASSIGN,\n OPERATOR_SHIFT_RIGHT_ASSIGN,\n OPERATOR_AND_ASSIGN,\n OPERATOR_OR_ASSIGN,\n OPERATOR_OR_DEFINED_ASSIGN,\n\n OPERATOR_GE_NUMERIC,\n OPERATOR_LE_NUMERIC,\n OPERATOR_EQ_NUMERIC,\n OPERATOR_NE_NUMERIC,\n OPERATOR_SMARTMATCH\n );\n\n TokenSet DEFAULT_KEYWORDS_TOKENSET = TokenSet.create(\n RESERVED_MY,\n RESERVED_OUR,\n RESERVED_STATE,\n RESERVED_LOCAL,\n RESERVED_ELSIF,\n RESERVED_ELSE,\n RESERVED_GIVEN,\n RESERVED_DEFAULT,\n RESERVED_CONTINUE,\n RESERVED_FORMAT,\n RESERVED_SUB,\n RESERVED_PACKAGE,\n RESERVED_USE,\n RESERVED_NO,\n RESERVED_REQUIRE,\n RESERVED_UNDEF,\n RESERVED_PRINT,\n RESERVED_PRINTF,\n RESERVED_SAY,\n RESERVED_GREP,\n RESERVED_MAP,\n RESERVED_SORT,\n RESERVED_DO,\n RESERVED_EVAL,\n RESERVED_GOTO,\n RESERVED_REDO,\n RESERVED_NEXT,\n RESERVED_LAST,\n RESERVED_RETURN,\n\n RESERVED_Y,\n RESERVED_TR,\n RESERVED_Q,\n RESERVED_S,\n RESERVED_M,\n RESERVED_QW,\n RESERVED_QQ,\n RESERVED_QR,\n RESERVED_QX,\n\n RESERVED_IF,\n RESERVED_UNTIL,\n RESERVED_UNLESS,\n RESERVED_FOR,\n RESERVED_FOREACH,\n RESERVED_WHEN,\n RESERVED_WHILE\n );\n\n TokenSet TRY_CATCH_KEYWORDS_TOKENSET = TokenSet.create(\n RESERVED_TRY,\n RESERVED_CATCH,\n RESERVED_FINALLY,\n RESERVED_CATCH_WITH,\n RESERVED_EXCEPT,\n RESERVED_OTHERWISE,\n RESERVED_CONTINUATION\n );\n\n TokenSet METHOD_SIGNATURES_KEYWORDS_TOKENSET = TokenSet.create(\n RESERVED_METHOD,\n RESERVED_FUNC\n );\n\n TokenSet KEYWORDS_TOKENSET = TokenSet.orSet(\n DEFAULT_KEYWORDS_TOKENSET,\n MOOSE_RESERVED_TOKENSET,\n METHOD_SIGNATURES_KEYWORDS_TOKENSET,\n TRY_CATCH_KEYWORDS_TOKENSET\n );\n\n TokenSet ANNOTATIONS_KEYS = TokenSet.create(\n ANNOTATION_DEPRECATED_KEY,\n ANNOTATION_RETURNS_KEY,\n ANNOTATION_OVERRIDE_KEY,\n ANNOTATION_METHOD_KEY,\n ANNOTATION_ABSTRACT_KEY,\n ANNOTATION_INJECT_KEY,\n ANNOTATION_NOINSPECTION_KEY,\n ANNOTATION_TYPE_KEY\n\n );\n\n TokenSet STRING_CONTENT_TOKENSET = TokenSet.create(\n STRING_CONTENT,\n STRING_CONTENT_XQ,\n STRING_CONTENT_QQ\n );\n\n TokenSet HEREDOC_BODIES_TOKENSET = TokenSet.create(\n HEREDOC,\n HEREDOC_QQ,\n HEREDOC_QX\n );\n\n\n TokenSet QUOTE_MIDDLE = TokenSet.create(REGEX_QUOTE, REGEX_QUOTE_E);\n\n TokenSet QUOTE_OPEN_ANY = TokenSet.orSet(\n TokenSet.create(REGEX_QUOTE_OPEN, REGEX_QUOTE_OPEN_E),\n PerlParserUtil.OPEN_QUOTES,\n QUOTE_MIDDLE\n );\n\n TokenSet QUOTE_CLOSE_FIRST_ANY = TokenSet.orSet(\n TokenSet.create(REGEX_QUOTE_CLOSE),\n QUOTE_MIDDLE,\n CLOSE_QUOTES\n );\n\n TokenSet QUOTE_CLOSE_PAIRED = TokenSet.orSet(\n CLOSE_QUOTES,\n TokenSet.create(REGEX_QUOTE_CLOSE)\n );\n\n TokenSet SIGILS = TokenSet.create(\n SIGIL_SCALAR, SIGIL_ARRAY, SIGIL_HASH, SIGIL_GLOB, SIGIL_CODE, SIGIL_SCALAR_INDEX\n );\n\n TokenSet STATEMENTS = TokenSet.create(\n STATEMENT, USE_STATEMENT, NO_STATEMENT\n );\n\n TokenSet LAZY_CODE_BLOCKS = TokenSet.create(LP_CODE_BLOCK, LP_CODE_BLOCK_WITH_TRYCATCH);\n\n TokenSet LAZY_PARSABLE_REGEXPS = TokenSet.create(\n LP_REGEX_REPLACEMENT,\n LP_REGEX,\n LP_REGEX_X,\n LP_REGEX_XX\n );\n\n TokenSet HEREDOC_ENDS = TokenSet.create(HEREDOC_END, HEREDOC_END_INDENTABLE);\n /**\n * Quote openers with three or four quotes\n */\n TokenSet COMPLEX_QUOTE_OPENERS = TokenSet.create(\n RESERVED_S,\n RESERVED_TR,\n RESERVED_Y\n );\n TokenSet SIMPLE_QUOTE_OPENERS = TokenSet.create(\n RESERVED_Q,\n RESERVED_QQ,\n RESERVED_QX,\n RESERVED_QW,\n RESERVED_QR,\n RESERVED_M\n );\n}", "AExpArgs createAExpArgs();", "protected RealExpression() {\r\n super();\r\n }", "public Literal createLiteral(float b) throws ModelException{\n\n return createLiteral(String.valueOf(b));\n }", "private Token number() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\twhile(isDigit(this.currentChar) && this.pos != Integer.MIN_VALUE) {\n\t\t\tsb.append(this.currentChar);\n\t\t\tnext_char();\n\t\t}\n\t\t//处理小数\n\t\tif(this.currentChar == '.') {\n\t\t\tsb.append(this.currentChar);\n\t\t\tnext_char();\n\t\t\t\n\t\t\twhile(isDigit(this.currentChar) && this.pos != Integer.MIN_VALUE) {\n\t\t\t\tsb.append(this.currentChar);\n\t\t\t\tnext_char();\n\t\t\t}\n\t\t\treturn new Token(Type.REAL_CONST, sb.toString());\n\t\t}else {\n\t\t\treturn new Token(Type.INTEGER_CONST, sb.toString());\n\t\t}\n\t}", "public Spill() {\n\t\tthis(0, null);\n\t}", "private ParseTree parseObjectLiteral() {\n SourcePosition start = getTreeStartLocation();\n ImmutableList.Builder<ParseTree> result = ImmutableList.builder();\n\n eat(TokenType.OPEN_CURLY);\n Token commaToken = null;\n while (peek(TokenType.ELLIPSIS) || peekPropertyNameOrComputedProp(0) || peek(TokenType.STAR)) {\n result.add(parsePropertyAssignment());\n commaToken = eatOpt(TokenType.COMMA);\n if (commaToken == null) {\n break;\n }\n }\n eat(TokenType.CLOSE_CURLY);\n\n maybeReportTrailingComma(commaToken);\n\n return new ObjectLiteralExpressionTree(\n getTreeLocation(start), result.build(), commaToken != null);\n }", "LengthScalarMultiply createLengthScalarMultiply();", "<C, P> TupleLiteralExp<C, P> createTupleLiteralExp();", "public VariablePrimitive(String nom) {\n\t\tsuper(nom, true);\n\t}", "public Literal createLiteral(byte b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "public Expression(Expression exp) {\r\n\t\tconcat(exp);\r\n\t\ttext = new StringBuffer(new String(exp.text));\r\n\t}", "@Test\r\n public void test1(){\r\n Exp one = new NumericLiteral(1);\r\n Exp three = new NumericLiteral(3);\r\n Exp exp = new PlusExp(one, three);\r\n Stmt decl = new DeclStmt(\"x\");\r\n Stmt assign = new Assignment(\"x\", exp);\r\n Stmt seq = new Sequence(decl, assign);\r\n assertEquals(seq.text(), \"var x; x = 1 + 3\");\r\n }", "JavaExpression createJavaExpression();", "public Snippet visit(PowExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t Snippet f6 = n.identifier1.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t _ret.returnTemp = \"Math.pow(\"+f4.returnTemp+\", \"+f6.returnTemp+\")\";\n\t return _ret;\n\t }", "public LiteralOPToken(String s, int nTypeCode, String sNudASTName)\n {\n this(s, nTypeCode);\n m_sNudASTName = sNudASTName;\n }", "String getLiteral();", "String getLiteral();", "private ProgrammingLanguage(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "final public ASTExpression Expression() throws ParseException {\r\n /*@bgen(jjtree) Expression */\r\n ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION);\r\n boolean jjtc000 = true;\r\n jjtree.openNodeScope(jjtn000);\r\n try {\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case QUOTE:\r\n StringLiteral();\r\n jj_consume_token(61);\r\n jjtree.closeNodeScope(jjtn000, true);\r\n jjtc000 = false;\r\n {if (true) return jjtn000;}\r\n break;\r\n case IDENTIFIER:\r\n case INTEGER:\r\n case NOT:\r\n case SUB:\r\n case FLOATING_POINT_LITERAL:\r\n case 59:\r\n LogicalORExpression();\r\n jjtree.closeNodeScope(jjtn000, true);\r\n jjtc000 = false;\r\n {if (true) return jjtn000;}\r\n break;\r\n default:\r\n jj_la1[45] = jj_gen;\r\n jj_consume_token(-1);\r\n throw new ParseException();\r\n }\r\n } catch (Throwable jjte000) {\r\n if (jjtc000) {\r\n jjtree.clearNodeScope(jjtn000);\r\n jjtc000 = false;\r\n } else {\r\n jjtree.popNode();\r\n }\r\n if (jjte000 instanceof RuntimeException) {\r\n {if (true) throw (RuntimeException)jjte000;}\r\n }\r\n if (jjte000 instanceof ParseException) {\r\n {if (true) throw (ParseException)jjte000;}\r\n }\r\n {if (true) throw (Error)jjte000;}\r\n } finally {\r\n if (jjtc000) {\r\n jjtree.closeNodeScope(jjtn000, true);\r\n }\r\n }\r\n throw new Error(\"Missing return statement in function\");\r\n }", "Exp getSubscriptExp();", "JannotTreeJCBinary(InfixExpression n) \n{\n super(n);\n}", "public Builder clearMaxEXP() {\n bitField0_ = (bitField0_ & ~0x00000004);\n maxEXP_ = 0;\n onChanged();\n return this;\n }", "public Snippet visit(ExpExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t _ret.returnTemp = \"Math.exp(\"+f4.returnTemp+\")\";\n\t return _ret;\n\t }", "public AncientEgyptianMultiplication( ) {\r\n }", "Expr createExpr();", "public boolean isLiteral() {\n return false;\n }", "public Builder clearMaxEXP() {\n bitField0_ = (bitField0_ & ~0x00020000);\n maxEXP_ = 0;\n onChanged();\n return this;\n }", "public InfixField(int num, String val) {\n tagNum = num + \"\";\n tagVal = val;\n }", "void setMaxStringLiteralSize(int value);", "public void lexBuiltinInstances() {\n\t\tupdateLongestLength(artBuiltin_CHAR_SQ(characterStringInputIndex), ART_TB_CHAR_SQ);\n\t\tupdateLongestLength(artBuiltin_ID(characterStringInputIndex), ART_TB_ID);\n\t\tupdateLongestLength(artBuiltin_INTEGER(characterStringInputIndex), ART_TB_INTEGER);\n\t\tupdateLongestLength(artBuiltin_REAL(characterStringInputIndex), ART_TB_REAL);\n\t\tupdateLongestLength(artBuiltin_STRING_DQ(characterStringInputIndex), ART_TB_STRING_DQ);\n\t}", "protected UnaryExpNode(ExpNode expr) {\n this.expr = expr;\n }", "Exp\ngetExp2();", "Multiply createMultiply();", "public static NumberAmount create(){\n NumberAmount NA = new NumberAmount(new AdvancedOperations(Digit.Zero()));\n return NA;\n }", "private Template(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "Exp\ngetExp1();", "public Expression() {\r\n }", "public NumericEntityUnescaper(OPTION... options) {\n/* 60 */ if (options.length > 0) {\n/* 61 */ this.options = EnumSet.copyOf(Arrays.asList(options));\n/* */ } else {\n/* 63 */ this.options = EnumSet.copyOf(Arrays.asList(new OPTION[] { OPTION.semiColonRequired }));\n/* */ } \n/* */ }" ]
[ "0.85912305", "0.6775634", "0.65183365", "0.6342023", "0.6121845", "0.60624224", "0.60566175", "0.60184336", "0.60184336", "0.600795", "0.5888964", "0.5885799", "0.5858769", "0.58525854", "0.5846383", "0.5838445", "0.57284915", "0.56690025", "0.5621938", "0.56092846", "0.5549078", "0.5460282", "0.544621", "0.54191625", "0.5387749", "0.5387749", "0.5383676", "0.53634375", "0.5355955", "0.5334791", "0.53143495", "0.52897877", "0.5288526", "0.52884704", "0.5272193", "0.52680767", "0.5258689", "0.5227314", "0.51980144", "0.5185233", "0.51768285", "0.5164277", "0.51383764", "0.51020163", "0.50882316", "0.5086531", "0.50778854", "0.50628", "0.5044062", "0.50416124", "0.5025175", "0.50246906", "0.49788406", "0.49661422", "0.4963369", "0.49441466", "0.49405053", "0.49169666", "0.4916728", "0.49113238", "0.49092674", "0.48834488", "0.48693275", "0.4866266", "0.48646596", "0.48618352", "0.4851001", "0.4849526", "0.48415288", "0.48414013", "0.4831719", "0.48294565", "0.4822313", "0.4807986", "0.47974658", "0.47941387", "0.479187", "0.47907305", "0.47907305", "0.4782176", "0.47789937", "0.47586668", "0.47460914", "0.4741454", "0.47409424", "0.4738226", "0.47334182", "0.47333533", "0.47332737", "0.47256163", "0.4709253", "0.4698895", "0.4687007", "0.46551606", "0.46547702", "0.4652675", "0.46521652", "0.46406996", "0.46367487", "0.4630004" ]
0.8467763
1
Returns a new object of class 'Invalid Literal Exp'.
<C> InvalidLiteralExp<C> createInvalidLiteralExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "InvalidLiteralExp createInvalidLiteralExp();", "UndefinedLiteralExp createUndefinedLiteralExp();", "RealLiteralExp createRealLiteralExp();", "StringLiteralExp createStringLiteralExp();", "public LiteralExpression (String str){\n _value = str;\n }", "Literal createLiteral();", "Literal createLiteral();", "public final EObject ruleInvalidLiteralExpCS() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:7147:2: ( ( () otherlv_1= 'invalid' ) )\n // InternalMyDsl.g:7148:2: ( () otherlv_1= 'invalid' )\n {\n // InternalMyDsl.g:7148:2: ( () otherlv_1= 'invalid' )\n // InternalMyDsl.g:7149:3: () otherlv_1= 'invalid'\n {\n // InternalMyDsl.g:7149:3: ()\n // InternalMyDsl.g:7150:4: \n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t/* */\n \t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getInvalidLiteralExpCSAccess().getInvalidLiteralExpCSAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n }\n\n }\n\n otherlv_1=(Token)match(input,107,FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getInvalidLiteralExpCSAccess().getInvalidKeyword_1());\n \t\t\n }\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public T caseInvalidLiteralExpCS(InvalidLiteralExpCS object) {\r\n return null;\r\n }", "<C> RealLiteralExp<C> createRealLiteralExp();", "IntegerLiteralExp createIntegerLiteralExp();", "LetExp createLetExp();", "<C> StringLiteralExp<C> createStringLiteralExp();", "public Literal createLiteral(char b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "SimpleLiteral createSimpleLiteral();", "TypeLiteralExp createTypeLiteralExp();", "@Test\r\n\tpublic void testInvalid01() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid01\");\r\n\t}", "public Literal createLiteral(double b) throws ModelException{\n\n return createLiteral(String.valueOf(b));\n }", "public final EObject entryRuleInvalidLiteralExpCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleInvalidLiteralExpCS = null;\n\n\n try {\n // InternalMyDsl.g:7134:60: (iv_ruleInvalidLiteralExpCS= ruleInvalidLiteralExpCS EOF )\n // InternalMyDsl.g:7135:2: iv_ruleInvalidLiteralExpCS= ruleInvalidLiteralExpCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getInvalidLiteralExpCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleInvalidLiteralExpCS=ruleInvalidLiteralExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleInvalidLiteralExpCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public Literal createLiteral(int b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "VariableExp createVariableExp();", "Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n SingleQuotedLiteral(),\n DoubleQuotedLiteral()),\n actions.pushLiteralNode());\n }", "@Test\r\n\tpublic void testInvalid02() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid02\");\r\n\t}", "private LiteralToken nextRegularExpressionLiteralToken() {\n LiteralToken token = scanner.nextRegularExpressionLiteralToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "@Test\r\n\tpublic void testInvalid03() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid03\");\r\n\t}", "@Test\r\n\tpublic void testInvalid04() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid04\");\r\n\t}", "@Test\r\n\tpublic void testInvalid09() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid09\");\r\n\t}", "Expression() { }", "<C> UnlimitedNaturalLiteralExp<C> createUnlimitedNaturalLiteralExp();", "public Literal createLiteral(byte b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "<C> NullLiteralExp<C> createNullLiteralExp();", "ExpOperand createExpOperand();", "public synchronized Literal createLiteral(String str) {\n\n // check whether we have it in the registry\n Literal r = (Literal)lmap.get(str);\n if(r == null) {\n r = new LiteralImpl(/*getUnusedNodeID(),*/ str);\n lmap.put(str, r);\n }\n return r;\n }", "@Test\r\n\tpublic void testInvalid07() throws Exception {\r\n\r\n\t\t/*\r\n\t\t * TODO This failure is associated to the bug\r\n\t\t * tudresden.ocl20.pivot.ocl2parser\r\n\t\t * .test.expressions.TestInvalidLiterals.testInvalidPositive02()\r\n\t\t */\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid07\");\r\n\t}", "@Test\r\n\tpublic void testInvalid05() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid05\");\r\n\t}", "public boolean isLiteral() {\n return false;\n }", "public Literal createLiteral(long b) throws ModelException{\n\n return createLiteral(String.valueOf(b));\n }", "public Literal getLiteral();", "public Literal getLiteral();", "<C> IntegerLiteralExp<C> createIntegerLiteralExp();", "@Test(expected = IllegalArgumentException.class)\n public void testComponentNotCreatedIfExpressionIsInvalid()\n {\n ExpressionEvaluator evaluator = new ExpressionEvaluator(EXPRESSION_CONCAT_INVALID);\n assertNull(evaluator);\n }", "static private ArithmeticException exception(String exp, int ofs, String txt) {\r\n return new ArithmeticException(txt+\" at offset \"+ofs+\" in expression \\\"\"+exp+\"\\\"\");\r\n }", "public Literal createLiteral(float b) throws ModelException{\n\n return createLiteral(String.valueOf(b));\n }", "public static Literal of(Source source, Object value) {\n if (value instanceof Literal) {\n return (Literal) value;\n }\n return new Literal(source, value, DataTypes.fromJava(value));\n }", "public Expression(String pExpStr) {\n Queue<Token> tokenQueue = new Queue<>();\n setTokenQueue(tokenQueue);\n Tokenizer tokenizer = new Tokenizer(pExpStr);\n Token prevToken = null;\n Token token = tokenizer.nextToken();\n while (token != null) {\n if (token instanceof SubOperator) {\n token = negationCheck(token, prevToken);\n }\n getTokenQueue().enqueue(token);\n prevToken = token;\n token = tokenizer.nextToken();\n }\n }", "Expression getExp();", "@Test\n public void testConstructorNegativeCost() {\n String name = \"A modifier\";\n int cost = -1;\n\n assertThrows( IllegalArgumentException.class, () -> {\n Modifier m = new Modifier(name, cost) {\n @Override\n public int getValue() {\n return 0;\n }\n };\n });\n }", "public UnaryExpNode() {\n }", "EvaluatorException mo19168b(String str, String str2, int i, String str3, int i2);", "private ProgrammingLanguage(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "private static boolean isValidLiteral(String literal)\r\n\t{\r\n\t\tboolean result = true;\r\n\t\t\r\n\t\tchar[] literalChars = new char[literal.length()];\r\n\t\tliteral.getChars(0, literalChars.length, literalChars, 0);\r\n\t\t\r\n\t\tfor (int i = 0; i < literalChars.length; i++)\r\n\t\t{\r\n\t\t\tif (i == 0 && !Character.isJavaIdentifierStart(literalChars[i]))\r\n\t\t\t{\r\n\t\t\t\tresult = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (i != 0 && !Character.isJavaIdentifierPart(literalChars[i]))\r\n\t\t\t{\r\n\t\t\t\tresult = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "String getLiteral();", "String getLiteral();", "public static String invalidToken() {\n\n return holder.format(\"invalidToken\", \"<HIDDEN>\");\n }", "Lexpr createLexpr();", "public ExprBad(Pos pos, String originalText, Err error) {\n super(pos, null, false, EMPTY, 0, 0, new JoinableList<Err>(error));\n this.originalText = originalText;\n }", "public Literal createLiteral(short b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "@Test\n public void TestLiteralExpr() {\n testLiteralExprPositive(\"false\", Type.BOOLEAN);\n testLiteralExprPositive(\"1\", Type.TINYINT);\n testLiteralExprPositive(\"1\", Type.SMALLINT);\n testLiteralExprPositive(\"1\", Type.INT);\n testLiteralExprPositive(\"1\", Type.BIGINT);\n testLiteralExprPositive(\"1.0\", Type.FLOAT);\n testLiteralExprPositive(\"1.0\", Type.DOUBLE);\n testLiteralExprPositive(\"ABC\", Type.STRING);\n testLiteralExprPositive(\"ABC\", Type.BINARY);\n testLiteralExprPositive(\"1.1\", ScalarType.createDecimalType(2, 1));\n testLiteralExprPositive(\"2001-02-28\", Type.DATE);\n\n // INVALID_TYPE should always fail\n testLiteralExprNegative(\"ABC\", Type.INVALID);\n\n // Invalid casts\n testLiteralExprNegative(\"ABC\", Type.BOOLEAN);\n testLiteralExprNegative(\"ABC\", Type.TINYINT);\n testLiteralExprNegative(\"ABC\", Type.SMALLINT);\n testLiteralExprNegative(\"ABC\", Type.INT);\n testLiteralExprNegative(\"ABC\", Type.BIGINT);\n testLiteralExprNegative(\"ABC\", Type.FLOAT);\n testLiteralExprNegative(\"ABC\", Type.DOUBLE);\n testLiteralExprNegative(\"ABC\", Type.TIMESTAMP);\n testLiteralExprNegative(\"ABC\", ScalarType.createDecimalType());\n testLiteralExprNegative(\"ABC\", Type.DATE);\n // Invalid date test\n testLiteralExprNegative(\"2001-02-31\", Type.DATE);\n\n // DATETIME/TIMESTAMP types not implemented\n testLiteralExprNegative(\"2010-01-01\", Type.DATETIME);\n testLiteralExprNegative(\"2010-01-01\", Type.TIMESTAMP);\n }", "private Template(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "Expression createExpression();", "public OverflowInLiteralWarningMessage(@Nonnull String literalText) {\n super(\"Overflow in literal: \" + Objects.requireNonNull(literalText, \"literalText\"));\n }", "@Test\r\n\tpublic void testInvalid06() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid06\");\r\n\t}", "public InvalidTinyExpressionException() {\n super(\"Not Found or Invalid Tiny Expression\");\n }", "public Literal createLiteral(boolean b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "EnumLiteralExp createEnumLiteralExp();", "protected Evaluable parseFactor() throws ParsingException {\n if (_token == null) {\n throw makeException(\"Expecting something more at end of expression\");\n }\n\n Evaluable eval = null;\n\n if (_token.type == TokenType.String) {\n eval = new LiteralExpr(_token.text);\n next(false);\n } else if (_token.type == TokenType.Regex) {\n RegexToken t = (RegexToken) _token;\n\n try {\n Pattern pattern = Pattern.compile(_token.text, t.caseInsensitive ? Pattern.CASE_INSENSITIVE : 0);\n eval = new LiteralExpr(pattern);\n next(false);\n } catch (Exception e) {\n throw makeException(\"Bad regular expression (\" + e.getMessage() + \")\");\n }\n } else if (_token.type == TokenType.Number) {\n eval = new LiteralExpr(((NumberToken)_token).value);\n next(false);\n } else if (_token.type == TokenType.Operator && _token.text.equals(\"-\")) { // unary minus?\n next(true);\n\n if (_token != null && _token.type == TokenType.Number) {\n Number n = ((NumberToken)_token).value;\n\n eval = new LiteralExpr(n instanceof Long ? -n.longValue() : -n.doubleValue());\n\n next(false);\n } else {\n throw makeException(\"Bad negative number\");\n }\n } else if (_token.type == TokenType.Identifier) {\n String text = _token.text;\n next(false);\n\n if (_token == null || _token.type != TokenType.Delimiter || !_token.text.equals(\"(\")) {\n eval = \"null\".equals(text) ? new LiteralExpr(null) : new VariableExpr(text);\n } else if( \"PI\".equals(text) ) {\n eval = new LiteralExpr(Math.PI);\n next(false);\n } else {\n Function f = ControlFunctionRegistry.getFunction(text);\n Control c = ControlFunctionRegistry.getControl(text);\n if (f == null && c == null) {\n throw makeException(\"Unknown function or control named \" + text);\n }\n\n next(true); // swallow (\n\n List<Evaluable> args = parseExpressionList(\")\");\n\n if (c != null) {\n Evaluable[] argsA = makeArray(args);\n String errorMessage = c.checkArguments(argsA);\n if (errorMessage != null) {\n throw makeException(errorMessage);\n }\n eval = new ControlCallExpr(argsA, c);\n } else {\n eval = new FunctionCallExpr(makeArray(args), f);\n }\n }\n } else if (_token.type == TokenType.Delimiter && _token.text.equals(\"(\")) {\n next(true);\n\n eval = parseExpression();\n\n if (_token != null && _token.type == TokenType.Delimiter && _token.text.equals(\")\")) {\n next(false);\n } else {\n throw makeException(\"Missing )\");\n }\n } else if (_token.type == TokenType.Delimiter && _token.text.equals(\"[\")) { // [ ... ] array\n next(true); // swallow [\n\n List<Evaluable> args = parseExpressionList(\"]\");\n\n eval = new FunctionCallExpr(makeArray(args), new ArgsToArray());\n } else {\n throw makeException(\"Missing number, string, identifier, regex, or parenthesized expression\");\n }\n\n while (_token != null) {\n if (_token.type == TokenType.Operator && _token.text.equals(\".\")) {\n next(false); // swallow .\n\n if (_token == null || _token.type != TokenType.Identifier) {\n throw makeException(\"Missing function name\");\n }\n\n String identifier = _token.text;\n next(false);\n\n if (_token != null && _token.type == TokenType.Delimiter && _token.text.equals(\"(\")) {\n next(true); // swallow (\n\n Function f = ControlFunctionRegistry.getFunction(identifier);\n if (f == null) {\n throw makeException(\"Unknown function \" + identifier);\n }\n\n List<Evaluable> args = parseExpressionList(\")\");\n args.add(0, eval);\n\n eval = new FunctionCallExpr(makeArray(args), f);\n } else {\n eval = new FieldAccessorExpr(eval, identifier);\n }\n } else if (_token.type == TokenType.Delimiter && _token.text.equals(\"[\")) {\n next(true); // swallow [\n\n List<Evaluable> args = parseExpressionList(\"]\");\n args.add(0, eval);\n\n eval = new FunctionCallExpr(makeArray(args), ControlFunctionRegistry.getFunction(\"get\"));\n } else {\n break;\n }\n }\n\n return eval;\n }", "<C, EL> EnumLiteralExp<C, EL> createEnumLiteralExp();", "private static Expression getNumericLiteral(String token, ExceptionMetadata metadataFromContext) {\n if (!token.contains(\".\") && !token.contains(\"e\") && !token.contains(\"E\")) {\n return new IntegerLiteralExpression(Integer.parseInt(token), metadataFromContext);\n }\n if (!token.contains(\"e\") && !token.contains(\"E\")) {\n return new DecimalLiteralExpression(new BigDecimal(token), metadataFromContext);\n }\n return new DoubleLiteralExpression(Double.parseDouble(token), metadataFromContext);\n\n }", "public LiteralOPToken(String s, int nTypeCode)\n {\n super(s);\n m_nType = nTypeCode;\n setBindingPower(OPToken.PRECEDENCE_IDENTIFIER);\n }", "public Equation()\r\n\t{\r\n\t\texpression = \"\";\r\n\t}", "TupleLiteralExp createTupleLiteralExp();", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM = 3 m\", \"0xA0182\");\r\n }", "@Test\r\n\tpublic void testInvalid08() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid08\");\r\n\t}", "private Token scanIllegalCharacter() {\n buffer.add(c);\n Token tok = new Token(buffer.toString(), TokenType.ILLEGAL, new Pair<>(in.line(), in.pos()));\n buffer.flush();\n c = in.read();\n return tok;\n }", "protected static void throwRuntimeFormatException(Exception pExp) {\n\t\tthrow new RuntimeException(pExp);\n\t}", "Expr createExpr();", "public Expression(String expr) {\n this.expr = expr;\n scalars = null;\n arrays = null;\n openingBracketIndex = null;\n closingBracketIndex = null;\n }", "@Test(expectedExceptions = TokenMgrError.class)\n\tpublic void testInvalidToken() throws ParseException {\n\t\tparser(\"<%=foo@bar%>\").block();\n\t}", "public Token(String lexeme, int lineNum, int colNum){\r\n this.kind = \"ERROR\";\r\n this.lexeme = lexeme;\r\n this.lineNum = lineNum;\r\n this.colNum = colNum;\r\n }", "public Expression asExpression() {\n switch (TYPE) {\n case EXPRESSION:\n return EXPRESSION;\n case IDENTIFIER:\n return new Variable(VALUE);\n case LITERAL:\n if (VALUE.matches(\"\\\\d+\")) {\n return new LInteger(Integer.parseInt(VALUE));\n } else if (VALUE.equals(\"true\") || VALUE.equals(\"false\")) {\n return LBoolean.resolve(VALUE.equals(\"true\"));\n } else if (VALUE.equals(\"null\")) {\n return LNull.NULL;\n } else {\n return new LString(VALUE);\n }\n default:\n throw ErrorLog.get(\"Unexpected symbol '%s'\", VALUE);\n }\n }", "public Literal setLiteral(Object literalData);", "public T caseLiteralExpCS(LiteralExpCS object) {\r\n return null;\r\n }", "@Test(expectedExceptions = ParseException.class)\n\tpublic void testInvalidMemberAccess() throws ParseException {\n\t\tparser(\"<%=a()b%>\").block();\n\t}", "@Test(expectedExceptions = ParseException.class)\n\tpublic void testInvalidFunctionCall() throws ParseException {\n\t\tparser(\"<%=f(a,)%>\").block();\n\t}", "public Code visitErrorExpNode(ExpNode.ErrorNode node) { \n errors.fatal(\"PL0 Internal error: generateCode for ErrorExpNode\",\n node.getLocation());\n return null;\n }", "public final EncodedValue literal() throws RecognitionException {\n EncodedValue encodedValue = null;\n\n\n int integer_literal24 = 0;\n long long_literal25 = 0;\n short short_literal26 = 0;\n byte byte_literal27 = 0;\n float float_literal28 = 0.0f;\n double double_literal29 = 0.0;\n char char_literal30 = 0;\n String string_literal31 = null;\n boolean bool_literal32 = false;\n String type_descriptor33 = null;\n List<EncodedValue> array_literal34 = null;\n TreeRuleReturnScope subannotation35 = null;\n FieldReference field_literal36 = null;\n MethodReference method_literal37 = null;\n FieldReference enum_literal38 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:272:3: ( integer_literal | long_literal | short_literal | byte_literal | float_literal | double_literal | char_literal | string_literal | bool_literal | NULL_LITERAL | type_descriptor | array_literal | subannotation | field_literal | method_literal | enum_literal )\n int alt9 = 16;\n switch (input.LA(1)) {\n case INTEGER_LITERAL: {\n alt9 = 1;\n }\n break;\n case LONG_LITERAL: {\n alt9 = 2;\n }\n break;\n case SHORT_LITERAL: {\n alt9 = 3;\n }\n break;\n case BYTE_LITERAL: {\n alt9 = 4;\n }\n break;\n case FLOAT_LITERAL: {\n alt9 = 5;\n }\n break;\n case DOUBLE_LITERAL: {\n alt9 = 6;\n }\n break;\n case CHAR_LITERAL: {\n alt9 = 7;\n }\n break;\n case STRING_LITERAL: {\n alt9 = 8;\n }\n break;\n case BOOL_LITERAL: {\n alt9 = 9;\n }\n break;\n case NULL_LITERAL: {\n alt9 = 10;\n }\n break;\n case ARRAY_DESCRIPTOR:\n case CLASS_DESCRIPTOR:\n case PRIMITIVE_TYPE:\n case VOID_TYPE: {\n alt9 = 11;\n }\n break;\n case I_ENCODED_ARRAY: {\n alt9 = 12;\n }\n break;\n case I_SUBANNOTATION: {\n alt9 = 13;\n }\n break;\n case I_ENCODED_FIELD: {\n alt9 = 14;\n }\n break;\n case I_ENCODED_METHOD: {\n alt9 = 15;\n }\n break;\n case I_ENCODED_ENUM: {\n alt9 = 16;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 9, 0, input);\n throw nvae;\n }\n switch (alt9) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:272:5: integer_literal\n {\n pushFollow(FOLLOW_integer_literal_in_literal442);\n integer_literal24 = integer_literal();\n state._fsp--;\n\n encodedValue = new ImmutableIntEncodedValue(integer_literal24);\n }\n break;\n case 2:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:273:5: long_literal\n {\n pushFollow(FOLLOW_long_literal_in_literal450);\n long_literal25 = long_literal();\n state._fsp--;\n\n encodedValue = new ImmutableLongEncodedValue(long_literal25);\n }\n break;\n case 3:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:274:5: short_literal\n {\n pushFollow(FOLLOW_short_literal_in_literal458);\n short_literal26 = short_literal();\n state._fsp--;\n\n encodedValue = new ImmutableShortEncodedValue(short_literal26);\n }\n break;\n case 4:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:275:5: byte_literal\n {\n pushFollow(FOLLOW_byte_literal_in_literal466);\n byte_literal27 = byte_literal();\n state._fsp--;\n\n encodedValue = new ImmutableByteEncodedValue(byte_literal27);\n }\n break;\n case 5:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:276:5: float_literal\n {\n pushFollow(FOLLOW_float_literal_in_literal474);\n float_literal28 = float_literal();\n state._fsp--;\n\n encodedValue = new ImmutableFloatEncodedValue(float_literal28);\n }\n break;\n case 6:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:277:5: double_literal\n {\n pushFollow(FOLLOW_double_literal_in_literal482);\n double_literal29 = double_literal();\n state._fsp--;\n\n encodedValue = new ImmutableDoubleEncodedValue(double_literal29);\n }\n break;\n case 7:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:278:5: char_literal\n {\n pushFollow(FOLLOW_char_literal_in_literal490);\n char_literal30 = char_literal();\n state._fsp--;\n\n encodedValue = new ImmutableCharEncodedValue(char_literal30);\n }\n break;\n case 8:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:279:5: string_literal\n {\n pushFollow(FOLLOW_string_literal_in_literal498);\n string_literal31 = string_literal();\n state._fsp--;\n\n encodedValue = new ImmutableStringEncodedValue(string_literal31);\n }\n break;\n case 9:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:280:5: bool_literal\n {\n pushFollow(FOLLOW_bool_literal_in_literal506);\n bool_literal32 = bool_literal();\n state._fsp--;\n\n encodedValue = ImmutableBooleanEncodedValue.forBoolean(bool_literal32);\n }\n break;\n case 10:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:281:5: NULL_LITERAL\n {\n match(input, NULL_LITERAL, FOLLOW_NULL_LITERAL_in_literal514);\n encodedValue = ImmutableNullEncodedValue.INSTANCE;\n }\n break;\n case 11:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:282:5: type_descriptor\n {\n pushFollow(FOLLOW_type_descriptor_in_literal522);\n type_descriptor33 = type_descriptor();\n state._fsp--;\n\n encodedValue = new ImmutableTypeEncodedValue(type_descriptor33);\n }\n break;\n case 12:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:283:5: array_literal\n {\n pushFollow(FOLLOW_array_literal_in_literal530);\n array_literal34 = array_literal();\n state._fsp--;\n\n encodedValue = new ImmutableArrayEncodedValue(array_literal34);\n }\n break;\n case 13:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:284:5: subannotation\n {\n pushFollow(FOLLOW_subannotation_in_literal538);\n subannotation35 = subannotation();\n state._fsp--;\n\n encodedValue = new ImmutableAnnotationEncodedValue((subannotation35 != null ? ((smaliTreeWalker.subannotation_return) subannotation35).annotationType : null), (subannotation35 != null ? ((smaliTreeWalker.subannotation_return) subannotation35).elements : null));\n }\n break;\n case 14:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:285:5: field_literal\n {\n pushFollow(FOLLOW_field_literal_in_literal546);\n field_literal36 = field_literal();\n state._fsp--;\n\n encodedValue = new ImmutableFieldEncodedValue(field_literal36);\n }\n break;\n case 15:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:286:5: method_literal\n {\n pushFollow(FOLLOW_method_literal_in_literal554);\n method_literal37 = method_literal();\n state._fsp--;\n\n encodedValue = new ImmutableMethodEncodedValue(method_literal37);\n }\n break;\n case 16:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:287:5: enum_literal\n {\n pushFollow(FOLLOW_enum_literal_in_literal562);\n enum_literal38 = enum_literal();\n state._fsp--;\n\n encodedValue = new ImmutableEnumEncodedValue(enum_literal38);\n }\n break;\n\n }\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return encodedValue;\n }", "public IntegerLiteral(Integer number)\n {\n this.literal = number; \n }", "private Equation createEquation() throws MainApplicationException {\r\n\t\tEquation equation = new Equation(false,\r\n\t\t\t\t\"a+b=c\", \r\n\t\t\t\tfalse, \r\n\t\t\t\tnew Parametre(), \r\n\t\t\t\t\"Insérer Propriété\",\r\n\t\t\t\t\"Insérer commentaire\");\r\n\t\tequation.setIsModifiable(true);\r\n\t\treturn equation;\r\n\t}", "<C, P> TupleLiteralExp<C, P> createTupleLiteralExp();", "@Test\r\n public void test1(){\r\n Exp one = new NumericLiteral(1);\r\n Exp three = new NumericLiteral(3);\r\n Exp exp = new PlusExp(one, three);\r\n Stmt decl = new DeclStmt(\"x\");\r\n Stmt assign = new Assignment(\"x\", exp);\r\n Stmt seq = new Sequence(decl, assign);\r\n assertEquals(seq.text(), \"var x; x = 1 + 3\");\r\n }", "final public ASTExpression Expression() throws ParseException {\r\n /*@bgen(jjtree) Expression */\r\n ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION);\r\n boolean jjtc000 = true;\r\n jjtree.openNodeScope(jjtn000);\r\n try {\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case QUOTE:\r\n StringLiteral();\r\n jj_consume_token(61);\r\n jjtree.closeNodeScope(jjtn000, true);\r\n jjtc000 = false;\r\n {if (true) return jjtn000;}\r\n break;\r\n case IDENTIFIER:\r\n case INTEGER:\r\n case NOT:\r\n case SUB:\r\n case FLOATING_POINT_LITERAL:\r\n case 59:\r\n LogicalORExpression();\r\n jjtree.closeNodeScope(jjtn000, true);\r\n jjtc000 = false;\r\n {if (true) return jjtn000;}\r\n break;\r\n default:\r\n jj_la1[45] = jj_gen;\r\n jj_consume_token(-1);\r\n throw new ParseException();\r\n }\r\n } catch (Throwable jjte000) {\r\n if (jjtc000) {\r\n jjtree.clearNodeScope(jjtn000);\r\n jjtc000 = false;\r\n } else {\r\n jjtree.popNode();\r\n }\r\n if (jjte000 instanceof RuntimeException) {\r\n {if (true) throw (RuntimeException)jjte000;}\r\n }\r\n if (jjte000 instanceof ParseException) {\r\n {if (true) throw (ParseException)jjte000;}\r\n }\r\n {if (true) throw (Error)jjte000;}\r\n } finally {\r\n if (jjtc000) {\r\n jjtree.closeNodeScope(jjtn000, true);\r\n }\r\n }\r\n throw new Error(\"Missing return statement in function\");\r\n }", "@Test(timeout = 4000)\n public void test234() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n ElExpression elExpression0 = new ElExpression(\"H<lw\\\"i?P_Tss-Hw\");\n // Undeclared exception!\n try { \n errorPage0.em((Object) elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Could not evaluate expression H<lw\\\"i?P_Tss-Hw in class wheel.ErrorPage\n //\n verifyException(\"wheel.components.ElExpression\", e);\n }\n }", "@Test\n public void testConstructorEmptyName() {\n String name = \"\";\n int cost = 10;\n\n assertThrows( IllegalArgumentException.class, () -> {\n Modifier m = new Modifier(name, cost) {\n @Override\n public int getValue() {\n return 0;\n }\n };\n });\n }", "<C, PM> LetExp<C, PM> createLetExp();", "public Object visit(LiteralExp host, Object data) {\r\n\t\tthrow new RuntimeException(\"Should not be here!\");\r\n\t}", "public Expression() {\r\n }", "public ExpressionGuard(final String expression)\n throws InvalidExpressionException, IllegalArgumentException {\n if (expression == null) {\n throw new IllegalArgumentException(\"`expression' must not be null.\");\n }\n try {\n this.compiledExpression = MVEL.compileExpression(expression);\n this.expression = expression;\n } catch (final CompileException exc) {\n throw new InvalidExpressionException(exc);\n }\n }", "public LiteralOPToken(String s, int nTypeCode, String sNudASTName)\n {\n this(s, nTypeCode);\n m_sNudASTName = sNudASTName;\n }", "@Override\r\n public Literal newLiteral(PObj[] data) {\r\n String symbol = ((Constant) data[0]).getObject().toString();\r\n PObj[] fixed = new PObj[data.length - 1];\r\n System.arraycopy(data, 1, fixed, 0, fixed.length);\r\n PList terms = ProvaListImpl.create(fixed);\r\n return newLiteral(symbol, terms);\r\n }", "public Expression() {\r\n\t\ttext = new StringBuffer();\r\n\t\txttext = new StringBuffer();\r\n\t}" ]
[ "0.87068117", "0.6962074", "0.69394886", "0.65983576", "0.6517249", "0.6501663", "0.6501663", "0.641876", "0.63767797", "0.6304415", "0.6287691", "0.6237074", "0.6016732", "0.6015277", "0.5957618", "0.59372014", "0.5918604", "0.5798058", "0.5762326", "0.57456523", "0.5727518", "0.571044", "0.56985474", "0.5672421", "0.56607676", "0.5640883", "0.5636398", "0.5630612", "0.56291234", "0.5583096", "0.55740017", "0.55681014", "0.5552726", "0.5544635", "0.55366653", "0.5531627", "0.55272186", "0.5499789", "0.5499789", "0.54702425", "0.54284453", "0.5419116", "0.5405429", "0.54041094", "0.53755057", "0.5368409", "0.5359134", "0.5354847", "0.53492945", "0.5339995", "0.53351665", "0.53341913", "0.53341913", "0.5318072", "0.5309128", "0.53088266", "0.5301279", "0.52957326", "0.5288515", "0.52777225", "0.5273692", "0.5266049", "0.525792", "0.52532274", "0.5248344", "0.524366", "0.5232926", "0.52173775", "0.52114695", "0.5201198", "0.5200293", "0.519441", "0.51915014", "0.51875585", "0.51864725", "0.5172706", "0.5169319", "0.51664", "0.5166299", "0.51629466", "0.51614213", "0.515648", "0.51548994", "0.515265", "0.51510996", "0.5144821", "0.51443666", "0.51415676", "0.51374424", "0.51343113", "0.5128893", "0.51160234", "0.51139444", "0.511035", "0.51056176", "0.51049364", "0.51035964", "0.5098785", "0.50950336", "0.5082766" ]
0.81262153
1
Returns a new object of class 'Iterate Exp'.
<C, PM> IterateExp<C, PM> createIterateExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IterateExp createIterateExp();", "IteratorExp createIteratorExp();", "<C, PM> IteratorExp<C, PM> createIteratorExp();", "public Iterator<T> iterator() {\r\n \r\n return new Iteration();\r\n }", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "public IterI(){\n }", "public abstract Iterator<E> createIterator();", "public MyIterator(ExperimentList exp){ // experiment list constructor.\r\n this.exp = exp;\r\n }", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "public Iterator<E> iterator(){\r\n return new IteratorHelper();\r\n }", "public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }", "public SList_Iterator<T> iterator() {\n return new iterator();\n }", "public Iterator<Item> iterator(){\n return new Iterator<Item>(); //Iterator interface implementation instance(has all Iterator methods)\n }", "@Override\r\n public Iterator iterator(){\n return new MyIterator(this);\r\n }", "public Iterator iterator () {\n return new MyIterator (first);\n }", "public Iterator<Item> iterator() {\n return new AIterator();\n }", "public IterR(){\n }", "@Override\n public Iterator<Integer> iterator() {\n return new IteratorImplementation();\n }", "public Iterator<E> iterator()\n {\n return new MyListIterator();\n }", "public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }", "public Repeat(Expression exp, Method callingMethod){\n\t\tsuper(callingMethod);\n\t\tthis.exp = exp;\n\t}", "@Override\n public Iterator<Object> iterator() {\n return new MyIterator();\n }", "@Override\n public Iterator<E> iterator() {\n return new ArrayIterator(); // create a new instance of the inner class\n }", "public RunIterator iterator() {\n // Replace the following line with your solution.\n return new RunIterator(runs.getFirst());\n // You'll want to construct a new RunIterator, but first you'll need to\n // write a constructor in the RunIterator class.\n \n \n }", "public static <T> Iterable<T> iter(final Iterator<T> i) {\n\t\treturn new Iterable<T>() {\n\n\t\t\t@Override\n\t\t\tpublic Iterator<T> iterator() {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t};\n\t}", "public Iterator<T> iterator() {\n\t\treturn new ReferentIterator();\n\t}", "public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}", "public Iterator<E> iterator() {\n\t\treturn new Itr();\n\t}", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "public Iterator<V> iterator()\n {\n return new Iterator<V>()\n {\n public boolean hasNext()\n {\n // STUB\n return false;\n } // hasNext()\n\n public V next()\n {\n // STUB\n return null;\n } // next()\n\n public void remove()\n throws UnsupportedOperationException\n {\n throw new UnsupportedOperationException();\n } // remove()\n }; // new Iterator<V>\n }", "public ASTNodeIterator iterator()\n {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = expression;\n return I;\n }", "public T iterator();", "public Iterator<Item> iterator() {\n return new Iterator<Item>() {\n public boolean hasNext() {\n return false;\n }\n\n public Item next() {\n return null;\n }\n };\n }", "public Iterator<Item> iterator() { return new ListIterator(); }", "public Iterator iterator() {\n maintain();\n return new MyIterator(collection.iterator());\n }", "public Iterator<Item> iterator() { \n return new ListIterator(); \n }", "public zzeiu iterator() {\n return new zzeio(this);\n }", "public Iterator<Item> iterator() {\n return new RandomIterator(N, a);\n }", "@Override\n public Iterator<E> iterator() {\n return new ElementIterator();\n }", "public Iterator<T> iterator()\n\t{\n\t\treturn new Iterator<T>()\n\t\t{\n\t\t\tNode<T> actual = head;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn actual != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic T next() \n\t\t\t{\n\t\t\t\tif(hasNext())\n\t\t\t\t{\n\t\t\t\t\tT data = actual.getElement();\n\t\t\t\t\tactual = actual.getNext();\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t}", "public Iterator<BigInteger> iterator() {\n // return new FibIterator();\n return new Iterator<BigInteger>() {\n private BigInteger previous = BigInteger.valueOf(-1);\n private BigInteger current = BigInteger.ONE;\n private int index = 0;\n \n \n @Override\n //if either true will stop, evaluates upper < 0 first (short circuit)\n public boolean hasNext() {\n return upper < 0 || index < upper;\n }\n\n @Override\n //Creating a new value called next\n public BigInteger next() {\n BigInteger next = previous.add(current);\n previous = current;\n current = next;\n index++;\n return current;\n }\n \n };\n }", "public Iterator<Object[]> getIterator()\n\t{\n\t\tinit();\n\t\t\n\t\treturn new SimpleIterator();\n\t}", "@Override\n public Iterator<T> iterator() {\n return new MyArrayList.MyIterator();\n }", "@Override\n\tpublic Iterator createIterator() {\n\t\treturn new WeaponListIterator(weaponList);\n\t}", "@Override\n public Iterator<E> iterator() {\n return new Iterator<E>() {\n private int nextIndex = 0;\n private int lastNextIndex = -1;\n private int rest = size();\n\n @Override\n public boolean hasNext() {\n return rest > 0;\n }\n\n @Override\n public E next() {\n if(!hasNext()){\n throw new NoSuchElementException();\n }\n rest--;\n lastNextIndex = nextIndex++;\n siftDown(nextIndex);\n\n return (E) array[lastNextIndex];\n }\n\n @Override\n public void remove() {\n if (lastNextIndex == -1) {\n throw new IllegalStateException();\n }\n removeElement(lastNextIndex);\n nextIndex--;\n lastNextIndex = -1;\n }\n };\n }", "public FlightIterator createIterator() {\r\n\t\treturn new FlightIterator(flights);\r\n\t}", "public Iterator<Item> iterator() { return new RandomIterator();}", "@Override\n\tpublic Iterator<NumberInterface> createIterator() {\n\t\treturn numbers.iterator();\n\t}", "public Iterator<Item> iterator() {\n return new RandomizedIterator();\n }", "Foreach createForeach();", "public IterName(){\n }", "IteratorExpVariableCS getIteratorVariable();", "@Override public java.util.Iterator<Function> iterator() {return new JavaIterator(begin(), end()); }", "@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "Iterator<T> iterator();", "@Override\n public Iterator<T> iterator() {\n return new IteratorTree(this.root, this.modCount);\n }", "@Override\n public Iterator<E> iterator() {\n // Yup.\n Iterator<E> ans = new Iterator<E>(){\n private int curIndex = 0;\n\n @Override\n public boolean hasNext(){\n return curIndex < size && queue[curIndex] != null;\n }\n @Override\n public E next(){\n return (E)queue[curIndex++];\n }\n public void remove(){\n // No.\n }\n };\n return ans;\n }", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "@Override\n public Iterator<T> impNiveles(){\n return (super.impNiveles());\n }", "public Iterator<T> getIterator() {\n return new Iterator(this);\n }", "public Iterator<T> iterator() {\n return new ListIterator<T>(this);\n }", "public Iterator<T> iterator() {\n return new ListIterator<T>(this);\n }", "public Iterator<T> iterator() {\r\n return byGenerations();\r\n }", "public Iterator<Type> iterator();", "Iterator<E> iterator();", "Iterator<E> iterator();", "public T caseIterateExpCS(IterateExpCS object) {\r\n return null;\r\n }", "@Override\n public Iterator<T> iterator() {\n return new Iterator<T>() {\n int index = 0;\n\n @Override\n public boolean hasNext() {\n return index < size;\n }\n\n @Override\n public T next() {\n return genericArrayList[index++];\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }", "public PTIterator iterator() {\n if (iterator == null && isValid())\n iterator = new PTIteratorImpl(handle);\n return iterator;\n }", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "public Iterator()\n {\n this(null, null, true);\n }", "public Iterator()\n {\n this(null, null, true);\n }", "public Iterator()\n {\n this(null, null, true);\n }", "public Iterator <T> iterator (){\n\t\t// create and return an instance of the inner class IteratorImpl\n\t\t\t\treturn new HashAVLTreeIterator();\n\t}", "@Override\n\tpublic final Iterator<T> iterator() {\n\t\treturn new IteratorImpl<>(value.get());\n\t}", "public static final Iterator repeat(final Object o, final int times) {\n return new Iterator() {\n int i = times;\n\n /*\n * (non-Javadoc)\n * \n * @see java.util.Iterator#hasNext()\n */\n public final boolean hasNext() {\n return this.i > 0;\n }\n\n /*\n * (non-Javadoc)\n * \n * @see java.util.Iterator#next()\n */\n public final Object next() {\n if (this.i-- <= 0) {\n\t\t\t\t\tthrow new NoSuchElementException();\n\t\t\t\t}\n return o;\n }\n\n /*\n * (non-Javadoc)\n * \n * @see java.util.Iterator#remove()\n */\n public final void remove() {\n throw new RuntimeException(\"Not yet implemented\");\n }\n };\n }", "public Iterator<Item> iterator() {\n return new CustomIterator<Item>(head);\n }", "public VectorStackWithIterator() {\n\t\tthis(10);\n\t}", "public Iterator<Item> iterator(){\n return new ArrayIterator();\n }", "public Iterator<Item> iterator() {\n\t\treturn new ListIterator(); \n\t\t}", "public SearchingIterator getIterator(Object key)\r\n\t{\r\n\t\tSearchingIterator x = new SearchingIterator(key); \r\n\t\treturn x; \r\n\t}", "public final Iterable getChainingIterator() {\n\t// TODO: Implemente the chaining iterator and add generic type to Iterable. I suppose it is this class.\n\tthrow new IllegalAccessError(\"Not implemented yet\");\n }", "public Iterator<I> getReservables(){\n IterI iter = new IterI();\n return iter;\n }", "public Iterator<Item> iterator() {\n Item[] temp = (Item[]) new Object[size];\n System.arraycopy(array, 0, temp, 0, size);\n return (new RandomIterator(temp));\n }", "@Override\n public Iterator<Integer> iterator() {\n return new Iterator<>() {\n int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < Set.this.count;\n }\n\n @Override\n public Integer next() {\n return Set.this.arr[i++];\n }\n };\n }", "public Iterator<Item> iterator()\r\n {\r\n return new ListIterator();\r\n }", "public final Iterator iterator() {\n return new WellsIterator(this);\n }", "@Override\n\tpublic Iterator<Item> iterator() {\n\t\treturn new StackIter();\n\t}", "public Iterator<T> iterator() {\n if (this.nrOfElements == 0) {\n return Collections.<T>emptyList().iterator();\n }\n return new Iterator<T>() {\n private Node walker = null;\n\n @Override\n public boolean hasNext() {\n return walker != last;\n }\n\n @Override\n public T next() {\n if (this.walker == null) {\n this.walker = first;\n return this.walker.getData();\n }\n\n if (this.walker.getNext() == null) {\n throw new NoSuchElementException();\n }\n\n this.walker = this.walker.getNext();\n return this.walker.getData();\n }\n };\n }", "public int getIteration();", "@Override\n public Iterator<E> iterator() {\n return new SimpleArrayListIterator<E>();\n }", "public static final Iterator iter (Object ... objects) {\r\n return new ObjectIterator(objects);\r\n }", "public Iterator<Item> iterator() {\n return new RandomIterator();\n }", "private static void iterator() {\n\t\t\r\n\t}" ]
[ "0.8118038", "0.77856237", "0.7508533", "0.673997", "0.6543003", "0.64630157", "0.6365735", "0.6361995", "0.63463676", "0.63279015", "0.63046837", "0.6249063", "0.6235163", "0.6233855", "0.61369395", "0.61098367", "0.6066785", "0.6054365", "0.5992805", "0.5985418", "0.597994", "0.5978484", "0.5973747", "0.5941219", "0.5934884", "0.59285593", "0.59139776", "0.5909327", "0.59008104", "0.59008104", "0.5896048", "0.5839134", "0.5819213", "0.58116716", "0.5803442", "0.5791994", "0.5732784", "0.5726096", "0.57250285", "0.57171124", "0.5716153", "0.571117", "0.57037026", "0.5699731", "0.5690371", "0.5669046", "0.5664286", "0.56304204", "0.56233853", "0.56121445", "0.55974895", "0.55861753", "0.5585418", "0.55535483", "0.55520177", "0.55519044", "0.5548238", "0.5530303", "0.5522631", "0.5522631", "0.5522631", "0.5522631", "0.5518263", "0.5516395", "0.5514821", "0.5514821", "0.55146575", "0.55067134", "0.5502103", "0.5502103", "0.5500302", "0.5499359", "0.5496206", "0.5495961", "0.5495961", "0.5495961", "0.54920316", "0.54920316", "0.54920316", "0.5478381", "0.5469811", "0.5460559", "0.54453266", "0.5442582", "0.54416317", "0.54381037", "0.54327357", "0.5422141", "0.5420277", "0.54091245", "0.54088867", "0.5400546", "0.53645015", "0.5355653", "0.5349373", "0.5345336", "0.53409463", "0.5335458", "0.533513", "0.5332" ]
0.8259022
0
Returns a new object of class 'Iterator Exp'.
<C, PM> IteratorExp<C, PM> createIteratorExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IteratorExp createIteratorExp();", "public abstract Iterator<E> createIterator();", "public Iterator<E> iterator(){\r\n return new IteratorHelper();\r\n }", "IterateExp createIterateExp();", "public Iterator<T> iterator() {\r\n \r\n return new Iteration();\r\n }", "<C, PM> IterateExp<C, PM> createIterateExp();", "public SList_Iterator<T> iterator() {\n return new iterator();\n }", "public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "public Iterator<Item> iterator() {\n return new AIterator();\n }", "public Iterator iterator () {\n return new MyIterator (first);\n }", "public Iterator<E> iterator()\n {\n return new MyListIterator();\n }", "public Iterator<Item> iterator(){\n return new Iterator<Item>(); //Iterator interface implementation instance(has all Iterator methods)\n }", "@Override\r\n public Iterator iterator(){\n return new MyIterator(this);\r\n }", "@Override\n public Iterator<Integer> iterator() {\n return new IteratorImplementation();\n }", "public Iterator<T> iterator() {\n\t\treturn new ReferentIterator();\n\t}", "public Iterator<V> iterator()\n {\n return new Iterator<V>()\n {\n public boolean hasNext()\n {\n // STUB\n return false;\n } // hasNext()\n\n public V next()\n {\n // STUB\n return null;\n } // next()\n\n public void remove()\n throws UnsupportedOperationException\n {\n throw new UnsupportedOperationException();\n } // remove()\n }; // new Iterator<V>\n }", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "public MyIterator(ExperimentList exp){ // experiment list constructor.\r\n this.exp = exp;\r\n }", "public Iterator<Item> iterator() {\n return new Iterator<Item>() {\n public boolean hasNext() {\n return false;\n }\n\n public Item next() {\n return null;\n }\n };\n }", "public Iterator<Object[]> getIterator()\n\t{\n\t\tinit();\n\t\t\n\t\treturn new SimpleIterator();\n\t}", "@Override\n public Iterator<Object> iterator() {\n return new MyIterator();\n }", "public Iterator<T> getIterator() {\n return new Iterator(this);\n }", "public Iterator<E> iterator() {\n\t\treturn new Itr();\n\t}", "public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }", "public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}", "Iterator<E> iterator();", "Iterator<E> iterator();", "@Override\n public Iterator<T> iterator() {\n return new MyArrayList.MyIterator();\n }", "@Override\n public Iterator<E> iterator() {\n return new ArrayIterator(); // create a new instance of the inner class\n }", "public Iterator iterator() {\n maintain();\n return new MyIterator(collection.iterator());\n }", "@Override\n public Iterator<E> iterator() {\n return new ElementIterator();\n }", "Iterator<T> iterator();", "public Iterator<T> iterator()\n\t{\n\t\treturn new Iterator<T>()\n\t\t{\n\t\t\tNode<T> actual = head;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext()\n\t\t\t{\n\t\t\t\treturn actual != null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic T next() \n\t\t\t{\n\t\t\t\tif(hasNext())\n\t\t\t\t{\n\t\t\t\t\tT data = actual.getElement();\n\t\t\t\t\tactual = actual.getNext();\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t}", "public IterI(){\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "public Iterator<Item> iterator() { return new ListIterator(); }", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "public T iterator();", "public Iterator<T> iterator() {\n return new ListIterator<T>(this);\n }", "public Iterator<T> iterator() {\n return new ListIterator<T>(this);\n }", "@Override\n public Iterator<E> iterator() {\n // Yup.\n Iterator<E> ans = new Iterator<E>(){\n private int curIndex = 0;\n\n @Override\n public boolean hasNext(){\n return curIndex < size && queue[curIndex] != null;\n }\n @Override\n public E next(){\n return (E)queue[curIndex++];\n }\n public void remove(){\n // No.\n }\n };\n return ans;\n }", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator()\n {\n this(null, null, true);\n }", "public Iterator()\n {\n this(null, null, true);\n }", "public Iterator()\n {\n this(null, null, true);\n }", "public Iterator<Integer> iterator() {\n\t\treturn new WrappedIntIterator(intIterator());\n\t}", "public Iterator iterator()\n {\n // optimization\n if (OldOldCache.this.isEmpty())\n {\n return NullImplementation.getIterator();\n }\n\n // complete entry set iterator\n Iterator iter = instantiateIterator();\n\n // filter to get rid of expired objects\n Filter filter = new Filter()\n {\n public boolean evaluate(Object o)\n {\n Entry entry = (Entry) o;\n boolean fExpired = entry.isExpired();\n if (fExpired)\n {\n OldOldCache.this.removeExpired(entry, true);\n }\n return !fExpired;\n }\n };\n\n return new FilterEnumerator(iter, filter);\n }", "public Iterator<Item> iterator() { \n return new ListIterator(); \n }", "public Iterator<T> getIterator();", "public zzeiu iterator() {\n return new zzeio(this);\n }", "@Override\n public Iterator<E> iterator() {\n return new Iterator<E>() {\n private int nextIndex = 0;\n private int lastNextIndex = -1;\n private int rest = size();\n\n @Override\n public boolean hasNext() {\n return rest > 0;\n }\n\n @Override\n public E next() {\n if(!hasNext()){\n throw new NoSuchElementException();\n }\n rest--;\n lastNextIndex = nextIndex++;\n siftDown(nextIndex);\n\n return (E) array[lastNextIndex];\n }\n\n @Override\n public void remove() {\n if (lastNextIndex == -1) {\n throw new IllegalStateException();\n }\n removeElement(lastNextIndex);\n nextIndex--;\n lastNextIndex = -1;\n }\n };\n }", "public SearchingIterator getIterator(Object key)\r\n\t{\r\n\t\tSearchingIterator x = new SearchingIterator(key); \r\n\t\treturn x; \r\n\t}", "public ASTNodeIterator iterator()\n {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = expression;\n return I;\n }", "@Override\n public Iterator<T> iterator() {\n return new Iterator<T>() {\n int index = 0;\n\n @Override\n public boolean hasNext() {\n return index < size;\n }\n\n @Override\n public T next() {\n return genericArrayList[index++];\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }", "public Iterator<Item> iterator() {\n return new CustomIterator<Item>(head);\n }", "public FlightIterator createIterator() {\r\n\t\treturn new FlightIterator(flights);\r\n\t}", "public Iterator<Type> iterator();", "@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "@Override\n public Iterator<E> iterator() {\n return new SimpleArrayListIterator<E>();\n }", "@Override\n\tpublic Iterator createIterator() {\n\t\treturn new WeaponListIterator(weaponList);\n\t}", "@Override\n public Iterator<Integer> iterator() {\n return new Iterator<>() {\n int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < Set.this.count;\n }\n\n @Override\n public Integer next() {\n return Set.this.arr[i++];\n }\n };\n }", "public Iterator<T> iterator()\n\t{\n\t\treturn new LinkedListIterator();\n\t}", "public Iterator<Item> iterator() {\n return new RandomIterator(N, a);\n }", "public Iterator<Item> iterator()\r\n {\r\n return new ListIterator();\r\n }", "public Iterator<E> iterator() {\n\t\treturn new LinkedListItr();\r\n\t}", "public Iterator<Item> iterator() { return new RandomIterator();}", "public Iterator<T> iterator() {\r\n return new DLListIterator<T>();\r\n }", "public Iterator iterator() {\n\t\treturn new LinkedListIterator();\n\t}", "public Iterator<T> iterator() {\n if (this.nrOfElements == 0) {\n return Collections.<T>emptyList().iterator();\n }\n return new Iterator<T>() {\n private Node walker = null;\n\n @Override\n public boolean hasNext() {\n return walker != last;\n }\n\n @Override\n public T next() {\n if (this.walker == null) {\n this.walker = first;\n return this.walker.getData();\n }\n\n if (this.walker.getNext() == null) {\n throw new NoSuchElementException();\n }\n\n this.walker = this.walker.getNext();\n return this.walker.getData();\n }\n };\n }", "public Iterator<T> iterator() {\r\n return new ArrayIterator(elements, size);\r\n }", "public Iterator<Item> iterator() {\n return new RandomizedIterator();\n }", "public Iterator<Item> iterator(){\n return new ArrayIterator();\n }", "public Iterator iterator()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n try\r\n {\r\n return new CompositeIterator(new Iterator[] { \r\n spaceMgr.makeComponentSpaceIterator(),\r\n spaceMgr.makeHistorySpaceIterator() });\r\n }\r\n catch (RuntimeException e)\r\n {\r\n e.printStackTrace();\r\n throw e;\r\n }\r\n }", "@Override\n\tpublic Iterator<NumberInterface> createIterator() {\n\t\treturn numbers.iterator();\n\t}", "public Iterator<Item> iterator() {\n\t\treturn new ListIterator(); \n\t\t}", "@Override\n\tpublic final Iterator<T> iterator() {\n\t\treturn new IteratorImpl<>(value.get());\n\t}", "public Iterator <T> iterator (){\n\t\t// create and return an instance of the inner class IteratorImpl\n\t\t\t\treturn new HashAVLTreeIterator();\n\t}", "public Iterator<Item> iterator() {\n RQIterator it = new RQIterator();\n return it;\n }", "public static <T> Iterable<T> iter(final Iterator<T> i) {\n\t\treturn new Iterable<T>() {\n\n\t\t\t@Override\n\t\t\tpublic Iterator<T> iterator() {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t};\n\t}", "public ListIterator listIterator() {\n\t\treturn new ItrListaDE();\n\t}", "@Override\r\n\tpublic Iterator<Item> iterator() \r\n\t{\r\n\t\treturn new rqIterator();\r\n\t}", "public Iterator<BigInteger> iterator() {\n // return new FibIterator();\n return new Iterator<BigInteger>() {\n private BigInteger previous = BigInteger.valueOf(-1);\n private BigInteger current = BigInteger.ONE;\n private int index = 0;\n \n \n @Override\n //if either true will stop, evaluates upper < 0 first (short circuit)\n public boolean hasNext() {\n return upper < 0 || index < upper;\n }\n\n @Override\n //Creating a new value called next\n public BigInteger next() {\n BigInteger next = previous.add(current);\n previous = current;\n current = next;\n index++;\n return current;\n }\n \n };\n }", "public Iterator<Item> iterator() {\n return new RandomIterator();\n }", "@Override\n public Iterator<T> iterator() {\n return new IteratorTree(this.root, this.modCount);\n }", "public /*@ non_null @*/ JMLIterator<E> iterator() {\n return new JMLEnumerationToIterator<E>(elements());\n }", "public final Iterator<E> iterator()\r\n/* 36: */ {\r\n/* 37:201 */ throw new UnsupportedOperationException();\r\n/* 38: */ }", "public Iterator<Item> iterator() {\n Item[] temp = (Item[]) new Object[size];\n System.arraycopy(array, 0, temp, 0, size);\n return (new RandomIterator(temp));\n }", "@Override public java.util.Iterator<Function> iterator() {return new JavaIterator(begin(), end()); }", "public interface IIterator<C>\n{\t\n\t/**\n\t * Returns {@code true} if there's another element in the list to iterate over, {@code false} otherwise.\n\t * @return {@code true} if there's another element in the list to iterate over, {@code false} otherwise\n\t * @since 1.0.0\n\t */\n\tpublic boolean hasNext();\n\t\n\t/**\n\t * Returns the next template object in the list iteration.\n\t * @return the next template object in the list iteration\n\t * @since 1.0.0\n\t */\n\tpublic C getNext();\n\t\n\t/**\n\t * Returns the size of the list.\n\t * @return the size of the list\n\t * @since 1.0.0\n\t */\n\tpublic int getSize();\n\t\n\t/**\n\t * Returns the current index location. The index adds 1 every time the {@code getNext()} method is called.\n\t * @return the current index location\n\t * @since 1.0.0\n\t */\n\tpublic int getIndex();\n\t\n\t/**\n\t * Resets the iterator index back to 0, if implemented.\n\t * @since 1.0.0\n\t */\n\tpublic void reset();\n}", "Iterator<K> iterator();", "public PTIterator iterator() {\n if (iterator == null && isValid())\n iterator = new PTIteratorImpl(handle);\n return iterator;\n }", "public Iterator<S> iterator() {\n\t\t// ..\n\t\treturn null;\n\t}", "public ArrayIntListIterator iterator() {\n\t return new ArrayIntListIterator(this);\n\t }" ]
[ "0.8649697", "0.7328878", "0.729144", "0.7273071", "0.726348", "0.71867895", "0.7184145", "0.7139409", "0.7122784", "0.7060843", "0.70387775", "0.70068747", "0.6981915", "0.6979649", "0.6946985", "0.68592334", "0.68579304", "0.68169737", "0.6813157", "0.6783789", "0.6777402", "0.6762586", "0.675535", "0.67529213", "0.6747704", "0.6740665", "0.6683927", "0.6683927", "0.6675015", "0.6668724", "0.66677254", "0.6656562", "0.66378224", "0.6583099", "0.6582094", "0.65758747", "0.65758747", "0.65398747", "0.6516193", "0.6516193", "0.6516193", "0.64990115", "0.64899653", "0.64899653", "0.6482772", "0.6481989", "0.6481989", "0.6481989", "0.6481989", "0.6455606", "0.6455606", "0.6455606", "0.6451166", "0.6444177", "0.6439932", "0.643647", "0.6433817", "0.64319354", "0.6377537", "0.6375834", "0.6365318", "0.635812", "0.63455594", "0.6341987", "0.63122934", "0.62913394", "0.62863", "0.627011", "0.6260529", "0.62579846", "0.6255951", "0.6253949", "0.62492937", "0.62453145", "0.62405074", "0.6231825", "0.6223256", "0.621919", "0.6215981", "0.6208479", "0.61812454", "0.61617696", "0.6155323", "0.6134651", "0.612694", "0.61035776", "0.60990804", "0.6098829", "0.6074221", "0.605273", "0.605143", "0.60476065", "0.6046846", "0.60394263", "0.6031739", "0.6029276", "0.60272634", "0.60189277", "0.6011593", "0.6007274" ]
0.81967384
1
Returns a new object of class 'Let Exp'.
<C, PM> LetExp<C, PM> createLetExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "LetExp createLetExp();", "public Let getLet(){\n return let;\n }", "public Element compileLet() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tString varName;\n\t\tboolean array = false;\n\t\tElement letParent = document.createElement(\"letStatement\");\n\n\t\t// let\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tletParent.appendChild(ele);\n\n\t\t// identifier\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tvarName = jTokenizer.returnTokenVal();\n\t\tele = createXMLnode(tokenType);\n\t\tletParent.appendChild(ele);\n\n\t\t// Checks if the variable is an array element\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal();\n\t\tif (token.equals(\"[\")) {\n\t\t\tarray = true;\n\t\t\t//Pushing base address\n\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t\t// [\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tletParent.appendChild(ele);\n\n\t\t\t// Pushing the offset, the expression that comes after [\n\t\t\tjTokenizer.advance();\n\t\t\tletParent.appendChild(compileExpression());\n\t\t\t\n\t\t\t// ]\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tletParent.appendChild(ele);\n\t\t\tjTokenizer.advance();\n\t\t\t\n\t\t\t//Adding the two to find the address of the element\n\t\t\twriter.writeArithmetic(\"add\");\n\t\t}\n\n\t\t// =\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tletParent.appendChild(ele);\n\n\t\t// compiling the expression on the right side of the equals\n\t\tjTokenizer.advance();\n\t\tletParent.appendChild(compileExpression());\n\n\t\t// ;\n\t\tjTokenizer.advance();\n\t\tele = createXMLnode(jTokenizer.tokenType());\n\t\tletParent.appendChild(ele);\n\t\t\n\t\t//If it was an array, we have to push the result of the expression to the address\n\t\t//of the specific element\n\t\tif (array) {\n\t\t\t// *(base+offset)=expression\n\t\t\twriter.writePop(\"temp\", 0);\n\n\t\t\t// base +index->that\n\t\t\twriter.writePop(\"pointer\", 1);\n\n\t\t\t// Expression -> *(base+index)\n\t\t\twriter.writePush(\"temp\", 0);\n\t\t\twriter.writePop(\"that\", 0);\n\t\t} \n\t\t//If not array, just pop it to the variable directly\n\t\telse {\n\t\t\twriter.writePop(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t}\n\n\t\treturn letParent;\n\t}", "VariableExp createVariableExp();", "<C, PM> VariableExp<C, PM> createVariableExp();", "Exp\ngetExp1();", "Exp\ngetExp2();", "Lexpr createLexpr();", "public T elementExp() {\n T c = createLike();\n ops.elementExp(mat, c.mat);\n return c;\n }", "Expression getExp();", "@Override\r\n\tpublic RandomGenerator_Exponential clone() {\r\n\t\tRandomGenerator_Exponential rg = new RandomGenerator_Exponential();\r\n\t\trg.lambda=lambda;\r\n\t\treturn rg;\r\n\t}", "public static NewExpression new_(Class type) { throw Extensions.todo(); }", "public final EObject entryRuleLetExpCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleLetExpCS = null;\n\n\n try {\n // InternalMyDsl.g:9028:49: (iv_ruleLetExpCS= ruleLetExpCS EOF )\n // InternalMyDsl.g:9029:2: iv_ruleLetExpCS= ruleLetExpCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getLetExpCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleLetExpCS=ruleLetExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleLetExpCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "AExpArgs createAExpArgs();", "public String getLetExpression() {\n\t\tString letExpression = \"\";\n\t\tList<ASTNode> children = this.getAbstractChildNodes();\n\t\tif (children.size() == 1 && children.get(0) instanceof PointCutASTNode)\n\t\t\tletExpression = ((PointCutASTNode) children.get(0)).getLetExpression();\n\t\telse if (children.size() == 2 && children.get(0) instanceof PointCutASTNode\n\t\t\t\t&& children.get(1) instanceof PointCutASTNode) {\n\t\t\tString leftChild = ((PointCutASTNode) children.get(0)).getLetExpression();\n\t\t\tString rightChild = ((PointCutASTNode) children.get(1)).getLetExpression();\n\n\t\t\tif (!leftChild.isEmpty() && !rightChild.isEmpty())\n\t\t\t\tletExpression = leftChild + \", \" + rightChild;\n\t\t\telse\n\t\t\t\tletExpression = leftChild + rightChild;\n\t\t}\n\t\treturn letExpression;\n\t}", "Expression() { }", "public Repeat(Expression exp, Method callingMethod){\n\t\tsuper(callingMethod);\n\t\tthis.exp = exp;\n\t}", "public final EObject entryRuleLetExpression() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleLetExpression = null;\n\n\n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2529:2: (iv_ruleLetExpression= ruleLetExpression EOF )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2530:2: iv_ruleLetExpression= ruleLetExpression EOF\n {\n currentNode = createCompositeNode(grammarAccess.getLetExpressionRule(), currentNode); \n pushFollow(FOLLOW_ruleLetExpression_in_entryRuleLetExpression4429);\n iv_ruleLetExpression=ruleLetExpression();\n _fsp--;\n\n current =iv_ruleLetExpression; \n match(input,EOF,FOLLOW_EOF_in_entryRuleLetExpression4439); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "Expression createExpression();", "private ExpressionTools(){\n\t\t\n\t}", "public final EObject ruleLetExpression() throws RecognitionException {\n EObject current = null;\n\n EObject lv_variableDeclarations_1_0 = null;\n\n EObject lv_variableDeclarations_3_0 = null;\n\n EObject lv_targetExpression_5_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2542:6: ( ( 'let' ( (lv_variableDeclarations_1_0= ruleLetExpressionVariableDeclaration ) ) ( ',' ( (lv_variableDeclarations_3_0= ruleLetExpressionVariableDeclaration ) ) )* 'in' ( (lv_targetExpression_5_0= ruleExpression ) ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2543:1: ( 'let' ( (lv_variableDeclarations_1_0= ruleLetExpressionVariableDeclaration ) ) ( ',' ( (lv_variableDeclarations_3_0= ruleLetExpressionVariableDeclaration ) ) )* 'in' ( (lv_targetExpression_5_0= ruleExpression ) ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2543:1: ( 'let' ( (lv_variableDeclarations_1_0= ruleLetExpressionVariableDeclaration ) ) ( ',' ( (lv_variableDeclarations_3_0= ruleLetExpressionVariableDeclaration ) ) )* 'in' ( (lv_targetExpression_5_0= ruleExpression ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2543:3: 'let' ( (lv_variableDeclarations_1_0= ruleLetExpressionVariableDeclaration ) ) ( ',' ( (lv_variableDeclarations_3_0= ruleLetExpressionVariableDeclaration ) ) )* 'in' ( (lv_targetExpression_5_0= ruleExpression ) )\n {\n match(input,40,FOLLOW_40_in_ruleLetExpression4474); \n\n createLeafNode(grammarAccess.getLetExpressionAccess().getLetKeyword_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2547:1: ( (lv_variableDeclarations_1_0= ruleLetExpressionVariableDeclaration ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2548:1: (lv_variableDeclarations_1_0= ruleLetExpressionVariableDeclaration )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2548:1: (lv_variableDeclarations_1_0= ruleLetExpressionVariableDeclaration )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2549:3: lv_variableDeclarations_1_0= ruleLetExpressionVariableDeclaration\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getLetExpressionAccess().getVariableDeclarationsLetExpressionVariableDeclarationParserRuleCall_1_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleLetExpressionVariableDeclaration_in_ruleLetExpression4495);\n lv_variableDeclarations_1_0=ruleLetExpressionVariableDeclaration();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getLetExpressionRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"variableDeclarations\",\n \t \t\tlv_variableDeclarations_1_0, \n \t \t\t\"LetExpressionVariableDeclaration\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2571:2: ( ',' ( (lv_variableDeclarations_3_0= ruleLetExpressionVariableDeclaration ) ) )*\n loop40:\n do {\n int alt40=2;\n int LA40_0 = input.LA(1);\n\n if ( (LA40_0==14) ) {\n alt40=1;\n }\n\n\n switch (alt40) {\n \tcase 1 :\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2571:4: ',' ( (lv_variableDeclarations_3_0= ruleLetExpressionVariableDeclaration ) )\n \t {\n \t match(input,14,FOLLOW_14_in_ruleLetExpression4506); \n\n \t createLeafNode(grammarAccess.getLetExpressionAccess().getCommaKeyword_2_0(), null); \n \t \n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2575:1: ( (lv_variableDeclarations_3_0= ruleLetExpressionVariableDeclaration ) )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2576:1: (lv_variableDeclarations_3_0= ruleLetExpressionVariableDeclaration )\n \t {\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2576:1: (lv_variableDeclarations_3_0= ruleLetExpressionVariableDeclaration )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2577:3: lv_variableDeclarations_3_0= ruleLetExpressionVariableDeclaration\n \t {\n \t \n \t \t currentNode=createCompositeNode(grammarAccess.getLetExpressionAccess().getVariableDeclarationsLetExpressionVariableDeclarationParserRuleCall_2_1_0(), currentNode); \n \t \t \n \t pushFollow(FOLLOW_ruleLetExpressionVariableDeclaration_in_ruleLetExpression4527);\n \t lv_variableDeclarations_3_0=ruleLetExpressionVariableDeclaration();\n \t _fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = factory.create(grammarAccess.getLetExpressionRule().getType().getClassifier());\n \t \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t \t }\n \t \t try {\n \t \t \t\tadd(\n \t \t \t\t\tcurrent, \n \t \t \t\t\t\"variableDeclarations\",\n \t \t \t\tlv_variableDeclarations_3_0, \n \t \t \t\t\"LetExpressionVariableDeclaration\", \n \t \t \t\tcurrentNode);\n \t \t } catch (ValueConverterException vce) {\n \t \t\t\t\thandleValueConverterException(vce);\n \t \t }\n \t \t currentNode = currentNode.getParent();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop40;\n }\n } while (true);\n\n match(input,41,FOLLOW_41_in_ruleLetExpression4539); \n\n createLeafNode(grammarAccess.getLetExpressionAccess().getInKeyword_3(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2603:1: ( (lv_targetExpression_5_0= ruleExpression ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2604:1: (lv_targetExpression_5_0= ruleExpression )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2604:1: (lv_targetExpression_5_0= ruleExpression )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2605:3: lv_targetExpression_5_0= ruleExpression\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getLetExpressionAccess().getTargetExpressionExpressionParserRuleCall_4_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleExpression_in_ruleLetExpression4560);\n lv_targetExpression_5_0=ruleExpression();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getLetExpressionRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"targetExpression\",\n \t \t\tlv_targetExpression_5_0, \n \t \t\t\"Expression\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions) { throw Extensions.todo(); }", "public Term clone() {\n\t\treturn new Term(this.coefficient, this.exponent);\n\t}", "ExpOperand createExpOperand();", "public a mo8520o() {\n return new a();\n }", "RealLiteralExp createRealLiteralExp();", "public Expression eliminateLet() {\n\treturn new UnaryPrimitiveApplication(operator,\n\t\t\t\t\t argument.eliminateLet());\n }", "public TileEntity a_()\r\n {\r\n try\r\n {\r\n return (TileEntity)this.mtPPlateEntityClass.newInstance();\r\n }\r\n catch (Exception var2)\r\n {\r\n throw new RuntimeException(var2);\r\n }\r\n }", "Exploitation createExploitation();", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions, Iterable<Member> members) { throw Extensions.todo(); }", "emp m1(){\n\t\tint salary = 5000;\r\n\t\tSystem.out.println(\"method m1\" +\" \"+salary);\r\n\t\t//emp e = new emp();\r\n\t\t//return e;\r\n\t\treturn new emp(); // most recommended way.\r\n\t}", "public Exercise(String name, int sets, int reps) {\n this.name = name;\n this.sets = sets;\n this.reps = reps;\n }", "private Expr expression() {\n return assignment();\n }", "public View create(Element elem)\n {\n if(isTextEval) {\n return new bluej.debugmgr.texteval.TextEvalSyntaxView(elem);\n }\n else {\n return new MoeSyntaxView(elem, errorMgr);\n }\n }", "@Test\n public void testConstructorSetCorrect() {\n String name = \"A modifier\";\n int cost = 10;\n\n Modifier m = new Modifier(name, cost) {\n @Override\n public int getValue() {\n return 0;\n }\n };\n\n assertEquals(name, m.getName());\n assertEquals(cost, m.getCost());\n }", "public T caseLetExpCS(LetExpCS object) {\r\n return null;\r\n }", "public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }", "public final EObject entryRuleLetExpressionVariableDeclaration() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleLetExpressionVariableDeclaration = null;\n\n\n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2636:2: (iv_ruleLetExpressionVariableDeclaration= ruleLetExpressionVariableDeclaration EOF )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2637:2: iv_ruleLetExpressionVariableDeclaration= ruleLetExpressionVariableDeclaration EOF\n {\n currentNode = createCompositeNode(grammarAccess.getLetExpressionVariableDeclarationRule(), currentNode); \n pushFollow(FOLLOW_ruleLetExpressionVariableDeclaration_in_entryRuleLetExpressionVariableDeclaration4596);\n iv_ruleLetExpressionVariableDeclaration=ruleLetExpressionVariableDeclaration();\n _fsp--;\n\n current =iv_ruleLetExpressionVariableDeclaration; \n match(input,EOF,FOLLOW_EOF_in_entryRuleLetExpressionVariableDeclaration4606); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public T newInstance();", "public final EObject ruleLetExpCS() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_2=null;\n Token otherlv_4=null;\n EObject lv_ownedVariables_1_0 = null;\n\n EObject lv_ownedVariables_3_0 = null;\n\n EObject lv_ownedInExpression_5_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:9041:2: ( (otherlv_0= 'let' ( (lv_ownedVariables_1_0= ruleLetVariableCS ) ) (otherlv_2= ',' ( (lv_ownedVariables_3_0= ruleLetVariableCS ) ) )* otherlv_4= 'in' ( (lv_ownedInExpression_5_0= ruleExpCS ) ) ) )\n // InternalMyDsl.g:9042:2: (otherlv_0= 'let' ( (lv_ownedVariables_1_0= ruleLetVariableCS ) ) (otherlv_2= ',' ( (lv_ownedVariables_3_0= ruleLetVariableCS ) ) )* otherlv_4= 'in' ( (lv_ownedInExpression_5_0= ruleExpCS ) ) )\n {\n // InternalMyDsl.g:9042:2: (otherlv_0= 'let' ( (lv_ownedVariables_1_0= ruleLetVariableCS ) ) (otherlv_2= ',' ( (lv_ownedVariables_3_0= ruleLetVariableCS ) ) )* otherlv_4= 'in' ( (lv_ownedInExpression_5_0= ruleExpCS ) ) )\n // InternalMyDsl.g:9043:3: otherlv_0= 'let' ( (lv_ownedVariables_1_0= ruleLetVariableCS ) ) (otherlv_2= ',' ( (lv_ownedVariables_3_0= ruleLetVariableCS ) ) )* otherlv_4= 'in' ( (lv_ownedInExpression_5_0= ruleExpCS ) )\n {\n otherlv_0=(Token)match(input,116,FOLLOW_46); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getLetExpCSAccess().getLetKeyword_0());\n \t\t\n }\n // InternalMyDsl.g:9047:3: ( (lv_ownedVariables_1_0= ruleLetVariableCS ) )\n // InternalMyDsl.g:9048:4: (lv_ownedVariables_1_0= ruleLetVariableCS )\n {\n // InternalMyDsl.g:9048:4: (lv_ownedVariables_1_0= ruleLetVariableCS )\n // InternalMyDsl.g:9049:5: lv_ownedVariables_1_0= ruleLetVariableCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getLetExpCSAccess().getOwnedVariablesLetVariableCSParserRuleCall_1_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_95);\n lv_ownedVariables_1_0=ruleLetVariableCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getLetExpCSRule());\n \t\t\t\t\t}\n \t\t\t\t\tadd(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"ownedVariables\",\n \t\t\t\t\t\tlv_ownedVariables_1_0,\n \t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.LetVariableCS\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n // InternalMyDsl.g:9066:3: (otherlv_2= ',' ( (lv_ownedVariables_3_0= ruleLetVariableCS ) ) )*\n loop133:\n do {\n int alt133=2;\n int LA133_0 = input.LA(1);\n\n if ( (LA133_0==59) ) {\n alt133=1;\n }\n\n\n switch (alt133) {\n \tcase 1 :\n \t // InternalMyDsl.g:9067:4: otherlv_2= ',' ( (lv_ownedVariables_3_0= ruleLetVariableCS ) )\n \t {\n \t otherlv_2=(Token)match(input,59,FOLLOW_46); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\tnewLeafNode(otherlv_2, grammarAccess.getLetExpCSAccess().getCommaKeyword_2_0());\n \t \t\t\t\n \t }\n \t // InternalMyDsl.g:9071:4: ( (lv_ownedVariables_3_0= ruleLetVariableCS ) )\n \t // InternalMyDsl.g:9072:5: (lv_ownedVariables_3_0= ruleLetVariableCS )\n \t {\n \t // InternalMyDsl.g:9072:5: (lv_ownedVariables_3_0= ruleLetVariableCS )\n \t // InternalMyDsl.g:9073:6: lv_ownedVariables_3_0= ruleLetVariableCS\n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\tnewCompositeNode(grammarAccess.getLetExpCSAccess().getOwnedVariablesLetVariableCSParserRuleCall_2_1_0());\n \t \t\t\t\t\t\n \t }\n \t pushFollow(FOLLOW_95);\n \t lv_ownedVariables_3_0=ruleLetVariableCS();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getLetExpCSRule());\n \t \t\t\t\t\t\t}\n \t \t\t\t\t\t\tadd(\n \t \t\t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\t\"ownedVariables\",\n \t \t\t\t\t\t\t\tlv_ownedVariables_3_0,\n \t \t\t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.LetVariableCS\");\n \t \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\t\n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop133;\n }\n } while (true);\n\n otherlv_4=(Token)match(input,110,FOLLOW_69); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_4, grammarAccess.getLetExpCSAccess().getInKeyword_3());\n \t\t\n }\n // InternalMyDsl.g:9095:3: ( (lv_ownedInExpression_5_0= ruleExpCS ) )\n // InternalMyDsl.g:9096:4: (lv_ownedInExpression_5_0= ruleExpCS )\n {\n // InternalMyDsl.g:9096:4: (lv_ownedInExpression_5_0= ruleExpCS )\n // InternalMyDsl.g:9097:5: lv_ownedInExpression_5_0= ruleExpCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getLetExpCSAccess().getOwnedInExpressionExpCSParserRuleCall_4_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_2);\n lv_ownedInExpression_5_0=ruleExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getLetExpCSRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"ownedInExpression\",\n \t\t\t\t\t\tlv_ownedInExpression_5_0,\n \t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.ExpCS\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public Exercise(String name) {\n\t\tthis.name = name;\n\t\tsetList = new ArrayList<Set>();\n\t\trepsGoal = -1;\n\t\tweightGoal = -1;\n\t\trest = -1;\n\t\texerciseInstance = false;\n\t\tnotes = \"\";\n\t\toldId = -1;\n\t\tid = -1;\n\t}", "public Expression() {\r\n }", "public Expression(Expression exp) {\r\n\t\tconcat(exp);\r\n\t\ttext = new StringBuffer(new String(exp.text));\r\n\t}", "public Expression(Object ob) {\r\n\t\tthis();\r\n\t\taddElement(ob);\r\n\t}", "public Variable(int power, char notation){\n\t\tthis.power = power;\n\t\tthis.notation = notation;\n\t}", "public Equation() {\n alpha_arr = new ArrayList<LinkedList<VariableUnit>>();\n for (int i = 0; i < 26; i++) {\n LinkedList<VariableUnit> list = new LinkedList<VariableUnit>();\n alpha_arr.add(list);\n }\n \n op_order = new LinkedList<VariableUnit>();\n }", "public void setMyExp(MyExp me);", "Elevage createElevage();", "public Object create(String key_letters) throws XtumlException;", "public final JavaliParser.newExpr_return newExpr() throws RecognitionException {\n\t\tJavaliParser.newExpr_return retval = new JavaliParser.newExpr_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken kw=null;\n\t\tToken id=null;\n\t\tToken Identifier79=null;\n\t\tToken char_literal80=null;\n\t\tToken char_literal81=null;\n\t\tToken char_literal82=null;\n\t\tToken char_literal84=null;\n\t\tToken char_literal85=null;\n\t\tToken char_literal87=null;\n\t\tParserRuleReturnScope pt =null;\n\t\tParserRuleReturnScope simpleExpr83 =null;\n\t\tParserRuleReturnScope simpleExpr86 =null;\n\n\t\tObject kw_tree=null;\n\t\tObject id_tree=null;\n\t\tObject Identifier79_tree=null;\n\t\tObject char_literal80_tree=null;\n\t\tObject char_literal81_tree=null;\n\t\tObject char_literal82_tree=null;\n\t\tObject char_literal84_tree=null;\n\t\tObject char_literal85_tree=null;\n\t\tObject char_literal87_tree=null;\n\t\tRewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,\"token 69\");\n\t\tRewriteRuleTokenStream stream_93=new RewriteRuleTokenStream(adaptor,\"token 93\");\n\t\tRewriteRuleTokenStream stream_70=new RewriteRuleTokenStream(adaptor,\"token 70\");\n\t\tRewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,\"token Identifier\");\n\t\tRewriteRuleTokenStream stream_84=new RewriteRuleTokenStream(adaptor,\"token 84\");\n\t\tRewriteRuleTokenStream stream_85=new RewriteRuleTokenStream(adaptor,\"token 85\");\n\t\tRewriteRuleSubtreeStream stream_simpleExpr=new RewriteRuleSubtreeStream(adaptor,\"rule simpleExpr\");\n\t\tRewriteRuleSubtreeStream stream_primitiveType=new RewriteRuleSubtreeStream(adaptor,\"rule primitiveType\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:408:2: (kw= 'new' Identifier '(' ')' -> ^( NewObject[$kw, \\\"NewObject\\\"] Identifier ) |kw= 'new' id= Identifier '[' simpleExpr ']' -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$id, $id.text + \\\"[]\\\"] simpleExpr ) |kw= 'new' pt= primitiveType '[' simpleExpr ']' -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$pt.start, $pt.text + \\\"[]\\\"] simpleExpr ) )\n\t\t\tint alt24=3;\n\t\t\tint LA24_0 = input.LA(1);\n\t\t\tif ( (LA24_0==93) ) {\n\t\t\t\tint LA24_1 = input.LA(2);\n\t\t\t\tif ( (LA24_1==Identifier) ) {\n\t\t\t\t\tint LA24_2 = input.LA(3);\n\t\t\t\t\tif ( (LA24_2==69) ) {\n\t\t\t\t\t\talt24=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA24_2==84) ) {\n\t\t\t\t\t\talt24=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 24, 2, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if ( (LA24_1==86||LA24_1==90||LA24_1==92) ) {\n\t\t\t\t\talt24=3;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 24, 1, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 24, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt24) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:408:4: kw= 'new' Identifier '(' ')'\n\t\t\t\t\t{\n\t\t\t\t\tkw=(Token)match(input,93,FOLLOW_93_in_newExpr1369); \n\t\t\t\t\tstream_93.add(kw);\n\n\t\t\t\t\tIdentifier79=(Token)match(input,Identifier,FOLLOW_Identifier_in_newExpr1371); \n\t\t\t\t\tstream_Identifier.add(Identifier79);\n\n\t\t\t\t\tchar_literal80=(Token)match(input,69,FOLLOW_69_in_newExpr1373); \n\t\t\t\t\tstream_69.add(char_literal80);\n\n\t\t\t\t\tchar_literal81=(Token)match(input,70,FOLLOW_70_in_newExpr1375); \n\t\t\t\t\tstream_70.add(char_literal81);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: Identifier\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 409:3: -> ^( NewObject[$kw, \\\"NewObject\\\"] Identifier )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:409:6: ^( NewObject[$kw, \\\"NewObject\\\"] Identifier )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(NewObject, kw, \"NewObject\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_Identifier.nextNode());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:410:4: kw= 'new' id= Identifier '[' simpleExpr ']'\n\t\t\t\t\t{\n\t\t\t\t\tkw=(Token)match(input,93,FOLLOW_93_in_newExpr1395); \n\t\t\t\t\tstream_93.add(kw);\n\n\t\t\t\t\tid=(Token)match(input,Identifier,FOLLOW_Identifier_in_newExpr1399); \n\t\t\t\t\tstream_Identifier.add(id);\n\n\t\t\t\t\tchar_literal82=(Token)match(input,84,FOLLOW_84_in_newExpr1401); \n\t\t\t\t\tstream_84.add(char_literal82);\n\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_newExpr1403);\n\t\t\t\t\tsimpleExpr83=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(simpleExpr83.getTree());\n\t\t\t\t\tchar_literal84=(Token)match(input,85,FOLLOW_85_in_newExpr1405); \n\t\t\t\t\tstream_85.add(char_literal84);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: simpleExpr, Identifier\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 411:3: -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$id, $id.text + \\\"[]\\\"] simpleExpr )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:411:6: ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$id, $id.text + \\\"[]\\\"] simpleExpr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(NewArray, kw, \"NewArray\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, (Object)adaptor.create(Identifier, id, (id!=null?id.getText():null) + \"[]\"));\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_simpleExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:412:4: kw= 'new' pt= primitiveType '[' simpleExpr ']'\n\t\t\t\t\t{\n\t\t\t\t\tkw=(Token)match(input,93,FOLLOW_93_in_newExpr1428); \n\t\t\t\t\tstream_93.add(kw);\n\n\t\t\t\t\tpushFollow(FOLLOW_primitiveType_in_newExpr1432);\n\t\t\t\t\tpt=primitiveType();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_primitiveType.add(pt.getTree());\n\t\t\t\t\tchar_literal85=(Token)match(input,84,FOLLOW_84_in_newExpr1434); \n\t\t\t\t\tstream_84.add(char_literal85);\n\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_newExpr1436);\n\t\t\t\t\tsimpleExpr86=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(simpleExpr86.getTree());\n\t\t\t\t\tchar_literal87=(Token)match(input,85,FOLLOW_85_in_newExpr1438); \n\t\t\t\t\tstream_85.add(char_literal87);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: simpleExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 413:3: -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$pt.start, $pt.text + \\\"[]\\\"] simpleExpr )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:413:6: ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$pt.start, $pt.text + \\\"[]\\\"] simpleExpr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(NewArray, kw, \"NewArray\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, (Object)adaptor.create(Identifier, (pt!=null?(pt.start):null), (pt!=null?input.toString(pt.start,pt.stop):null) + \"[]\"));\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_simpleExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "@Test\r\n public void test1(){\r\n Exp one = new NumericLiteral(1);\r\n Exp three = new NumericLiteral(3);\r\n Exp exp = new PlusExp(one, three);\r\n Stmt decl = new DeclStmt(\"x\");\r\n Stmt assign = new Assignment(\"x\", exp);\r\n Stmt seq = new Sequence(decl, assign);\r\n assertEquals(seq.text(), \"var x; x = 1 + 3\");\r\n }", "<C, S> StateExp<C, S> createStateExp();", "public Exercise(String name,int sets,int reps){\n setName(name);\n setReps(reps);\n setSets(sets);\n }", "public Weapon clone() {\n\t\treturn new Weapon(this);\n\t}", "<C> RealLiteralExp<C> createRealLiteralExp();", "private Clause make(Literal... e) {\n Clause c = new Clause();\n for (int i = 0; i < e.length; ++i) {\n c = c.add(e[i]);\n }\n return c;\n }", "JavaExpression createJavaExpression();", "public Latent(String internalName,\n TypeDescription declaringType,\n TypeDescription returnType,\n List<? extends TypeDescription> parameterTypes,\n int modifiers,\n List<? extends TypeDescription> exceptionTypes) {\n this.internalName = internalName;\n this.declaringType = declaringType;\n this.returnType = returnType;\n this.parameterTypes = parameterTypes;\n this.modifiers = modifiers;\n this.exceptionTypes = exceptionTypes;\n }", "final public ASTExpression Expression() throws ParseException {\r\n /*@bgen(jjtree) Expression */\r\n ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION);\r\n boolean jjtc000 = true;\r\n jjtree.openNodeScope(jjtn000);\r\n try {\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case QUOTE:\r\n StringLiteral();\r\n jj_consume_token(61);\r\n jjtree.closeNodeScope(jjtn000, true);\r\n jjtc000 = false;\r\n {if (true) return jjtn000;}\r\n break;\r\n case IDENTIFIER:\r\n case INTEGER:\r\n case NOT:\r\n case SUB:\r\n case FLOATING_POINT_LITERAL:\r\n case 59:\r\n LogicalORExpression();\r\n jjtree.closeNodeScope(jjtn000, true);\r\n jjtc000 = false;\r\n {if (true) return jjtn000;}\r\n break;\r\n default:\r\n jj_la1[45] = jj_gen;\r\n jj_consume_token(-1);\r\n throw new ParseException();\r\n }\r\n } catch (Throwable jjte000) {\r\n if (jjtc000) {\r\n jjtree.clearNodeScope(jjtn000);\r\n jjtc000 = false;\r\n } else {\r\n jjtree.popNode();\r\n }\r\n if (jjte000 instanceof RuntimeException) {\r\n {if (true) throw (RuntimeException)jjte000;}\r\n }\r\n if (jjte000 instanceof ParseException) {\r\n {if (true) throw (ParseException)jjte000;}\r\n }\r\n {if (true) throw (Error)jjte000;}\r\n } finally {\r\n if (jjtc000) {\r\n jjtree.closeNodeScope(jjtn000, true);\r\n }\r\n }\r\n throw new Error(\"Missing return statement in function\");\r\n }", "<C, PM> IterateExp<C, PM> createIterateExp();", "Multiply createMultiply();", "public Module() {\n\t\tthis(new Function[0]);\n\t}", "InteractionFlowExpression createInteractionFlowExpression();", "public Expressao getExp() {\n\t\treturn exp;\n\t}", "@Override\n\tpublic Location newInstance() {\n\t\treturn new Location(this.X,this.Y,0);\n\t}", "IterateExp createIterateExp();", "public static void main(String[] args) throws Exception {\r\n Expression e = new Plus(new Mult(2, \"x\"), new Plus(new Sin(new Mult(4, \"y\")), new Pow(\"e\", \"x\")));\r\n System.out.println(e);\r\n Map<String, Double> assignment = new TreeMap<String, Double>();\r\n assignment.put(\"x\", 2.0);\r\n assignment.put(\"y\", 0.25);\r\n assignment.put(\"e\", 2.71);\r\n System.out.println(e.evaluate(assignment));\r\n e = e.differentiate(\"x\");\r\n System.out.println(e);\r\n System.out.println(e.evaluate(assignment));\r\n System.out.println(e.simplify());\r\n System.out.println(e);\r\n }", "ActivationExpression createActivationExpression();", "public QLearnAgent() {\n\t\tthis(name);\t\n\t}", "public Expression() {\r\n\t\ttext = new StringBuffer();\r\n\t\txttext = new StringBuffer();\r\n\t}", "Exp getArrayExp();", "Reproducible newInstance();", "public Jewel generate()\r\n\t{\r\n\t\treturn new Jewel(rand.nextInt(maxType));\r\n\t}", "StringLiteralExp createStringLiteralExp();", "public Node power()\r\n\t{\r\n\t\tNode fact = factor();\r\n\t\tint index = lexer.getPosition();\r\n\t\tif(lexer.getToken()==Lexer.Token.POW)\r\n\t\t{\t\t\t\r\n\t\t\tNode pow = power();\r\n\t\t\tif(pow!=null)\r\n\t\t\t{\r\n\t\t\t\treturn new Pow(fact,pow);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn fact;\r\n\t}", "private TreatExpression() {\r\n }", "public Lexicon lex()\n/* */ {\n/* 505 */ return new BaseLexicon();\n/* */ }", "static Obj NewObj (String name,int kind) {\r\n\t\tObj p, obj = new Obj();\r\n obj.name = new String(name); \r\n\t\tobj.type = null; obj.kind = kind;\r\n\t\tobj.level = curLevel;\r\n\t\tp = topScope.locals;\r\n\t\t/*Para buscar si el nb de la variable nueva ya esta!!!*/\r\n\t\twhile (p != null) { \r\n \t \tif (p.name.equals(name)) Parser.SemError(1);\r\n\t\t\tp = p.next;\r\n\t\t}\r\n \t//FILO!!\r\n obj.next = topScope.locals; \r\n\t\ttopScope.locals = obj;\r\n \t//if (kind == vars) {}\r\n \t//obj.adr = topScope.nextAdr; topScope.nextAdr++;\r\n \t//obj.view();\r\n\t\treturn obj;\r\n }", "ExpMaterial createExpMaterial(Container container, Lsid lsid);", "protected Enemy copy()\r\n\t{\r\n\t\treturn new DwarfEnemy();\r\n\t}", "public ThisKeyword(){\n this(1.0);\n }", "@Override\r\n\tpublic Explore getNewInstance() {\n\t\treturn new ZYDCExplore();\r\n\t}", "public Camp newEntity() { return new Camp(); }", "public MutableBlock createMutableBlock(String expression) {\r\n return new MutableBlock(passwordType, expression);\r\n }", "protected Pair<JilExpr,List<JilStmt>> doNew(Expr.New e) {\n \t\tArrayList<JilStmt> r = new ArrayList();\t\r\n \t\tType.Reference type = (Type.Reference) e.type().attribute(Type.class);\r\n \t\t\r\n \t\tMethodInfo mi = (MethodInfo) e\r\n \t\t\t\t.attribute(MethodInfo.class);\t\t\t\r\n \t\t\r\n \t\tPair<JilExpr,List<JilStmt>> context = doExpression(e.context());\r\n \t\tPair<List<JilExpr>,List<JilStmt>> params = doExpressionList(e.parameters());\r\n \t\t\t\t\t\t\t\t\r\n \t\tif(context != null) {\r\n \t\t\tr.addAll(context.second());\r\n \t\t}\r\n \t\t\r\n \t\tr.addAll(params.second());\t\t\t\t\t\r\n \t\t\r\n \t\tif(mi != null) {\t\t\t\r\n \t\t\treturn new Pair<JilExpr, List<JilStmt>>(new JilExpr.New(type, params\r\n \t\t\t\t\t.first(), mi.type, e.attributes()), r);\r\n \t\t} else if(type instanceof Type.Array){\r\n \t\t\treturn new Pair<JilExpr, List<JilStmt>>(new JilExpr.New(type, params\r\n \t\t\t\t\t.first(), null, e.attributes()), r);\r\n \t\t} else {\r\n \t\t\tsyntax_error(\"internal failure --- unable to find method information\",e);\r\n \t\t\treturn null;\r\n \t\t}\r\n \t}", "public Expression asExpression() {\n switch (TYPE) {\n case EXPRESSION:\n return EXPRESSION;\n case IDENTIFIER:\n return new Variable(VALUE);\n case LITERAL:\n if (VALUE.matches(\"\\\\d+\")) {\n return new LInteger(Integer.parseInt(VALUE));\n } else if (VALUE.equals(\"true\") || VALUE.equals(\"false\")) {\n return LBoolean.resolve(VALUE.equals(\"true\"));\n } else if (VALUE.equals(\"null\")) {\n return LNull.NULL;\n } else {\n return new LString(VALUE);\n }\n default:\n throw ErrorLog.get(\"Unexpected symbol '%s'\", VALUE);\n }\n }", "public ConvCalculator(Expression exp){\r\n this();\r\n this.expression = exp;\r\n }", "public be m9724a() {\r\n return new be(this);\r\n }", "public Watermelon saySomething() {\n return new Watermelon(\"Japanese\" , \"Square\");//it return an object of watermelon\n }", "public void setExp(int exp) {\r\n\t\tthis.exp = exp;\r\n\t}", "<C> TypeExp<C> createTypeExp();", "public final void mLET() throws RecognitionException {\n try {\n int _type = LET;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/dannluciano/Sources/MyLanguage/expr.g:149:5: ( 'let' )\n // /Users/dannluciano/Sources/MyLanguage/expr.g:149:7: 'let'\n {\n match(\"let\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "Leq createLeq();", "Expr createExpr();", "private Operation classCreatorRest(Token t, Scope scope, Vector queue)\r\n {\r\n Vector v = new Vector();\r\n String s = \"super\";\r\n Operation root = new Operation();\r\n\r\n root.type.type = Keyword.NONESY;\r\n root.type.ident = t;\r\n traceOn(v);\r\n root.left = arguments(scope, v, queue);\r\n traceOff(v);\r\n\r\n for(int i = 0; i < v.size(); i++)\r\n {\r\n Token pt = (Token)v.get(i);\r\n\r\n if (pt.kind == Keyword.NUMBERSY)\r\n s += pt.val;\r\n else if (pt.kind == Keyword.LNUMBERSY)\r\n s += pt.val + \"L\";\r\n else if (pt.kind == Keyword.DNUMBERSY)\r\n s += pt.fval;\r\n else if (pt.kind == Keyword.IDENTSY)\r\n s += pt.string;\r\n else\r\n s += pt.kind.string;\r\n }\r\n if (s.endsWith(\"()\"))\r\n s = \"\";\r\n else\r\n s += ';';\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n ClassType x = new ClassType();\r\n x.name = new Token();\r\n x.name.kind = Keyword.IDENTSY;\r\n x.name.string = \"Anonymous\" + anonymous++;\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n x.extend = new ClassType(t.string.substring(t.string.lastIndexOf('.') + 1));\r\n x.implement = new ClassType[1];\r\n x.implement[0] = x.extend;\r\n declMember(scope, x);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n root.type.ident = x.name;\r\n root.type.type = Keyword.NONESY;\r\n root.left.left = null;\r\n Vector old = queue;\r\n queue = new Vector();\r\n HashSet dummy = unresolved;\r\n unresolved = x.unresolved;\r\n unresolved.add(t.string);\r\n classBody(x, new Modifier(), s, queue);\r\n addToConstructor(x, queue);\r\n queue = old;\r\n unresolved = dummy;\r\n writeList(x);\r\n }\r\n\r\n return root;\r\n }", "public T casePow(Pow object)\n {\n return null;\n }", "Lab create();", "public Snippet visit(PowExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t Snippet f6 = n.identifier1.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t _ret.returnTemp = \"Math.pow(\"+f4.returnTemp+\", \"+f6.returnTemp+\")\";\n\t return _ret;\n\t }", "public Stmt createAssignment(Assign expr) {\n return createEval(expr);\n }", "public void setExp(int exp) {\n \t\tthis.exp = exp;\n \t}" ]
[ "0.852355", "0.62654275", "0.5887476", "0.57867295", "0.57552457", "0.5687197", "0.5631604", "0.55133593", "0.5460565", "0.544561", "0.53837645", "0.53580487", "0.53231275", "0.5301234", "0.5296428", "0.52864456", "0.5270197", "0.5160859", "0.5130942", "0.5123574", "0.5098926", "0.5076804", "0.5073169", "0.50430244", "0.5040021", "0.50201946", "0.50167584", "0.50030756", "0.500269", "0.49890837", "0.49835315", "0.4956302", "0.49497905", "0.494969", "0.49496615", "0.49284422", "0.49169928", "0.49148217", "0.49134228", "0.48992935", "0.4896573", "0.48836535", "0.4878472", "0.4872004", "0.48602682", "0.48543957", "0.48492876", "0.48489973", "0.48431504", "0.48418194", "0.48403612", "0.483872", "0.4802098", "0.47996706", "0.4797122", "0.47937423", "0.47877955", "0.47854796", "0.47789586", "0.47772777", "0.47680783", "0.47599912", "0.47535205", "0.47483587", "0.47405037", "0.4726937", "0.47120157", "0.47109482", "0.47079536", "0.47078586", "0.47001037", "0.46908486", "0.46826208", "0.46730116", "0.46719447", "0.46546495", "0.46513838", "0.4651059", "0.46481884", "0.464755", "0.46376577", "0.46351638", "0.46317816", "0.4631367", "0.46264228", "0.46221706", "0.46122527", "0.46100938", "0.46091828", "0.460726", "0.4606643", "0.46027458", "0.45922646", "0.45858985", "0.45812997", "0.4575787", "0.4575204", "0.45703432", "0.45667955", "0.45663717" ]
0.7930681
1
Returns a new object of class 'Message Exp'.
<C, COA, SSA> MessageExp<C, COA, SSA> createMessageExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Message newMessage(String message, Object p0) {\n/* 69 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object p0, Object p1) {\n/* 77 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) {\n/* 118 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) {\n/* 109 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3) {\n/* 93 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object... params) {\n/* 61 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) {\n/* 127 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n/* 145 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object p0, Object p1, Object p2) {\n/* 85 */ return new SimpleMessage(message);\n/* */ }", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4) {\n/* 101 */ return new SimpleMessage(message);\n/* */ }", "public Message(){}", "public Message() {}", "public Message() {}", "public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) {\n/* 136 */ return new SimpleMessage(message);\n/* */ }", "DynamicMessage createDynamicMessage();", "public Message createMessage()\n {\n return messageFactory.createMessage();\n }", "private Message(){\n // default constructor\n }", "public Message() {\n }", "public Message() {\n }", "public Message() {\n\t\tsuper();\n\t}", "public Message() {\n }", "public Message () {\n\t\tthis.setCreationtime(Calendar.getInstance().getTimeInMillis());\n\t\tsetTimestamp();\n\t}", "protected ParseObject createMessage() {\n //format single variables appropriatly. most cases the field is an array\n ArrayList<ParseUser> nextDrinker = new ArrayList<ParseUser>();\n nextDrinker.add(mNextDrinker);\n ArrayList<String> groupName = new ArrayList<String>();\n groupName.add(mGroupName);\n\n ParseObject message = new ParseObject(ParseConstants.CLASS_MESSAGES);\n message.put(ParseConstants.KEY_SENDER_ID, ParseUser.getCurrentUser().getObjectId());\n message.put(ParseConstants.KEY_SENDER, ParseUser.getCurrentUser());\n message.put(ParseConstants.KEY_GROUP_ID, mGroupId);\n message.put(ParseConstants.KEY_GROUP_NAME, groupName);\n message.put(ParseConstants.KEY_SENDER_NAME, ParseUser.getCurrentUser().getUsername());\n message.put(ParseConstants.KEY_RECIPIENT_IDS, nextDrinker);\n message.put(ParseConstants.KEY_MESSAGE_TYPE, ParseConstants.TYPE_DRINK_REQUEST);\n\n return message;\n }", "public final InternalMessageModel newMessageModel() {\n return (InternalMessageModel) newProxy(InternalMessageModel.class,\n MessageModelImpl.class);\n }", "public MessageRecord() {\n super(Message.MESSAGE);\n }", "public MessageAbstract createMessageAbstract() {\n\t\tMessageAbstract messageAbstract = new MessageAbstract();\n\t\tmessageAbstract.setId(this.id);\n\t\tmessageAbstract.setMessage(this.message);\n\t\tmessageAbstract.setSentTimestamp(this.sentTimestamp);\n\n\t\t// Add sender's user ID if available\n\t\tif (this.origin != null) {\n\t\t\tmessageAbstract.setSenderUserId(this.origin.getId());\n\t\t\tmessageAbstract.setSenderScreenName(this.origin.getScreenName());\n\t\t}\n\t\treturn messageAbstract;\n\t}", "public Message(){\n\t\ttimeStamp = System.currentTimeMillis();\n\t}", "private static Message createMessage(Exchange exchange) {\n Endpoint ep = exchange.get(Endpoint.class);\n Message msg = null;\n if (ep != null) {\n msg = new MessageImpl();\n msg.setExchange(exchange);\n if (ep.getBinding() != null) {\n msg = ep.getBinding().createMessage(msg);\n }\n }\n return msg;\n }", "public AmqpMessage() {}", "public FlowMonMessage(){}", "public MessageInfo() { }", "protected abstract Message createMessage(Object object, MessageProperties messageProperties);", "MessageDef getMessageDef();", "Object getMessage();", "public OesMessageRecord() {\n super(OesMessage.OES_MESSAGE);\n }", "public Message build() {\n Objects.requireNonNull(transactionIdBytes);\n\n byte[] messageBytes = new byte[MESSAGE_LEN_HEADER + length];\n\n byte[] messageTypeBytes = createMessageType();\n System.arraycopy(messageTypeBytes, 0, messageBytes, MESSAGE_POS_TYPE, MESSAGE_LEN_TYPE);\n\n byte[] lengthBytes = Bytes.intToBytes(length);\n System.arraycopy(lengthBytes, 2, messageBytes, MESSAGE_POS_LENGTH, MESSAGE_LEN_LENGTH);\n\n byte[] magicCookieBytes = Bytes.intToBytes(MAGIC_COOKIE_FIXED_VALUE);\n System.arraycopy(\n magicCookieBytes, 0, messageBytes, MESSAGE_POS_MAGIC_COOKIE, MESSAGE_LEN_MAGIC_COOKIE);\n\n System.arraycopy(\n transactionIdBytes, 0, messageBytes, MESSAGE_POS_TRANSACTION_ID,\n MESSAGE_LEN_TRANSACTION_ID);\n transactionIdBytes = null;\n\n if (attributeBytes != null && attributeBytes.length > 0) {\n System.arraycopy(\n attributeBytes, 0, messageBytes, MESSAGE_LEN_HEADER, attributeBytes.length);\n attributeBytes = null;\n }\n\n return new Message(messageBytes);\n }", "public Message() {\n message = \"\";\n senderID = \"\";\n time = 0;\n }", "public OctopusCollectedMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "public Message(String message){\n\t\tthis(message, 5000);\n\t}", "public Alarm_Msg(){ }", "private DAPMessage constructFrom(DatabaseTableRecord record) {\n return DAPMessage.fromXML(record.getStringValue(CommunicationNetworkServiceDatabaseConstants.DAP_MESSAGE_DATA_COLUMN_NAME));\n }", "@Override\n public TransponderMessage newMessage() {\n super.newMessage();\n setModule(\"somevertical\");\n return this;\n }", "public DeclineMeetingInvitationMessage createDeclineMessage() {\n\t\ttry {\n\t\t\treturn new DeclineMeetingInvitationMessage(this);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public PromoMessages() {\n }", "public Message(){\n this(\"Not Specified\",\"Not Specified\");\n }", "public static GenericMessagesReceived createEntity() {\n GenericMessagesReceived genericMessagesReceived = new GenericMessagesReceived()\n .originatingModule(DEFAULT_ORIGINATING_MODULE)\n .dateReceived(DEFAULT_DATE_RECEIVED)\n .messageId(MESSAGE_ID)\n .messageDateCreated(UPDATED_DATE_RECEIVED)\n .pubSubMessageTypeCode(PUB_SUB_TYPE_CODE)\n .incidentNumber(INCIDENT_NUMBER)\n .incidentHeader(INCIDENT_HEADER)\n .incidentDescription(INCIDENT_DESCRIPTION)\n .eventTypeCode(EVENT_TYPE_CODE)\n .incidentPriorityCode(INCIDENT_PRIORITY_CODE)\n .operatorName(OPERATOR_NAME)\n .payload(PAYLOAD);\n \n return genericMessagesReceived;\n }", "public interface Message extends Serializable {\n\t/**\n\t * set current message object\n\t * @param messageObject\n\t * @throws UtilsException\n\t */\n\tpublic void setObjet(Object messageObject) throws UtilsException;\n\t\n\t/**\n\t * return current's message object\n\t * @return\n\t */\n\tpublic Object getObject() ;\n\t\n\t/**\n\t * return true if this message match filter\n\t * @param filter\n\t * @return\n\t */\n\tpublic boolean matchFilter(Map<String,String> filter);\n\t\n\t/**\n\t * add a new text property to current message\n\t * @param propertyName\n\t * @param propertyValue\n\t * @throws UtilsException\n\t */\n\tpublic void setStringProperty(String propertyName,String propertyValue) throws UtilsException;\n\n\tvoid rewriteStringProperty(String propertyName,String propertyValue) throws UtilsException;\n\t\n\t/**\n\t * return value of property propertyName\n\t * @param propertyName\n\t * @return\n\t */\n\tpublic String getStringProperty(String propertyName) ;\n}", "public ImMessage() {\r\n }", "private Message createMsg(long type,Object event){\r\n Message msg=new Message(0,type,0,\"\",new Object[]{event},\r\n System.currentTimeMillis(),0,0,null,0,0,0);\r\n return msg;\r\n }", "public MessageParseException() {\n }", "public Message() {\n\tkey = MessageKey.NULL;\n\tdata = null;\n\n\tattachment = null;\n }", "public static MessageBuilder newMessage(Session session) {\n\n return new MessageBuilder(session);\n }", "public MailMessage() {\n }", "public MassMsgFrame() {\n\t}", "public Message newMessage(String type, String addr) {\n\tMessage message = null;\n\n\tif (type.equals(MessageConnection.TEXT_MESSAGE)) {\n\n\t message = new TextObject(addr);\n\t} else {\n\t if (type.equals(MessageConnection.BINARY_MESSAGE)) {\n\n message = new BinaryObject(addr);\n\t } else {\n throw new IllegalArgumentException(\n \"Message type not supported\");\n\t }\n\t}\n\n\n\treturn message;\n }", "public InfoMessage createInfoMessage();", "public Message wrap(String name, String reci, String msg)\n {\n return new Message(name, reci, msg);\n }", "public LCAmsg2 () { }", "public TriggerMessage() {\n\t}", "public MessageService()\n {\n messages.put(1L, new Message(1, \"Hello World!\", \"Marc\"));\n messages.put(2L, new Message(2, \"Hello Embarc!\", \"Kevin\"));\n messages.put(3L, new Message(3, \"Hello Luksusowa!\", \"Sid\"));\n messages.put(4L, new Message(4,\n \"I think Sid might have a bit too much blood in his alcohol-stream...\", \"Craig\"));\n }", "public Message getMessage(){\n return message;\n }", "public SystemMessage() {\r\n\t}", "public MimeMessage createEmptyMessage();", "private Message(MessageType handle) {\n this(handle, null, null);\n }", "public AbstractMessage() {\n\t\t//this.idMessage = SecUtils.getHex(SecUtils.getRandomBytes(SecUtils.getSeed(), 20));\n\t\tthis.idMessage = this.hashCode();\n\t\tthis.setChallenge(new Challenge());\n\t}", "public Message newMessage(String type) {\n\tString address = null;\n\n\t/*\n * Provide the default address from the original open.\n */\n\n\tif (((m_mode & Connector.WRITE) > 0) && (host != null)) {\n\t address = ADDRESS_PREFIX + host;\n\t if (m_iport != 0) {\n\t\taddress = address + \":\" + String.valueOf(m_iport);\n\t }\n\t}\n\n\treturn newMessage(type, address);\n }", "@Override\n public ResponsibilityResultMessage<TResult> createMessage() {\n return new ResponsibilityResultMessage<TResult>();\n }", "@Override\n public BytesMessage provideMessage(long msgCounter) throws JMSException {\n return (BytesMessage) createMessage();\n }", "MessageRefType createMessageRefType();", "@Override\n\tpublic MessageDao getMessage() {\n\t\treturn new BuyMessageImpl();\n\t}", "private Messages() {\n\t}", "public Message createMessage(String messageText)\n {\n Message msg =\n new MessageIcqImpl(messageText,\n OperationSetBasicInstantMessaging.DEFAULT_MIME_TYPE,\n OperationSetBasicInstantMessaging.DEFAULT_MIME_ENCODING, null);\n\n return msg;\n }", "public Message getMessage() throws MessageNotFetchedException {\n \tcheckedActivate(2);\n \tmMessage.initializeTransient(mFreetalk);\n return mMessage;\n }", "@Override\n\tpublic Message clone() {\n\t\treturn this;\n\t}", "@Override\n\tpublic Message clone() {\n\t\treturn this;\n\t}", "@Override\n\tpublic Message clone() {\n\t\treturn this;\n\t}", "Message getCurrentMessage();", "private Message formatMessage(LogRecord record)\n\t{\n\t\treturn new Message(record);\n\t}", "public MessageEntity() {\n }", "private Message(Builder builder) {\n super(builder);\n }", "Message create(MessageInvoice invoice);", "public UserMsg getMessage() throws Exception\r\n\t{\r\n\t\tUserMsg msg = new UserMsg();\r\n\t\tmsg.setUserId(this.userId);\r\n\t\tmsg.setFirstName(this.getFirstname());\r\n\t\tmsg.setLastName(this.getLastname());\r\n\t\tmsg.setRole(this.getRole());\r\n\t\tmsg.setUsername(this.getUsername());\r\n\t\tmsg.setPassword(this.getPassword());\r\n\t\tmsg.setLevel(this.getLevel());\r\n\t\tmsg.setPeriod(this.getPeriod());\r\n\t\tmsg.setEnable(this.isEnabled());\r\n\t\treturn msg;\r\n\t}", "public HazelcastMQMessage() {\n this(new DefaultHeaders(), null);\n }", "Payload getMsg();", "public AmqpMessage()\n {\n this(Proton.message(), null, null);\n setDurable(true);\n }", "public CallMessage() {\n\t}", "private HeartBeatMessage() {\n initFields();\n }", "public Message(){\n super();\n this.status = RETURN_OK;\n put(\"status\",this.status.getCode());\n put(\"message\", this.status.getMessage());\n }", "public messages() {\n }", "public MessageRequest() {\n\t}", "MessagesType createMessagesType();", "public Message(String key) {\n this.key = key;\n }", "private Expression(String id, String message, String expression) {\n this.id = id;\n this.message = message;\n this.expression = expression;\n }", "public ScGridColumn<AcFossWebServiceMessage> newMessageColumn()\n {\n return newMessageColumn(\"Message\");\n }", "@Override\n public MediationMessage createMessage(CamelMediationMessage message) {\n return null;\n }", "public Message(long msg) {\n m_msg = msg;\n m_type = getType(msg);\n parseMessage();\n }", "private Message(MessageType handle, String srcName) {\n this(handle, srcName, null);\n }", "void mo23214a(Message message);", "public MessageResponse() {\r\n\t}", "public Message(){\n this.body = null;\n this.contact = null;\n }" ]
[ "0.6891279", "0.68560266", "0.68554497", "0.6808153", "0.6749733", "0.6747658", "0.672867", "0.6727283", "0.67271537", "0.6714835", "0.6700748", "0.66831917", "0.66831917", "0.66269", "0.6595792", "0.65175563", "0.64772344", "0.63893384", "0.63893384", "0.63732725", "0.6325247", "0.61843055", "0.61643165", "0.6153859", "0.6152948", "0.6130373", "0.61093456", "0.6067469", "0.5987952", "0.59729403", "0.5963378", "0.5961852", "0.5952901", "0.5949736", "0.5936308", "0.59104145", "0.5894265", "0.58713263", "0.5862388", "0.5846963", "0.5838796", "0.58224744", "0.58217925", "0.5813539", "0.5812659", "0.58006763", "0.57827276", "0.57733583", "0.5722834", "0.5710984", "0.5707257", "0.5702413", "0.5700303", "0.56910974", "0.5680248", "0.56619173", "0.56495017", "0.56301814", "0.5629612", "0.5623962", "0.56182444", "0.56040585", "0.56017756", "0.5598912", "0.5597174", "0.55953693", "0.5594097", "0.5593479", "0.55924594", "0.55894405", "0.5582255", "0.5579224", "0.55684775", "0.55661803", "0.55661803", "0.55661803", "0.5558311", "0.5557306", "0.5555287", "0.5552477", "0.5538496", "0.55345976", "0.55258554", "0.5517918", "0.5514103", "0.55102533", "0.54959136", "0.549256", "0.5484229", "0.54770935", "0.5465422", "0.5464753", "0.545636", "0.5446626", "0.5440812", "0.5432776", "0.5426282", "0.5415661", "0.54092646", "0.53994274" ]
0.7133076
0
Returns a new object of class 'Null Literal Exp'.
<C> NullLiteralExp<C> createNullLiteralExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ExprNull createExprNull();", "UndefinedLiteralExp createUndefinedLiteralExp();", "public T caseNullLiteralExpCS(NullLiteralExpCS object) {\r\n return null;\r\n }", "public FnNull(){\n\t}", "RealLiteralExp createRealLiteralExp();", "public static Value makeNull() {\n return theNull;\n }", "@Override\n\tpublic Object visitLiteral(Literal literal) {\n\t\treturn null;\n\t}", "@Override public Type make_nil(byte nil) { return make(nil,_any); }", "public T caseNullLiteral(NullLiteral object)\n {\n return null;\n }", "@Override\n public String visit(NullLiteralExpr n, Object arg) {\n return null;\n }", "InvalidLiteralExp createInvalidLiteralExp();", "NULL createNULL();", "NullStatement createNullStatement();", "NullValue createNullValue();", "NullValue createNullValue();", "public T caseLiteralExpCS(LiteralExpCS object) {\r\n return null;\r\n }", "<C> RealLiteralExp<C> createRealLiteralExp();", "@Override\n public String visit(ObjectCreationExpr n, Object arg) {\n return null;\n }", "T getNullRepresentation();", "public UnaryExpNode() {\n }", "<C> InvalidLiteralExp<C> createInvalidLiteralExp();", "StringLiteralExp createStringLiteralExp();", "public T caseInvalidLiteralExpCS(InvalidLiteralExpCS object) {\r\n return null;\r\n }", "public T casePrimitiveLiteralExpCS(PrimitiveLiteralExpCS object) {\r\n return null;\r\n }", "NullSt (int ln) { super (ln); }", "public T caseNullDirective(NullDirective object)\n\t{\n\t\treturn null;\n\t}", "public final EObject ruleNullLiteral() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1965:28: ( ( () otherlv_1= 'null' ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1966:1: ( () otherlv_1= 'null' )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1966:1: ( () otherlv_1= 'null' )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1966:2: () otherlv_1= 'null'\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1966:2: ()\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1967:5: \n {\n if ( state.backtracking==0 ) {\n\n current = forceCreateModelElement(\n grammarAccess.getNullLiteralAccess().getNullLiteralAction_0(),\n current);\n \n }\n\n }\n\n otherlv_1=(Token)match(input,50,FOLLOW_50_in_ruleNullLiteral4694); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getNullLiteralAccess().getNullKeyword_1());\n \n }\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "@Override\n public String visit(CharLiteralExpr n, Object arg) {\n return null;\n }", "public T caseRealLiteralExpCS(RealLiteralExpCS object) {\r\n return null;\r\n }", "public T caseLiteral(Literal object)\n {\n return null;\n }", "<C> StringLiteralExp<C> createStringLiteralExp();", "public T caseStringLiteralExpCS(StringLiteralExpCS object) {\r\n return null;\r\n }", "SimpleLiteral createSimpleLiteral();", "public T caseNamedLiteralExpCS(NamedLiteralExpCS object) {\r\n return null;\r\n }", "public ParseExpression(){\n expression = null;\n }", "@Override\r\n\tpublic void visit(NullExpression nullExpression) {\n\r\n\t}", "@Override\n\tpublic void visit(Null n) {\n\t\t\n\t}", "@Override\n\tpublic Object visitStringLiteral(StringLiteral literal) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Element newInstance() {\n\t\treturn null;\n\t}", "public final EObject ruleNullLiteralExpCS() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:7180:2: ( ( () otherlv_1= 'null' ) )\n // InternalMyDsl.g:7181:2: ( () otherlv_1= 'null' )\n {\n // InternalMyDsl.g:7181:2: ( () otherlv_1= 'null' )\n // InternalMyDsl.g:7182:3: () otherlv_1= 'null'\n {\n // InternalMyDsl.g:7182:3: ()\n // InternalMyDsl.g:7183:4: \n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t/* */\n \t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getNullLiteralExpCSAccess().getNullLiteralExpCSAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n }\n\n }\n\n otherlv_1=(Token)match(input,108,FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getNullLiteralExpCSAccess().getNullKeyword_1());\n \t\t\n }\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public T caseNewExpression(NewExpression object)\n {\n return null;\n }", "public None()\n {\n \n }", "Expression() { }", "public T caseLetExpCS(LetExpCS object) {\r\n return null;\r\n }", "public T caseExpresionVar(ExpresionVar object)\n {\n return null;\n }", "Literal createLiteral();", "Literal createLiteral();", "public Spill() {\n\t\tthis(0, null);\n\t}", "void writeNullObject() throws SAXException {\n workAttrs.clear();\n addIdAttribute(workAttrs, \"0\");\n XmlElementName elemName = uimaTypeName2XmiElementName(\"uima.cas.NULL\");\n startElement(elemName, workAttrs, 0);\n endElement(elemName);\n }", "TypeLiteralExp createTypeLiteralExp();", "public PrimObject referenceNil() {\n //System.out.println(\"** referenceNil\");\n return classLoader().nilInstance();\n }", "public Expression() {\r\n }", "public final EObject entryRuleNullLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleNullLiteral = null;\n\n\n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1954:2: (iv_ruleNullLiteral= ruleNullLiteral EOF )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1955:2: iv_ruleNullLiteral= ruleNullLiteral EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getNullLiteralRule()); \n }\n pushFollow(FOLLOW_ruleNullLiteral_in_entryRuleNullLiteral4638);\n iv_ruleNullLiteral=ruleNullLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleNullLiteral; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleNullLiteral4648); if (state.failed) return current;\n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final EObject entryRuleNullLiteralExpCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleNullLiteralExpCS = null;\n\n\n try {\n // InternalMyDsl.g:7167:57: (iv_ruleNullLiteralExpCS= ruleNullLiteralExpCS EOF )\n // InternalMyDsl.g:7168:2: iv_ruleNullLiteralExpCS= ruleNullLiteralExpCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getNullLiteralExpCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleNullLiteralExpCS=ruleNullLiteralExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleNullLiteralExpCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "@Override\n public String visit(TextBlockLiteralExpr n, Object arg) {\n return null;\n }", "public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }", "protected RealExpression() {\r\n super();\r\n }", "public static NumberAmount create(){\n NumberAmount NA = new NumberAmount(new AdvancedOperations(Digit.Zero()));\n return NA;\n }", "private TempExpressionHelper() {\r\n\t}", "VariableExp createVariableExp();", "@Override\n public String visit(StringLiteralExpr n, Object arg) {\n return null;\n }", "private void serializeNull(final StringBuffer buffer)\n {\n buffer.append(\"N;\");\n }", "@Override\n public String visit(InstanceOfExpr n, Object arg) {\n return null;\n }", "public T caseVariableDeclarationWithoutInitCS(VariableDeclarationWithoutInitCS object) {\r\n return null;\r\n }", "private static native JsJsonNull createProd() /*-{\n return null;\n }-*/;", "T getNullValue();", "public T caseExpresion(Expresion object)\n {\n return null;\n }", "String getDefaultNull();", "public ListNode() {\n\t\tthis(0, null);\n\t}", "public ParseTreeNode visit(LiteralNode literalNode) {\n return null;\n }", "public LocalObject() {}", "public T casePrimitiveAnonymousDefinition(PrimitiveAnonymousDefinition object)\n {\n return null;\n }", "public Expression() {\r\n\t\ttext = new StringBuffer();\r\n\t\txttext = new StringBuffer();\r\n\t}", "public static Object anonymous(final Object self) {\n return ScriptRuntime.UNDEFINED;\n }", "public static String formatNull() {\n\t\treturn \"null\";\n\t}", "private NullSafe()\n {\n super();\n }", "O() { super(null); }", "public static Value makeNone() {\n return theNone;\n }", "@NonNull\n @SuppressWarnings(\"unchecked\")\n static <T> Nil<T> nil() {\n return (Nil<T>) Nil.INSTANCE;\n }", "public RemoveNullElementException() {\n }", "public NullUnit() {\n super(1, 0, new InvalidLocation(), 0);\n }", "public final EObject entryRuleNullLiteral() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleNullLiteral = null;\r\n\r\n\r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4271:2: (iv_ruleNullLiteral= ruleNullLiteral EOF )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4272:2: iv_ruleNullLiteral= ruleNullLiteral EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getNullLiteralRule()); \r\n }\r\n pushFollow(FOLLOW_ruleNullLiteral_in_entryRuleNullLiteral9187);\r\n iv_ruleNullLiteral=ruleNullLiteral();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleNullLiteral; \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleNullLiteral9197); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public void testCreateNull() {\n System.out.println(\"createNull\");// NOI18N\n \n PropertyValue result = PropertyValue.createNull();\n \n assertNotNull(result);\n assertEquals(result.getKind(),PropertyValue.Kind.NULL);\n }", "@Test\n public void testConstructorNullName() {\n String name = null;\n int cost = 10;\n\n assertThrows( IllegalArgumentException.class, () -> {\n Modifier m = new Modifier(name, cost) {\n @Override\n public int getValue() {\n return 0;\n }\n };\n });\n }", "public T caseVariableDeclarationWithoutInitListCS(VariableDeclarationWithoutInitListCS object) {\r\n return null;\r\n }", "public final EObject entryRuleNullLiteral() throws RecognitionException {\n EObject current = null;\n int entryRuleNullLiteral_StartIndex = input.index();\n EObject iv_ruleNullLiteral = null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 115) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4794:2: (iv_ruleNullLiteral= ruleNullLiteral EOF )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4795:2: iv_ruleNullLiteral= ruleNullLiteral EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getNullLiteralRule()); \n }\n pushFollow(FOLLOW_ruleNullLiteral_in_entryRuleNullLiteral9778);\n iv_ruleNullLiteral=ruleNullLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleNullLiteral; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleNullLiteral9788); if (state.failed) return current;\n\n }\n\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 115, entryRuleNullLiteral_StartIndex); }\n }\n return current;\n }", "IntegerLiteralExp createIntegerLiteralExp();", "public ExpressionTree()\n\t\t{\n\t root = null;\n\t\t}", "@Override\n public String visit(ExpressionStmt n, Object arg) {\n return null;\n }", "@Override\n public String visit(DoubleLiteralExpr n, Object arg) {\n return null;\n }", "@Override\n RuntimeValue eval(RuntimeScope curScope) throws RuntimeReturnValue {\n return null;\n }", "public T caseDefinitionExpCS(DefinitionExpCS object) {\r\n return null;\r\n }", "LetExp createLetExp();", "public final EObject ruleNullLiteral() throws RecognitionException {\n EObject current = null;\n int ruleNullLiteral_StartIndex = input.index();\n Token otherlv_1=null;\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 116) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4805:28: ( ( () otherlv_1= KEYWORD_51 ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4806:1: ( () otherlv_1= KEYWORD_51 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4806:1: ( () otherlv_1= KEYWORD_51 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4806:2: () otherlv_1= KEYWORD_51\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4806:2: ()\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4807:2: \n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n\n current = forceCreateModelElement(\n grammarAccess.getNullLiteralAccess().getNullLiteralAction_0(),\n current);\n \n }\n\n }\n\n otherlv_1=(Token)match(input,KEYWORD_51,FOLLOW_KEYWORD_51_in_ruleNullLiteral9838); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getNullLiteralAccess().getNullKeyword_1());\n \n }\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 116, ruleNullLiteral_StartIndex); }\n }\n return current;\n }", "public C42156aw mo97896J() {\n return null;\n }", "ObjectLiteral createObjectLiteral();", "public T caseLoopExpCS(LoopExpCS object) {\r\n return null;\r\n }", "protected AST_Node() {\r\n\t}", "<C> UnlimitedNaturalLiteralExp<C> createUnlimitedNaturalLiteralExp();", "@Test\n\tpublic void testNullToTerm() {\n\t\tassertTrue(JAVA_NULL.termEquals(jpc.toTerm(null)));\n\t}" ]
[ "0.7368956", "0.7350734", "0.6751136", "0.64409566", "0.63695353", "0.6242367", "0.62321585", "0.62275416", "0.6164758", "0.615992", "0.6142163", "0.6119067", "0.6072103", "0.60212123", "0.60212123", "0.59857625", "0.595354", "0.5943152", "0.59313905", "0.5863436", "0.5863296", "0.5854775", "0.5803273", "0.5739213", "0.5729277", "0.5717781", "0.5703286", "0.5687188", "0.567153", "0.56687886", "0.5668404", "0.56441724", "0.5638549", "0.5625682", "0.56188285", "0.56115997", "0.5597627", "0.5586738", "0.5572386", "0.5570926", "0.5567884", "0.5537391", "0.5523622", "0.5514233", "0.54962856", "0.5477995", "0.5477995", "0.54703563", "0.5469688", "0.5463868", "0.54556423", "0.5446339", "0.5427023", "0.5426606", "0.53925735", "0.5379299", "0.53669584", "0.53667426", "0.53642964", "0.5361538", "0.5345964", "0.53348947", "0.53072387", "0.5307127", "0.5305039", "0.52958435", "0.5295638", "0.529195", "0.5279217", "0.5277081", "0.52627057", "0.5255837", "0.5251758", "0.5225581", "0.5224651", "0.52220994", "0.52123505", "0.52095807", "0.52068704", "0.520484", "0.5204044", "0.52029514", "0.5195249", "0.5185708", "0.51846546", "0.51781166", "0.51765305", "0.5171162", "0.5168357", "0.51659507", "0.5164357", "0.5143764", "0.51391", "0.51320714", "0.51290804", "0.5116553", "0.51111275", "0.5105073", "0.5096426", "0.5076802" ]
0.7992049
0
Returns a new object of class 'Operation Call Exp'.
<C, O> OperationCallExp<C, O> createOperationCallExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OperationCallExp createOperationCallExp();", "public static ObjectInstance getMultiplyToAddOperationCallObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"sourceEndpoint\", StringMangler\n .EncodeForJmx(getMultiplyEndpointMBean().getUrl()));\n properties.put(\"sourceOperation\", getMultiplyOperationMBean()\n .getName());\n properties.put(\"targetEndpoint\", StringMangler\n .EncodeForJmx(getAddEndpointMBean().getUrl()));\n properties.put(\"targetOperation\", getAddOperationMBean().getName());\n properties.put(\"jmxType\", new OperationCall().getJmxType());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'Divide-Subtract' OperationCall ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new OperationCall().getClass().getName());\n }", "public static ObjectInstance getDivideToSubtractOperationCallObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"sourceEndpoint\", StringMangler\n .EncodeForJmx(getDivideEndpointMBean().getUrl()));\n properties.put(\"sourceOperation\", getDivideOperationMBean()\n .getName());\n properties.put(\"targetEndpoint\", StringMangler\n .EncodeForJmx(getSubtractEndpointMBean().getUrl()));\n properties.put(\"targetOperation\", getSubtractOperationMBean()\n .getName());\n properties.put(\"jmxType\", new OperationCall().getJmxType());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"'Divide-Subtract' OperationCall ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new OperationCall().getClass().getName());\n }", "public Operation(){\n\t}", "Operation createOperation();", "Operation createOperation();", "public Operation() {\n /* empty */\n }", "public Operation() {\n super();\n }", "public Operation() {\n\t}", "FunCall createFunCall();", "public T caseOperationCallExpCS(OperationCallExpCS object) {\r\n return null;\r\n }", "public static OperationResponse builder() {\n\t\treturn new OperationResponse();\n\t}", "private ExtendedOperations(){}", "Operations createOperations();", "public T caseMultOperationCallExpCS(MultOperationCallExpCS object) {\r\n return null;\r\n }", "PropertyCallExp createPropertyCallExp();", "CallStatement createCallStatement();", "public Operations() {\n history = new LinkedList<>();\n future = new LinkedList<>();\n }", "public Call createCall() throws ServiceException {\n\t\treturn null;\n\t}", "public CALL(Exp f, ExpList a) {func=f; args=a;}", "public OperationMacro() {\n errorList = new ArrayList();\n linkedOpList = new ArrayList();\n }", "public EnbOper() {\n super(Epc.NAMESPACE, \"enb-oper\");\n }", "InOper createInOper();", "public ConvCalculator(Expression exp){\r\n this();\r\n this.expression = exp;\r\n }", "public static ObjectInstance getAddOperationObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"name\", StringMangler\n .EncodeForJmx(getAddOperationMBean().getName()));\n properties.put(\"jmxType\", new Operation().getJmxType());\n o = new ObjectName(_domain, properties);\n\n }\n catch (Exception e)\n {\n Assert.fail(\"'Add' Operation ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new Operation().getClass().getName());\n }", "public Call createCall(QName arg0) throws ServiceException {\n\t\treturn null;\n\t}", "Operation getOperation();", "public T caseOperationCallBinaryExpCS(OperationCallBinaryExpCS object) {\r\n return null;\r\n }", "public Call createCall(QName arg0, QName arg1) throws ServiceException {\n\t\treturn null;\n\t}", "public OpDesc() {\n\n }", "@Override\n\tpublic Operation createOperate() {\n\t\treturn new OperationDiv();\n\t}", "public T caseOperationCallBaseExpCS(OperationCallBaseExpCS object) {\r\n return null;\r\n }", "public Call createCall(QName arg0, String arg1) throws ServiceException {\n\t\treturn null;\n\t}", "public Operation(OperationType type) {\n this.type = type;\n }", "public T caseAdditiveOperationCallExpCS(AdditiveOperationCallExpCS object) {\r\n return null;\r\n }", "Request _request(String operation);", "OpList createOpList();", "public T caseOperationCallOnSelfExpCS(OperationCallOnSelfExpCS object) {\r\n return null;\r\n }", "public Operation getOperation();", "public T caseLogicalAndOperationCallExpCS(LogicalAndOperationCallExpCS object) {\r\n return null;\r\n }", "@SuppressWarnings(\"unchecked\")\n\t\tpublic Operation createOperation(String opName, String[] params, OperationCallback caller) {\n\t\t\tthrow new RuntimeException(\"Method 'createOperation' in class 'DummyNode' not yet implemented!\");\n\t\t\t//return null;\n\t\t}", "private Operand parseFactor() {\n Operand operand = new Operand(SymbolTable.OBJECT_NONE);\n switch (nextToken.kind) {\n case Token.IDENT:\n operand = parseDesignator();\n\n if (nextToken.kind == Token.LPAR) {\n if (operand.kind != Operand.KIND_METHOD) {\n error(\"Illegal method call\");\n }\n parseActPars(operand.object);\n if (operand.object == SymbolTable.OBJECT_LEN) {\n code.put(Code.OP_ARRAYLENGTH);\n } else if(operand.object != SymbolTable.OBJECT_CHR\n && operand.object != SymbolTable.OBJECT_ORD) {\n code.put(Code.OP_CALL);\n code.put2(operand.address);\n }\n } else {\n code.load(operand);\n }\n\n break;\n case Token.NUMBER:\n check(Token.NUMBER);\n operand = new Operand(token.value);\n operand.type = SymbolTable.STRUCT_INT;\n code.load(new Operand(token.value));\n break;\n case Token.CHAR_CONST:\n check(Token.CHAR_CONST);\n operand = new Operand(token.value);\n operand.type = SymbolTable.STRUCT_CHAR;\n code.load(new Operand(token.value));\n break;\n case Token.NEW:\n check(Token.NEW);\n check(Token.IDENT);\n SymObject object = find(token.string);\n assertIsType(object);\n Struct type = object.type;\n if (nextToken.kind == Token.LBRACK) {\n check(Token.LBRACK);\n Struct sizeType = parseExpr().type;\n if (sizeType != SymbolTable.STRUCT_INT) {\n error(\"Array size must be an int\");\n }\n check(Token.RBRACK);\n type = new Struct(Struct.KIND_ARRAY, type);\n\n code.put(Code.OP_NEWARRAY);\n if (type.elementsType == SymbolTable.STRUCT_CHAR) {\n code.put(0);\n } else {\n code.put(1);\n }\n } else {\n if (type.kind != Struct.KIND_CLASS) {\n error(\"Illegal instantiation: type isn't a class\");\n }\n\n code.put(Code.OP_NEW);\n code.put2(type.fields.size());\n }\n operand = new Operand(Operand.KIND_EXPR, -1, type);\n break;\n case Token.LPAR:\n check(Token.LPAR);\n operand = parseExpr();\n check(Token.RPAR);\n break;\n }\n\n return operand;\n }", "public interface Operation {\n}", "public Call_simple() {\n }", "Operations operations();", "public CallInfo() {\n\t}", "public org.xmlsoap.schemas.wsdl.http.OperationType addNewOperation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.http.OperationType target = null;\n target = (org.xmlsoap.schemas.wsdl.http.OperationType)get_store().add_element_user(OPERATION$0);\n return target;\n }\n }", "public Command createOperationCommand(int operator, Operand operand1, Operand operand2);", "Operacion createOperacion();", "IOperationable create(String operationType);", "public OperationCallItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}", "private void addOp(Class op){\n try {\n //Create a new instance and add it to the list\n Operation operation = (Operation)op.newInstance();\n operations.put(operation.getTextualRepresentation(), operation);\n } catch (InstantiationException | IllegalAccessException ex) {\n Logger.getLogger(RPC.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "<C, P> PropertyCallExp<C, P> createPropertyCallExp();", "Expression() { }", "public T caseUnaryOperationCallExpCS(UnaryOperationCallExpCS object) {\r\n return null;\r\n }", "public interface Operation {\n String description();\n void command();\n}", "public final EObject ruleECallOperationActivityDefinition() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token this_BEGIN_1=null;\n Token this_END_3=null;\n EObject lv_operation_2_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:3296:2: ( (otherlv_0= Call_operation this_BEGIN_1= RULE_BEGIN ( (lv_operation_2_0= ruleECallOperationActivityDefinitionBody ) ) this_END_3= RULE_END ) )\n // InternalRMParser.g:3297:2: (otherlv_0= Call_operation this_BEGIN_1= RULE_BEGIN ( (lv_operation_2_0= ruleECallOperationActivityDefinitionBody ) ) this_END_3= RULE_END )\n {\n // InternalRMParser.g:3297:2: (otherlv_0= Call_operation this_BEGIN_1= RULE_BEGIN ( (lv_operation_2_0= ruleECallOperationActivityDefinitionBody ) ) this_END_3= RULE_END )\n // InternalRMParser.g:3298:3: otherlv_0= Call_operation this_BEGIN_1= RULE_BEGIN ( (lv_operation_2_0= ruleECallOperationActivityDefinitionBody ) ) this_END_3= RULE_END\n {\n otherlv_0=(Token)match(input,Call_operation,FOLLOW_6); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getECallOperationActivityDefinitionAccess().getCall_operationKeyword_0());\n \t\t\n this_BEGIN_1=(Token)match(input,RULE_BEGIN,FOLLOW_46); \n\n \t\t\tnewLeafNode(this_BEGIN_1, grammarAccess.getECallOperationActivityDefinitionAccess().getBEGINTerminalRuleCall_1());\n \t\t\n // InternalRMParser.g:3306:3: ( (lv_operation_2_0= ruleECallOperationActivityDefinitionBody ) )\n // InternalRMParser.g:3307:4: (lv_operation_2_0= ruleECallOperationActivityDefinitionBody )\n {\n // InternalRMParser.g:3307:4: (lv_operation_2_0= ruleECallOperationActivityDefinitionBody )\n // InternalRMParser.g:3308:5: lv_operation_2_0= ruleECallOperationActivityDefinitionBody\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getECallOperationActivityDefinitionAccess().getOperationECallOperationActivityDefinitionBodyParserRuleCall_2_0());\n \t\t\t\t\n pushFollow(FOLLOW_8);\n lv_operation_2_0=ruleECallOperationActivityDefinitionBody();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getECallOperationActivityDefinitionRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"operation\",\n \t\t\t\t\t\tlv_operation_2_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.ECallOperationActivityDefinitionBody\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n this_END_3=(Token)match(input,RULE_END,FOLLOW_2); \n\n \t\t\tnewLeafNode(this_END_3, grammarAccess.getECallOperationActivityDefinitionAccess().getENDTerminalRuleCall_3());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public T caseOperationCallWithSourceExpCS(OperationCallWithSourceExpCS object) {\r\n return null;\r\n }", "ExpOperand createExpOperand();", "public T caseRelationalOperationCallExpCS(RelationalOperationCallExpCS object) {\r\n return null;\r\n }", "Nop createNop();", "public Calculator() {\r\n\t\tthis.operator = new Addition();\r\n\t}", "@Override\n public SymmetricOpDescription build() {\n return new SymmetricOpDescription(operatorType, dataCodecClass, tasks, redFuncClass);\n }", "public PhoneCall build() {\n return new PhoneCall(caller, callee, startTime, endTime);\n }", "public Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exceptions,\n ContextList contexts) {\n throw new NO_IMPLEMENT(reason);\n }", "SomePlus createSomePlus();", "Expression createExpression();", "public ChainOperator(){\n\n }", "public T caseLogicalImpliesOperationCallExpCS(LogicalImpliesOperationCallExpCS object) {\r\n return null;\r\n }", "public RequestImpl(ORB orb,\n org.omg.CORBA.Object targetObject,\n Context ctx,\n String operationName,\n NVList argumentList,\n NamedValue resultContainer,\n ExceptionList exceptionList,\n ContextList ctxList){\n // initialize the orb\n _orb=orb;\n _wrapper=ORBUtilSystemException.get(orb,\n CORBALogDomains.OA_INVOCATION);\n // initialize target, context and operation name\n _target=targetObject;\n _ctx=ctx;\n _opName=operationName;\n // initialize argument list if not passed in\n if(argumentList==null)\n _arguments=new NVListImpl(_orb);\n else\n _arguments=argumentList;\n // set result container.\n _result=resultContainer;\n // initialize exception list if not passed in\n if(exceptionList==null)\n _exceptions=new ExceptionListImpl();\n else\n _exceptions=exceptionList;\n // initialize context list if not passed in\n if(ctxList==null)\n _ctxList=new ContextListImpl(_orb);\n else\n _ctxList=ctxList;\n // initialize environment\n _env=new EnvironmentImpl();\n }", "public Operation operation() {\n return Operation.fromSwig(alert.getOp());\n }", "public OperationStFactory(String input, String oper) {\r\n\t\tthis.inputList = u.toInputList(input);\r\n\t\tthis.operator = u.toCharList(oper);\r\n\t}", "public APIOperation()\n {\n super();\n }", "public void makeCall() {\n\n }", "Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);", "ProcedureCall createProcedureCall();", "com.learning.learning.grpc.ManagerOperationRequest.Operations getOperation();", "protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }", "public AgwCslOper() {\n super(Epc.NAMESPACE, \"agw-csl-oper\");\n }", "public Operation(OperationType code) {\n\t\tthis.code = code;\n\t\tthis.timestamp = System.currentTimeMillis();\n\t}", "OpFunction createOpFunction();", "public Call getCurrentCall();", "public AppCall createBaseAppCall() {\r\n return new AppCall(getRequestCode());\r\n }", "private Operation classCreatorRest(Token t, Scope scope, Vector queue)\r\n {\r\n Vector v = new Vector();\r\n String s = \"super\";\r\n Operation root = new Operation();\r\n\r\n root.type.type = Keyword.NONESY;\r\n root.type.ident = t;\r\n traceOn(v);\r\n root.left = arguments(scope, v, queue);\r\n traceOff(v);\r\n\r\n for(int i = 0; i < v.size(); i++)\r\n {\r\n Token pt = (Token)v.get(i);\r\n\r\n if (pt.kind == Keyword.NUMBERSY)\r\n s += pt.val;\r\n else if (pt.kind == Keyword.LNUMBERSY)\r\n s += pt.val + \"L\";\r\n else if (pt.kind == Keyword.DNUMBERSY)\r\n s += pt.fval;\r\n else if (pt.kind == Keyword.IDENTSY)\r\n s += pt.string;\r\n else\r\n s += pt.kind.string;\r\n }\r\n if (s.endsWith(\"()\"))\r\n s = \"\";\r\n else\r\n s += ';';\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n ClassType x = new ClassType();\r\n x.name = new Token();\r\n x.name.kind = Keyword.IDENTSY;\r\n x.name.string = \"Anonymous\" + anonymous++;\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n x.extend = new ClassType(t.string.substring(t.string.lastIndexOf('.') + 1));\r\n x.implement = new ClassType[1];\r\n x.implement[0] = x.extend;\r\n declMember(scope, x);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n root.type.ident = x.name;\r\n root.type.type = Keyword.NONESY;\r\n root.left.left = null;\r\n Vector old = queue;\r\n queue = new Vector();\r\n HashSet dummy = unresolved;\r\n unresolved = x.unresolved;\r\n unresolved.add(t.string);\r\n classBody(x, new Modifier(), s, queue);\r\n addToConstructor(x, queue);\r\n queue = old;\r\n unresolved = dummy;\r\n writeList(x);\r\n }\r\n\r\n return root;\r\n }", "public static ObjectInstance getDivideOperationObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"name\", StringMangler\n .EncodeForJmx(getDivideOperationMBean().getName()));\n properties.put(\"jmxType\", new Operation().getJmxType());\n o = new ObjectName(_domain, properties);\n\n }\n catch (Exception e)\n {\n Assert\n .fail(\"'Divide' Operation ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new Operation().getClass().getName());\n }", "public Object construct() {\n try {\n Object res;\n\n res = mTarget.invokeTimeout(mMethodName, mParams, mTimeout);\n return res;\n }\n catch (TokenFailure ex) {\n return ex;\n }\n catch (RPCException ex) {\n return ex;\n }\n catch (XMPPException ex) {\n return ex;\n }\n }", "BOperation createBOperation();", "public Expression() {\r\n }", "Operand createOperand();", "public fUML.Semantics.Classes.Kernel.Value new_() {\n return new RealPlusFunctionBehaviorExecution();\n }", "public T caseCallExpCS(CallExpCS object) {\r\n return null;\r\n }", "public Action createOperation(int choose) {\n if (choose==0) {\n action = new Addition();\n } else if (choose==1) {\n action = new Subtracting();\n } else if (choose==2) {\n action = new Multiplication();\n } else if (choose==3) {\n action = new Dividing();\n } else {\n action = null;\n }\n return action;\n }", "public OperationFactory() {\n initMap();\n }", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions) { throw Extensions.todo(); }", "public String getOperation() {\n if(isConstructor()) {\n return \"new\";\n }\n return getName();\n }", "public OpStack() {\n opStack = new Stack();\n }", "ROp() {super(null); _ops=new HashMap<>(); }", "public void setOperation(String op) {this.operation = op;}", "Plus createPlus();", "Plus createPlus();" ]
[ "0.8484386", "0.73201853", "0.6913047", "0.6542828", "0.642407", "0.642407", "0.6368638", "0.63460076", "0.61215925", "0.60323113", "0.60027164", "0.59994704", "0.5941218", "0.5889305", "0.5866585", "0.58144224", "0.5810878", "0.58043885", "0.5795525", "0.5795074", "0.5782932", "0.5766526", "0.5745139", "0.5729954", "0.57090485", "0.5697675", "0.5663186", "0.56612974", "0.56193477", "0.5607286", "0.55903953", "0.558872", "0.5576945", "0.5574287", "0.5564947", "0.55546695", "0.5546553", "0.5545699", "0.55326253", "0.5518642", "0.55178076", "0.55101883", "0.5499677", "0.54969823", "0.5489371", "0.54782665", "0.54763424", "0.5476269", "0.5470333", "0.54620844", "0.54499644", "0.5431888", "0.5431499", "0.54275006", "0.5425829", "0.54224086", "0.54166216", "0.54016787", "0.5394158", "0.5388729", "0.5373889", "0.53733987", "0.53688806", "0.53425115", "0.5341203", "0.53317755", "0.53235304", "0.53141207", "0.5311822", "0.5292862", "0.5283976", "0.52780324", "0.52778834", "0.5276491", "0.5275656", "0.52676225", "0.52629966", "0.52612287", "0.5254077", "0.5253962", "0.52504295", "0.52500916", "0.5250011", "0.5249902", "0.52450824", "0.5239295", "0.5236969", "0.5234334", "0.52167296", "0.52099854", "0.5203115", "0.5198486", "0.5197977", "0.519744", "0.51957726", "0.51888025", "0.5184943", "0.51849073", "0.5184423", "0.5184423" ]
0.734712
1
Returns a new object of class 'Property Call Exp'.
<C, P> PropertyCallExp<C, P> createPropertyCallExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PropertyCallExp createPropertyCallExp();", "Property createProperty();", "OperationCallExp createOperationCallExp();", "public static MemberExpression property(Expression expression, String name) { throw Extensions.todo(); }", "public static MemberExpression property(Expression expression, Method method) { throw Extensions.todo(); }", "public static MemberExpression property(Expression expression, Class type, String name) { throw Extensions.todo(); }", "private PropertyEvaluator createEvaluator() {\n return helper.getStandardPropertyEvaluator();\n }", "public Constant createProperty(Expression exp) {\r\n\t\tif (exp.isConstant()){\r\n\t\t\t// no regexp, std property\r\n\t\t\treturn (Constant) exp;\r\n\t\t}\r\n\t\tConstant cst = createConstant(RootPropertyQN);\r\n\t\tcst.setExpression(exp);\r\n\t\treturn cst;\r\n\t}", "public static ObjectInstance getMultiplyToAddOperationCallObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"sourceEndpoint\", StringMangler\n .EncodeForJmx(getMultiplyEndpointMBean().getUrl()));\n properties.put(\"sourceOperation\", getMultiplyOperationMBean()\n .getName());\n properties.put(\"targetEndpoint\", StringMangler\n .EncodeForJmx(getAddEndpointMBean().getUrl()));\n properties.put(\"targetOperation\", getAddOperationMBean().getName());\n properties.put(\"jmxType\", new OperationCall().getJmxType());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'Divide-Subtract' OperationCall ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new OperationCall().getClass().getName());\n }", "public T casePropertyCallExpCS(PropertyCallExpCS object) {\r\n return null;\r\n }", "public static MemberExpression property(Expression expression, PropertyInfo property) { throw Extensions.todo(); }", "PropertyReference createPropertyReference();", "public static Property property(Expression expression, String name) {\n\t\treturn Property.create(expression, name);\n\t}", "PropertyRule createPropertyRule();", "public final ManchesterOWLSyntaxAutoComplete.propertyExpression_return propertyExpression() {\n ManchesterOWLSyntaxAutoComplete.propertyExpression_return retval = new ManchesterOWLSyntaxAutoComplete.propertyExpression_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxTree IDENTIFIER6 = null;\n ManchesterOWLSyntaxTree ENTITY_REFERENCE7 = null;\n ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return complexPropertyExpression8 = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:171:1:\n // ( IDENTIFIER | ENTITY_REFERENCE | complexPropertyExpression )\n int alt8 = 3;\n switch (input.LA(1)) {\n case IDENTIFIER: {\n alt8 = 1;\n }\n break;\n case ENTITY_REFERENCE: {\n alt8 = 2;\n }\n break;\n case INVERSE_OBJECT_PROPERTY_EXPRESSION: {\n alt8 = 3;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 8, 0, input);\n throw nvae;\n }\n switch (alt8) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:172:7:\n // IDENTIFIER\n {\n IDENTIFIER6 = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_propertyExpression462);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable().match(\n IDENTIFIER6.getText()));\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:176:9:\n // ENTITY_REFERENCE\n {\n ENTITY_REFERENCE7 = (ManchesterOWLSyntaxTree) match(input,\n ENTITY_REFERENCE,\n FOLLOW_ENTITY_REFERENCE_in_propertyExpression480);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable().match(\n ENTITY_REFERENCE7.getText()));\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:180:7:\n // complexPropertyExpression\n {\n pushFollow(FOLLOW_complexPropertyExpression_in_propertyExpression494);\n complexPropertyExpression8 = complexPropertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable()\n .match(complexPropertyExpression8 != null ? complexPropertyExpression8.node\n .getText() : null));\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "public Property() {\n this(0, 0, 0, 0);\n }", "public Property createProperty() {\n Property p = new Property();\n p.setProject(getProject());\n p.setTaskName(\"property\");\n properties.addElement(p);\n return p;\n }", "public Property createProperty() {\n if (newProject == null) {\n reinit();\n }\n Property p = new Property(true, getProject());\n p.setProject(newProject);\n p.setTaskName(\"property\");\n properties.addElement(p);\n return p;\n }", "private Expression toExpression() {\n Expression lhs = null, rhs = null;\n if (base instanceof DerefSymbol) {\n lhs = ((DerefSymbol)base).toExpression();\n } else if (base instanceof AccessSymbol) {\n lhs = ((AccessSymbol)base).toExpression();\n } else if (base instanceof Identifier) {\n lhs = new Identifier(base);\n } else {\n PrintTools.printlnStatus(0,\n \"[WARNING] Unexpected access expression type\");\n return null;\n }\n rhs = new Identifier(member);\n return new AccessExpression(lhs, AccessOperator.MEMBER_ACCESS, rhs);\n }", "public static IndexExpression Property(Expression expression, String name, Expression[] arguments) { throw Extensions.todo(); }", "private GetProperty(Builder builder) {\n super(builder);\n }", "Expression createExpression();", "public T casePropertyCallBaseExpCS(PropertyCallBaseExpCS object) {\r\n return null;\r\n }", "public Repeat(Expression exp, Method callingMethod){\n\t\tsuper(callingMethod);\n\t\tthis.exp = exp;\n\t}", "public static MemberExpression makeMemberAccess(Expression expression, Member member) { throw Extensions.todo(); }", "public static ObjectInstance getDivideToSubtractOperationCallObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"sourceEndpoint\", StringMangler\n .EncodeForJmx(getDivideEndpointMBean().getUrl()));\n properties.put(\"sourceOperation\", getDivideOperationMBean()\n .getName());\n properties.put(\"targetEndpoint\", StringMangler\n .EncodeForJmx(getSubtractEndpointMBean().getUrl()));\n properties.put(\"targetOperation\", getSubtractOperationMBean()\n .getName());\n properties.put(\"jmxType\", new OperationCall().getJmxType());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"'Divide-Subtract' OperationCall ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new OperationCall().getClass().getName());\n }", "public T casePropertyCallOnSelfExpCS(PropertyCallOnSelfExpCS object) {\r\n return null;\r\n }", "public void addPropertyExpression(Object comp, String propertyName, DataStoreEvaluator expEval) throws NoSuchMethodException, DataStoreException {\r\n\t\tClass c = comp.getClass();\r\n\t\tMethod m[] = c.getMethods();\r\n\t\tMethod exe = null;\r\n\t\tString name = \"set\" + propertyName;\r\n\t\tClass parms[] = null;\r\n\t\tfor (int i = 0; i < m.length; i++) {\r\n\t\t\tif (name.equalsIgnoreCase(m[i].getName())) {\r\n\t\t\t\tparms = m[i].getParameterTypes();\r\n\t\t\t\tif (parms.length == 1) {\r\n\t\t\t\t\texe = m[i];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (exe == null)\r\n\t\t\tthrow new NoSuchMethodException(\"Couldn't find a set method for property:\" + propertyName);\r\n\t\tThreeObjectContainer t = new ThreeObjectContainer(comp, exe, expEval);\r\n\t\tif (_propertyExpressions == null)\r\n\t\t\t_propertyExpressions = new Vector();\r\n\t\t_propertyExpressions.addElement(t);\r\n\t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public Property() {}", "public CALL(Exp f, ExpList a) {func=f; args=a;}", "private ReadProperty()\r\n {\r\n\r\n }", "Expression() { }", "protected PropertyChangeSupport getPropertyChange() {\r\n\t\tif (propertyChange == null) {\r\n\t\t\tpropertyChange = new PropertyChangeSupport(this);\r\n\t\t}\r\n\t\t;\r\n\t\treturn propertyChange;\r\n\t}", "public PropertiesQDoxPropertyExpander() {\n super();\n }", "public native final Value property(final String name)/*-{\n\t\treturn {\n\t\t\tdatum : this.property(name)\n\t\t};\n\t}-*/;", "Object getPropertytrue();", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions, Iterable<Member> members) { throw Extensions.todo(); }", "<C, O> OperationCallExp<C, O> createOperationCallExp();", "public Property(Property p) {\r\n\t\tpositive = Arrays.copyOf(p.positive, p.positive.length);\r\n\t\tnegative = Arrays.copyOf(p.negative, p.negative.length);\r\n\t\tstop = Arrays.copyOf(p.stop, p.stop.length);\r\n\t\tscoringmethod = p.scoringmethod;\r\n\t\tmindistance = p.mindistance;\r\n\t}", "public static IndexExpression property(Expression expression, PropertyInfo property, Expression[] arguments) { throw Extensions.todo(); }", "private Expr expression() {\n return assignment();\n }", "private static Property makeNewPropertyFromUserInput() {\n\t\tint regNum = requestRegNum();\r\n\t\t// check if a registrant with the regNum is available\r\n\t\tif (getRegControl().findRegistrant(regNum) == null) {\r\n\t\t\tSystem.out.println(\"Registrant number not found\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tString coordinateString = getResponseTo(\"Enter top and left coordinates of property (as X, Y): \");\r\n\t\t// split the xLeft and yTop from the string: \"xLeft, yTop\"\r\n\t\tString[] coordinates = coordinateString.split(\", \");\r\n\t\tString dimensionString = getResponseTo(\"Enter length and width of property (as length, width): \");\r\n\t\t// split the xLength and yWidth from the string: \"xLength, yWidth\"\r\n\t\tString[] dimensions = dimensionString.split(\", \");\r\n\t\t// convert all string in the lists to int and create a new Property object with them\r\n\t\tint xLeft = Integer.parseInt(coordinates[0]);\r\n\t\tint yTop = Integer.parseInt(coordinates[1]);\r\n\t\tint xLength = Integer.parseInt(dimensions[0]);\r\n\t\tint yWidth = Integer.parseInt(dimensions[1]);\r\n\t\t// Limit for registrant for property size minimum 20m x 10m and maximum size 1000m x 1000m\r\n\t\tif (xLength < 20 || yWidth < 10 || (xLength + xLeft) > 1000 || (yTop + yWidth) > 1000) {\r\n\t\t\tSystem.out.println(\"Invalid dimensions/coordinates inputs\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tProperty new_prop = new Property(xLength, yWidth, Integer.parseInt(coordinates[0]),\r\n\t\t\t\tInteger.parseInt(coordinates[1]), regNum);\r\n\t\treturn new_prop;\r\n\t}", "public PhoneCall build() {\n return new PhoneCall(caller, callee, startTime, endTime);\n }", "public final ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return complexPropertyExpression() {\n ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return retval = new ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxTree IDENTIFIER9 = null;\n ManchesterOWLSyntaxTree ENTITY_REFERENCE10 = null;\n ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return p = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:190:1:\n // ( ^( INVERSE_OBJECT_PROPERTY_EXPRESSION p=\n // complexPropertyExpression ) | ^(\n // INVERSE_OBJECT_PROPERTY_EXPRESSION IDENTIFIER ) | ^(\n // INVERSE_OBJECT_PROPERTY_EXPRESSION ENTITY_REFERENCE ) )\n int alt9 = 3;\n int LA9_0 = input.LA(1);\n if (LA9_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n int LA9_1 = input.LA(2);\n if (LA9_1 == DOWN) {\n switch (input.LA(3)) {\n case IDENTIFIER: {\n alt9 = 2;\n }\n break;\n case ENTITY_REFERENCE: {\n alt9 = 3;\n }\n break;\n case INVERSE_OBJECT_PROPERTY_EXPRESSION: {\n alt9 = 1;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 9,\n 2, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 9, 1, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 9, 0, input);\n throw nvae;\n }\n switch (alt9) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:191:2:\n // ^( INVERSE_OBJECT_PROPERTY_EXPRESSION p=\n // complexPropertyExpression )\n {\n match(input, INVERSE_OBJECT_PROPERTY_EXPRESSION,\n FOLLOW_INVERSE_OBJECT_PROPERTY_EXPRESSION_in_complexPropertyExpression528);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_complexPropertyExpression_in_complexPropertyExpression534);\n p = complexPropertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start).setCompletions(p.node\n .getCompletions());\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:195:4:\n // ^( INVERSE_OBJECT_PROPERTY_EXPRESSION IDENTIFIER )\n {\n match(input, INVERSE_OBJECT_PROPERTY_EXPRESSION,\n FOLLOW_INVERSE_OBJECT_PROPERTY_EXPRESSION_in_complexPropertyExpression544);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n IDENTIFIER9 = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_complexPropertyExpression546);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable().match(\n IDENTIFIER9.getText()));\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:199:4:\n // ^( INVERSE_OBJECT_PROPERTY_EXPRESSION ENTITY_REFERENCE )\n {\n match(input, INVERSE_OBJECT_PROPERTY_EXPRESSION,\n FOLLOW_INVERSE_OBJECT_PROPERTY_EXPRESSION_in_complexPropertyExpression556);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n ENTITY_REFERENCE10 = (ManchesterOWLSyntaxTree) match(input,\n ENTITY_REFERENCE,\n FOLLOW_ENTITY_REFERENCE_in_complexPropertyExpression558);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable().match(\n ENTITY_REFERENCE10.getText()));\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "JavaExpression createJavaExpression();", "public Property(Property p) {\n\t\tcity=p.getCity();\n\t\towner=p.getOwner();\n\t\tpropertyName=p.getPropertyName();\n\t\trentAmount=p.getRentAmount();\n\t\tplot= new Plot(p.plot);\n\t}", "public Property(String name) {\n super(SOME, NONE);\n this.name = name;\n }", "public Property(Property prop, int regNum) {\n // this code provided by Dave Houtman [2020] personal communication\n this(prop.getXLength(), prop.getYWidth(), prop.getXLeft(), prop.getYTop(), regNum);\n }", "ReferenceProperty createReferenceProperty();", "public void addPropertyExpression(Object comp, String propertyName, DataStoreBuffer dsb, DataStoreExpression propExpression) throws NoSuchMethodException, DataStoreException {\r\n\r\n\t\tDataStoreEvaluator dse = new DataStoreEvaluator(dsb, propExpression);\r\n\t\taddPropertyExpression(comp, propertyName, dse);\r\n\t}", "public Property() {\r\n\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\tscoringmethod = 0;\r\n\t\tmindistance = 0.5;\r\n\t}", "Property getProperty();", "Property getProperty();", "public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }", "public static IndexExpression property(Expression expression, PropertyInfo property, Iterable<Expression> arguments) { throw Extensions.todo(); }", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions) { throw Extensions.todo(); }", "public Object getExpression();", "public Object prop(String name, String type);", "public String prop(String name);", "public static NewExpression new_(Class type) { throw Extensions.todo(); }", "public Property()\r\n {\r\n }", "private static PropertyFunctionInstance magicProperty(Context context,\n Triple pfTriple,\n BasicPattern triples)\n {\n List<Triple> listTriples = new ArrayList<>() ;\n\n GNode sGNode = new GNode(triples, pfTriple.getSubject()) ;\n GNode oGNode = new GNode(triples, pfTriple.getObject()) ;\n List<Node> sList = null ;\n List<Node> oList = null ;\n \n if ( GraphList.isListNode(sGNode) )\n {\n sList = GraphList.members(sGNode) ;\n GraphList.allTriples(sGNode, listTriples) ;\n }\n if ( GraphList.isListNode(oGNode) )\n {\n oList = GraphList.members(oGNode) ;\n GraphList.allTriples(oGNode, listTriples) ;\n }\n \n PropFuncArg subjArgs = new PropFuncArg(sList, pfTriple.getSubject()) ;\n PropFuncArg objArgs = new PropFuncArg(oList, pfTriple.getObject()) ;\n \n // Confuses single arg with a list of one. \n PropertyFunctionInstance pfi = new PropertyFunctionInstance(subjArgs, pfTriple.getPredicate(), objArgs) ;\n \n triples.getList().removeAll(listTriples) ;\n return pfi ;\n }", "public interface PropertyAccess extends FeatureCall\n{\n}", "@SuppressWarnings( \"unchecked\" )\n public static <T> PropertyFunction<T> property( Property<T> property )\n {\n return ( (PropertyReferenceHandler<T>) Proxy.getInvocationHandler( property ) ).property();\n }", "private <T extends ProcessingElement> T makePE(PEMaker pem, Class<T> type) throws NoSuchFieldException,\n IllegalAccessException {\n T pe = app.createPE(type);\n pe.setSingleton(pem.isSingleton());\n\n if (pem.getCacheMaximumSize() > 0)\n pe.setPECache(pem.getCacheMaximumSize(), pem.getCacheDuration(), TimeUnit.MILLISECONDS);\n\n if (pem.getTimerInterval() > 0)\n pe.setTimerInterval(pem.getTimerInterval(), TimeUnit.MILLISECONDS);\n\n if (pem.getTriggerEventType() != null) {\n if (pem.getTriggerNumEvents() > 0 || pem.getTriggerInterval() > 0) {\n pe.setTrigger(pem.getTriggerEventType(), pem.getTriggerNumEvents(), pem.getTriggerInterval(),\n TimeUnit.MILLISECONDS);\n }\n }\n\n /* Use introspection to match properties to class fields. */\n setPEAttributes(pe, pem, type);\n return pe;\n }", "public Expression() {\r\n }", "<C, P> AssociationClassCallExp<C, P> createAssociationClassCallExp();", "public ProcessCallProperties getProcessCallProperties()\n {\n return processCallProperties;\n }", "private DiffProperty() {\n\t\t// No implementation\n\t}", "PrimitiveProperty createPrimitiveProperty();", "public T casePropertyCallExplicitPathExpCS(PropertyCallExplicitPathExpCS object) {\r\n return null;\r\n }", "private PropertySingleton(){}", "protected abstract Property createProperty(String key, Object value);", "AExpArgs createAExpArgs();", "public JournalPropertyValueFactory(@NamedArg(\"property\") String property) {\n super(property);\n }", "protected java.beans.PropertyChangeSupport getPropertyChange() {\n\t\tif (propertyChange == null) {\n\t\t\tpropertyChange = new java.beans.PropertyChangeSupport(this);\n\t\t};\n\t\treturn propertyChange;\n\t}", "Expression getExp();", "public Object construct() {\n try {\n Object res;\n\n res = mTarget.invokeTimeout(mMethodName, mParams, mTimeout);\n return res;\n }\n catch (TokenFailure ex) {\n return ex;\n }\n catch (RPCException ex) {\n return ex;\n }\n catch (XMPPException ex) {\n return ex;\n }\n }", "public Property() {\n\t\tcity=\"\";\n\t\towner=\"\";\n\t\tpropertyName=\"\";\n\t\trentAmount=0;\n\t\tplot= new Plot(0,0,1,1);\n\t}", "Expr createExpr();", "int getProperty0();", "public DSMFunction( Properties props )\n {\n super( props );\n }", "@Override public com.hp.hpl.jena.rdf.model.Property createProperty(final String nameSpace, final String localName)\n {\n final com.hp.hpl.jena.rdf.model.Property property = super.createProperty(nameSpace, localName);\n \n if (DEBUG.SEARCH && DEBUG.RDF) {\n final String propName;\n if (property instanceof com.hp.hpl.jena.rdf.model.impl.PropertyImpl)\n propName = \"PropertyImpl\";\n else\n propName = property.getClass().getName();\n Log.debug(\"createProperty \" + Util.tags(nameSpace)\n + String.format(\"+%-18s= %s@%08X[%s]\",\n Util.tags(localName), // note need extra padding for escape codes here:\n propName,\n System.identityHashCode(property),\n property.toString()));\n }\n return property;\n }", "public static MemberInitExpression memberInit(NewExpression newExpression, Iterable<MemberBinding> bindings) { throw Extensions.todo(); }", "public void addPropertyExpression(Object comp, String propertyName, DataStoreBuffer dsb, String expression) throws NoSuchMethodException, DataStoreException {\r\n\t\tDataStoreEvaluator dse = new DataStoreEvaluator(dsb, expression);\r\n\t\taddPropertyExpression(comp, propertyName, dse);\r\n\t}", "public IExpObject getProperty(Integer id) throws ExpException {\n return null;\n }", "public NewInstanceExpressionElements getNewInstanceExpressionAccess() {\r\n\t\treturn pNewInstanceExpression;\r\n\t}", "JavaEvaluator createJavaEvaluator();", "protected java.beans.PropertyChangeSupport getPropertyChange() {\r\n\tif (propertyChange == null) {\r\n\t\tpropertyChange = new java.beans.PropertyChangeSupport(this);\r\n\t};\r\n\treturn propertyChange;\r\n}", "private Expression(String id, String message, String expression) {\n this.id = id;\n this.message = message;\n this.expression = expression;\n }", "Exp\ngetExp1();", "public IExpObject getProperty(int index) throws ExpException {\n return null;\n }", "protected PropertyChangeListener createPropertyChangeListener() {\n return new PropertyChangeHandler(); }", "public ConvCalculator(Expression exp){\r\n this();\r\n this.expression = exp;\r\n }", "int getProperty2();", "public final ManchesterOWLSyntaxAutoComplete.expression_return expression() {\n ManchesterOWLSyntaxAutoComplete.expression_return retval = new ManchesterOWLSyntaxAutoComplete.expression_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxAutoComplete.conjunction_return c = null;\n ManchesterOWLSyntaxAutoComplete.expression_return chainItem = null;\n ManchesterOWLSyntaxAutoComplete.conjunction_return conj = null;\n ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return cpe = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:106:2:\n // ( ^( DISJUNCTION (c= conjunction )+ ) | ^( PROPERTY_CHAIN\n // (chainItem= expression )+ ) | conj= conjunction | cpe=\n // complexPropertyExpression )\n int alt4 = 4;\n switch (input.LA(1)) {\n case DISJUNCTION: {\n alt4 = 1;\n }\n break;\n case PROPERTY_CHAIN: {\n alt4 = 2;\n }\n break;\n case IDENTIFIER:\n case ENTITY_REFERENCE:\n case CONJUNCTION:\n case NEGATED_EXPRESSION:\n case SOME_RESTRICTION:\n case ALL_RESTRICTION:\n case VALUE_RESTRICTION:\n case CARDINALITY_RESTRICTION:\n case ONE_OF: {\n alt4 = 3;\n }\n break;\n case INVERSE_OBJECT_PROPERTY_EXPRESSION: {\n alt4 = 4;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 4, 0, input);\n throw nvae;\n }\n switch (alt4) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:107:4:\n // ^( DISJUNCTION (c= conjunction )+ )\n {\n match(input, DISJUNCTION, FOLLOW_DISJUNCTION_in_expression226);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:107:19:\n // (c= conjunction )+\n int cnt2 = 0;\n loop2: do {\n int alt2 = 2;\n int LA2_0 = input.LA(1);\n if (LA2_0 >= IDENTIFIER && LA2_0 <= ENTITY_REFERENCE\n || LA2_0 == CONJUNCTION || LA2_0 == NEGATED_EXPRESSION\n || LA2_0 >= SOME_RESTRICTION && LA2_0 <= ONE_OF) {\n alt2 = 1;\n }\n switch (alt2) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:107:21:\n // c= conjunction\n {\n pushFollow(FOLLOW_conjunction_in_expression235);\n c = conjunction();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(c.node.getCompletions());\n }\n }\n break;\n default:\n if (cnt2 >= 1) {\n break loop2;\n }\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n EarlyExitException eee = new EarlyExitException(2, input);\n throw eee;\n }\n cnt2++;\n } while (true);\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:110:6:\n // ^( PROPERTY_CHAIN (chainItem= expression )+ )\n {\n match(input, PROPERTY_CHAIN, FOLLOW_PROPERTY_CHAIN_in_expression248);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:110:24:\n // (chainItem= expression )+\n int cnt3 = 0;\n loop3: do {\n int alt3 = 2;\n int LA3_0 = input.LA(1);\n if (LA3_0 >= IDENTIFIER && LA3_0 <= ENTITY_REFERENCE\n || LA3_0 >= DISJUNCTION && LA3_0 <= NEGATED_EXPRESSION\n || LA3_0 >= SOME_RESTRICTION && LA3_0 <= ONE_OF\n || LA3_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt3 = 1;\n }\n switch (alt3) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:110:25:\n // chainItem= expression\n {\n pushFollow(FOLLOW_expression_in_expression256);\n chainItem = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(chainItem.node\n .getCompletions());\n }\n }\n break;\n default:\n if (cnt3 >= 1) {\n break loop3;\n }\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n EarlyExitException eee = new EarlyExitException(3, input);\n throw eee;\n }\n cnt3++;\n } while (true);\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:114:5:\n // conj= conjunction\n {\n pushFollow(FOLLOW_conjunction_in_expression276);\n conj = conjunction();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start).setCompletions(conj.node\n .getCompletions());\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:118:5:\n // cpe= complexPropertyExpression\n {\n pushFollow(FOLLOW_complexPropertyExpression_in_expression291);\n cpe = complexPropertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start).setCompletions(cpe.node\n .getCompletions());\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "private Equation createEquation() throws MainApplicationException {\r\n\t\tEquation equation = new Equation(false,\r\n\t\t\t\t\"a+b=c\", \r\n\t\t\t\tfalse, \r\n\t\t\t\tnew Parametre(), \r\n\t\t\t\t\"Insérer Propriété\",\r\n\t\t\t\t\"Insérer commentaire\");\r\n\t\tequation.setIsModifiable(true);\r\n\t\treturn equation;\r\n\t}", "@Test\n public void testConstructorSetCorrect() {\n String name = \"A modifier\";\n int cost = 10;\n\n Modifier m = new Modifier(name, cost) {\n @Override\n public int getValue() {\n return 0;\n }\n };\n\n assertEquals(name, m.getName());\n assertEquals(cost, m.getCost());\n }", "Expression getExpression();" ]
[ "0.8716135", "0.6071713", "0.6064097", "0.60250753", "0.5903222", "0.58873546", "0.58529013", "0.58269316", "0.5825698", "0.5797332", "0.5632135", "0.5492968", "0.54057765", "0.54009557", "0.5383544", "0.537388", "0.53594273", "0.5340793", "0.53276986", "0.53232235", "0.5280839", "0.5278114", "0.52673453", "0.5243006", "0.5236029", "0.5228967", "0.52277637", "0.52134883", "0.52118814", "0.5210444", "0.5179462", "0.5172327", "0.51662815", "0.51538765", "0.5143594", "0.5134644", "0.5134342", "0.510732", "0.5065846", "0.5063267", "0.50586176", "0.50574803", "0.5054574", "0.50421375", "0.5021936", "0.50213945", "0.5018595", "0.50124305", "0.5006501", "0.49996328", "0.49721673", "0.49679303", "0.49655333", "0.49655333", "0.49624947", "0.49563873", "0.494666", "0.4946468", "0.4940777", "0.4940116", "0.49208882", "0.49153417", "0.4914391", "0.49122787", "0.4908809", "0.49039978", "0.4903742", "0.48771915", "0.48622823", "0.4853256", "0.4846723", "0.48397842", "0.48309222", "0.4830372", "0.48271433", "0.48237535", "0.4818394", "0.481725", "0.48168063", "0.48092484", "0.4803176", "0.4794838", "0.47875035", "0.47777033", "0.4775409", "0.47706553", "0.47683522", "0.4766323", "0.4765024", "0.4751493", "0.47484672", "0.47423378", "0.47418806", "0.47350043", "0.47337502", "0.47276315", "0.47275302", "0.4718668", "0.47094074", "0.46985832" ]
0.8107605
1
Returns a new object of class 'Real Literal Exp'.
<C> RealLiteralExp<C> createRealLiteralExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "RealLiteralExp createRealLiteralExp();", "Literal createLiteral();", "Literal createLiteral();", "StringLiteralExp createStringLiteralExp();", "SimpleLiteral createSimpleLiteral();", "protected RealExpression() {\r\n super();\r\n }", "LetExp createLetExp();", "InvalidLiteralExp createInvalidLiteralExp();", "TypeLiteralExp createTypeLiteralExp();", "VariableExp createVariableExp();", "ExpOperand createExpOperand();", "UndefinedLiteralExp createUndefinedLiteralExp();", "IntegerLiteralExp createIntegerLiteralExp();", "<C> InvalidLiteralExp<C> createInvalidLiteralExp();", "<C> StringLiteralExp<C> createStringLiteralExp();", "public Literal getLiteral();", "public Literal getLiteral();", "Expression getExp();", "public LiteralExpression (String str){\n _value = str;\n }", "Lexpr createLexpr();", "RealConstant createRealConstant();", "Expression createExpression();", "FullExpression createFullExpression();", "Expr createExpr();", "JavaExpression createJavaExpression();", "public Object clone() {\n\t\treturn new RelExpr((Term)getTerm(0).clone(), op, (Term)getTerm(1).clone());\n\t}", "public T caseRealLiteralExpCS(RealLiteralExpCS object) {\r\n return null;\r\n }", "<C> UnlimitedNaturalLiteralExp<C> createUnlimitedNaturalLiteralExp();", "Expression() { }", "<C, PM> VariableExp<C, PM> createVariableExp();", "<C> IntegerLiteralExp<C> createIntegerLiteralExp();", "public Literal createLiteral(double b) throws ModelException{\n\n return createLiteral(String.valueOf(b));\n }", "<C> NullLiteralExp<C> createNullLiteralExp();", "public Expression asExpression() {\n switch (TYPE) {\n case EXPRESSION:\n return EXPRESSION;\n case IDENTIFIER:\n return new Variable(VALUE);\n case LITERAL:\n if (VALUE.matches(\"\\\\d+\")) {\n return new LInteger(Integer.parseInt(VALUE));\n } else if (VALUE.equals(\"true\") || VALUE.equals(\"false\")) {\n return LBoolean.resolve(VALUE.equals(\"true\"));\n } else if (VALUE.equals(\"null\")) {\n return LNull.NULL;\n } else {\n return new LString(VALUE);\n }\n default:\n throw ErrorLog.get(\"Unexpected symbol '%s'\", VALUE);\n }\n }", "Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n SingleQuotedLiteral(),\n DoubleQuotedLiteral()),\n actions.pushLiteralNode());\n }", "Exp\ngetExp2();", "ObjectLiteral createObjectLiteral();", "public Expression(Expression exp) {\r\n\t\tconcat(exp);\r\n\t\ttext = new StringBuffer(new String(exp.text));\r\n\t}", "public final EObject ruleRealLiteral() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token lv_value_1_0=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3842:28: ( ( () ( (lv_value_1_0= RULE_FLOAT ) ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3843:1: ( () ( (lv_value_1_0= RULE_FLOAT ) ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3843:1: ( () ( (lv_value_1_0= RULE_FLOAT ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3843:2: () ( (lv_value_1_0= RULE_FLOAT ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3843:2: ()\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3844:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getRealLiteralAccess().getRealLiteralAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3849:2: ( (lv_value_1_0= RULE_FLOAT ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3850:1: (lv_value_1_0= RULE_FLOAT )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3850:1: (lv_value_1_0= RULE_FLOAT )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3851:3: lv_value_1_0= RULE_FLOAT\r\n {\r\n lv_value_1_0=(Token)match(input,RULE_FLOAT,FOLLOW_RULE_FLOAT_in_ruleRealLiteral8859); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t\t\tnewLeafNode(lv_value_1_0, grammarAccess.getRealLiteralAccess().getValueFLOATTerminalRuleCall_1_0()); \r\n \t\t\r\n }\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElement(grammarAccess.getRealLiteralRule());\r\n \t }\r\n \t\tsetWithLastConsumed(\r\n \t\t\tcurrent, \r\n \t\t\t\"value\",\r\n \t\tlv_value_1_0, \r\n \t\t\"FLOAT\");\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public MathEval() {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n setConstant(\"E\" ,Math.E);\r\n setConstant(\"Euler\" ,0.577215664901533D);\r\n setConstant(\"LN2\" ,0.693147180559945D);\r\n setConstant(\"LN10\" ,2.302585092994046D);\r\n setConstant(\"LOG2E\" ,1.442695040888963D);\r\n setConstant(\"LOG10E\",0.434294481903252D);\r\n setConstant(\"PHI\" ,1.618033988749895D);\r\n setConstant(\"PI\" ,Math.PI);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n offset=0;\r\n isConstant=false;\r\n }", "@Override\r\n public Literal newLiteral(PObj[] data) {\r\n String symbol = ((Constant) data[0]).getObject().toString();\r\n PObj[] fixed = new PObj[data.length - 1];\r\n System.arraycopy(data, 1, fixed, 0, fixed.length);\r\n PList terms = ProvaListImpl.create(fixed);\r\n return newLiteral(symbol, terms);\r\n }", "public synchronized Literal createLiteral(String str) {\n\n // check whether we have it in the registry\n Literal r = (Literal)lmap.get(str);\n if(r == null) {\n r = new LiteralImpl(/*getUnusedNodeID(),*/ str);\n lmap.put(str, r);\n }\n return r;\n }", "Exp\ngetExp1();", "public Expression deepCopy (){\n return new LiteralExpression(_value);\n }", "public Literal createLiteral(char b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "public Expression() {\r\n\t\ttext = new StringBuffer();\r\n\t\txttext = new StringBuffer();\r\n\t}", "public Stmt createEval(Expr expr) {\n return xnf.Eval(expr.position(), expr);\n }", "<C, PM> LetExp<C, PM> createLetExp();", "@Test\r\n public void test1(){\r\n Exp one = new NumericLiteral(1);\r\n Exp three = new NumericLiteral(3);\r\n Exp exp = new PlusExp(one, three);\r\n Stmt decl = new DeclStmt(\"x\");\r\n Stmt assign = new Assignment(\"x\", exp);\r\n Stmt seq = new Sequence(decl, assign);\r\n assertEquals(seq.text(), \"var x; x = 1 + 3\");\r\n }", "public UnaryExpNode() {\n }", "String getLiteral();", "String getLiteral();", "public final EObject ruleRealLiteral() throws RecognitionException {\n EObject current = null;\n\n Token lv_value_0_0=null;\n Token lv_modifier_1_0=null;\n EObject lv_unit_3_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4453:6: ( ( ( (lv_value_0_0= RULE_REAL ) ) ( (lv_modifier_1_0= RULE_ID ) )? ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4454:1: ( ( (lv_value_0_0= RULE_REAL ) ) ( (lv_modifier_1_0= RULE_ID ) )? ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4454:1: ( ( (lv_value_0_0= RULE_REAL ) ) ( (lv_modifier_1_0= RULE_ID ) )? ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )? )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4454:2: ( (lv_value_0_0= RULE_REAL ) ) ( (lv_modifier_1_0= RULE_ID ) )? ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )?\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4454:2: ( (lv_value_0_0= RULE_REAL ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4455:1: (lv_value_0_0= RULE_REAL )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4455:1: (lv_value_0_0= RULE_REAL )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4456:3: lv_value_0_0= RULE_REAL\n {\n lv_value_0_0=(Token)input.LT(1);\n match(input,RULE_REAL,FOLLOW_RULE_REAL_in_ruleRealLiteral7818); \n\n \t\t\tcreateLeafNode(grammarAccess.getRealLiteralAccess().getValueREALTerminalRuleCall_0_0(), \"value\"); \n \t\t\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getRealLiteralRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode, current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"value\",\n \t \t\tlv_value_0_0, \n \t \t\t\"REAL\", \n \t \t\tlastConsumedNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t \n\n }\n\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4478:2: ( (lv_modifier_1_0= RULE_ID ) )?\n int alt66=2;\n int LA66_0 = input.LA(1);\n\n if ( (LA66_0==RULE_ID) ) {\n alt66=1;\n }\n switch (alt66) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4479:1: (lv_modifier_1_0= RULE_ID )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4479:1: (lv_modifier_1_0= RULE_ID )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4480:3: lv_modifier_1_0= RULE_ID\n {\n lv_modifier_1_0=(Token)input.LT(1);\n match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleRealLiteral7840); \n\n \t\t\tcreateLeafNode(grammarAccess.getRealLiteralAccess().getModifierIDTerminalRuleCall_1_0(), \"modifier\"); \n \t\t\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getRealLiteralRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode, current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"modifier\",\n \t \t\tlv_modifier_1_0, \n \t \t\t\"ID\", \n \t \t\tlastConsumedNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t \n\n }\n\n\n }\n break;\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4502:3: ( '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')' )?\n int alt67=2;\n int LA67_0 = input.LA(1);\n\n if ( (LA67_0==25) ) {\n alt67=1;\n }\n switch (alt67) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4502:5: '(' ( (lv_unit_3_0= ruleUnitExpression ) ) ')'\n {\n match(input,25,FOLLOW_25_in_ruleRealLiteral7857); \n\n createLeafNode(grammarAccess.getRealLiteralAccess().getLeftParenthesisKeyword_2_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4506:1: ( (lv_unit_3_0= ruleUnitExpression ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4507:1: (lv_unit_3_0= ruleUnitExpression )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4507:1: (lv_unit_3_0= ruleUnitExpression )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4508:3: lv_unit_3_0= ruleUnitExpression\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getRealLiteralAccess().getUnitUnitExpressionParserRuleCall_2_1_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleUnitExpression_in_ruleRealLiteral7878);\n lv_unit_3_0=ruleUnitExpression();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getRealLiteralRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"unit\",\n \t \t\tlv_unit_3_0, \n \t \t\t\"UnitExpression\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n match(input,26,FOLLOW_26_in_ruleRealLiteral7888); \n\n createLeafNode(grammarAccess.getRealLiteralAccess().getRightParenthesisKeyword_2_2(), null); \n \n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public static Term createRegExp(Expression exp) {\r\n\t\tTerm term = Term.function(REGEX, exp);\r\n\t\treturn term;\r\n\t}", "public static Literal of(Source source, Object value) {\n if (value instanceof Literal) {\n return (Literal) value;\n }\n return new Literal(source, value, DataTypes.fromJava(value));\n }", "public Literal setLiteral(Object literalData);", "public Expression(Object ob) {\r\n\t\tthis();\r\n\t\taddElement(ob);\r\n\t}", "public Literal getLiteral(Object literalData);", "public MathEval(MathEval oth) {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n constants.putAll(oth.constants);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n variables.putAll(oth.variables);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n functions.putAll(oth.functions);\r\n\r\n relaxed=oth.relaxed;\r\n\r\n offset=0;\r\n isConstant=false;\r\n }", "final public ASTExpression Expression() throws ParseException {\r\n /*@bgen(jjtree) Expression */\r\n ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION);\r\n boolean jjtc000 = true;\r\n jjtree.openNodeScope(jjtn000);\r\n try {\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case QUOTE:\r\n StringLiteral();\r\n jj_consume_token(61);\r\n jjtree.closeNodeScope(jjtn000, true);\r\n jjtc000 = false;\r\n {if (true) return jjtn000;}\r\n break;\r\n case IDENTIFIER:\r\n case INTEGER:\r\n case NOT:\r\n case SUB:\r\n case FLOATING_POINT_LITERAL:\r\n case 59:\r\n LogicalORExpression();\r\n jjtree.closeNodeScope(jjtn000, true);\r\n jjtc000 = false;\r\n {if (true) return jjtn000;}\r\n break;\r\n default:\r\n jj_la1[45] = jj_gen;\r\n jj_consume_token(-1);\r\n throw new ParseException();\r\n }\r\n } catch (Throwable jjte000) {\r\n if (jjtc000) {\r\n jjtree.clearNodeScope(jjtn000);\r\n jjtc000 = false;\r\n } else {\r\n jjtree.popNode();\r\n }\r\n if (jjte000 instanceof RuntimeException) {\r\n {if (true) throw (RuntimeException)jjte000;}\r\n }\r\n if (jjte000 instanceof ParseException) {\r\n {if (true) throw (ParseException)jjte000;}\r\n }\r\n {if (true) throw (Error)jjte000;}\r\n } finally {\r\n if (jjtc000) {\r\n jjtree.closeNodeScope(jjtn000, true);\r\n }\r\n }\r\n throw new Error(\"Missing return statement in function\");\r\n }", "public Expression(String expr) {\n this.expr = expr;\n scalars = null;\n arrays = null;\n openingBracketIndex = null;\n closingBracketIndex = null;\n }", "Expr expr();", "public Literal createLiteral(int b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "JavaEvaluator createJavaEvaluator();", "public final JavaliParser.newExpr_return newExpr() throws RecognitionException {\n\t\tJavaliParser.newExpr_return retval = new JavaliParser.newExpr_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken kw=null;\n\t\tToken id=null;\n\t\tToken Identifier79=null;\n\t\tToken char_literal80=null;\n\t\tToken char_literal81=null;\n\t\tToken char_literal82=null;\n\t\tToken char_literal84=null;\n\t\tToken char_literal85=null;\n\t\tToken char_literal87=null;\n\t\tParserRuleReturnScope pt =null;\n\t\tParserRuleReturnScope simpleExpr83 =null;\n\t\tParserRuleReturnScope simpleExpr86 =null;\n\n\t\tObject kw_tree=null;\n\t\tObject id_tree=null;\n\t\tObject Identifier79_tree=null;\n\t\tObject char_literal80_tree=null;\n\t\tObject char_literal81_tree=null;\n\t\tObject char_literal82_tree=null;\n\t\tObject char_literal84_tree=null;\n\t\tObject char_literal85_tree=null;\n\t\tObject char_literal87_tree=null;\n\t\tRewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,\"token 69\");\n\t\tRewriteRuleTokenStream stream_93=new RewriteRuleTokenStream(adaptor,\"token 93\");\n\t\tRewriteRuleTokenStream stream_70=new RewriteRuleTokenStream(adaptor,\"token 70\");\n\t\tRewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,\"token Identifier\");\n\t\tRewriteRuleTokenStream stream_84=new RewriteRuleTokenStream(adaptor,\"token 84\");\n\t\tRewriteRuleTokenStream stream_85=new RewriteRuleTokenStream(adaptor,\"token 85\");\n\t\tRewriteRuleSubtreeStream stream_simpleExpr=new RewriteRuleSubtreeStream(adaptor,\"rule simpleExpr\");\n\t\tRewriteRuleSubtreeStream stream_primitiveType=new RewriteRuleSubtreeStream(adaptor,\"rule primitiveType\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:408:2: (kw= 'new' Identifier '(' ')' -> ^( NewObject[$kw, \\\"NewObject\\\"] Identifier ) |kw= 'new' id= Identifier '[' simpleExpr ']' -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$id, $id.text + \\\"[]\\\"] simpleExpr ) |kw= 'new' pt= primitiveType '[' simpleExpr ']' -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$pt.start, $pt.text + \\\"[]\\\"] simpleExpr ) )\n\t\t\tint alt24=3;\n\t\t\tint LA24_0 = input.LA(1);\n\t\t\tif ( (LA24_0==93) ) {\n\t\t\t\tint LA24_1 = input.LA(2);\n\t\t\t\tif ( (LA24_1==Identifier) ) {\n\t\t\t\t\tint LA24_2 = input.LA(3);\n\t\t\t\t\tif ( (LA24_2==69) ) {\n\t\t\t\t\t\talt24=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA24_2==84) ) {\n\t\t\t\t\t\talt24=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 24, 2, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if ( (LA24_1==86||LA24_1==90||LA24_1==92) ) {\n\t\t\t\t\talt24=3;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 24, 1, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 24, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt24) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:408:4: kw= 'new' Identifier '(' ')'\n\t\t\t\t\t{\n\t\t\t\t\tkw=(Token)match(input,93,FOLLOW_93_in_newExpr1369); \n\t\t\t\t\tstream_93.add(kw);\n\n\t\t\t\t\tIdentifier79=(Token)match(input,Identifier,FOLLOW_Identifier_in_newExpr1371); \n\t\t\t\t\tstream_Identifier.add(Identifier79);\n\n\t\t\t\t\tchar_literal80=(Token)match(input,69,FOLLOW_69_in_newExpr1373); \n\t\t\t\t\tstream_69.add(char_literal80);\n\n\t\t\t\t\tchar_literal81=(Token)match(input,70,FOLLOW_70_in_newExpr1375); \n\t\t\t\t\tstream_70.add(char_literal81);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: Identifier\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 409:3: -> ^( NewObject[$kw, \\\"NewObject\\\"] Identifier )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:409:6: ^( NewObject[$kw, \\\"NewObject\\\"] Identifier )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(NewObject, kw, \"NewObject\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_Identifier.nextNode());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:410:4: kw= 'new' id= Identifier '[' simpleExpr ']'\n\t\t\t\t\t{\n\t\t\t\t\tkw=(Token)match(input,93,FOLLOW_93_in_newExpr1395); \n\t\t\t\t\tstream_93.add(kw);\n\n\t\t\t\t\tid=(Token)match(input,Identifier,FOLLOW_Identifier_in_newExpr1399); \n\t\t\t\t\tstream_Identifier.add(id);\n\n\t\t\t\t\tchar_literal82=(Token)match(input,84,FOLLOW_84_in_newExpr1401); \n\t\t\t\t\tstream_84.add(char_literal82);\n\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_newExpr1403);\n\t\t\t\t\tsimpleExpr83=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(simpleExpr83.getTree());\n\t\t\t\t\tchar_literal84=(Token)match(input,85,FOLLOW_85_in_newExpr1405); \n\t\t\t\t\tstream_85.add(char_literal84);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: simpleExpr, Identifier\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 411:3: -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$id, $id.text + \\\"[]\\\"] simpleExpr )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:411:6: ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$id, $id.text + \\\"[]\\\"] simpleExpr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(NewArray, kw, \"NewArray\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, (Object)adaptor.create(Identifier, id, (id!=null?id.getText():null) + \"[]\"));\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_simpleExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:412:4: kw= 'new' pt= primitiveType '[' simpleExpr ']'\n\t\t\t\t\t{\n\t\t\t\t\tkw=(Token)match(input,93,FOLLOW_93_in_newExpr1428); \n\t\t\t\t\tstream_93.add(kw);\n\n\t\t\t\t\tpushFollow(FOLLOW_primitiveType_in_newExpr1432);\n\t\t\t\t\tpt=primitiveType();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_primitiveType.add(pt.getTree());\n\t\t\t\t\tchar_literal85=(Token)match(input,84,FOLLOW_84_in_newExpr1434); \n\t\t\t\t\tstream_84.add(char_literal85);\n\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_newExpr1436);\n\t\t\t\t\tsimpleExpr86=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(simpleExpr86.getTree());\n\t\t\t\t\tchar_literal87=(Token)match(input,85,FOLLOW_85_in_newExpr1438); \n\t\t\t\t\tstream_85.add(char_literal87);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: simpleExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 413:3: -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$pt.start, $pt.text + \\\"[]\\\"] simpleExpr )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:413:6: ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$pt.start, $pt.text + \\\"[]\\\"] simpleExpr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(NewArray, kw, \"NewArray\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, (Object)adaptor.create(Identifier, (pt!=null?(pt.start):null), (pt!=null?input.toString(pt.start,pt.stop):null) + \"[]\"));\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_simpleExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public interface ExpressionsFactory {\n\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tExpressionsFactory INSTANCE = org.dresdenocl.essentialocl.expressions.impl.ExpressionsFactoryImpl.eINSTANCE;\n\n\t/**\n\t * Returns a new object of class '<em>Variable Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Variable Exp</em>'.\n\t * @generated\n\t */\n\tVariableExp createVariableExp();\n\n\t/**\n\t * Returns a new object of class '<em>Variable</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Variable</em>'.\n\t * @generated\n\t */\n\tVariable createVariable();\n\n\t/**\n\t * Returns a new object of class '<em>Unlimited Natural Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Unlimited Natural Exp</em>'.\n\t * @generated\n\t */\n\tUnlimitedNaturalExp createUnlimitedNaturalExp();\n\n\t/**\n\t * Returns a new object of class '<em>Type Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Type Literal Exp</em>'.\n\t * @generated\n\t */\n\tTypeLiteralExp createTypeLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Tuple Literal Part</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Tuple Literal Part</em>'.\n\t * @generated\n\t */\n\tTupleLiteralPart createTupleLiteralPart();\n\n\t/**\n\t * Returns a new object of class '<em>Tuple Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Tuple Literal Exp</em>'.\n\t * @generated\n\t */\n\tTupleLiteralExp createTupleLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>String Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>String Literal Exp</em>'.\n\t * @generated\n\t */\n\tStringLiteralExp createStringLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Real Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Real Literal Exp</em>'.\n\t * @generated\n\t */\n\tRealLiteralExp createRealLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Property Call Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Property Call Exp</em>'.\n\t * @generated\n\t */\n\tPropertyCallExp createPropertyCallExp();\n\n\t/**\n\t * Returns a new object of class '<em>Operation Call Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Operation Call Exp</em>'.\n\t * @generated\n\t */\n\tOperationCallExp createOperationCallExp();\n\n\t/**\n\t * Returns a new object of class '<em>Undefined Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Undefined Literal Exp</em>'.\n\t * @generated\n\t */\n\tUndefinedLiteralExp createUndefinedLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Let Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Let Exp</em>'.\n\t * @generated\n\t */\n\tLetExp createLetExp();\n\n\t/**\n\t * Returns a new object of class '<em>Iterator Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Iterator Exp</em>'.\n\t * @generated\n\t */\n\tIteratorExp createIteratorExp();\n\n\t/**\n\t * Returns a new object of class '<em>Iterate Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Iterate Exp</em>'.\n\t * @generated\n\t */\n\tIterateExp createIterateExp();\n\n\t/**\n\t * Returns a new object of class '<em>Invalid Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Invalid Literal Exp</em>'.\n\t * @generated\n\t */\n\tInvalidLiteralExp createInvalidLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Integer Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Integer Literal Exp</em>'.\n\t * @generated\n\t */\n\tIntegerLiteralExp createIntegerLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>If Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>If Exp</em>'.\n\t * @generated\n\t */\n\tIfExp createIfExp();\n\n\t/**\n\t * Returns a new object of class '<em>Boolean Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Boolean Literal Exp</em>'.\n\t * @generated\n\t */\n\tBooleanLiteralExp createBooleanLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Collection Item</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Collection Item</em>'.\n\t * @generated\n\t */\n\tCollectionItem createCollectionItem();\n\n\t/**\n\t * Returns a new object of class '<em>Collection Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Collection Literal Exp</em>'.\n\t * @generated\n\t */\n\tCollectionLiteralExp createCollectionLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Collection Range</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Collection Range</em>'.\n\t * @generated\n\t */\n\tCollectionRange createCollectionRange();\n\n\t/**\n\t * Returns a new object of class '<em>Enum Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Enum Literal Exp</em>'.\n\t * @generated\n\t */\n\tEnumLiteralExp createEnumLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Expression In Ocl</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Expression In Ocl</em>'.\n\t * @generated\n\t */\n\tExpressionInOcl createExpressionInOcl();\n\n}", "private Expr expression() {\n return assignment();\n }", "public T caseLiteralExpCS(LiteralExpCS object) {\r\n return null;\r\n }", "public Literal createLiteral(float b) throws ModelException{\n\n return createLiteral(String.valueOf(b));\n }", "@Override\n\tpublic Literal getLiteral() {\n\t\treturn heldObj.getLiteral();\n\t}", "private Equation createEquation() throws MainApplicationException {\r\n\t\tEquation equation = new Equation(false,\r\n\t\t\t\t\"a+b=c\", \r\n\t\t\t\tfalse, \r\n\t\t\t\tnew Parametre(), \r\n\t\t\t\t\"Insérer Propriété\",\r\n\t\t\t\t\"Insérer commentaire\");\r\n\t\tequation.setIsModifiable(true);\r\n\t\treturn equation;\r\n\t}", "@Override\n public String toString()\n {\n return literal;\n }", "@Override\n public String toString()\n {\n return literal;\n }", "@Override\n public String toString()\n {\n return literal;\n }", "@Override\n public String toString()\n {\n return literal;\n }", "public Expression(String pExpStr) {\n Queue<Token> tokenQueue = new Queue<>();\n setTokenQueue(tokenQueue);\n Tokenizer tokenizer = new Tokenizer(pExpStr);\n Token prevToken = null;\n Token token = tokenizer.nextToken();\n while (token != null) {\n if (token instanceof SubOperator) {\n token = negationCheck(token, prevToken);\n }\n getTokenQueue().enqueue(token);\n prevToken = token;\n token = tokenizer.nextToken();\n }\n }", "private Operation classCreatorRest(Token t, Scope scope, Vector queue)\r\n {\r\n Vector v = new Vector();\r\n String s = \"super\";\r\n Operation root = new Operation();\r\n\r\n root.type.type = Keyword.NONESY;\r\n root.type.ident = t;\r\n traceOn(v);\r\n root.left = arguments(scope, v, queue);\r\n traceOff(v);\r\n\r\n for(int i = 0; i < v.size(); i++)\r\n {\r\n Token pt = (Token)v.get(i);\r\n\r\n if (pt.kind == Keyword.NUMBERSY)\r\n s += pt.val;\r\n else if (pt.kind == Keyword.LNUMBERSY)\r\n s += pt.val + \"L\";\r\n else if (pt.kind == Keyword.DNUMBERSY)\r\n s += pt.fval;\r\n else if (pt.kind == Keyword.IDENTSY)\r\n s += pt.string;\r\n else\r\n s += pt.kind.string;\r\n }\r\n if (s.endsWith(\"()\"))\r\n s = \"\";\r\n else\r\n s += ';';\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n ClassType x = new ClassType();\r\n x.name = new Token();\r\n x.name.kind = Keyword.IDENTSY;\r\n x.name.string = \"Anonymous\" + anonymous++;\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n x.extend = new ClassType(t.string.substring(t.string.lastIndexOf('.') + 1));\r\n x.implement = new ClassType[1];\r\n x.implement[0] = x.extend;\r\n declMember(scope, x);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n root.type.ident = x.name;\r\n root.type.type = Keyword.NONESY;\r\n root.left.left = null;\r\n Vector old = queue;\r\n queue = new Vector();\r\n HashSet dummy = unresolved;\r\n unresolved = x.unresolved;\r\n unresolved.add(t.string);\r\n classBody(x, new Modifier(), s, queue);\r\n addToConstructor(x, queue);\r\n queue = old;\r\n unresolved = dummy;\r\n writeList(x);\r\n }\r\n\r\n return root;\r\n }", "public interface\nExp extends HIR\n{\n\n/** ConstNode (##3)\n * Build HIR constant node.\n * @param pConstSym constant symbol to be attached to the node.\n * @return constant leaf node having operation code opConst.\n**/\n// Constructor (##3)\n// ConstNode( Const pConstSym );\n\n/** getConstSym\n * Get constant symbol attached to this node.\n * \"this\" should be a constant node.\n * @return constant symbol attached to this node.\n**/\nConst\ngetConstSym();\n\n/** SymNode (##3)\n * Build an HIR symbol name node from a symbol name.\n * @param pVar variable name symbol to be attached to the node.\n * @param pSubp subprogram name symbol to be attached to the node.\n * @param pLabel label name symbol to be attached to the node.\n * @param pElem struct/union element name to be attached to the node.\n * @param pField class field name to be attached to the node.\n * @return symbol name node of corresponding class (##2)\n * having operation code opSym.\n**/\n// Constructor (##3)\n// VarNode( Var pVar ); (##3)\n// SubpNode( Subp pSubp ); (##3)\n// LabelNode( Label pLabel ); (##3)\n// ElemNode( Elem pElem ); (##3)\n// FieldNode( Field pField ); (##3)\n\n/** getSym\n * Get symbol from SymNode. (##2)\n * \"this\" should be a SymNode (##2)\n * (either VarNode, SubpNode, LabelNode, ElemNode, or FieldNode). (##2)\n * @return the symbol attached to the node\n * (either Var, Subp, Label, Elem, or Field). (##2)\n**/\n//## Sym\n//## getSym();\n\n/** getVar\n * Get symbol of specified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nVar getVar();\n\n/** getSubp\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nSubp getSubp();\n\n/**\n * getLabel\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nLabel getLabel();\n\n/**\n * getElem\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nElem getElem();\n// Field getField();\n\n/** UnaryExp (##3)\n * Build an unary expression having pOperator as its operator\n * and pExp as its source operand.\n * @param pOperator unary operator.\n * @param pExp source operand expression.\n * @return unary expression using pOperator and pExp as its\n * operator and operand.\n**/\n// Constructor (##3)\n// UnaryExp( int pOperator, Exp pExp );\n\n/** BinaryExp (##3)\n * Build a binary expression having pOperator as its operator\n * and pExp1, pExp2 as its source operand 1 and 2.\n * @param pOperator binary operator.\n * @param pExp1 source operand 1 expression.\n * @param pExp2 source operand 2 expression.\n * @return binary expression using pOperator and\n * pExp1 and pExp2 as its operator and operands.\n**/\n// Constructor (##3)\n// BinaryExp( int pOperator, Exp pExp1, Exp pExp2 );\n\n/** getExp1\n * Get source operand 1 from unary or binary expression.\n * \"this\" should be either unary or binary expression.\n * @return the source operand 1 expression of this node.\n**/\nExp\ngetExp1();\n\n/** getExp2\n * Get source operand 2 from binary expression.\n * \"this\" should be a binary expression.\n * @return the source operand 2 expression of this node.\n**/\nExp\ngetExp2();\n\n/** getArrayExp (##2)\n * getSubscriptExp\n * getElemSizeExp (##2)\n * Get a component of a subscripted variable.\n * \"this\" should be a node built by buildSubscriptedVar method.\n * @return a component expression of this subscripted variable.\n**/\nExp getArrayExp(); // return array expression part (pArrayExp).\nExp getSubscriptExp(); // return subscript expression part (pSubscript).\nExp getElemSizeExp(); // return element size part (pElemSize).\n\n/** PointedVar (##3)\n * Build a pointed variable node.\n * @param pPointer pointer expression which may be a compond variable.\n(##2)\n * @param pElement struct/union element name pointed by pPointer.\n * @return pointed variable node having operation code opArrow.\n**/\n// Constructor (##3)\n// PointedVar( Exp pPointer, Elem pElement ); // (##2)\n\n/** getPointerExp\n * getPointedElem\n * Get a component of pointed variable expression.\n * \"this\" should be a node built by buildPointedVar method.\n * @return a component expression of this pointed variable.\n**/\nExp getPointerExp(); // return the pointer expression part (pPointer).\nElem getPointedElem(); // return the pointed element part (pElem).\n\n/** QualifiedVar (##3)\n * Build qualified variable node that represents an element\n * of structure or union.\n * @param pQualifier struct/union variable having elements.\n * @param pElement struct/union element name to be represented.\n * @return qualified variable node having operation code opQual.\n**/\n// Constructor (##3)\n// QualifiedVar( Exp pQualifier, Elem pElement );\n\n/** getQualifier\n * getQualifiedElem\n * Get a component of qualified variable expression.\n * \"this\" should be a node built by BuildQualifiedVar method.\n * @return a component of \"this\" QualifiedVar expression. (##2)\n**/\nExp getQualifierExp(); // return qualifier part (pQualifier).\nElem getQualifiedElem(); // return qualified element part (pelement).\n\n/** FunctionExp (##3)\n * Build a function expression node that computes function value.\n * @param pSubpExp function specification part which may be either\n * a function name, or an expression specifying a function name.\n * @param pParamList actual parameter list.\n * @return function expression node having operation code opCall.\n * @see IrList.\n**/\n// Constructor (##3)\n// FunctionExp( Subp pSubpSpec, IrList pParamList );\n\n/** getSubpSpec (##2)\n * getActualParamList\n * Get a component expression of the function expression. (##2)\n * \"this\" should be a node built by buildFunctionExp.\n * getSubpSpec return the expression specifying the subprogram\n * to be called (pSubpSpec). (##2)\n * getActualParamList return the actual parameter list (pParamList).\n * If this has no parameter, then return null.\n**/\nExp getSubpSpec();\nIrList getActualParamList();\n\n/** findSubpType\n * Find SubpType represented by this expression.\n * If this is SubpNode then return SubpType pointed by this node type,\n * else decompose this expression to find Subpnode.\n * If illegal type is encountered, return null.\n**/\npublic SubpType // (##6)\nfindSubpType();\n\n/** isEvaluable\n * See if \"this\" expression can be evaluated or not.\n * Following expressions are evaluable expression: //##14\n * constant expression,\n * expression whose operands are all evaluable expressions.\n * Expressions with OP_ADDR or OP_NULL are treated as non evaluable.\n * Variable with initial value is also treated as non evaluable\n * because its value may change. //##43\n * @return true if this expression can be evaluated as constant value\n * at the invocation of this method, false otherwise.\n**/\nboolean isEvaluable();\n\n//SF050111[\n///** evaluate\n// * Evaluate \"this\" expression.\n// * \"this\" should be an evaluable expression.\n// * If not, this method returns null.\n// * It is strongly recommended to confirm isEvaluable() returns true\n// * for this expression before calling this method.\n// * @return constant node as the result of evaluation.\n//**/\n//ConstNode evaluate();\n\n/**\n * Evaluate \"this\" expression.\n * @return constant as the result of evaluation or null(when failing in the\n * evaluation)\n**/\npublic Const evaluate();\n\n/**\n * Fold \"this\" expression.\n * evaluate() is called by recursive. If the evaluation succeeded, former node\n * is substituted for the constant node generated as evaluation result.\n * @return constant as the result of evaluation or null (when failing in the\n * evaluation)\n**/\npublic Exp fold();\n//SF050111]\n\n/** evaluateAsInt\n * Evaluate \"this\" expression as int.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return integer value as the result of evaluation.\n**/\n//SF050111 int evaluateAsInt();\npublic int evaluateAsInt(); //SF050111\n\n/**\n * Evaluate \"this\" expression as long.\n * \"this\" should be an evaluable expression. If not, this method returns 0.\n * @return long value as the result of evaluation.\n**/\npublic long evaluateAsLong(); //SF050111\n\n/** evaluateAsFloat\n * Evaluate \"this\" expression as float.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return float value as the result of evaluation.\n**/\n//SF050111 float evaluateAsFloat();\npublic float evaluateAsFloat(); //SF050111\n\n/** evaluateAsDouble\n * Evaluate \"this\" expression as double.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return float value as the result of evaluation.\n**/\n//SF050111 double evaluateAsDouble();\npublic double evaluateAsDouble(); //SF050111\n\n/** getValueString //##40\n * Evaluate this subtree and return the result as a string.\n * If the result is constant, then return the string representing\n * the constant.\n * If the result is not a constant, then return a string\n * representing the resultant expression.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return a string representing the evaluated result.\n**/\npublic String\ngetValueString();\n\n//##84 BEGIN\n/**\n * Adjust the types of binary operands according to the\n * C language specifications\n * (See ISO/IEC 9899-1999 Programming language C section 6.3.1.8).\n * The result is an expression\n * (HIR.OP_SEQ, adjusted_operand1, adjusted_operand2).\n * The operands can be get by\n * ((HIR)lResult.getChild1()).copyWithOperands()\n * ((HIR)lResult.getChild2()).copyWithOperands()\n * @param pExp1 operand 1.\n * @param pExp2 operand 2.\n * @return (HIR.OP_SEQ, adjusted_operand1, adjusted_operand2)\n */\npublic Exp\nadjustTypesOfBinaryOperands( Exp pExp1, Exp pExp2 );\n//##84 END\n\n/** initiateArray //##15\n * Create loop statement to initiate all elements of\n * the array pArray and append it to the initiation block\n * of subprogram pSubp.\n * The initiation statement to be created for pSubp is\n * for (i = pFrom; i <= pTo; i++)\n * pArray[i] = pInitExp;\n * If pSubp is null, set-data statement is generated.\n * @param pArray array variable expression.\n * @param pInitExp initial value to be set.\n * @param pFrom array index start position\n * @param pTo array index end position\n * @param pSubp subprogram containing the initiation statement.\n * null for global variable initiation.\n * @return the loop statement to set initial value.\n**/\npublic Stmt\ninitiateArray(\n Exp pArray, Exp pInitExp,\n Exp pFrom, Exp pTo, Subp pSubp ); //##15\n\n}", "UnlimitedNaturalExp createUnlimitedNaturalExp();", "private LiteralToken nextRegularExpressionLiteralToken() {\n LiteralToken token = scanner.nextRegularExpressionLiteralToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "public final EObject entryRuleRealLiteral() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleRealLiteral = null;\r\n\r\n\r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3831:2: (iv_ruleRealLiteral= ruleRealLiteral EOF )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3832:2: iv_ruleRealLiteral= ruleRealLiteral EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getRealLiteralRule()); \r\n }\r\n pushFollow(FOLLOW_ruleRealLiteral_in_entryRuleRealLiteral8798);\r\n iv_ruleRealLiteral=ruleRealLiteral();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleRealLiteral; \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleRealLiteral8808); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public Literal createLiteral(long b) throws ModelException{\n\n return createLiteral(String.valueOf(b));\n }", "public LiteralRegistry() {\n addEntry(new Entry(SkriptPattern.parse(\"biome[s]\"), BiomeRegistry.Entry.class));\n addEntry(new Entry(SkriptPattern.parse(\"boolean[s]\"), boolean.class));\n addEntry(new Entry(SkriptPattern.parse(\"cat[ ](type|race)[s]\"), CatType.class));\n addEntry(new Entry(SkriptPattern.parse(\"click[ ]type[s]\"), ClickType.class));\n addEntry(new Entry(SkriptPattern.parse(\"colo[u]r[s]\"), Color.class));\n addEntry(new Entry(SkriptPattern.parse(\"damage[ ]cause[s]\"), DamageCause.class));\n addEntry(new Entry(SkriptPattern.parse(\"enchantment[s]\"), Enchantment.class));\n addEntry(new Entry(SkriptPattern.parse(\"experience[ ][point[s]]\"), Experience.class));\n addEntry(new Entry(SkriptPattern.parse(\"firework[ ]type[s]\"), FireworkType.class));\n addEntry(new Entry(SkriptPattern.parse(\"game[ ]mode[s]\"), GameMode.class));\n addEntry(new Entry(SkriptPattern.parse(\"[panda] gene[s]\"), Gene.class));\n addEntry(new Entry(SkriptPattern.parse(\"inventory[ ]action[s]\"), InventoryAction.class));\n addEntry(new Entry(SkriptPattern.parse(\"inventory[ ]type[s]\"), InventoryTypeRegistry.Entry.class));\n addEntry(new Entry(SkriptPattern.parse(\"(item[ ]type[s]|items|materials)\"), ItemType.class));\n addEntry(new Entry(SkriptPattern.parse(\"(item|material)\"), Item.class));\n addEntry(new Entry(SkriptPattern.parse(\"num[ber][s]\"), Number.class));\n addEntry(new Entry(SkriptPattern.parse(\"resource[ ]pack[ ]state[s]\"), ResourcePackStatus.class));\n addEntry(new Entry(SkriptPattern.parse(\"sound[ ]categor(y|ies)\"), SoundCategory.class));\n addEntry(new Entry(SkriptPattern.parse(\"spawn[ing][ ]reason[s]\"), SpawnReason.class));\n addEntry(new Entry(SkriptPattern.parse(\"potion[[ ]effect][ ]type[s]\"), StatusEffectType.class));\n addEntry(new Entry(SkriptPattern.parse(\"(text|string)[s]\"), Text.class));\n addEntry(new Entry(SkriptPattern.parse(\"teleport[ ](cause|reason|type)[s]\"), TeleportCause.class));\n addEntry(new Entry(SkriptPattern.parse(\"time[s]\"), Time.class));\n addEntry(new Entry(SkriptPattern.parse(\"(time[ ]period|duration)[s]\"), TimePeriod.class));\n addEntry(new Entry(SkriptPattern.parse(\"time[ ]span[s]\"), TimeSpan.class));\n addEntry(new Entry(SkriptPattern.parse(\"(tree[ ]type|tree)[s]\"), TreeType.class));\n addEntry(new Entry(SkriptPattern.parse(\"visual effect\"), VisualEffectRegistry.Entry.class));\n }", "NumericExpression createNumericExpression();", "private Expression toExpression() {\n Expression lhs = null, rhs = null;\n if (base instanceof DerefSymbol) {\n lhs = ((DerefSymbol)base).toExpression();\n } else if (base instanceof AccessSymbol) {\n lhs = ((AccessSymbol)base).toExpression();\n } else if (base instanceof Identifier) {\n lhs = new Identifier(base);\n } else {\n PrintTools.printlnStatus(0,\n \"[WARNING] Unexpected access expression type\");\n return null;\n }\n rhs = new Identifier(member);\n return new AccessExpression(lhs, AccessOperator.MEMBER_ACCESS, rhs);\n }", "private Operand parseFactor() {\n Operand operand = new Operand(SymbolTable.OBJECT_NONE);\n switch (nextToken.kind) {\n case Token.IDENT:\n operand = parseDesignator();\n\n if (nextToken.kind == Token.LPAR) {\n if (operand.kind != Operand.KIND_METHOD) {\n error(\"Illegal method call\");\n }\n parseActPars(operand.object);\n if (operand.object == SymbolTable.OBJECT_LEN) {\n code.put(Code.OP_ARRAYLENGTH);\n } else if(operand.object != SymbolTable.OBJECT_CHR\n && operand.object != SymbolTable.OBJECT_ORD) {\n code.put(Code.OP_CALL);\n code.put2(operand.address);\n }\n } else {\n code.load(operand);\n }\n\n break;\n case Token.NUMBER:\n check(Token.NUMBER);\n operand = new Operand(token.value);\n operand.type = SymbolTable.STRUCT_INT;\n code.load(new Operand(token.value));\n break;\n case Token.CHAR_CONST:\n check(Token.CHAR_CONST);\n operand = new Operand(token.value);\n operand.type = SymbolTable.STRUCT_CHAR;\n code.load(new Operand(token.value));\n break;\n case Token.NEW:\n check(Token.NEW);\n check(Token.IDENT);\n SymObject object = find(token.string);\n assertIsType(object);\n Struct type = object.type;\n if (nextToken.kind == Token.LBRACK) {\n check(Token.LBRACK);\n Struct sizeType = parseExpr().type;\n if (sizeType != SymbolTable.STRUCT_INT) {\n error(\"Array size must be an int\");\n }\n check(Token.RBRACK);\n type = new Struct(Struct.KIND_ARRAY, type);\n\n code.put(Code.OP_NEWARRAY);\n if (type.elementsType == SymbolTable.STRUCT_CHAR) {\n code.put(0);\n } else {\n code.put(1);\n }\n } else {\n if (type.kind != Struct.KIND_CLASS) {\n error(\"Illegal instantiation: type isn't a class\");\n }\n\n code.put(Code.OP_NEW);\n code.put2(type.fields.size());\n }\n operand = new Operand(Operand.KIND_EXPR, -1, type);\n break;\n case Token.LPAR:\n check(Token.LPAR);\n operand = parseExpr();\n check(Token.RPAR);\n break;\n }\n\n return operand;\n }", "public Expression() {\r\n }", "Expr getExpr();", "public Term clone() {\n\t\treturn new Term(this.coefficient, this.exponent);\n\t}", "protected UnaryExpNode(ExpNode expr) {\n this.expr = expr;\n }", "public Node term()\r\n\t{\r\n\t\tNode lhs = negaposi();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.TIMES\r\n\t\t\t\t||token == Lexer.Token.DIVIDE)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = negaposi(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.TIMES)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Mul(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.DIVIDE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Div(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}", "public Literal createLiteral(boolean b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "@Override\n\tpublic String toString() {\n\t\tString out = \"\";\n\t\tfor (Literal s : literals) {\n\t\t\tout = out + \" (\"+ s.getLiteral()+\" \"+((s.getArithmetic_value()==null)?s.isLiteral_positivity():s.getArithmetic_value())+\") \";\n\t\t}\n\t\treturn out;\n\t}", "@Override\r\n public String toString() {\r\n return literal;\r\n }", "public final EObject entryRuleRealLiteral() throws RecognitionException {\n EObject current = null;\n int entryRuleRealLiteral_StartIndex = input.index();\n EObject iv_ruleRealLiteral = null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 111) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4703:2: (iv_ruleRealLiteral= ruleRealLiteral EOF )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4704:2: iv_ruleRealLiteral= ruleRealLiteral EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getRealLiteralRule()); \n }\n pushFollow(FOLLOW_ruleRealLiteral_in_entryRuleRealLiteral9556);\n iv_ruleRealLiteral=ruleRealLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleRealLiteral; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleRealLiteral9566); if (state.failed) return current;\n\n }\n\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 111, entryRuleRealLiteral_StartIndex); }\n }\n return current;\n }", "public Literal createLiteral(short b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "public String toString()\n {\n return \"LiteralOPToken(\" + getValue() + \")\";\n }", "public Literal createLiteral(byte b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "LWordConstant createLWordConstant();", "public Node expression()\r\n\t{\r\n\t\tNode lhs = term();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.PLUS\r\n\t\t\t\t||token == Lexer.Token.MINUS)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = term(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.PLUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Add(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.MINUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Sub(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}" ]
[ "0.86764807", "0.6631058", "0.6631058", "0.65514696", "0.652855", "0.6504356", "0.6443567", "0.6418205", "0.6358318", "0.6284964", "0.6273068", "0.6220697", "0.62100047", "0.6196634", "0.6147924", "0.60525596", "0.60525596", "0.60367703", "0.5997478", "0.59648603", "0.5964824", "0.59574336", "0.59482634", "0.5944086", "0.5766842", "0.57421434", "0.5733638", "0.56979007", "0.5693196", "0.56294245", "0.5614983", "0.5610754", "0.5609834", "0.5593458", "0.5558411", "0.55436486", "0.554163", "0.55366737", "0.55299294", "0.55116755", "0.5460109", "0.54411787", "0.5437", "0.54319495", "0.54289937", "0.5425701", "0.5422767", "0.5421336", "0.54180384", "0.541288", "0.5409358", "0.5409358", "0.5397983", "0.5384427", "0.53812385", "0.53667027", "0.5357708", "0.53546935", "0.5352079", "0.5332867", "0.533163", "0.5329621", "0.5308803", "0.5298714", "0.5287264", "0.52703637", "0.5251595", "0.5247862", "0.5237008", "0.52365875", "0.521558", "0.5199424", "0.5199424", "0.5199424", "0.5199424", "0.51979846", "0.5196229", "0.5188283", "0.5184063", "0.5182256", "0.51807857", "0.51755285", "0.5171141", "0.51622593", "0.5154556", "0.5139142", "0.5138902", "0.5100592", "0.509922", "0.5095313", "0.50921446", "0.50759155", "0.5075782", "0.5072097", "0.50660926", "0.5060051", "0.5048757", "0.5048318", "0.504828", "0.5047123" ]
0.8023722
1
Returns a new object of class 'State Exp'.
<C, S> StateExp<C, S> createStateExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public State state();", "public State(){}", "void create( State state );", "public State () {\n\t\tthis.stateId = generateStateId();\n\t}", "public State(String state_rep) {\n\t\tthis.state_rep = state_rep;\n\t}", "Object getState();", "@Override\r\n public IObjectiveState createState(final Serializable staticState) {\r\n return new InternalState(this.m_func.createState(staticState));\r\n }", "public State(T state) {\r\n\t\tthis.state = state;\r\n\t}", "public ActionState createActionState();", "public Context() {\n\t\tstates = new ObjectStack<>();\n\t}", "public State getState();", "public State getState();", "State getState();", "State getState();", "State getState();", "State getState();", "StateT getState();", "State.Builder<E, S, A> to(S state);", "StateType createStateType();", "StateMachineFactory getStateMachineFactory();", "protected S state() {\n return state;\n }", "ESMFState getState();", "public static GameState createInstance() {\n\t\treturn new GameState();\n\t}", "public IState getState();", "public State() {\n resetTransitions();\n id = next_id++;\n }", "public StateInfo createStateInfo() {\n return new JJStateInfo();\n }", "InternalState(final IObjectiveState s) {\r\n super();\r\n this.m_state = s;\r\n }", "IfaceState createState(int nlocal,IfaceSafetyStatus sts);", "StateClass() {\r\n restored = restore();\r\n }", "private StateUtils() {}", "public abstract State clone();", "public interface ActionStateClass extends javax.jmi.reflect.RefClass {\n /**\n * The default factory operation used to create an instance object.\n * @return The created instance object.\n */\n public ActionState createActionState();\n /**\n * Creates an instance object having attributes initialized by the passed \n * values.\n * @param name \n * @param visibility \n * @param isSpecification \n * @param isDynamic \n * @param dynamicArguments \n * @param dynamicMultiplicity \n * @return The created instance object.\n */\n public ActionState createActionState(java.lang.String name, org.omg.uml.foundation.datatypes.VisibilityKind visibility, boolean isSpecification, boolean isDynamic, org.omg.uml.foundation.datatypes.ArgListsExpression dynamicArguments, org.omg.uml.foundation.datatypes.Multiplicity dynamicMultiplicity);\n}", "public State getNewState() {\n\t\treturn newState;\n\t}", "public State getState(){return this.state;}", "public State()\n {\n this(\"\");\n }", "public State getNewState() {\n return newState;\n }", "LabState state();", "SimplStateMachineFactory getSimplStateMachineFactory();", "public S getCurrentState();", "public States states();", "@NotNull\r\n State getState();", "public State getState(Action action) { \n\t\tState newstate = new State(getTractor(), getK(), getMax(), getRows(), getColumns());\n\t\tfor (int i = 0; i < getRows(); i++) {\n\t\t\tfor (int j = 0; j < getColumns(); j++) {\n\t\t\t\tnewstate.cells[i][j] = new Square(i, j, cells[i][j].getSand()); \n\t\t\t}\n\t\t} \n\t\tnewstate.getSquare(newstate.getTractor()).setSand(newstate.getSquare(newstate.getTractor()).getSand()-action.distributedAmount());\n\t\tnewstate.tractor=(Square) action.getMovement();\n\t\tSquare[] adjacents = action.getAdjacents();\n\t\tint[] values = action.getValues();\n\n\t\tfor (int i = 0; i < adjacents.length; i++) {\n\t\t\tnewstate.getSquare(adjacents[i]).setSand(newstate.getSquare(adjacents[i]).getSand()+values[i]);\n\t\t}\n\t\treturn newstate;\n\t}", "PowerState getState();", "public void getState();", "public State createState(Environment environmentIn, State oldState)\n\t{\n\t\treturn new MarioState(environmentIn, oldState);\n\t}", "public State(String fromString)\n {\n// Metrics.increment(\"State count\");\n //...\n }", "public abstract IState createState(ISemanticObject<?> observable, IContext context) throws ThinklabException;", "public interface State {\r\n\r\n}", "public TSLexerState getState() {\r\n \t\treturn state;\r\n \t}", "private State(String name, int index) {\r\n \t\t\tthis.index = index;\r\n \t\t\tthis.name = name;\r\n \t\t}", "public DFAState(String name) {\n this.name = name;\n this.hashCode = name.hashCode();\n }", "State(String name)\n\t\t{\n\t\t\tthis.name = name;\n\t\t}", "public FSM() {\r\n \t\tstates = new HashMap<String, State>();\r\n \t\ttransitions = new LinkedHashMap<String, Transition>();\r\n \t}", "private State getState()\n {\n return state;\n }", "private InterpreterState(final String statename) {\n name = statename;\n }", "public GameState getState(){\n\t\tGameState State=new GameState(this.points, this.currentBoard.getState());\n\t\t\n\t\treturn State;\n\t}", "ControllerState getNewObjectState();", "StatePacBuilder operationalState(OperationalState operationalState);", "public S getState() {\r\n\t\treturn state;\r\n\t}", "public State createState(final Point point) {\n\t\tint i = 0;\n\t\twhile (getStateWithID(i) != null) {\n\t\t\ti++;\n\t\t}\n\t\tfinal State state = new State(i, point, this);\n\t\taddState(state);\n\t\treturn state;\n\t}", "public static State startState() {\n return new State(StateTypes.q0);\n }", "public TaskState getNewTaskState(){\n\n TaskState newState = new TaskState();\n\n newState.graph = new DescGraph();\n newState.moveStack = new Stack<>();\n newState.hasSolution = false;\n newState.isNew = true;\n\n newState.moveStack.push(\n new HorseMove(newState.graph.getFirst())\n );\n\n return newState;\n\n }", "public org.landxml.schema.landXML11.StateType xgetState()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.StateType target = null;\r\n target = (org.landxml.schema.landXML11.StateType)get_store().find_attribute_user(STATE$14);\r\n return target;\r\n }\r\n }", "public abstract State getSourceState ();", "T initialState();", "private final State copy( State state)\n {\n State copy = new State();\n copy.index = counter++;\n copy.stackOps = Arrays.copyOf( state.stackOps, state.stackOps.length);\n copy.gotos = Arrays.copyOf( state.gotos, state.gotos.length);\n itemSetMap.put( copy, itemSetMap.get( state));\n return copy;\n }", "public State(State old, Integer select){\n complete = true;\n Variable onOperate = old.onOperate;\n int type = onOperate.type;\n int position = onOperate.position;\n onOperate.visited=true;\n table = new Variable[5][5];\n for (int i=0;i<5;i++){\n for (int j=0;j<5;j++){\n table[i][j] = new Variable(old.table[i][j]);\n complete = complete&&table[i][j].visited;\n }\n }\n table[type][position].domains.clear();\n table[type][position].domains.add(select);\n this.onOperate = table[type][position];\n this.onOperate.visited = true;\n this.onOperate.iterator = onOperate.domains.iterator();\n }", "public State(T state , double cost,State<T> cameFrom)\r\n\t{\r\n\t\tthis.state = state;\r\n\t\tthis.cost = cost;\r\n\t\tthis.cameFrom = cameFrom;\r\n\t}", "public GameState() {}", "@Generated\n public FlexState() {\n }", "private State createNewState(State oldState, SketchNode sk, OpNonterminalSymbol opSym) {\n\n assert (opSym.prod.operatorName.equals(\"not\"));\n\n State newState = new State(oldState);\n assert (oldState.pp.numRefinementSketch == newState.pp.numRefinementSketch);\n VariableNode newV = newState.pp.findSelectedVar();\n\n if (newV.depth == Main.DEPTH_LIMIT) return null;\n\n Node[] args = new Node[1];\n OperatorNode add = newState.pp.mkOperatorNode(opSym, newV.parent, args);\n\n add.args.set(0, newState.pp.mkVarNode(sk, add, true, false, (newV.depth + 1)));\n\n newState.pp.substituteVar(newV, add);\n newState.cost += opSym.prod.cost;\n// newState.cost = Math.floor(newState.cost) + opSym.prod.cost;\n\n if (newV.containNot) newState.cost += Main.MORE_THAN_ONE_NOT;\n\n assert (newState.pp.varNodes.size() >= newState.pp.numRefinementSketch) : newState.toString();\n return newState;\n }", "public State GetState()\n {\n return this.state;\n }", "StateMachineType createStateMachineType();", "public S getState() {\n return currentState;\n }", "public State(String hName, int hPop, String capName, int capPop, String sName, int sPop){\r\n \r\n highPop = new City(hName, hPop);\r\n capital = new City(capName, capPop);\r\n stateName = sName;\r\n statePop = sPop;\r\n }", "StatePac build();", "CompositeState createCompositeState();", "private Transition(State sourceState) {\r\n \t\t\tthis.sourceState = sourceState;\r\n \t\t\tthis.nextStateInfo = new ArrayList<NextStateInfo>();\r\n \t\t}", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "public GameState(State.StateView state) {\n }", "public State(String name) {\n\t\tthis.name = name;\n\t\tif (name.endsWith(\"a\")) {\n\t\t\tsetAccepting();\n\t\t} else if (name.endsWith(\"d\")) {\n\t\t\tsetDeclining();\n\t\t} else if (name.endsWith(\"f\")) {\n\t\t\tsetFinal(true);\n\t\t}\n\t}", "public T getState() {\r\n\t\treturn state;\r\n\t}", "public Node(State state) {\r\n\t\t\tthis.state=state;\r\n\t\t}", "public interface StateBuilder {\n\n /**\n * Creates the state.\n *\n * @return the state.\n */\n State build();\n\n /**\n * Changes the acceptance of the state, to the specified value.\n *\n * @param acceptance\n * new acceptance.\n */\n void changeAcceptance(final boolean acceptance);\n\n /**\n * Checks if a state is a accepting state.\n *\n * @return acceptance of the state.\n */\n boolean isAccepting();\n\n /**\n * Returns the state number.\n *\n * @return the state number.\n */\n String getId();\n}", "public StateInfo copy() {\n return new StateInfo(this);\n }", "public STATE getState() {\n\t\n\t\treturn state;\n\t}", "public State() {\r\n this.root = Directory.createRoot();\r\n this.setExit(false);\r\n this.directoryStack = new Stack<>();\r\n this.returnObject = new ReturnObject();\r\n workingDirectory = this.root;\r\n\r\n // Create a new ArrayList for the command history\r\n commandHistory = new ArrayList<>();\r\n }", "public States(Gameengine game) {\r\n\t\tthis.game = game;\r\n\t}", "public TransactionState state();", "@Override\n public int getState() {\n return myState;\n }", "public InstructionsState(int stateID){\r\n\t\tthis.stateID = stateID;\r\n\t}", "public StateDAO(final State state) {\n\t\tthis.state = state;\n\t}", "public State state() {\n return state;\n }", "public TState getState() {\n return state;\n }", "public NewTransitionRecord(){\r\n fromstate = 0;\r\n tostate = 0;\r\n rate = 0.0;\r\n }" ]
[ "0.7109358", "0.70309556", "0.6696193", "0.65898675", "0.6579671", "0.64809746", "0.645415", "0.6432772", "0.63984424", "0.63605875", "0.6355344", "0.6355344", "0.63547486", "0.63547486", "0.63547486", "0.63547486", "0.6352129", "0.6350585", "0.6308928", "0.63031274", "0.62575805", "0.6253878", "0.6241571", "0.623151", "0.61825013", "0.6178665", "0.61700225", "0.6135663", "0.60895514", "0.6078817", "0.6066441", "0.6061179", "0.6060988", "0.60605514", "0.6041479", "0.60394305", "0.60216576", "0.601692", "0.6005533", "0.6001229", "0.59983337", "0.5992855", "0.59832746", "0.5982647", "0.5960258", "0.5959961", "0.5945501", "0.59309065", "0.5928493", "0.5928246", "0.59275824", "0.59219617", "0.59165174", "0.59104276", "0.59045875", "0.5894465", "0.58748883", "0.585889", "0.5857828", "0.5854048", "0.5853245", "0.5848232", "0.5847296", "0.58434236", "0.58375144", "0.58358604", "0.58310634", "0.5820907", "0.5789611", "0.5788781", "0.5767884", "0.5761672", "0.57583237", "0.5752404", "0.57484746", "0.57403934", "0.57359356", "0.57218856", "0.5717604", "0.5717604", "0.5717604", "0.5717604", "0.5717604", "0.5717604", "0.57126623", "0.57110745", "0.5710209", "0.5706673", "0.5683816", "0.5681566", "0.5680809", "0.56806433", "0.56744903", "0.5673225", "0.5666965", "0.5659988", "0.56578046", "0.56543076", "0.56527966", "0.56475997" ]
0.8023302
0
Returns a new object of class 'String Literal Exp'.
<C> StringLiteralExp<C> createStringLiteralExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "StringLiteralExp createStringLiteralExp();", "StringExpression createStringExpression();", "public LiteralExpression (String str){\n _value = str;\n }", "RealLiteralExp createRealLiteralExp();", "SimpleLiteral createSimpleLiteral();", "Literal createLiteral();", "Literal createLiteral();", "<C> RealLiteralExp<C> createRealLiteralExp();", "InvalidLiteralExp createInvalidLiteralExp();", "String getLiteral();", "String getLiteral();", "StringOperation createStringOperation();", "TypeLiteralExp createTypeLiteralExp();", "private String literal(String str) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"'\");\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\'':\n buffer.append(\"''\");\n break;\n default:\n buffer.append(str.charAt(i));\n break;\n }\n }\n buffer.append(\"'\");\n return buffer.toString();\n }", "public synchronized Literal createLiteral(String str) {\n\n // check whether we have it in the registry\n Literal r = (Literal)lmap.get(str);\n if(r == null) {\n r = new LiteralImpl(/*getUnusedNodeID(),*/ str);\n lmap.put(str, r);\n }\n return r;\n }", "public static StringLiteral fromLiteralValue (String pValue)\n {\n return new StringLiteral (pValue);\n }", "StringConstant createStringConstant();", "public static Symbol string()\r\n\t{\r\n\t\tString str_text = buffer.toString();\r\n\t\tToken token = new Token(fname, str_text, str_linepos, str_charpos,\r\n\t\t\t\tstr_colpos);\r\n\t\treturn new Symbol(sym.STRING, str_linepos, str_colpos, token);\r\n\t}", "<C> InvalidLiteralExp<C> createInvalidLiteralExp();", "@Override\n public Object construct(Object... args) {\n CharSequence stringData = (args.length > 0 ? ToString(realm(), args[0]) : \"\");\n ExoticString obj = new ExoticString(realm(), stringData);\n obj.setPrototype(realm().getIntrinsic(Intrinsics.StringPrototype));\n return obj;\n }", "public static StringLiteral fromToken (String pToken)\n {\n return new StringLiteral (getValueFromToken (pToken));\n }", "Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n SingleQuotedLiteral(),\n DoubleQuotedLiteral()),\n actions.pushLiteralNode());\n }", "public T caseStringLiteralExpCS(StringLiteralExpCS object) {\r\n return null;\r\n }", "String getString_lit();", "public Literal setLiteralString(String literalData);", "public Expression(String pExpStr) {\n Queue<Token> tokenQueue = new Queue<>();\n setTokenQueue(tokenQueue);\n Tokenizer tokenizer = new Tokenizer(pExpStr);\n Token prevToken = null;\n Token token = tokenizer.nextToken();\n while (token != null) {\n if (token instanceof SubOperator) {\n token = negationCheck(token, prevToken);\n }\n getTokenQueue().enqueue(token);\n prevToken = token;\n token = tokenizer.nextToken();\n }\n }", "StringTemplate createStringTemplate();", "@Override\n public String toString()\n {\n return literal;\n }", "@Override\n public String toString()\n {\n return literal;\n }", "@Override\n public String toString()\n {\n return literal;\n }", "@Override\n public String toString()\n {\n return literal;\n }", "LetExp createLetExp();", "public Literal getLiteralString(String literalData);", "public abstract String construct();", "public Literal getLiteral();", "public Literal getLiteral();", "public StringTemplateElement()\n {\n super(String.class);\n }", "UndefinedLiteralExp createUndefinedLiteralExp();", "@Override\r\n public String toString() {\r\n return literal;\r\n }", "VariableExp createVariableExp();", "public Expression(Expression exp) {\r\n\t\tconcat(exp);\r\n\t\ttext = new StringBuffer(new String(exp.text));\r\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}", "@Override\n public String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}", "@Override\n public String toString() {\n return literal;\n }", "public static Expression compile(@NonNull final String s) {\n return new Expression(PARSER.parse(s));\n }", "public Expression() {\r\n\t\ttext = new StringBuffer();\r\n\t\txttext = new StringBuffer();\r\n\t}", "public String toString()\n {\n return \"LiteralOPToken(\" + getValue() + \")\";\n }", "@Override\r\n\tpublic Object visitStringLiteralExpression(\r\n\t\t\tStringLiteralExpression stringLiteralExpression, Object arg)\r\n\t\t\tthrows Exception {\n\t mv.visitLdcInsn(stringLiteralExpression.stringLiteral.getText());\r\n\t\treturn \"Ljava/lang/String;\";\r\n\t}", "StringContent createStringContent();", "public PyShadowString() {\n\t\tthis(Py.EmptyString, Py.EmptyString);\n\t}", "public StringExpr(Token token, String value) {\n super(token);\n this.value = value;\n }", "public StringLiteralToken(String id, String literal, boolean optional, boolean caseInsensitive) {\n\t\tthis.id = id;\n\t\tthis.literal = literal;\n\t\tthis.optional = optional;\n\t\tthis.caseInsensitive = caseInsensitive;\n\t}", "<C> NullLiteralExp<C> createNullLiteralExp();", "IntegerLiteralExp createIntegerLiteralExp();", "public Expression(String expr) {\n this.expr = expr;\n scalars = null;\n arrays = null;\n openingBracketIndex = null;\n closingBracketIndex = null;\n }", "<C> UnlimitedNaturalLiteralExp<C> createUnlimitedNaturalLiteralExp();", "CollectionLiteralExp createCollectionLiteralExp();", "StringValue createStringValue();", "StringValue createStringValue();", "StringValue createStringValue();", "StringValue createStringValue();", "private static boolean stringLiteralExpression_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"stringLiteralExpression_0\")) return false;\n boolean r;\n r = consumeToken(b, RAW_SINGLE_QUOTED_STRING);\n if (!r) r = consumeToken(b, RAW_TRIPLE_QUOTED_STRING);\n if (!r) r = stringTemplate(b, l + 1);\n return r;\n }", "private Strings()\n\t{\n\t}", "private Strings()\n\t{\n\t}", "private void jetExprStr(){\n\t\texprType = Z3MiscFunctions.v().getExprType(rExpr);\n\t\tswitch(exprType){\n\t\t\tcase BINOP:\n\t\t\t\tjetBinopExprStr();\n\t\t\t\tbreak;\n\t\t\tcase CAST:\n\t\t\t\tjetCastExprStr();\n\t\t\t\tbreak;\n\t\t\tcase INVOKE:\n\t\t\t\tjetInvokeExpr();\n\t\t\t\tbreak;\n\t\t\tcase NEWARRAY:\n\t\t\t\tjetNewArrayExpr();\n\t\t\t\tbreak;\n\t\t\tcase NEWEXPR:\n\t\t\t\tjetNewExpr();\n\t\t\t\tbreak;\n\t\t\tcase UNOP:\n\t\t\t\tjetUnopExpr();\n\t\t\t\tbreak;\n\t\t\tcase INSTANCEOF:\n\t\t\t\t//TODO\n\t\t\t\tassert(false);\n\t\t\t\tbreak;\n\t\t\tcase NEWMULIARRAY:\n\t\t\t\t//TODO\n\t\t\t\tassert(false);\n\t\t\t\tbreak;\n\t\t}\n\t}", "public LiteralOPToken(String s, int nTypeCode, String sNudASTName)\n {\n this(s, nTypeCode);\n m_sNudASTName = sNudASTName;\n }", "Expression createExpression();", "C11998c mo41090e(String str);", "public java.lang.Object createObject() {\n\treturn new NlsString();\n}" ]
[ "0.8403026", "0.7579944", "0.72717273", "0.70021", "0.696711", "0.6801305", "0.6801305", "0.653994", "0.6443741", "0.6403371", "0.6403371", "0.63967055", "0.633031", "0.6278689", "0.62370795", "0.62355894", "0.6165387", "0.61409247", "0.61162055", "0.6104798", "0.608653", "0.59923816", "0.59566224", "0.5905955", "0.58998823", "0.58975476", "0.58967054", "0.587008", "0.587008", "0.587008", "0.587008", "0.5868804", "0.5857573", "0.5848455", "0.5844615", "0.5844615", "0.58413774", "0.583168", "0.5823293", "0.5811942", "0.5762785", "0.57465494", "0.57465494", "0.57465494", "0.57465494", "0.57465494", "0.57465494", "0.57406795", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.57263213", "0.5725169", "0.57162863", "0.5697877", "0.56865406", "0.56803703", "0.56654394", "0.56507254", "0.5646601", "0.5643368", "0.5627016", "0.562542", "0.55755615", "0.55746305", "0.5552464", "0.55505115", "0.55505115", "0.55505115", "0.55505115", "0.55173993", "0.551565", "0.551565", "0.5500516", "0.5470866", "0.5458585", "0.54530054", "0.5450624" ]
0.8103633
1
Returns a new object of class 'Tuple Literal Exp'.
<C, P> TupleLiteralExp<C, P> createTupleLiteralExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TupleLiteralExp createTupleLiteralExp();", "TupleExpr createTupleExpr();", "TupleLiteralPart createTupleLiteralPart();", "<C, P> TupleLiteralPart<C, P> createTupleLiteralPart();", "private Tuples() {}", "TupleTypeRule createTupleTypeRule();", "public final AstValidator.tuple_return tuple() throws RecognitionException {\n AstValidator.tuple_return retval = new AstValidator.tuple_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree TUPLE_VAL436=null;\n AstValidator.literal_return literal437 =null;\n\n\n CommonTree TUPLE_VAL436_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:673:7: ( ^( TUPLE_VAL ( literal )* ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:673:9: ^( TUPLE_VAL ( literal )* )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n TUPLE_VAL436=(CommonTree)match(input,TUPLE_VAL,FOLLOW_TUPLE_VAL_in_tuple3574); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n TUPLE_VAL436_tree = (CommonTree)adaptor.dupNode(TUPLE_VAL436);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(TUPLE_VAL436_tree, root_1);\n }\n\n\n if ( input.LA(1)==Token.DOWN ) {\n match(input, Token.DOWN, null); if (state.failed) return retval;\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:673:22: ( literal )*\n loop121:\n do {\n int alt121=2;\n int LA121_0 = input.LA(1);\n\n if ( (LA121_0==BIGDECIMALNUMBER||LA121_0==BIGINTEGERNUMBER||LA121_0==DOUBLENUMBER||LA121_0==FALSE||LA121_0==FLOATNUMBER||LA121_0==INTEGER||LA121_0==LONGINTEGER||LA121_0==MINUS||LA121_0==NULL||LA121_0==QUOTEDSTRING||LA121_0==TRUE||LA121_0==BAG_VAL||LA121_0==MAP_VAL||LA121_0==TUPLE_VAL) ) {\n alt121=1;\n }\n\n\n switch (alt121) {\n \tcase 1 :\n \t // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:673:22: literal\n \t {\n \t _last = (CommonTree)input.LT(1);\n \t pushFollow(FOLLOW_literal_in_tuple3576);\n \t literal437=literal();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) \n \t adaptor.addChild(root_1, literal437.getTree());\n\n\n \t if ( state.backtracking==0 ) {\n \t }\n \t }\n \t break;\n\n \tdefault :\n \t break loop121;\n }\n } while (true);\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n }\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public Tuple() {\n this(new ArrayList<Object>());\n }", "public Tuple(List<Term> elts) {\n\t\tTerm[] tmp = new Term[elts.size()];\n\t\tthis.elts = elts.toArray(tmp);\n\t}", "public T caseTupleLiteralExpCS(TupleLiteralExpCS object) {\r\n return null;\r\n }", "Lexpr createLexpr();", "public T caseTupleTypeLiteralExpCS(TupleTypeLiteralExpCS object) {\r\n return null;\r\n }", "public TupleTypeLiteralElements getTupleTypeLiteralAccess() {\r\n\t\treturn pTupleTypeLiteral;\r\n\t}", "Astro tuple(AstroArg args);", "public Tuple(List<? extends Loyalty> c)\r\n\t\t{\r\n\t\t\tsuper(c);\r\n\t\t}", "Literal createLiteral();", "Literal createLiteral();", "TypeLiteralExp createTypeLiteralExp();", "<C, PM> LetExp<C, PM> createLetExp();", "public Tuple(String textLine) {\n this(textLine, defaultDelimiter);\n }", "public static interface Tuple {\n\n\t}", "public static Tuple getInstance( ) {\n return tuple;\n }", "public Tuple(Loyalty... c)\r\n\t\t{\r\n\t\t\tsuper(Arrays.asList(c));\r\n\t\t}", "LetExp createLetExp();", "public PremonPatTuple (PremonPat[] Ps) {\n this.Ps = Ps;\n PremonType[] Ts = new PremonType[Ps.length];\n bind = PremonCon.empty;\n for (int i=0; i<Ps.length; i++) {\n Ts[i] = Ps[i].type;\n bind = bind.comp (Ps[i].bind);\n }\n type = new PremonTypeTuple (Ts);\n }", "public final EObject entryRuleTupleLiteralExpCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleTupleLiteralExpCS = null;\n\n\n try {\n // InternalMyDsl.g:6820:58: (iv_ruleTupleLiteralExpCS= ruleTupleLiteralExpCS EOF )\n // InternalMyDsl.g:6821:2: iv_ruleTupleLiteralExpCS= ruleTupleLiteralExpCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getTupleLiteralExpCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleTupleLiteralExpCS=ruleTupleLiteralExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleTupleLiteralExpCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "private Tuple createTuple(Tuple tup) {\n\t\tTuple t = new Tuple(td);\n\t\tif (this.gbfieldtype == null) {\n\t\t\tt.setField(0, new IntField(1));\n\t\t} else {\n\t\t\tt.setField(0, tup.getField(gbfield));\n\t\t\tt.setField(1, new IntField(1));\n\t\t}\n\t\treturn t;\n\t}", "Tuple (L left, R right){\n\t\tthis.left=left;\n\t\tthis.right=right;\n\t}", "public Tuple()\n {\n // Creat a new tuple\n data = new byte[max_size];\n tuple_offset = 0;\n tuple_length = max_size;\n }", "<C, PM> VariableExp<C, PM> createVariableExp();", "public UnmodifiableTuple(Tuple<F, L> tuple) {\r\n this.first = tuple.getFirst();\r\n this.last = tuple.getLast();\r\n size = tuple.size();\r\n hashCode = tuple.hashCode();\r\n }", "StringLiteralExp createStringLiteralExp();", "Tuple (){\n\t\tleft=null;\n\t\tright=null;\n\t}", "SimpleLiteral createSimpleLiteral();", "private Tuples() {\n // prevent instantiation.\n }", "@ConstructorProperties({\"values\"})\n public Tuple(Object... values) {\n this();\n Collections.addAll(elements, values);\n }", "public Tuple2() {\n }", "static TwoTuple<String,Integer> f() {\n return new TwoTuple<String,Integer>(\"hi\", 47);\n }", "public OrderedTupleTypeLiteralElements getOrderedTupleTypeLiteralAccess() {\r\n\t\treturn pOrderedTupleTypeLiteral;\r\n\t}", "public Tuple(Datum fieldIn) {\n fields = new ArrayList<Datum>(1);\n fields.add(fieldIn);\n }", "RealLiteralExp createRealLiteralExp();", "IntegerLiteralExp createIntegerLiteralExp();", "public Tuple(String attrib_names [], String attrib_types [], String attrib_values []) {\n\n\ttuple_counter++;\n\tnum_attribs = attrib_types.length;\n\tmy_data = new HashMap();\n\t\n\tfor (int i = 0; i < num_attribs; i++) {\n\ttry {\n\t Class cl = Class.forName(attrib_types[i]);\n\t Constructor constructor =\n\t\tcl.getConstructor(new Class[] { String.class });\n\t my_data.put ( attrib_names[i],\n\t\t(ColumnValue) constructor.newInstance\n\t\t(new Object[] { attrib_values[i] }));\n\t}\n\tcatch (java.lang.ClassNotFoundException e)\n\t { System.out.println(e.toString()); } \n\tcatch (java.lang.NoSuchMethodException e)\n\t { System.out.println(e.toString()); }\n\tcatch (java.lang.reflect.InvocationTargetException e)\n\t { System.out.println(e.toString()); }\n\tcatch (java.lang.InstantiationException e)\n\t { System.out.println(e.toString()); }\n\tcatch (java.lang.IllegalAccessException e)\n\t { System.out.println(e.toString()); }\n\n\t}\n }", "public Tuple(Object... objects){\n pattern =objects;\n size=objects.length;\n }", "<C> StringLiteralExp<C> createStringLiteralExp();", "public final void synpred203_InternalMyDsl_fragment() throws RecognitionException { \n EObject this_TupleLiteralExpCS_4 = null;\n\n\n // InternalMyDsl.g:7833:3: (this_TupleLiteralExpCS_4= ruleTupleLiteralExpCS )\n // InternalMyDsl.g:7833:3: this_TupleLiteralExpCS_4= ruleTupleLiteralExpCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t/* */\n \t\t\n }\n pushFollow(FOLLOW_2);\n this_TupleLiteralExpCS_4=ruleTupleLiteralExpCS();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }", "<C> RealLiteralExp<C> createRealLiteralExp();", "Expr createExpr();", "@VTID(13)\r\n java.lang.String getTuple();", "public final EObject ruleTupleTypeCS() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n EObject lv_ownedParts_2_0 = null;\n\n EObject lv_ownedParts_4_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:5956:2: ( ( ( (lv_name_0_0= 'Tuple' ) ) (otherlv_1= '(' ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )? otherlv_5= ')' )? ) )\n // InternalMyDsl.g:5957:2: ( ( (lv_name_0_0= 'Tuple' ) ) (otherlv_1= '(' ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )? otherlv_5= ')' )? )\n {\n // InternalMyDsl.g:5957:2: ( ( (lv_name_0_0= 'Tuple' ) ) (otherlv_1= '(' ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )? otherlv_5= ')' )? )\n // InternalMyDsl.g:5958:3: ( (lv_name_0_0= 'Tuple' ) ) (otherlv_1= '(' ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )? otherlv_5= ')' )?\n {\n // InternalMyDsl.g:5958:3: ( (lv_name_0_0= 'Tuple' ) )\n // InternalMyDsl.g:5959:4: (lv_name_0_0= 'Tuple' )\n {\n // InternalMyDsl.g:5959:4: (lv_name_0_0= 'Tuple' )\n // InternalMyDsl.g:5960:5: lv_name_0_0= 'Tuple'\n {\n lv_name_0_0=(Token)match(input,94,FOLLOW_62); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewLeafNode(lv_name_0_0, grammarAccess.getTupleTypeCSAccess().getNameTupleKeyword_0_0());\n \t\t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getTupleTypeCSRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(current, \"name\", lv_name_0_0, \"Tuple\");\n \t\t\t\t\n }\n\n }\n\n\n }\n\n // InternalMyDsl.g:5972:3: (otherlv_1= '(' ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )? otherlv_5= ')' )?\n int alt81=2;\n int LA81_0 = input.LA(1);\n\n if ( (LA81_0==20) ) {\n alt81=1;\n }\n switch (alt81) {\n case 1 :\n // InternalMyDsl.g:5973:4: otherlv_1= '(' ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )? otherlv_5= ')'\n {\n otherlv_1=(Token)match(input,20,FOLLOW_47); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(otherlv_1, grammarAccess.getTupleTypeCSAccess().getLeftParenthesisKeyword_1_0());\n \t\t\t\n }\n // InternalMyDsl.g:5977:4: ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )?\n int alt80=2;\n int LA80_0 = input.LA(1);\n\n if ( ((LA80_0>=RULE_SIMPLE_ID && LA80_0<=RULE_ESCAPED_ID)||LA80_0==19||(LA80_0>=60 && LA80_0<=61)) ) {\n alt80=1;\n }\n switch (alt80) {\n case 1 :\n // InternalMyDsl.g:5978:5: ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )*\n {\n // InternalMyDsl.g:5978:5: ( (lv_ownedParts_2_0= ruleTuplePartCS ) )\n // InternalMyDsl.g:5979:6: (lv_ownedParts_2_0= ruleTuplePartCS )\n {\n // InternalMyDsl.g:5979:6: (lv_ownedParts_2_0= ruleTuplePartCS )\n // InternalMyDsl.g:5980:7: lv_ownedParts_2_0= ruleTuplePartCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\t\tnewCompositeNode(grammarAccess.getTupleTypeCSAccess().getOwnedPartsTuplePartCSParserRuleCall_1_1_0_0());\n \t\t\t\t\t\t\n }\n pushFollow(FOLLOW_48);\n lv_ownedParts_2_0=ruleTuplePartCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\t\tif (current==null) {\n \t\t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getTupleTypeCSRule());\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tadd(\n \t\t\t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\t\t\"ownedParts\",\n \t\t\t\t\t\t\t\tlv_ownedParts_2_0,\n \t\t\t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.TuplePartCS\");\n \t\t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\t\t\n }\n\n }\n\n\n }\n\n // InternalMyDsl.g:5997:5: (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )*\n loop79:\n do {\n int alt79=2;\n int LA79_0 = input.LA(1);\n\n if ( (LA79_0==59) ) {\n alt79=1;\n }\n\n\n switch (alt79) {\n \tcase 1 :\n \t // InternalMyDsl.g:5998:6: otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) )\n \t {\n \t otherlv_3=(Token)match(input,59,FOLLOW_46); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\tnewLeafNode(otherlv_3, grammarAccess.getTupleTypeCSAccess().getCommaKeyword_1_1_1_0());\n \t \t\t\t\t\t\n \t }\n \t // InternalMyDsl.g:6002:6: ( (lv_ownedParts_4_0= ruleTuplePartCS ) )\n \t // InternalMyDsl.g:6003:7: (lv_ownedParts_4_0= ruleTuplePartCS )\n \t {\n \t // InternalMyDsl.g:6003:7: (lv_ownedParts_4_0= ruleTuplePartCS )\n \t // InternalMyDsl.g:6004:8: lv_ownedParts_4_0= ruleTuplePartCS\n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\tnewCompositeNode(grammarAccess.getTupleTypeCSAccess().getOwnedPartsTuplePartCSParserRuleCall_1_1_1_1_0());\n \t \t\t\t\t\t\t\t\n \t }\n \t pushFollow(FOLLOW_48);\n \t lv_ownedParts_4_0=ruleTuplePartCS();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getTupleTypeCSRule());\n \t \t\t\t\t\t\t\t\t}\n \t \t\t\t\t\t\t\t\tadd(\n \t \t\t\t\t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\t\t\t\"ownedParts\",\n \t \t\t\t\t\t\t\t\t\tlv_ownedParts_4_0,\n \t \t\t\t\t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.TuplePartCS\");\n \t \t\t\t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\t\t\t\n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop79;\n }\n } while (true);\n\n\n }\n break;\n\n }\n\n otherlv_5=(Token)match(input,21,FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(otherlv_5, grammarAccess.getTupleTypeCSAccess().getRightParenthesisKeyword_1_2());\n \t\t\t\n }\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public UnorderedTupleTypeLiteralWithInitializerElements getUnorderedTupleTypeLiteralWithInitializerAccess() {\r\n\t\treturn pUnorderedTupleTypeLiteralWithInitializer;\r\n\t}", "VariableExp createVariableExp();", "public TupleDesc getTupleDesc();", "@SafeVarargs\n\tpublic static <R> Tuple<R> construct(R... data) {\n\t\tLinkedList<R> list = new LinkedList<>();\n\t\tfor (R element : data) {\n\t\t\tlist.add(element);\n\t\t}\n\n\t\treturn new Tuple<>(list);\n\t}", "<C> InvalidLiteralExp<C> createInvalidLiteralExp();", "public TupleDesc() {\n columns = new ArrayList<>();\n }", "static Tuple wrap(Tuple init, long sign) throws ExecException {\n\t\tTuple tup = tf.newTuple(2);\n\t\ttup.set(0, init.get(0));\n\t\ttup.set(1, sign);\n\t\t\n\t\tDataBag bag = bf.newDefaultBag();\n\t\tbag.add(tup);\n\t\t\n\t\treturn tf.newTuple(bag);\n\t}", "public Tuple(TupleDesc td) {\n\t\t\tfields = new ArrayList<Field>();\n\t\t\ttupleDesc = td;\n\t\t\n\t\t// some code goes here\n\t\t// 2- assign td and initialize the array of fields\n\n\t}", "public abstract T getTuple(int aPosition);", "Expression createExpression();", "InvalidLiteralExp createInvalidLiteralExp();", "public Tuple1(T value) {\n super(value);\n }", "java.lang.String getSymbolTuple();", "public UnorderedTupleTypeLiteralElements getUnorderedTupleTypeLiteralAccess() {\r\n\t\treturn pUnorderedTupleTypeLiteral;\r\n\t}", "private Clause make(Literal... e) {\n Clause c = new Clause();\n for (int i = 0; i < e.length; ++i) {\n c = c.add(e[i]);\n }\n return c;\n }", "@Test\r\n public void test1(){\r\n Exp one = new NumericLiteral(1);\r\n Exp three = new NumericLiteral(3);\r\n Exp exp = new PlusExp(one, three);\r\n Stmt decl = new DeclStmt(\"x\");\r\n Stmt assign = new Assignment(\"x\", exp);\r\n Stmt seq = new Sequence(decl, assign);\r\n assertEquals(seq.text(), \"var x; x = 1 + 3\");\r\n }", "<C> IntegerLiteralExp<C> createIntegerLiteralExp();", "private Tuple(K key, V value) {\n this.key = key;\n this.value = value;\n }", "@Override\r\n public Literal newLiteral(PObj[] data) {\r\n String symbol = ((Constant) data[0]).getObject().toString();\r\n PObj[] fixed = new PObj[data.length - 1];\r\n System.arraycopy(data, 1, fixed, 0, fixed.length);\r\n PList terms = ProvaListImpl.create(fixed);\r\n return newLiteral(symbol, terms);\r\n }", "public Tuple(Object... values) {\n data = Arrays.copyOf(values, values.length);\n }", "public UnmodifiableTuple(F first, L last) {\r\n this.first = first;\r\n this.last = last;\r\n size = getSize(first, last);\r\n hashCode = hashCode();\r\n }", "<C> UnlimitedNaturalLiteralExp<C> createUnlimitedNaturalLiteralExp();", "ExpOperand createExpOperand();", "private static Tuple tupleBuilder(String s) throws Exception {\n\n if (s.length() < 3 || s.charAt(0) != '(' || s.charAt(s.length() - 1) != ')') {\n System.out.print(\"Tuple format is wrong. \");\n throw new Exception();\n }\n\n s = s.substring(1, s.length() - 1); // \"abc\", +3, -7.5, -7.5f, 2e3\n String[] ss = s.split(\",\"); // [\"abc\" , +3, -7.5, -7.5f, 2e3]\n List<Object> list = new ArrayList<>();\n for (int i = 0; i < ss.length; i++) {\n String temp = ss[i].trim(); // ?i:int || \"abc\" || +3 || -7.5f || 2e3\n Object o = null;\n // type match\n if (temp.charAt(0) == '?') {\n int index = temp.indexOf(':');\n String name = temp.substring(1, index);\n String type = temp.substring(index + 1);\n if (type.equalsIgnoreCase(\"int\")) {\n type = TYPEMATCH_INTEGER_NAME;\n } else if (type.equalsIgnoreCase(\"float\")) {\n type = TYPEMATCH_FLOAT_NAME;\n } else if (type.equalsIgnoreCase(\"string\")) {\n type = TYPEMATCH_STRING_NAME;\n } else {\n System.out.print(\"Type match format is wrong. \");\n throw new Exception();\n }\n o = new ArrayList<String>(Arrays.asList(name, type));\n // type is string\n } else if (temp.charAt(0) == '\"' && temp.charAt(temp.length() - 1) == '\"') {\n o = new String(temp.substring(1, temp.length() - 1));\n // type is float\n } else if (temp.indexOf('.') != -1 || temp.indexOf('e') != -1 || temp.indexOf('E') != -1) {\n try {\n o = Float.valueOf(temp);\n } catch (Exception e) {\n System.out.print(\"Float format is wrong. \");\n throw new Exception();\n }\n\n if ((Float) o == Float.POSITIVE_INFINITY) {\n System.out.print(\"Float is overflow. \");\n throw new Exception();\n }\n // type is int\n } else {\n try {\n o = Integer.valueOf(temp);\n } catch (Exception e) {\n System.out.print(\"Tuple format is wrong. \");\n throw new Exception();\n }\n }\n list.add(o);\n }\n Tuple t = new Tuple(list);\n return t;\n }", "protected Predicate createLiteralFromTuple(Map<String, String> hashConstantToVariable, Tuple tuple, Mode mode,\n\t\t\tboolean headMode) {\n\t\tList<Term> terms = new ArrayList<Term>();\n\t\tfor (int i = 0; i < mode.getArguments().size(); i++) {\n\t\t\tString value;\n\t\t\tif (tuple.getValues().get(i) != null) {\n\t\t\t\tvalue = tuple.getValues().get(i).toString();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = NULL_PREFIX+nullCounter;\n\t\t\t\tnullCounter++;\n\t\t\t}\n\n\t\t\tif (mode.getArguments().get(i).getIdentifierType().equals(IdentifierType.CONSTANT)) {\n\t\t\t\tterms.add(new Constant(\"\\\"\" + Commons.escapeMetaCharacters(value) + \"\\\"\"));\n\t\t\t} else {\n\t\t\t\t// INPUT or OUTPUT type\n\t\t\t\tString valueWithSuffix = value + \"_\" + mode.getArguments().get(i).getType();\n\t\t\t\tif (!hashConstantToVariable.containsKey(valueWithSuffix)) {\n\t\t\t\t\tString var = Commons.newVariable(varCounter);\n\t\t\t\t\tvarCounter++;\n\n\t\t\t\t\thashConstantToVariable.put(valueWithSuffix, var);\n\t\t\t\t}\n\t\t\t\tterms.add(new Variable(hashConstantToVariable.get(valueWithSuffix)));\n\t\t\t}\n\t\t}\n\n\t\tPredicate literal = new Predicate(mode.getPredicateName(), terms);\n\t\treturn literal;\n\t}", "JavaExpression createJavaExpression();", "public Element compileLet() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tString varName;\n\t\tboolean array = false;\n\t\tElement letParent = document.createElement(\"letStatement\");\n\n\t\t// let\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tletParent.appendChild(ele);\n\n\t\t// identifier\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tvarName = jTokenizer.returnTokenVal();\n\t\tele = createXMLnode(tokenType);\n\t\tletParent.appendChild(ele);\n\n\t\t// Checks if the variable is an array element\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal();\n\t\tif (token.equals(\"[\")) {\n\t\t\tarray = true;\n\t\t\t//Pushing base address\n\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t\t// [\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tletParent.appendChild(ele);\n\n\t\t\t// Pushing the offset, the expression that comes after [\n\t\t\tjTokenizer.advance();\n\t\t\tletParent.appendChild(compileExpression());\n\t\t\t\n\t\t\t// ]\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tletParent.appendChild(ele);\n\t\t\tjTokenizer.advance();\n\t\t\t\n\t\t\t//Adding the two to find the address of the element\n\t\t\twriter.writeArithmetic(\"add\");\n\t\t}\n\n\t\t// =\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tletParent.appendChild(ele);\n\n\t\t// compiling the expression on the right side of the equals\n\t\tjTokenizer.advance();\n\t\tletParent.appendChild(compileExpression());\n\n\t\t// ;\n\t\tjTokenizer.advance();\n\t\tele = createXMLnode(jTokenizer.tokenType());\n\t\tletParent.appendChild(ele);\n\t\t\n\t\t//If it was an array, we have to push the result of the expression to the address\n\t\t//of the specific element\n\t\tif (array) {\n\t\t\t// *(base+offset)=expression\n\t\t\twriter.writePop(\"temp\", 0);\n\n\t\t\t// base +index->that\n\t\t\twriter.writePop(\"pointer\", 1);\n\n\t\t\t// Expression -> *(base+index)\n\t\t\twriter.writePush(\"temp\", 0);\n\t\t\twriter.writePop(\"that\", 0);\n\t\t} \n\t\t//If not array, just pop it to the variable directly\n\t\telse {\n\t\t\twriter.writePop(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t}\n\n\t\treturn letParent;\n\t}", "<C, O> OperationCallExp<C, O> createOperationCallExp();", "public LiteralOPToken(LiteralBaseToken bt)\n {\n this(bt.getValue(), bt.getType());\n }", "public LiteralExpression (String str){\n _value = str;\n }", "public ExtendedTupleEditorSupport(AttrManager m, AttrEditorManager em) {\r\n\t\tsuper(m, em);\r\n\t}", "public Tuple(String textLine, String delimiter) {\n if (delimiter == null) {\n delimiter = defaultDelimiter;\n }\n \n fields = new ArrayList<Datum>(numFields) ;\n int delimSize = delimiter.length() ;\n boolean done = false ;\n \n int lastIdx = 0 ;\n \n while (!done) {\n int newIdx = textLine.indexOf(delimiter, lastIdx) ;\n if (newIdx != (-1)) {\n String token = textLine.substring(lastIdx, newIdx) ;\n fields.add(new DataAtom(token));\n lastIdx = newIdx + delimSize ;\n }\n else {\n String token = textLine.substring(lastIdx) ;\n fields.add(new DataAtom(token));\n done = true ;\n }\n }\n\n numFields = fields.size();\n }", "public Tuple(Node nd, ArrayList<Integer> list, char [] str, char letter){\r\n node = nd;\r\n trail = list;\r\n int charArrayLength = str.length;\r\n prefix = new char[charArrayLength + 1];\r\n System.arraycopy(str, 0, prefix, 0, charArrayLength);\r\n prefix[charArrayLength] = letter;\r\n alphabet = letter;\r\n }", "Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n SingleQuotedLiteral(),\n DoubleQuotedLiteral()),\n actions.pushLiteralNode());\n }", "public Literal getLiteral();", "public Literal getLiteral();", "public Builder setSymbolTuple(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n symbolTuple_ = value;\n onChanged();\n return this;\n }", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions, Iterable<Member> members) { throw Extensions.todo(); }", "AExpArgs createAExpArgs();", "protected Predicate createLiteralFromTuple(Map<String, String> hashConstantToVariable, Tuple tuple, Mode mode,\n\t\t\tboolean headMode, boolean ground) {\n\t\tList<Term> terms = new ArrayList<Term>();\n\t\tfor (int i = 0; i < mode.getArguments().size(); i++) {\n\t\t\tString value;\n\t\t\tif (tuple.getValues().get(i) != null) {\n\t\t\t\tvalue = tuple.getValues().get(i).toString();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = NULL_PREFIX+nullCounter;\n\t\t\t\tnullCounter++;\n\t\t\t}\n\n\t\t\tif (ground) {\n\t\t\t\tterms.add(new Constant(\"\\\"\" + Commons.escapeMetaCharacters(value) + \"\\\"\"));\n\t\t\t} else {\n\t\t\t\tif (mode.getArguments().get(i).getIdentifierType().equals(IdentifierType.CONSTANT)) {\n\t\t\t\t\tterms.add(new Constant(\"\\\"\" + Commons.escapeMetaCharacters(value) + \"\\\"\"));\n\t\t\t\t} else {\n\t\t\t\t\t// INPUT or OUTPUT type\n\t\t\t\t\tString valueWithSuffix = value + \"_\" + mode.getArguments().get(i).getType();\n\t\t\t\t\tif (!hashConstantToVariable.containsKey(valueWithSuffix)) {\n\t\t\t\t\t\tString var = Commons.newVariable(varCounter);\n\t\t\t\t\t\tvarCounter++;\n\t\n\t\t\t\t\t\thashConstantToVariable.put(valueWithSuffix, var);\n\t\t\t\t\t}\n\t\t\t\t\tterms.add(new Variable(hashConstantToVariable.get(valueWithSuffix)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tPredicate literal = new Predicate(mode.getPredicateName(), terms);\n\t\treturn literal;\n\t}", "public abstract Statement createSimpleStatement(int type, CodeLocation codeLoc, List<Annotation> annotations, Variable assign, Value ... v);", "public final EObject entryRuleTupleLiteralPartCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleTupleLiteralPartCS = null;\n\n\n try {\n // InternalMyDsl.g:6895:59: (iv_ruleTupleLiteralPartCS= ruleTupleLiteralPartCS EOF )\n // InternalMyDsl.g:6896:2: iv_ruleTupleLiteralPartCS= ruleTupleLiteralPartCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getTupleLiteralPartCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleTupleLiteralPartCS=ruleTupleLiteralPartCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleTupleLiteralPartCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public MutableBlock createMutableBlock(String expression) {\r\n return new MutableBlock(passwordType, expression);\r\n }", "public abstract T getTuple(Record record);", "<C, S> StateExp<C, S> createStateExp();", "private Expression toExpression() {\n Expression lhs = null, rhs = null;\n if (base instanceof DerefSymbol) {\n lhs = ((DerefSymbol)base).toExpression();\n } else if (base instanceof AccessSymbol) {\n lhs = ((AccessSymbol)base).toExpression();\n } else if (base instanceof Identifier) {\n lhs = new Identifier(base);\n } else {\n PrintTools.printlnStatus(0,\n \"[WARNING] Unexpected access expression type\");\n return null;\n }\n rhs = new Identifier(member);\n return new AccessExpression(lhs, AccessOperator.MEMBER_ACCESS, rhs);\n }", "VariableDeclaration createVariableDeclaration();", "ObjectLiteral createObjectLiteral();", "private SchemaTupleFactory internalNewSchemaTupleFactory(Schema s, boolean isAppendable, GenContext context) {\n return newSchemaTupleFactory(Triple.make(new SchemaKey(s), isAppendable, context));\n }", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions) { throw Extensions.todo(); }" ]
[ "0.8934344", "0.80159235", "0.7878818", "0.7756982", "0.68530196", "0.6698256", "0.6575443", "0.6422555", "0.6342736", "0.6316029", "0.62487376", "0.62221706", "0.6215422", "0.61527854", "0.6049118", "0.6041781", "0.6041781", "0.60180193", "0.6002699", "0.5995242", "0.5955068", "0.5933349", "0.5920017", "0.5895625", "0.5885285", "0.585372", "0.585279", "0.58419496", "0.583215", "0.5822389", "0.58151054", "0.5804503", "0.5803288", "0.5778899", "0.57675344", "0.5737289", "0.5731181", "0.5698103", "0.5693283", "0.5691721", "0.56734395", "0.5655237", "0.5650011", "0.563237", "0.559641", "0.55874974", "0.55828583", "0.55801296", "0.55721986", "0.5560527", "0.55494094", "0.55282974", "0.55121076", "0.550298", "0.5502288", "0.5499053", "0.54983604", "0.5496129", "0.5481207", "0.5433222", "0.54177237", "0.5416614", "0.5402269", "0.53968567", "0.5396778", "0.5361252", "0.5359838", "0.5339914", "0.5334983", "0.5299832", "0.5287507", "0.5268049", "0.5247979", "0.52418447", "0.52400905", "0.52387565", "0.521772", "0.5199403", "0.5170351", "0.51699185", "0.5154598", "0.51359165", "0.512874", "0.51237166", "0.510219", "0.510219", "0.50793445", "0.5009931", "0.50066394", "0.50010103", "0.49983606", "0.49915445", "0.4990645", "0.49846008", "0.49697903", "0.49579757", "0.49551743", "0.4946627", "0.4941029", "0.49361637" ]
0.8676419
1
Returns a new object of class 'Tuple Literal Part'.
<C, P> TupleLiteralPart<C, P> createTupleLiteralPart();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TupleLiteralPart createTupleLiteralPart();", "TupleLiteralExp createTupleLiteralExp();", "<C, P> TupleLiteralExp<C, P> createTupleLiteralExp();", "TupleExpr createTupleExpr();", "private Tuples() {}", "public final AstValidator.tuple_return tuple() throws RecognitionException {\n AstValidator.tuple_return retval = new AstValidator.tuple_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree TUPLE_VAL436=null;\n AstValidator.literal_return literal437 =null;\n\n\n CommonTree TUPLE_VAL436_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:673:7: ( ^( TUPLE_VAL ( literal )* ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:673:9: ^( TUPLE_VAL ( literal )* )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n TUPLE_VAL436=(CommonTree)match(input,TUPLE_VAL,FOLLOW_TUPLE_VAL_in_tuple3574); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n TUPLE_VAL436_tree = (CommonTree)adaptor.dupNode(TUPLE_VAL436);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(TUPLE_VAL436_tree, root_1);\n }\n\n\n if ( input.LA(1)==Token.DOWN ) {\n match(input, Token.DOWN, null); if (state.failed) return retval;\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:673:22: ( literal )*\n loop121:\n do {\n int alt121=2;\n int LA121_0 = input.LA(1);\n\n if ( (LA121_0==BIGDECIMALNUMBER||LA121_0==BIGINTEGERNUMBER||LA121_0==DOUBLENUMBER||LA121_0==FALSE||LA121_0==FLOATNUMBER||LA121_0==INTEGER||LA121_0==LONGINTEGER||LA121_0==MINUS||LA121_0==NULL||LA121_0==QUOTEDSTRING||LA121_0==TRUE||LA121_0==BAG_VAL||LA121_0==MAP_VAL||LA121_0==TUPLE_VAL) ) {\n alt121=1;\n }\n\n\n switch (alt121) {\n \tcase 1 :\n \t // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:673:22: literal\n \t {\n \t _last = (CommonTree)input.LT(1);\n \t pushFollow(FOLLOW_literal_in_tuple3576);\n \t literal437=literal();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) \n \t adaptor.addChild(root_1, literal437.getTree());\n\n\n \t if ( state.backtracking==0 ) {\n \t }\n \t }\n \t break;\n\n \tdefault :\n \t break loop121;\n }\n } while (true);\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n }\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "TupleTypeRule createTupleTypeRule();", "public Tuple() {\n this(new ArrayList<Object>());\n }", "public Tuple(String textLine) {\n this(textLine, defaultDelimiter);\n }", "Literal createLiteral();", "Literal createLiteral();", "public final EObject ruleTupleTypeCS() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n EObject lv_ownedParts_2_0 = null;\n\n EObject lv_ownedParts_4_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:5956:2: ( ( ( (lv_name_0_0= 'Tuple' ) ) (otherlv_1= '(' ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )? otherlv_5= ')' )? ) )\n // InternalMyDsl.g:5957:2: ( ( (lv_name_0_0= 'Tuple' ) ) (otherlv_1= '(' ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )? otherlv_5= ')' )? )\n {\n // InternalMyDsl.g:5957:2: ( ( (lv_name_0_0= 'Tuple' ) ) (otherlv_1= '(' ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )? otherlv_5= ')' )? )\n // InternalMyDsl.g:5958:3: ( (lv_name_0_0= 'Tuple' ) ) (otherlv_1= '(' ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )? otherlv_5= ')' )?\n {\n // InternalMyDsl.g:5958:3: ( (lv_name_0_0= 'Tuple' ) )\n // InternalMyDsl.g:5959:4: (lv_name_0_0= 'Tuple' )\n {\n // InternalMyDsl.g:5959:4: (lv_name_0_0= 'Tuple' )\n // InternalMyDsl.g:5960:5: lv_name_0_0= 'Tuple'\n {\n lv_name_0_0=(Token)match(input,94,FOLLOW_62); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewLeafNode(lv_name_0_0, grammarAccess.getTupleTypeCSAccess().getNameTupleKeyword_0_0());\n \t\t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getTupleTypeCSRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(current, \"name\", lv_name_0_0, \"Tuple\");\n \t\t\t\t\n }\n\n }\n\n\n }\n\n // InternalMyDsl.g:5972:3: (otherlv_1= '(' ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )? otherlv_5= ')' )?\n int alt81=2;\n int LA81_0 = input.LA(1);\n\n if ( (LA81_0==20) ) {\n alt81=1;\n }\n switch (alt81) {\n case 1 :\n // InternalMyDsl.g:5973:4: otherlv_1= '(' ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )? otherlv_5= ')'\n {\n otherlv_1=(Token)match(input,20,FOLLOW_47); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(otherlv_1, grammarAccess.getTupleTypeCSAccess().getLeftParenthesisKeyword_1_0());\n \t\t\t\n }\n // InternalMyDsl.g:5977:4: ( ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )* )?\n int alt80=2;\n int LA80_0 = input.LA(1);\n\n if ( ((LA80_0>=RULE_SIMPLE_ID && LA80_0<=RULE_ESCAPED_ID)||LA80_0==19||(LA80_0>=60 && LA80_0<=61)) ) {\n alt80=1;\n }\n switch (alt80) {\n case 1 :\n // InternalMyDsl.g:5978:5: ( (lv_ownedParts_2_0= ruleTuplePartCS ) ) (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )*\n {\n // InternalMyDsl.g:5978:5: ( (lv_ownedParts_2_0= ruleTuplePartCS ) )\n // InternalMyDsl.g:5979:6: (lv_ownedParts_2_0= ruleTuplePartCS )\n {\n // InternalMyDsl.g:5979:6: (lv_ownedParts_2_0= ruleTuplePartCS )\n // InternalMyDsl.g:5980:7: lv_ownedParts_2_0= ruleTuplePartCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\t\tnewCompositeNode(grammarAccess.getTupleTypeCSAccess().getOwnedPartsTuplePartCSParserRuleCall_1_1_0_0());\n \t\t\t\t\t\t\n }\n pushFollow(FOLLOW_48);\n lv_ownedParts_2_0=ruleTuplePartCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\t\tif (current==null) {\n \t\t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getTupleTypeCSRule());\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tadd(\n \t\t\t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\t\t\"ownedParts\",\n \t\t\t\t\t\t\t\tlv_ownedParts_2_0,\n \t\t\t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.TuplePartCS\");\n \t\t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\t\t\n }\n\n }\n\n\n }\n\n // InternalMyDsl.g:5997:5: (otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) ) )*\n loop79:\n do {\n int alt79=2;\n int LA79_0 = input.LA(1);\n\n if ( (LA79_0==59) ) {\n alt79=1;\n }\n\n\n switch (alt79) {\n \tcase 1 :\n \t // InternalMyDsl.g:5998:6: otherlv_3= ',' ( (lv_ownedParts_4_0= ruleTuplePartCS ) )\n \t {\n \t otherlv_3=(Token)match(input,59,FOLLOW_46); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\tnewLeafNode(otherlv_3, grammarAccess.getTupleTypeCSAccess().getCommaKeyword_1_1_1_0());\n \t \t\t\t\t\t\n \t }\n \t // InternalMyDsl.g:6002:6: ( (lv_ownedParts_4_0= ruleTuplePartCS ) )\n \t // InternalMyDsl.g:6003:7: (lv_ownedParts_4_0= ruleTuplePartCS )\n \t {\n \t // InternalMyDsl.g:6003:7: (lv_ownedParts_4_0= ruleTuplePartCS )\n \t // InternalMyDsl.g:6004:8: lv_ownedParts_4_0= ruleTuplePartCS\n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\tnewCompositeNode(grammarAccess.getTupleTypeCSAccess().getOwnedPartsTuplePartCSParserRuleCall_1_1_1_1_0());\n \t \t\t\t\t\t\t\t\n \t }\n \t pushFollow(FOLLOW_48);\n \t lv_ownedParts_4_0=ruleTuplePartCS();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getTupleTypeCSRule());\n \t \t\t\t\t\t\t\t\t}\n \t \t\t\t\t\t\t\t\tadd(\n \t \t\t\t\t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\t\t\t\"ownedParts\",\n \t \t\t\t\t\t\t\t\t\tlv_ownedParts_4_0,\n \t \t\t\t\t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.TuplePartCS\");\n \t \t\t\t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\t\t\t\n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop79;\n }\n } while (true);\n\n\n }\n break;\n\n }\n\n otherlv_5=(Token)match(input,21,FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(otherlv_5, grammarAccess.getTupleTypeCSAccess().getRightParenthesisKeyword_1_2());\n \t\t\t\n }\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public TupleTypeLiteralElements getTupleTypeLiteralAccess() {\r\n\t\treturn pTupleTypeLiteral;\r\n\t}", "public final EObject entryRuleTupleLiteralPartCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleTupleLiteralPartCS = null;\n\n\n try {\n // InternalMyDsl.g:6895:59: (iv_ruleTupleLiteralPartCS= ruleTupleLiteralPartCS EOF )\n // InternalMyDsl.g:6896:2: iv_ruleTupleLiteralPartCS= ruleTupleLiteralPartCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getTupleLiteralPartCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleTupleLiteralPartCS=ruleTupleLiteralPartCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleTupleLiteralPartCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public T caseTupleLiteralExpCS(TupleLiteralExpCS object) {\r\n return null;\r\n }", "@VTID(13)\r\n java.lang.String getTuple();", "SimpleLiteral createSimpleLiteral();", "public static interface Tuple {\n\n\t}", "public Tuple(List<Term> elts) {\n\t\tTerm[] tmp = new Term[elts.size()];\n\t\tthis.elts = elts.toArray(tmp);\n\t}", "private Tuple createTuple(Tuple tup) {\n\t\tTuple t = new Tuple(td);\n\t\tif (this.gbfieldtype == null) {\n\t\t\tt.setField(0, new IntField(1));\n\t\t} else {\n\t\t\tt.setField(0, tup.getField(gbfield));\n\t\t\tt.setField(1, new IntField(1));\n\t\t}\n\t\treturn t;\n\t}", "public Tuple()\n {\n // Creat a new tuple\n data = new byte[max_size];\n tuple_offset = 0;\n tuple_length = max_size;\n }", "public T caseTupleTypeLiteralExpCS(TupleTypeLiteralExpCS object) {\r\n return null;\r\n }", "public UnmodifiableTuple(Tuple<F, L> tuple) {\r\n this.first = tuple.getFirst();\r\n this.last = tuple.getLast();\r\n size = tuple.size();\r\n hashCode = tuple.hashCode();\r\n }", "public Tuple(Datum fieldIn) {\n fields = new ArrayList<Datum>(1);\n fields.add(fieldIn);\n }", "Astro tuple(AstroArg args);", "Tuple (L left, R right){\n\t\tthis.left=left;\n\t\tthis.right=right;\n\t}", "public final void synpred203_InternalMyDsl_fragment() throws RecognitionException { \n EObject this_TupleLiteralExpCS_4 = null;\n\n\n // InternalMyDsl.g:7833:3: (this_TupleLiteralExpCS_4= ruleTupleLiteralExpCS )\n // InternalMyDsl.g:7833:3: this_TupleLiteralExpCS_4= ruleTupleLiteralExpCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t/* */\n \t\t\n }\n pushFollow(FOLLOW_2);\n this_TupleLiteralExpCS_4=ruleTupleLiteralExpCS();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }", "private Tuples() {\n // prevent instantiation.\n }", "public Tuple2() {\n }", "public PremonPatTuple (PremonPat[] Ps) {\n this.Ps = Ps;\n PremonType[] Ts = new PremonType[Ps.length];\n bind = PremonCon.empty;\n for (int i=0; i<Ps.length; i++) {\n Ts[i] = Ps[i].type;\n bind = bind.comp (Ps[i].bind);\n }\n type = new PremonTypeTuple (Ts);\n }", "@Override\r\n public Literal newLiteral(PObj[] data) {\r\n String symbol = ((Constant) data[0]).getObject().toString();\r\n PObj[] fixed = new PObj[data.length - 1];\r\n System.arraycopy(data, 1, fixed, 0, fixed.length);\r\n PList terms = ProvaListImpl.create(fixed);\r\n return newLiteral(symbol, terms);\r\n }", "public Tuple(String textLine, String delimiter) {\n if (delimiter == null) {\n delimiter = defaultDelimiter;\n }\n \n fields = new ArrayList<Datum>(numFields) ;\n int delimSize = delimiter.length() ;\n boolean done = false ;\n \n int lastIdx = 0 ;\n \n while (!done) {\n int newIdx = textLine.indexOf(delimiter, lastIdx) ;\n if (newIdx != (-1)) {\n String token = textLine.substring(lastIdx, newIdx) ;\n fields.add(new DataAtom(token));\n lastIdx = newIdx + delimSize ;\n }\n else {\n String token = textLine.substring(lastIdx) ;\n fields.add(new DataAtom(token));\n done = true ;\n }\n }\n\n numFields = fields.size();\n }", "public static Tuple getInstance( ) {\n return tuple;\n }", "Tuple (){\n\t\tleft=null;\n\t\tright=null;\n\t}", "public Tuple(List<? extends Loyalty> c)\r\n\t\t{\r\n\t\t\tsuper(c);\r\n\t\t}", "public Tuple(TupleDesc td) {\n\t\t\tfields = new ArrayList<Field>();\n\t\t\ttupleDesc = td;\n\t\t\n\t\t// some code goes here\n\t\t// 2- assign td and initialize the array of fields\n\n\t}", "public Tuple(Object... objects){\n pattern =objects;\n size=objects.length;\n }", "public OrderedTupleTypeLiteralElements getOrderedTupleTypeLiteralAccess() {\r\n\t\treturn pOrderedTupleTypeLiteral;\r\n\t}", "@ConstructorProperties({\"values\"})\n public Tuple(Object... values) {\n this();\n Collections.addAll(elements, values);\n }", "public TupleDesc() {\n columns = new ArrayList<>();\n }", "public abstract T getTuple(int aPosition);", "public final EObject entryRuleTupleLiteralExpCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleTupleLiteralExpCS = null;\n\n\n try {\n // InternalMyDsl.g:6820:58: (iv_ruleTupleLiteralExpCS= ruleTupleLiteralExpCS EOF )\n // InternalMyDsl.g:6821:2: iv_ruleTupleLiteralExpCS= ruleTupleLiteralExpCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getTupleLiteralExpCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleTupleLiteralExpCS=ruleTupleLiteralExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleTupleLiteralExpCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public Tuple(Loyalty... c)\r\n\t\t{\r\n\t\t\tsuper(Arrays.asList(c));\r\n\t\t}", "public TupleDesc getTupleDesc();", "static TwoTuple<String,Integer> f() {\n return new TwoTuple<String,Integer>(\"hi\", 47);\n }", "public UnmodifiableTuple(F first, L last) {\r\n this.first = first;\r\n this.last = last;\r\n size = getSize(first, last);\r\n hashCode = hashCode();\r\n }", "@SafeVarargs\n\tpublic static <R> Tuple<R> construct(R... data) {\n\t\tLinkedList<R> list = new LinkedList<>();\n\t\tfor (R element : data) {\n\t\t\tlist.add(element);\n\t\t}\n\n\t\treturn new Tuple<>(list);\n\t}", "public Literal getLiteral();", "public Literal getLiteral();", "public UnorderedTupleTypeLiteralWithInitializerElements getUnorderedTupleTypeLiteralWithInitializerAccess() {\r\n\t\treturn pUnorderedTupleTypeLiteralWithInitializer;\r\n\t}", "public interface CoordTupleString {\n\n /**\n * Accessor for the max tuple index\n * \n * @return the max tuple index\n */\n public abstract int maxIndex();\n\n /**\n * Accessor to determine the actual type managed.\n * \n * @return a Number the most directly corresponds to the\n * underlying managed type (Float for a float tuplestring,\n * Double for a double tuplestring, etc)\n */\n public abstract Number getPrimitiveType();\n\n /**\n * Accessor to retrieve a tuple\n * \n * @param tuple the tuple to retrieve (the first tuple is index 0)\n * @return the tuple at index <code>tuple</code>, coereced into\n * a float[]\n */\n public abstract float[] getasFloat(int tuple);\n\n /**\n * Accessor to retrieve a tuple\n * \n * @param tuple the tuple to retrieve (the first tuple is index 0)\n * @return the tuple at index <code>tuple</code>, coereced into\n * a double[]\n */\n public abstract double[] getasDouble(int tuple);\n\n /**\n * Accessor to retrieve a single value in a tuple\n * \n * @param tuple the tuple to retrieve (the first tuple is index 0)\n * @param val the index of the value in the tuple (the first val\n * is index 0)\n * @return the tuple at index <code>tuple</code>, coereced into\n * a float\n */\n public abstract float getasFloat(int tuple, int val);\n\n /**\n * Accessor to retrieve a single value in a tuple\n * \n * @param tuple the tuple to retrieve (the first tuple is index 0)\n * @param val the index of the value in the tuple (the first val\n * is index 0)\n * @return the tuple at index <code>tuple</code>, coereced into\n * a double\n */\n public abstract double getasDouble(int tuple, int val);\n}", "public final EObject entryRuleTuplePartCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleTuplePartCS = null;\n\n\n try {\n // InternalMyDsl.g:6032:52: (iv_ruleTuplePartCS= ruleTuplePartCS EOF )\n // InternalMyDsl.g:6033:2: iv_ruleTuplePartCS= ruleTuplePartCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getTuplePartCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleTuplePartCS=ruleTuplePartCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleTuplePartCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public Tuple1(T value) {\n super(value);\n }", "public Tuple(String attrib_names [], String attrib_types [], String attrib_values []) {\n\n\ttuple_counter++;\n\tnum_attribs = attrib_types.length;\n\tmy_data = new HashMap();\n\t\n\tfor (int i = 0; i < num_attribs; i++) {\n\ttry {\n\t Class cl = Class.forName(attrib_types[i]);\n\t Constructor constructor =\n\t\tcl.getConstructor(new Class[] { String.class });\n\t my_data.put ( attrib_names[i],\n\t\t(ColumnValue) constructor.newInstance\n\t\t(new Object[] { attrib_values[i] }));\n\t}\n\tcatch (java.lang.ClassNotFoundException e)\n\t { System.out.println(e.toString()); } \n\tcatch (java.lang.NoSuchMethodException e)\n\t { System.out.println(e.toString()); }\n\tcatch (java.lang.reflect.InvocationTargetException e)\n\t { System.out.println(e.toString()); }\n\tcatch (java.lang.InstantiationException e)\n\t { System.out.println(e.toString()); }\n\tcatch (java.lang.IllegalAccessException e)\n\t { System.out.println(e.toString()); }\n\n\t}\n }", "private Tuple(K key, V value) {\n this.key = key;\n this.value = value;\n }", "ObjectLiteral createObjectLiteral();", "public Tuple(Node nd, ArrayList<Integer> list, char [] str, char letter){\r\n node = nd;\r\n trail = list;\r\n int charArrayLength = str.length;\r\n prefix = new char[charArrayLength + 1];\r\n System.arraycopy(str, 0, prefix, 0, charArrayLength);\r\n prefix[charArrayLength] = letter;\r\n alphabet = letter;\r\n }", "public Literal createLiteral(byte b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "Lexpr createLexpr();", "static Tuple wrap(Tuple init, long sign) throws ExecException {\n\t\tTuple tup = tf.newTuple(2);\n\t\ttup.set(0, init.get(0));\n\t\ttup.set(1, sign);\n\t\t\n\t\tDataBag bag = bf.newDefaultBag();\n\t\tbag.add(tup);\n\t\t\n\t\treturn tf.newTuple(bag);\n\t}", "Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n SingleQuotedLiteral(),\n DoubleQuotedLiteral()),\n actions.pushLiteralNode());\n }", "public UnorderedTupleTypeLiteralElements getUnorderedTupleTypeLiteralAccess() {\r\n\t\treturn pUnorderedTupleTypeLiteral;\r\n\t}", "public Tuple(Object... values) {\n data = Arrays.copyOf(values, values.length);\n }", "EExpr slotsTuple(ENodeBuilder b, EExpr optPrefix, String[] exports) {\n return mixedTuple(b, optPrefix, exports, null, null);\n }", "protected Predicate createLiteralFromTuple(Map<String, String> hashConstantToVariable, Tuple tuple, Mode mode,\n\t\t\tboolean headMode) {\n\t\tList<Term> terms = new ArrayList<Term>();\n\t\tfor (int i = 0; i < mode.getArguments().size(); i++) {\n\t\t\tString value;\n\t\t\tif (tuple.getValues().get(i) != null) {\n\t\t\t\tvalue = tuple.getValues().get(i).toString();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = NULL_PREFIX+nullCounter;\n\t\t\t\tnullCounter++;\n\t\t\t}\n\n\t\t\tif (mode.getArguments().get(i).getIdentifierType().equals(IdentifierType.CONSTANT)) {\n\t\t\t\tterms.add(new Constant(\"\\\"\" + Commons.escapeMetaCharacters(value) + \"\\\"\"));\n\t\t\t} else {\n\t\t\t\t// INPUT or OUTPUT type\n\t\t\t\tString valueWithSuffix = value + \"_\" + mode.getArguments().get(i).getType();\n\t\t\t\tif (!hashConstantToVariable.containsKey(valueWithSuffix)) {\n\t\t\t\t\tString var = Commons.newVariable(varCounter);\n\t\t\t\t\tvarCounter++;\n\n\t\t\t\t\thashConstantToVariable.put(valueWithSuffix, var);\n\t\t\t\t}\n\t\t\t\tterms.add(new Variable(hashConstantToVariable.get(valueWithSuffix)));\n\t\t\t}\n\t\t}\n\n\t\tPredicate literal = new Predicate(mode.getPredicateName(), terms);\n\t\treturn literal;\n\t}", "public Builder setSymbolTuple(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n symbolTuple_ = value;\n onChanged();\n return this;\n }", "public Literal createLiteral(char b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "protected Predicate createLiteralFromTuple(Map<String, String> hashConstantToVariable, Tuple tuple, Mode mode,\n\t\t\tboolean headMode, boolean ground) {\n\t\tList<Term> terms = new ArrayList<Term>();\n\t\tfor (int i = 0; i < mode.getArguments().size(); i++) {\n\t\t\tString value;\n\t\t\tif (tuple.getValues().get(i) != null) {\n\t\t\t\tvalue = tuple.getValues().get(i).toString();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalue = NULL_PREFIX+nullCounter;\n\t\t\t\tnullCounter++;\n\t\t\t}\n\n\t\t\tif (ground) {\n\t\t\t\tterms.add(new Constant(\"\\\"\" + Commons.escapeMetaCharacters(value) + \"\\\"\"));\n\t\t\t} else {\n\t\t\t\tif (mode.getArguments().get(i).getIdentifierType().equals(IdentifierType.CONSTANT)) {\n\t\t\t\t\tterms.add(new Constant(\"\\\"\" + Commons.escapeMetaCharacters(value) + \"\\\"\"));\n\t\t\t\t} else {\n\t\t\t\t\t// INPUT or OUTPUT type\n\t\t\t\t\tString valueWithSuffix = value + \"_\" + mode.getArguments().get(i).getType();\n\t\t\t\t\tif (!hashConstantToVariable.containsKey(valueWithSuffix)) {\n\t\t\t\t\t\tString var = Commons.newVariable(varCounter);\n\t\t\t\t\t\tvarCounter++;\n\t\n\t\t\t\t\t\thashConstantToVariable.put(valueWithSuffix, var);\n\t\t\t\t\t}\n\t\t\t\t\tterms.add(new Variable(hashConstantToVariable.get(valueWithSuffix)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tPredicate literal = new Predicate(mode.getPredicateName(), terms);\n\t\treturn literal;\n\t}", "public Literal createLiteral(long b) throws ModelException{\n\n return createLiteral(String.valueOf(b));\n }", "public Literal createLiteral(int b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }", "public static TupleSlot of(String name, Type type) {\n if (name == null) throw new IllegalArgumentException(\"name must not be null\");\n if (type == null) throw new IllegalArgumentException(\"type must not be null\");\n\n return new TupleSlot(name, type);\n }", "public ExtendedTupleEditorSupport(AttrManager m, AttrEditorManager em) {\r\n\t\tsuper(m, em);\r\n\t}", "public boolean isGeneralTuple();", "java.lang.String getSymbolTuple();", "StringLiteralExp createStringLiteralExp();", "TypeLiteralExp createTypeLiteralExp();", "public final EObject ruleTupleLiteralPartCS() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n Token otherlv_3=null;\n AntlrDatatypeRuleToken lv_name_0_0 = null;\n\n EObject lv_ownedType_2_0 = null;\n\n EObject lv_ownedInitExpression_4_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:6908:2: ( ( ( (lv_name_0_0= ruleUnrestrictedName ) ) (otherlv_1= ':' ( (lv_ownedType_2_0= ruleTypeExpCS ) ) )? otherlv_3= '=' ( (lv_ownedInitExpression_4_0= ruleExpCS ) ) ) )\n // InternalMyDsl.g:6909:2: ( ( (lv_name_0_0= ruleUnrestrictedName ) ) (otherlv_1= ':' ( (lv_ownedType_2_0= ruleTypeExpCS ) ) )? otherlv_3= '=' ( (lv_ownedInitExpression_4_0= ruleExpCS ) ) )\n {\n // InternalMyDsl.g:6909:2: ( ( (lv_name_0_0= ruleUnrestrictedName ) ) (otherlv_1= ':' ( (lv_ownedType_2_0= ruleTypeExpCS ) ) )? otherlv_3= '=' ( (lv_ownedInitExpression_4_0= ruleExpCS ) ) )\n // InternalMyDsl.g:6910:3: ( (lv_name_0_0= ruleUnrestrictedName ) ) (otherlv_1= ':' ( (lv_ownedType_2_0= ruleTypeExpCS ) ) )? otherlv_3= '=' ( (lv_ownedInitExpression_4_0= ruleExpCS ) )\n {\n // InternalMyDsl.g:6910:3: ( (lv_name_0_0= ruleUnrestrictedName ) )\n // InternalMyDsl.g:6911:4: (lv_name_0_0= ruleUnrestrictedName )\n {\n // InternalMyDsl.g:6911:4: (lv_name_0_0= ruleUnrestrictedName )\n // InternalMyDsl.g:6912:5: lv_name_0_0= ruleUnrestrictedName\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getTupleLiteralPartCSAccess().getNameUnrestrictedNameParserRuleCall_0_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_73);\n lv_name_0_0=ruleUnrestrictedName();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getTupleLiteralPartCSRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_0_0,\n \t\t\t\t\t\t\"org.eclipse.ocl.xtext.completeocl.CompleteOCL.UnrestrictedName\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n // InternalMyDsl.g:6929:3: (otherlv_1= ':' ( (lv_ownedType_2_0= ruleTypeExpCS ) ) )?\n int alt94=2;\n int LA94_0 = input.LA(1);\n\n if ( (LA94_0==42) ) {\n alt94=1;\n }\n switch (alt94) {\n case 1 :\n // InternalMyDsl.g:6930:4: otherlv_1= ':' ( (lv_ownedType_2_0= ruleTypeExpCS ) )\n {\n otherlv_1=(Token)match(input,42,FOLLOW_50); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(otherlv_1, grammarAccess.getTupleLiteralPartCSAccess().getColonKeyword_1_0());\n \t\t\t\n }\n // InternalMyDsl.g:6934:4: ( (lv_ownedType_2_0= ruleTypeExpCS ) )\n // InternalMyDsl.g:6935:5: (lv_ownedType_2_0= ruleTypeExpCS )\n {\n // InternalMyDsl.g:6935:5: (lv_ownedType_2_0= ruleTypeExpCS )\n // InternalMyDsl.g:6936:6: lv_ownedType_2_0= ruleTypeExpCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\tnewCompositeNode(grammarAccess.getTupleLiteralPartCSAccess().getOwnedTypeTypeExpCSParserRuleCall_1_1_0());\n \t\t\t\t\t\n }\n pushFollow(FOLLOW_33);\n lv_ownedType_2_0=ruleTypeExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\tif (current==null) {\n \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getTupleLiteralPartCSRule());\n \t\t\t\t\t\t}\n \t\t\t\t\t\tset(\n \t\t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\t\"ownedType\",\n \t\t\t\t\t\t\tlv_ownedType_2_0,\n \t\t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.TypeExpCS\");\n \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n otherlv_3=(Token)match(input,46,FOLLOW_69); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_3, grammarAccess.getTupleLiteralPartCSAccess().getEqualsSignKeyword_2());\n \t\t\n }\n // InternalMyDsl.g:6958:3: ( (lv_ownedInitExpression_4_0= ruleExpCS ) )\n // InternalMyDsl.g:6959:4: (lv_ownedInitExpression_4_0= ruleExpCS )\n {\n // InternalMyDsl.g:6959:4: (lv_ownedInitExpression_4_0= ruleExpCS )\n // InternalMyDsl.g:6960:5: lv_ownedInitExpression_4_0= ruleExpCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getTupleLiteralPartCSAccess().getOwnedInitExpressionExpCSParserRuleCall_3_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_2);\n lv_ownedInitExpression_4_0=ruleExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getTupleLiteralPartCSRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"ownedInitExpression\",\n \t\t\t\t\t\tlv_ownedInitExpression_4_0,\n \t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.ExpCS\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public abstract T getTuple(Record record);", "public Builder setSymbolTupleBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n symbolTuple_ = value;\n onChanged();\n return this;\n }", "@Test\n\tpublic void testBerlinModTupleBuilder() {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.BERLINMOD);\n\n\t\tfinal Tuple tuple = tupleBuilder.buildTuple(BERLINMOD, \"1\");\n\n\t\tAssert.assertNotNull(tuple);\n\t\tAssert.assertEquals(Integer.toString(1), tuple.getKey());\n\n\t\tfinal Hyperrectangle exptectedBox = new Hyperrectangle(52.4981d, 52.4981d, 13.327d, 13.327d);\n\t\t\t\t\n\t\tAssert.assertEquals(1180224000000L, tuple.getVersionTimestamp());\n\t\tAssert.assertEquals(exptectedBox, tuple.getBoundingBox());\n\t}", "public Literal getLiteral(Object literalData);", "private TupleDesc generateTupleDesc(){\n \tif(this.childTD == null){ //no tuples merged yet\n \t\t//return a general tupleDesc\n \t\treturn generalTupleDesc();\n \t} else {\n \t\t//generate a helpful, well-named TupleDesc\n \t\tType[] typeArr;\n \tString[] nameArr;\n \tString aggName = operator.toString() + \"(\" + childTD.getFieldName(aggField) + \")\";\n \tif(gbField == NO_GROUPING && gbFieldType == Type.INT_TYPE){\n \t\ttypeArr = new Type[]{Type.INT_TYPE};\n \t\tnameArr = new String[]{aggName};\n \t}else if(gbField == NO_GROUPING){ //gbFieldType == Type.STRING_TYPE\n \t\ttypeArr = new Type[]{Type.STRING_TYPE};\n \t\tnameArr = new String[]{aggName};\n \t} else {\n \t\ttypeArr = new Type[]{gbFieldType, Type.INT_TYPE};\n \t\tString groupName = \"group by(\" + childTD.getFieldName(gbField) + \")\";\n \t\tnameArr = new String[]{groupName, aggName};\n \t}\n \treturn new TupleDesc(typeArr, nameArr);\n \t}\n }", "private Clause make(Literal... e) {\n Clause c = new Clause();\n for (int i = 0; i < e.length; ++i) {\n c = c.add(e[i]);\n }\n return c;\n }", "private static Tuple tupleBuilder(String s) throws Exception {\n\n if (s.length() < 3 || s.charAt(0) != '(' || s.charAt(s.length() - 1) != ')') {\n System.out.print(\"Tuple format is wrong. \");\n throw new Exception();\n }\n\n s = s.substring(1, s.length() - 1); // \"abc\", +3, -7.5, -7.5f, 2e3\n String[] ss = s.split(\",\"); // [\"abc\" , +3, -7.5, -7.5f, 2e3]\n List<Object> list = new ArrayList<>();\n for (int i = 0; i < ss.length; i++) {\n String temp = ss[i].trim(); // ?i:int || \"abc\" || +3 || -7.5f || 2e3\n Object o = null;\n // type match\n if (temp.charAt(0) == '?') {\n int index = temp.indexOf(':');\n String name = temp.substring(1, index);\n String type = temp.substring(index + 1);\n if (type.equalsIgnoreCase(\"int\")) {\n type = TYPEMATCH_INTEGER_NAME;\n } else if (type.equalsIgnoreCase(\"float\")) {\n type = TYPEMATCH_FLOAT_NAME;\n } else if (type.equalsIgnoreCase(\"string\")) {\n type = TYPEMATCH_STRING_NAME;\n } else {\n System.out.print(\"Type match format is wrong. \");\n throw new Exception();\n }\n o = new ArrayList<String>(Arrays.asList(name, type));\n // type is string\n } else if (temp.charAt(0) == '\"' && temp.charAt(temp.length() - 1) == '\"') {\n o = new String(temp.substring(1, temp.length() - 1));\n // type is float\n } else if (temp.indexOf('.') != -1 || temp.indexOf('e') != -1 || temp.indexOf('E') != -1) {\n try {\n o = Float.valueOf(temp);\n } catch (Exception e) {\n System.out.print(\"Float format is wrong. \");\n throw new Exception();\n }\n\n if ((Float) o == Float.POSITIVE_INFINITY) {\n System.out.print(\"Float is overflow. \");\n throw new Exception();\n }\n // type is int\n } else {\n try {\n o = Integer.valueOf(temp);\n } catch (Exception e) {\n System.out.print(\"Tuple format is wrong. \");\n throw new Exception();\n }\n }\n list.add(o);\n }\n Tuple t = new Tuple(list);\n return t;\n }", "public LiteralOPToken(String s, int nTypeCode)\n {\n super(s);\n m_nType = nTypeCode;\n setBindingPower(OPToken.PRECEDENCE_IDENTIFIER);\n }", "@Test\n\tpublic void testSyntheticTupleBuilder() throws ParseException {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.SYNTHETIC);\n\n\t\tfinal Tuple tuple = tupleBuilder.buildTuple(SYNTHETIC_TEST_LINE, \"1\");\n\n\t\tAssert.assertNotNull(tuple);\n\t\tAssert.assertEquals(Integer.toString(1), tuple.getKey());\n\n\t\tfinal Hyperrectangle exptectedBox = new Hyperrectangle(51.47015078569419, 58.26664175357267,\n\t\t\t\t49.11808592466023, 52.72529828070016);\n\n\t\tAssert.assertEquals(exptectedBox, tuple.getBoundingBox());\n\t\tAssert.assertEquals(\"e1k141dox9rayxo544y9\", new String(tuple.getDataBytes()));\n\t}", "public static Literal of(Source source, Object value) {\n if (value instanceof Literal) {\n return (Literal) value;\n }\n return new Literal(source, value, DataTypes.fromJava(value));\n }", "<C> StringLiteralExp<C> createStringLiteralExp();", "public T caseTupleTypeCS(TupleTypeCS object) {\r\n return null;\r\n }", "public interface IGeneralTuple {\r\n /**\r\n * Sets the values for a tuple.\r\n * @param values the tuple values\r\n */\r\n public void setValues(List<Object> values);\r\n /**\r\n * Returns the list of values in a tuple.\r\n * @return the list of values\r\n */\r\n public List<Object> getValues();\r\n /**\r\n * Returns the value located in a specific index of the list of values. \r\n * @param index the index in which the value is located\r\n * @return the value \r\n */\r\n public Object getValue(int index);\r\n /**\r\n * Returns whether it is a general tuple.\r\n * @return a boolean value indicating whether it is a general tuple\r\n */\r\n public boolean isGeneralTuple();\r\n}", "private Mutation mutationFromTuple(Tuple t) throws IOException\n {\n Mutation mutation = new Mutation();\n if (t.get(1) == null)\n {\n if (allow_deletes)\n {\n mutation.deletion = new Deletion();\n mutation.deletion.predicate = new org.apache.cassandra.thrift.SlicePredicate();\n mutation.deletion.predicate.column_names = Arrays.asList(objToBB(t.get(0)));\n mutation.deletion.setTimestamp(FBUtilities.timestampMicros());\n }\n else\n throw new IOException(\"null found but deletes are disabled, set \" + PIG_ALLOW_DELETES +\n \"=true in environment or allow_deletes=true in URL to enable\");\n }\n else\n {\n org.apache.cassandra.thrift.Column column = new org.apache.cassandra.thrift.Column();\n column.setName(objToBB(t.get(0)));\n column.setValue(objToBB(t.get(1)));\n column.setTimestamp(FBUtilities.timestampMicros());\n mutation.column_or_supercolumn = new ColumnOrSuperColumn();\n mutation.column_or_supercolumn.column = column;\n }\n return mutation;\n }", "public T caseTuple(Tuple object)\n {\n return null;\n }", "public Tuple append(Tuple... tuples) {\n Tuple result = new Tuple(this);\n\n for (Tuple tuple : tuples)\n result.addAll(tuple);\n\n return result;\n }", "public Tuple(K newKey, V newValue) {\r\n\t\tkey = newKey;\r\n\t\tvalue = newValue;\r\n\t}", "private SchemaTupleFactory internalNewSchemaTupleFactory(Schema s, boolean isAppendable, GenContext context) {\n return newSchemaTupleFactory(Triple.make(new SchemaKey(s), isAppendable, context));\n }", "public synchronized Literal createLiteral(String str) {\n\n // check whether we have it in the registry\n Literal r = (Literal)lmap.get(str);\n if(r == null) {\n r = new LiteralImpl(/*getUnusedNodeID(),*/ str);\n lmap.put(str, r);\n }\n return r;\n }", "Tuple[] getTuples() {\r\n Tuple[] newTuples = new Tuple[tupleCount];\r\n System.arraycopy(tuple,0,newTuples,0,tupleCount);\r\n return newTuples;\r\n }", "IntermediateTuple(Tuple t1, Tuple t2) {\n\n if(t1 instanceof BaseTuple) {\n baseTuples.add((BaseTuple) t1);\n } else {\n for(BaseTuple bt : ((IntermediateTuple) t1).baseTuples) {\n baseTuples.add(bt);\n }\n }\n\n if(t2 instanceof BaseTuple) {\n baseTuples.add((BaseTuple) t2);\n } else {\n for(BaseTuple bt : ((IntermediateTuple) t2).baseTuples) {\n baseTuples.add(bt);\n }\n }\n }", "public TupleDesc getTupleDesc() {\n // some code goes here\n return td;\n }", "AstroArg unpack(Astro litChars);" ]
[ "0.8842612", "0.81300426", "0.78717005", "0.7316557", "0.6875989", "0.6530572", "0.64761156", "0.6358642", "0.6293645", "0.62504834", "0.62504834", "0.6210895", "0.61999434", "0.60682607", "0.605693", "0.60466784", "0.60414076", "0.60300523", "0.60209936", "0.6008237", "0.5983897", "0.59700066", "0.5969653", "0.5954975", "0.5827522", "0.5823899", "0.58105695", "0.58092743", "0.5808419", "0.5777934", "0.57510704", "0.5750189", "0.57460433", "0.57452667", "0.57291913", "0.57142705", "0.5709643", "0.5649854", "0.5648216", "0.56215227", "0.56103855", "0.560642", "0.55666155", "0.5546998", "0.552242", "0.54868156", "0.5480048", "0.5357015", "0.5357015", "0.53469145", "0.53227097", "0.5313625", "0.5301024", "0.52599", "0.52411777", "0.52275395", "0.5226146", "0.5219805", "0.5216931", "0.5199852", "0.51849663", "0.5173695", "0.5173577", "0.51724666", "0.516604", "0.51551133", "0.5127832", "0.51258856", "0.5108924", "0.51033914", "0.50950307", "0.50898695", "0.5069437", "0.5063449", "0.5053587", "0.5049099", "0.50386924", "0.5038317", "0.5035204", "0.5034778", "0.49957573", "0.49774924", "0.4976317", "0.49724963", "0.49712795", "0.49515295", "0.49460107", "0.493578", "0.49295098", "0.49267218", "0.4921394", "0.49034706", "0.48927864", "0.48844337", "0.48831436", "0.48782519", "0.48700354", "0.4869324", "0.48431158", "0.48371172" ]
0.86597216
1
Returns a new object of class 'Type Exp'.
<C> TypeExp<C> createTypeExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static NewExpression new_(Class type) { throw Extensions.todo(); }", "<C, PM> VariableExp<C, PM> createVariableExp();", "TypeLiteralExp createTypeLiteralExp();", "VariableExp createVariableExp();", "LetExp createLetExp();", "<C, PM> LetExp<C, PM> createLetExp();", "Exp\ngetExp2();", "Exp\ngetExp1();", "Expression getExp();", "public org.python.types.Type __new__(org.python.types.Type cls);", "ExpOperand createExpOperand();", "AExpArgs createAExpArgs();", "Expression createExpression();", "Exploitation createExploitation();", "Expression() { }", "public T elementExp() {\n T c = createLike();\n ops.elementExp(mat, c.mat);\n return c;\n }", "private Memory memory(Expression expression, cat.footoredo.mx.type.Type type) {\n return new Memory(asmType(type), expression);\n }", "public Expression() {\r\n }", "private Type type()\r\n {\r\n Type t = new Type();\r\n\r\n t.ident = nextToken;\r\n t.type = basicType();\r\n if (t.type == Keyword.NONESY)\r\n {\r\n unresolved.add(t.ident.string = qualident());\r\n }\r\n else\r\n t.ident.string = null;\r\n\r\n t.dim = bracketsOpt();\r\n\r\n return t;\r\n }", "public a mo8520o() {\n return new a();\n }", "<C, S> StateExp<C, S> createStateExp();", "Type createType();", "Type createType();", "Type createType();", "public Expression asExpression() {\n switch (TYPE) {\n case EXPRESSION:\n return EXPRESSION;\n case IDENTIFIER:\n return new Variable(VALUE);\n case LITERAL:\n if (VALUE.matches(\"\\\\d+\")) {\n return new LInteger(Integer.parseInt(VALUE));\n } else if (VALUE.equals(\"true\") || VALUE.equals(\"false\")) {\n return LBoolean.resolve(VALUE.equals(\"true\"));\n } else if (VALUE.equals(\"null\")) {\n return LNull.NULL;\n } else {\n return new LString(VALUE);\n }\n default:\n throw ErrorLog.get(\"Unexpected symbol '%s'\", VALUE);\n }\n }", "public void setMyExp(MyExp me);", "Expr createExpr();", "public static ExpressionType construire(Element elemType) {\n ExpressionType expr = null;\n Element classeElem = (Element) elemType\n .getElementsByTagName(\"expression-class\").item(0);\n String classe = classeElem.getChildNodes().item(0).getNodeValue();\n Element motCleElem = (Element) elemType.getElementsByTagName(\"keyword\")\n .item(0);\n String motCleNom = motCleElem.getChildNodes().item(0).getNodeValue();\n ConstraintOperator keyWord = ConstraintOperator\n .shortcut(StringEscapeUtils.unescapeXml(motCleNom));\n if (classe.equals(ConfigExpressionType.class.getSimpleName())) {\n expr = new ConfigExpressionType(null, keyWord);\n } else if (classe.equals(MarginExpressionType.class.getSimpleName())) {\n Element pourElem = (Element) elemType.getElementsByTagName(\"margin\")\n .item(0);\n Double pourcent = Double\n .valueOf(pourElem.getChildNodes().item(0).getNodeValue());\n double pourcentage = 0.0;\n if (pourcent != null)\n pourcentage = pourcent.doubleValue();\n // on récupère l'unité\n Element unitElem = (Element) elemType.getElementsByTagName(\"unit\")\n .item(0);\n ValueUnit unite = ValueUnit\n .valueOf(unitElem.getChildNodes().item(0).getNodeValue());\n expr = new MarginExpressionType(null, keyWord, pourcentage, unite);\n } else if (classe.equals(ReductionExpressionType.class.getSimpleName())) {\n Element pourElem = (Element) elemType.getElementsByTagName(\"value\")\n .item(0);\n double pourcentage = Double\n .valueOf(pourElem.getChildNodes().item(0).getNodeValue());\n expr = new ReductionExpressionType(null, keyWord, pourcentage);\n } else {\n // on récupère la valeur\n Element valElem = (Element) elemType.getElementsByTagName(\"value\")\n .item(0);\n String valeurS = valElem.getChildNodes().item(0).getNodeValue();\n CharacterValueType type = getTypeSimple(valeurS);\n Object valeur = valeurS;\n if (type.equals(CharacterValueType.INT))\n valeur = Integer.valueOf(valeurS);\n else if (type.equals(CharacterValueType.REAL))\n valeur = Double.valueOf(valeurS);\n else if (type.equals(CharacterValueType.BOOLEAN))\n valeur = Boolean.valueOf(valeurS);\n // on récupère l'unité\n Element unitElem = (Element) elemType.getElementsByTagName(\"unit\")\n .item(0);\n ValueUnit unite = ValueUnit\n .valueOf(unitElem.getChildNodes().item(0).getNodeValue());\n if (classe.equals(ThreshExpressionType.class.getSimpleName()))\n expr = new ThreshExpressionType(null, keyWord, valeur, unite);\n else\n expr = new ControlExpressionType(null, keyWord, valeur, unite);\n }\n return expr;\n }", "public T exp(T value);", "JavaExpression createJavaExpression();", "RealLiteralExp createRealLiteralExp();", "public Expense() {\n\t\tsuper();\n\t}", "<C> RealLiteralExp<C> createRealLiteralExp();", "private final TypeTerm _clone ()\n {\n TypeTerm clone = null;\n try\n {\n clone = (TypeTerm)clone();\n }\n catch (Exception e)\n {\n throw new TypeDefinitionException(e);\n }\n return clone;\n }", "@Override\n\tpublic Void visit(NewType type) {\n\t\tprintIndent(\"new\");\n\t\tindent++;\n\t\ttype.type.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "public Expressao getExp() {\n\t\treturn exp;\n\t}", "<C> UnspecifiedValueExp<C> createUnspecifiedValueExp();", "public T newInstance();", "ExtensionType createExtensionType();", "private static Object createNewInstance(String implement, String header, String expression) {\n\n\t\t// a feeble attempt at preventing arbitrary code execution\n\t\t// by limiting expressions to a single statement.\n\t\t// Otherwise the expression can be something like:\n\t\t// \tf(); } Object f() { System.exit(0); return null\n\t\tif (expression.contains(\";\"))\n\t\t\treturn null;\n\n\t\t// since we might create multiple expressions, we need their names to be unique\n\t\tString className = \"MyExpression\" + classNum++;\n\n\t\t// if we compile the class susseccfully, try and instantiate it\n\t\tif (writeAndCompile(className, implement, header, expression)) {\n\t\t\ttry {\n\t\t\t\tFile classFile = new File(path + className + \".class\");\n\t\t\t\t// load the class into the JVM, and try and get an instance of it\n\t\t\t\t//Class<?> newClass = ClassLoader.getSystemClassLoader().loadClass(className);\n\n\t\t\t\tURLClassLoader classLoader = URLClassLoader.newInstance(new URL[] { classFile.toURI().toURL() });\n\t\t\t\tClass<?> newClass = Class.forName(className, true, classLoader);\n\n\t\t\t\t// delete the class file, so we leave no trace\n\t\t\t\t// this is okay because we already loaded the class\n\t\t\t\ttry {\n\t\t\t\t\tclassFile.delete();\n\n\t\t\t\t// meh, we tried\n\t\t\t\t} catch (Exception e) {}\n\n\t\t\t\treturn newClass.newInstance();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t//System.out.println(\"Couldn't load class\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Couldn't write / compile source\");\n\t\t}\n\n\t\t// the class didn't compile\n\t\treturn null;\n\t}", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions) { throw Extensions.todo(); }", "public Expression(Expression exp) {\r\n\t\tconcat(exp);\r\n\t\ttext = new StringBuffer(new String(exp.text));\r\n\t}", "NumericExpression createNumericExpression();", "public static TypeExamen createEntity(EntityManager em) {\n TypeExamen typeExamen = new TypeExamen()\n .libelle(DEFAULT_LIBELLE);\n return typeExamen;\n }", "private Expression toExpression() {\n Expression lhs = null, rhs = null;\n if (base instanceof DerefSymbol) {\n lhs = ((DerefSymbol)base).toExpression();\n } else if (base instanceof AccessSymbol) {\n lhs = ((AccessSymbol)base).toExpression();\n } else if (base instanceof Identifier) {\n lhs = new Identifier(base);\n } else {\n PrintTools.printlnStatus(0,\n \"[WARNING] Unexpected access expression type\");\n return null;\n }\n rhs = new Identifier(member);\n return new AccessExpression(lhs, AccessOperator.MEMBER_ACCESS, rhs);\n }", "public Type getExpressionType();", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions, Iterable<Member> members) { throw Extensions.todo(); }", "ExpData createData(Container container, @NotNull DataType type);", "public static NumberAmount create(){\n NumberAmount NA = new NumberAmount(new AdvancedOperations(Digit.Zero()));\n return NA;\n }", "QuoteType createQuoteType();", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "@Override\n public Type evaluateType() throws Exception {\n return new IntegerType();\n }", "public abstract DataType<T> newInstance();", "Tulip getType() { return new Tulip(); }", "<C, O> OperationCallExp<C, O> createOperationCallExp();", "Multiply createMultiply();", "public interface\nExp extends HIR\n{\n\n/** ConstNode (##3)\n * Build HIR constant node.\n * @param pConstSym constant symbol to be attached to the node.\n * @return constant leaf node having operation code opConst.\n**/\n// Constructor (##3)\n// ConstNode( Const pConstSym );\n\n/** getConstSym\n * Get constant symbol attached to this node.\n * \"this\" should be a constant node.\n * @return constant symbol attached to this node.\n**/\nConst\ngetConstSym();\n\n/** SymNode (##3)\n * Build an HIR symbol name node from a symbol name.\n * @param pVar variable name symbol to be attached to the node.\n * @param pSubp subprogram name symbol to be attached to the node.\n * @param pLabel label name symbol to be attached to the node.\n * @param pElem struct/union element name to be attached to the node.\n * @param pField class field name to be attached to the node.\n * @return symbol name node of corresponding class (##2)\n * having operation code opSym.\n**/\n// Constructor (##3)\n// VarNode( Var pVar ); (##3)\n// SubpNode( Subp pSubp ); (##3)\n// LabelNode( Label pLabel ); (##3)\n// ElemNode( Elem pElem ); (##3)\n// FieldNode( Field pField ); (##3)\n\n/** getSym\n * Get symbol from SymNode. (##2)\n * \"this\" should be a SymNode (##2)\n * (either VarNode, SubpNode, LabelNode, ElemNode, or FieldNode). (##2)\n * @return the symbol attached to the node\n * (either Var, Subp, Label, Elem, or Field). (##2)\n**/\n//## Sym\n//## getSym();\n\n/** getVar\n * Get symbol of specified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nVar getVar();\n\n/** getSubp\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nSubp getSubp();\n\n/**\n * getLabel\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nLabel getLabel();\n\n/**\n * getElem\n * Get symbol of spefified class from SymNode. (##2)\n * \"this\" should be a SymNode.\n * @return the symbol of specified class attached to the node.\n * If the symbol is not attached to the node or if its class is\n * not the specified class, then return null.\n**/\nElem getElem();\n// Field getField();\n\n/** UnaryExp (##3)\n * Build an unary expression having pOperator as its operator\n * and pExp as its source operand.\n * @param pOperator unary operator.\n * @param pExp source operand expression.\n * @return unary expression using pOperator and pExp as its\n * operator and operand.\n**/\n// Constructor (##3)\n// UnaryExp( int pOperator, Exp pExp );\n\n/** BinaryExp (##3)\n * Build a binary expression having pOperator as its operator\n * and pExp1, pExp2 as its source operand 1 and 2.\n * @param pOperator binary operator.\n * @param pExp1 source operand 1 expression.\n * @param pExp2 source operand 2 expression.\n * @return binary expression using pOperator and\n * pExp1 and pExp2 as its operator and operands.\n**/\n// Constructor (##3)\n// BinaryExp( int pOperator, Exp pExp1, Exp pExp2 );\n\n/** getExp1\n * Get source operand 1 from unary or binary expression.\n * \"this\" should be either unary or binary expression.\n * @return the source operand 1 expression of this node.\n**/\nExp\ngetExp1();\n\n/** getExp2\n * Get source operand 2 from binary expression.\n * \"this\" should be a binary expression.\n * @return the source operand 2 expression of this node.\n**/\nExp\ngetExp2();\n\n/** getArrayExp (##2)\n * getSubscriptExp\n * getElemSizeExp (##2)\n * Get a component of a subscripted variable.\n * \"this\" should be a node built by buildSubscriptedVar method.\n * @return a component expression of this subscripted variable.\n**/\nExp getArrayExp(); // return array expression part (pArrayExp).\nExp getSubscriptExp(); // return subscript expression part (pSubscript).\nExp getElemSizeExp(); // return element size part (pElemSize).\n\n/** PointedVar (##3)\n * Build a pointed variable node.\n * @param pPointer pointer expression which may be a compond variable.\n(##2)\n * @param pElement struct/union element name pointed by pPointer.\n * @return pointed variable node having operation code opArrow.\n**/\n// Constructor (##3)\n// PointedVar( Exp pPointer, Elem pElement ); // (##2)\n\n/** getPointerExp\n * getPointedElem\n * Get a component of pointed variable expression.\n * \"this\" should be a node built by buildPointedVar method.\n * @return a component expression of this pointed variable.\n**/\nExp getPointerExp(); // return the pointer expression part (pPointer).\nElem getPointedElem(); // return the pointed element part (pElem).\n\n/** QualifiedVar (##3)\n * Build qualified variable node that represents an element\n * of structure or union.\n * @param pQualifier struct/union variable having elements.\n * @param pElement struct/union element name to be represented.\n * @return qualified variable node having operation code opQual.\n**/\n// Constructor (##3)\n// QualifiedVar( Exp pQualifier, Elem pElement );\n\n/** getQualifier\n * getQualifiedElem\n * Get a component of qualified variable expression.\n * \"this\" should be a node built by BuildQualifiedVar method.\n * @return a component of \"this\" QualifiedVar expression. (##2)\n**/\nExp getQualifierExp(); // return qualifier part (pQualifier).\nElem getQualifiedElem(); // return qualified element part (pelement).\n\n/** FunctionExp (##3)\n * Build a function expression node that computes function value.\n * @param pSubpExp function specification part which may be either\n * a function name, or an expression specifying a function name.\n * @param pParamList actual parameter list.\n * @return function expression node having operation code opCall.\n * @see IrList.\n**/\n// Constructor (##3)\n// FunctionExp( Subp pSubpSpec, IrList pParamList );\n\n/** getSubpSpec (##2)\n * getActualParamList\n * Get a component expression of the function expression. (##2)\n * \"this\" should be a node built by buildFunctionExp.\n * getSubpSpec return the expression specifying the subprogram\n * to be called (pSubpSpec). (##2)\n * getActualParamList return the actual parameter list (pParamList).\n * If this has no parameter, then return null.\n**/\nExp getSubpSpec();\nIrList getActualParamList();\n\n/** findSubpType\n * Find SubpType represented by this expression.\n * If this is SubpNode then return SubpType pointed by this node type,\n * else decompose this expression to find Subpnode.\n * If illegal type is encountered, return null.\n**/\npublic SubpType // (##6)\nfindSubpType();\n\n/** isEvaluable\n * See if \"this\" expression can be evaluated or not.\n * Following expressions are evaluable expression: //##14\n * constant expression,\n * expression whose operands are all evaluable expressions.\n * Expressions with OP_ADDR or OP_NULL are treated as non evaluable.\n * Variable with initial value is also treated as non evaluable\n * because its value may change. //##43\n * @return true if this expression can be evaluated as constant value\n * at the invocation of this method, false otherwise.\n**/\nboolean isEvaluable();\n\n//SF050111[\n///** evaluate\n// * Evaluate \"this\" expression.\n// * \"this\" should be an evaluable expression.\n// * If not, this method returns null.\n// * It is strongly recommended to confirm isEvaluable() returns true\n// * for this expression before calling this method.\n// * @return constant node as the result of evaluation.\n//**/\n//ConstNode evaluate();\n\n/**\n * Evaluate \"this\" expression.\n * @return constant as the result of evaluation or null(when failing in the\n * evaluation)\n**/\npublic Const evaluate();\n\n/**\n * Fold \"this\" expression.\n * evaluate() is called by recursive. If the evaluation succeeded, former node\n * is substituted for the constant node generated as evaluation result.\n * @return constant as the result of evaluation or null (when failing in the\n * evaluation)\n**/\npublic Exp fold();\n//SF050111]\n\n/** evaluateAsInt\n * Evaluate \"this\" expression as int.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return integer value as the result of evaluation.\n**/\n//SF050111 int evaluateAsInt();\npublic int evaluateAsInt(); //SF050111\n\n/**\n * Evaluate \"this\" expression as long.\n * \"this\" should be an evaluable expression. If not, this method returns 0.\n * @return long value as the result of evaluation.\n**/\npublic long evaluateAsLong(); //SF050111\n\n/** evaluateAsFloat\n * Evaluate \"this\" expression as float.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return float value as the result of evaluation.\n**/\n//SF050111 float evaluateAsFloat();\npublic float evaluateAsFloat(); //SF050111\n\n/** evaluateAsDouble\n * Evaluate \"this\" expression as double.\n * \"this\" should be an evaluable expression.\n * If not, this method returns 0.0.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return float value as the result of evaluation.\n**/\n//SF050111 double evaluateAsDouble();\npublic double evaluateAsDouble(); //SF050111\n\n/** getValueString //##40\n * Evaluate this subtree and return the result as a string.\n * If the result is constant, then return the string representing\n * the constant.\n * If the result is not a constant, then return a string\n * representing the resultant expression.\n * It is strongly recommended to confirm isEvaluable() returns true\n * for this expression before calling this method.\n * @return a string representing the evaluated result.\n**/\npublic String\ngetValueString();\n\n//##84 BEGIN\n/**\n * Adjust the types of binary operands according to the\n * C language specifications\n * (See ISO/IEC 9899-1999 Programming language C section 6.3.1.8).\n * The result is an expression\n * (HIR.OP_SEQ, adjusted_operand1, adjusted_operand2).\n * The operands can be get by\n * ((HIR)lResult.getChild1()).copyWithOperands()\n * ((HIR)lResult.getChild2()).copyWithOperands()\n * @param pExp1 operand 1.\n * @param pExp2 operand 2.\n * @return (HIR.OP_SEQ, adjusted_operand1, adjusted_operand2)\n */\npublic Exp\nadjustTypesOfBinaryOperands( Exp pExp1, Exp pExp2 );\n//##84 END\n\n/** initiateArray //##15\n * Create loop statement to initiate all elements of\n * the array pArray and append it to the initiation block\n * of subprogram pSubp.\n * The initiation statement to be created for pSubp is\n * for (i = pFrom; i <= pTo; i++)\n * pArray[i] = pInitExp;\n * If pSubp is null, set-data statement is generated.\n * @param pArray array variable expression.\n * @param pInitExp initial value to be set.\n * @param pFrom array index start position\n * @param pTo array index end position\n * @param pSubp subprogram containing the initiation statement.\n * null for global variable initiation.\n * @return the loop statement to set initial value.\n**/\npublic Stmt\ninitiateArray(\n Exp pArray, Exp pInitExp,\n Exp pFrom, Exp pTo, Subp pSubp ); //##15\n\n}", "Exp getArrayExp();", "FullExpression createFullExpression();", "public interface ExpressionsFactory {\n\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tExpressionsFactory INSTANCE = org.dresdenocl.essentialocl.expressions.impl.ExpressionsFactoryImpl.eINSTANCE;\n\n\t/**\n\t * Returns a new object of class '<em>Variable Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Variable Exp</em>'.\n\t * @generated\n\t */\n\tVariableExp createVariableExp();\n\n\t/**\n\t * Returns a new object of class '<em>Variable</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Variable</em>'.\n\t * @generated\n\t */\n\tVariable createVariable();\n\n\t/**\n\t * Returns a new object of class '<em>Unlimited Natural Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Unlimited Natural Exp</em>'.\n\t * @generated\n\t */\n\tUnlimitedNaturalExp createUnlimitedNaturalExp();\n\n\t/**\n\t * Returns a new object of class '<em>Type Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Type Literal Exp</em>'.\n\t * @generated\n\t */\n\tTypeLiteralExp createTypeLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Tuple Literal Part</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Tuple Literal Part</em>'.\n\t * @generated\n\t */\n\tTupleLiteralPart createTupleLiteralPart();\n\n\t/**\n\t * Returns a new object of class '<em>Tuple Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Tuple Literal Exp</em>'.\n\t * @generated\n\t */\n\tTupleLiteralExp createTupleLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>String Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>String Literal Exp</em>'.\n\t * @generated\n\t */\n\tStringLiteralExp createStringLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Real Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Real Literal Exp</em>'.\n\t * @generated\n\t */\n\tRealLiteralExp createRealLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Property Call Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Property Call Exp</em>'.\n\t * @generated\n\t */\n\tPropertyCallExp createPropertyCallExp();\n\n\t/**\n\t * Returns a new object of class '<em>Operation Call Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Operation Call Exp</em>'.\n\t * @generated\n\t */\n\tOperationCallExp createOperationCallExp();\n\n\t/**\n\t * Returns a new object of class '<em>Undefined Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Undefined Literal Exp</em>'.\n\t * @generated\n\t */\n\tUndefinedLiteralExp createUndefinedLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Let Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Let Exp</em>'.\n\t * @generated\n\t */\n\tLetExp createLetExp();\n\n\t/**\n\t * Returns a new object of class '<em>Iterator Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Iterator Exp</em>'.\n\t * @generated\n\t */\n\tIteratorExp createIteratorExp();\n\n\t/**\n\t * Returns a new object of class '<em>Iterate Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Iterate Exp</em>'.\n\t * @generated\n\t */\n\tIterateExp createIterateExp();\n\n\t/**\n\t * Returns a new object of class '<em>Invalid Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Invalid Literal Exp</em>'.\n\t * @generated\n\t */\n\tInvalidLiteralExp createInvalidLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Integer Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Integer Literal Exp</em>'.\n\t * @generated\n\t */\n\tIntegerLiteralExp createIntegerLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>If Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>If Exp</em>'.\n\t * @generated\n\t */\n\tIfExp createIfExp();\n\n\t/**\n\t * Returns a new object of class '<em>Boolean Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Boolean Literal Exp</em>'.\n\t * @generated\n\t */\n\tBooleanLiteralExp createBooleanLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Collection Item</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Collection Item</em>'.\n\t * @generated\n\t */\n\tCollectionItem createCollectionItem();\n\n\t/**\n\t * Returns a new object of class '<em>Collection Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Collection Literal Exp</em>'.\n\t * @generated\n\t */\n\tCollectionLiteralExp createCollectionLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Collection Range</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Collection Range</em>'.\n\t * @generated\n\t */\n\tCollectionRange createCollectionRange();\n\n\t/**\n\t * Returns a new object of class '<em>Enum Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Enum Literal Exp</em>'.\n\t * @generated\n\t */\n\tEnumLiteralExp createEnumLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Expression In Ocl</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Expression In Ocl</em>'.\n\t * @generated\n\t */\n\tExpressionInOcl createExpressionInOcl();\n\n}", "<C> IfExp<C> createIfExp();", "public Expense(){\n\n }", "public T caseExpresion(Expresion object)\n {\n return null;\n }", "public UnaryExpNode() {\n }", "<C, PM> IteratorExp<C, PM> createIteratorExp();", "TypeDecl createTypeDecl();", "Type() {\n }", "public Expression getType();", "emp m1(){\n\t\tint salary = 5000;\r\n\t\tSystem.out.println(\"method m1\" +\" \"+salary);\r\n\t\t//emp e = new emp();\r\n\t\t//return e;\r\n\t\treturn new emp(); // most recommended way.\r\n\t}", "private IExpressionElement createExpression() throws RodinDBException {\n\t\tfinal IMachineRoot mch = createMachine(\"mch\");\n\t\treturn mch.createChild(IVariant.ELEMENT_TYPE, null, null);\n\t}", "<C, PM> IterateExp<C, PM> createIterateExp();", "public static Employee createEmployee(int id, String name, double salary, String type) {\n if (type.equals(\"permanent\")) {\n return new PermanentEmployee(id, name, salary);\n } else if (type.equals(\"temporary\")) {\n return new TemporaryEmployee(id, name, salary);\n } else {\n throw new IllegalArgumentException(\"Invalid type for employee\");\n }\n }", "public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }", "@Override\r\n\tpublic Explore getNewInstance() {\n\t\treturn new ZYDCExplore();\r\n\t}", "@Override\r\n\tpublic RandomGenerator_Exponential clone() {\r\n\t\tRandomGenerator_Exponential rg = new RandomGenerator_Exponential();\r\n\t\trg.lambda=lambda;\r\n\t\treturn rg;\r\n\t}", "public static Term createRegExp(Expression exp) {\r\n\t\tTerm term = Term.function(REGEX, exp);\r\n\t\treturn term;\r\n\t}", "<C, COA, SSA> MessageExp<C, COA, SSA> createMessageExp();", "public T getNewInstance() {\n T value = null;\n Class<T> tClass = (Class<T>) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[0];\n try {\n value = tClass.newInstance();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n return value;\n }", "public Type() {\n super();\n }", "public static final ExpTypeBackingBean getExpTypeBean( String etype ) {\r\n ExpTypeBackingBean exptype;\r\n if( etype.equals( AdminManagerImpl.IDENTIFY ) ) {\r\n exptype = (ExpTypeBackingBean)JSFUtil.getManagedObject(\"ExpTypeIdentify\");\r\n } else if( etype.equals( AdminManagerImpl.MIGRATE ) ) {\r\n exptype = (ExpTypeBackingBean)JSFUtil.getManagedObject(\"ExpTypeMigrate\");\r\n } else if( etype.equals( AdminManagerImpl.EMULATE ) ) {\r\n exptype = (ExpTypeBackingBean)JSFUtil.getManagedObject(\"ExpTypeViewer\");\r\n } else if( etype.equals( AdminManagerImpl.EXECUTABLEPP ) ) {\r\n exptype = (ExpTypeBackingBean)JSFUtil.getManagedObject(\"ExpTypeExecutablePP\");\r\n \r\n } else {\r\n // For unrecognised experiment types, set to NULL:\r\n exptype = null;\r\n }\r\n return exptype;\r\n }", "IterateExp createIterateExp();", "private ExplorationTypes(int type_val) \n { \n this.type_val = type_val; \n }", "public PaymentType builder()\n {\n return new PaymentType(this);\n }", "protected Pair<JilExpr,List<JilStmt>> doNew(Expr.New e) {\n \t\tArrayList<JilStmt> r = new ArrayList();\t\r\n \t\tType.Reference type = (Type.Reference) e.type().attribute(Type.class);\r\n \t\t\r\n \t\tMethodInfo mi = (MethodInfo) e\r\n \t\t\t\t.attribute(MethodInfo.class);\t\t\t\r\n \t\t\r\n \t\tPair<JilExpr,List<JilStmt>> context = doExpression(e.context());\r\n \t\tPair<List<JilExpr>,List<JilStmt>> params = doExpressionList(e.parameters());\r\n \t\t\t\t\t\t\t\t\r\n \t\tif(context != null) {\r\n \t\t\tr.addAll(context.second());\r\n \t\t}\r\n \t\t\r\n \t\tr.addAll(params.second());\t\t\t\t\t\r\n \t\t\r\n \t\tif(mi != null) {\t\t\t\r\n \t\t\treturn new Pair<JilExpr, List<JilStmt>>(new JilExpr.New(type, params\r\n \t\t\t\t\t.first(), mi.type, e.attributes()), r);\r\n \t\t} else if(type instanceof Type.Array){\r\n \t\t\treturn new Pair<JilExpr, List<JilStmt>>(new JilExpr.New(type, params\r\n \t\t\t\t\t.first(), null, e.attributes()), r);\r\n \t\t} else {\r\n \t\t\tsyntax_error(\"internal failure --- unable to find method information\",e);\r\n \t\t\treturn null;\r\n \t\t}\r\n \t}", "public void setExp(int exp) {\r\n\t\tthis.exp = exp;\r\n\t}", "public Expression(Object ob) {\r\n\t\tthis();\r\n\t\taddElement(ob);\r\n\t}", "public static ExpressionNode create(final ExpressionNode type, final ExpressionNode expr,\n final SourceSection sourceSection) {\n // Only create the type check if type checking is enabled\n if (VmSettings.USE_TYPE_CHECKING) {\n if (VmSettings.COLLECT_TYPE_STATS) {\n ++numTypeCheckLocations;\n }\n // Create the type check\n return UnresolvedTypeCheckNodeFactory.create(sourceSection, type, expr);\n }\n // Otherwise return the expression as is.\n return expr;\n }", "public static UnaryExpression makeUnary(ExpressionType expressionType, Expression expression, Class type) { throw Extensions.todo(); }", "public static <T extends @TestAnnotation2 Number & Comparable> TypeInstance createTypeVariable() {\n AnnotatedType referencedTypeVariable = getAnnotatedType();\n TypeInstance typeInstance = Diamond.types().from(referencedTypeVariable);\n return typeInstance;\n }", "public ConvCalculator(Expression exp){\r\n this();\r\n this.expression = exp;\r\n }", "public static UnaryExpression typeAs(Expression expression, Class type) { throw Extensions.todo(); }", "private MathProblemType generateProblemType() {\n\t\tint nbrOfOperators = mathProblemTypes.size();\n\n\t\tint rand = (int) Math.floor((Math.random() * nbrOfOperators));\n\n\t\ttry {\n\t\t\treturn (MathProblemType) mathProblemTypes.get(rand).newInstance();\n\t\t} catch (InstantiationException e) {\n\t\t\tLog.d(TAG, e.getMessage());\n\t\t} catch (IllegalAccessException e) {\n\t\t\tLog.d(TAG, e.getMessage());\n\t\t}\n\n\t\t// return default problem.\n\t\treturn new AdditionProblem();\n\t}", "public Repeat(Expression exp, Method callingMethod){\n\t\tsuper(callingMethod);\n\t\tthis.exp = exp;\n\t}", "public TYPE SemantMe() {\n\t\tSYM_TABLE sym_table = SYM_TABLE.getInstance();\n\t\t\n\t\t// Lookup the name\n\t\tTYPE t = sym_table.find(this.type);\n\t\t// Check it\n\t\tif (t == null || !t.isTypeName())\n\t\t {\n\t\t\t// Code bug -- type given does not exist in table or just is not a name a of a type\n\t\t\treport_error();\n\t\t }\n\t\t\t// Its fine, declare it\n\t\treturn new TYPE_VAR_DEC(t.name,this.name);\n }", "public Expression(Expression exp1, Operator op, Expression exp2) {\r\n\t\t// Remember, this is in postfix notation.\r\n\t\telements.addAll(exp1.elements);\r\n\t\telements.addAll(exp2.elements);\r\n\t\telements.add(op);\r\n\t}", "public static DynamicExpression makeDynamic(Class type, CallSiteBinder binder, Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public AddExp(Exp term, Exp exp) {\n\t\tthis.term = term;\n\t\tthis.exp = exp;\n\t}", "private ExpressionTools(){\n\t\t\n\t}", "T create();", "T create();" ]
[ "0.67137873", "0.6527346", "0.6479427", "0.61915356", "0.6167604", "0.61589795", "0.6092269", "0.60759985", "0.605313", "0.6043496", "0.59867465", "0.58562195", "0.5832002", "0.58066696", "0.5692089", "0.56672055", "0.56489325", "0.56472033", "0.56409496", "0.5602335", "0.558979", "0.5571788", "0.5571788", "0.5571788", "0.5515745", "0.5481728", "0.5462625", "0.54621863", "0.54361486", "0.5417424", "0.5416574", "0.54060364", "0.5398745", "0.5394896", "0.538365", "0.5381373", "0.53693444", "0.5362462", "0.5360022", "0.5321192", "0.530222", "0.5287561", "0.52657485", "0.5249094", "0.52346253", "0.5223303", "0.52168435", "0.5212087", "0.5199497", "0.5174737", "0.51694465", "0.5159796", "0.5155267", "0.5155", "0.5152071", "0.5149157", "0.514894", "0.5147262", "0.51456165", "0.5144321", "0.51255274", "0.5120389", "0.511982", "0.51129067", "0.50978315", "0.50969154", "0.5096405", "0.5086451", "0.5077136", "0.5071669", "0.50637305", "0.50635153", "0.50576085", "0.50498116", "0.50431556", "0.50370306", "0.5034185", "0.5020422", "0.5019637", "0.5009682", "0.5008928", "0.50050306", "0.4995656", "0.4995353", "0.498021", "0.49762657", "0.49747404", "0.49660987", "0.49606383", "0.4955885", "0.49499503", "0.49492332", "0.49469495", "0.49425223", "0.49411312", "0.49345997", "0.49342665", "0.4932105", "0.4927768", "0.4927768" ]
0.72512627
0
Returns a new object of class 'Unspecified Value Exp'.
<C> UnspecifiedValueExp<C> createUnspecifiedValueExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Value() {}", "public Value(){}", "public static Value makeAbsent() {\n return theAbsent;\n }", "public Value restrictToNotAbsent() {\n checkNotUnknown();\n if (isNotAbsent())\n return this;\n Value r = new Value(this);\n r.flags &= ~ABSENT;\n if (r.var != null && (r.flags & (PRESENT_DATA | PRESENT_ACCESSOR)) == 0)\n r.var = null;\n return canonicalize(r);\n }", "private Value() {\n\t}", "UndefinedLiteralExp createUndefinedLiteralExp();", "UnsignedValue createUnsignedValue();", "protected Value() {\n flags = 0;\n num = null;\n str = null;\n object_labels = getters = setters = null;\n excluded_strings = included_strings = null;\n functionPartitions = null;\n functionTypeSignatures = null;\n var = null;\n hashcode = 0;\n }", "NumberValue createNumberValue();", "public Value makeNonPolymorphic() {\n if (var == null)\n return this;\n Value r = new Value(this);\n r.var = null;\n r.flags &= ~(PRESENT_DATA | PRESENT_ACCESSOR);\n return canonicalize(r);\n }", "public static NumberAmount create(){\n NumberAmount NA = new NumberAmount(new AdvancedOperations(Digit.Zero()));\n return NA;\n }", "public CalculatorValue(){\n\t\tvalue=0.0;\n\t\terrorTerm=0.0;\n\t\tthis.units=\"\";\n\t}", "public DoubleValue() {\n this.value = 0;\n }", "public BwValue mkValue() {\n\t\treturn new BwValue(this.sT);\n\t}", "public static Value makeAbsentModified() {\n return theAbsentModified;\n }", "public Value() {\n }", "public static Value makeUndef() {\n return theUndef;\n }", "public Value setNotDontEnum() {\n checkNotUnknown();\n if (isNotDontEnum())\n return this;\n Value r = new Value(this);\n r.flags &= ~ATTR_DONTENUM_ANY;\n r.flags |= ATTR_NOTDONTENUM;\n return canonicalize(r);\n }", "@Override\n public double getValue() {\n return 0;\n }", "VariableExp createVariableExp();", "NullValue createNullValue();", "NullValue createNullValue();", "<C, PM> VariableExp<C, PM> createVariableExp();", "public static TypedData unknownValue() {\n return UNKNOWN_INSTANCE;\n }", "public GenerateurImpl() {\n\t\tsuper();\n\t\tthis.value = 0;\n\t}", "public static Value makeUnknown() {\n return theUnknown;\n }", "ValueType getValue();", "public static Value createValue(Object val) {\n if (val instanceof String) {\n return new NominalValue((String) val);\n } else if (val instanceof Double) {\n return new NumericValue((Double) val);\n }\n return UnknownValue.getInstance();\n }", "public MyDouble() {\n this.setValue(0);\n }", "public T exp(T value);", "IntegerValue createIntegerValue();", "IntegerValue createIntegerValue();", "public void setMyExp(MyExp me);", "@Override\n\tpublic Value apprise() {\n\t\treturn null;\n\t}", "public BabbleValue() {}", "MeanValueType createMeanValueType();", "public static AbsTime factory(AbsTime t)\n {\n // The value to return.\n AbsTime result;\n\n if (t.isASAP() || t.isNEVER()) {\n // No need to make a new object.\n result = t;\n } else {\n // Not a special case. Make a new object.\n result = new AbsTime(t);\n }\n\n return result;\n }", "public abstract O value();", "public interface ImpExValues {\n\n /**\n * String value (default for all import data).\n */\n String STRING = \"STRING\";\n /**\n * Boolean value (e.g. for flags).\n */\n String BOOLEAN = \"BOOLEAN\";\n /**\n * Long value (e.g. for PK's).\n */\n String LONG = \"LONG\";\n /**\n * Integer value.\n */\n String INT = \"INT\";\n /**\n * BigDecimal value.\n */\n String DECIMAL = \"DECIMAL\";\n /**\n * Date value. Format: \"yyyy-MM-dd\" {@link DateUtils#ldParseSDT(String)}\n */\n String DATE = \"DATE\";\n /**\n * Date value. Format: \"yyyy-MM-dd HH:mm:ss\" {@link DateUtils#ldtParseSDT(String)}\n */\n String DATETIME = \"DATETIME\";\n /**\n * Date value. Format: \"yyyy-MM-dd HH:mm:ss\" {@link DateUtils#zdtParseSDT(String)}\n */\n String ZONEDTIME = \"ZONEDTIME\";\n /**\n * Date value. Format: \"yyyy-MM-dd HH:mm:ss\" {@link DateUtils#iParseSDT(String)}\n */\n String INSTANT = \"INSTANT\";\n\n}", "@SuppressWarnings(\"unused\")\n private CreateOrUpdateValueTypeResult() {\n }", "public Value restrictToNonAttributes() {\n Value r = new Value(this);\n r.flags &= ~(PROPERTYDATA | ABSENT | PRESENT_DATA | PRESENT_ACCESSOR);\n return canonicalize(r);\n }", "Unit() {\n\t\tthis(new Apfloat(\"0.0\", APFLOATPRECISION), SCALAR, 1);\n\t}", "E getValue();", "public InventoryQuantityValue buildUnchecked() {\n return new InventoryQuantityValueImpl(quantityOnStock, availableQuantity);\n }", "public Value restrictToAttributes() {\n Value r = new Value(this);\n r.num = null;\n r.str = null;\n r.var = null;\n r.flags &= ATTR | ABSENT | UNKNOWN;\n if (!isUnknown() && isMaybePresent())\n r.flags |= UNDEF; // just a dummy value, to satisfy the representation invariant for PRESENT\n r.excluded_strings = r.included_strings = null;\n return canonicalize(r);\n }", "public Builder clearMaxEXP() {\n bitField0_ = (bitField0_ & ~0x00000004);\n maxEXP_ = 0;\n onChanged();\n return this;\n }", "private static LocalCacheValue createLocalCacheValue(Object internalValue, long ldtCreation, ExpiryPolicy policy,\n JCacheSyntheticKind kind)\n {\n return new LocalCacheValue(internalValue, ldtCreation, policy, kind);\n }", "public AbsTime() throws Time.Ex_TimeNotAvailable\n {\n itsValue = timeNow();\n }", "public Exp transIntExp(int value){\r\n\t\treturn new Ex(new CONST(value));\r\n\t}", "public Int() {\n super(Expression.X_IS_UNDEFINED);\n this.value = 0;\n }", "private Values(){}", "protected Object getDefaultValue() {\r\n if (FeatureCollectionTools.isAttributeTypeNumeric((AttributeType) this.typeDropDown.getSelectedItem())) {\r\n AttributeType at = (AttributeType) this.typeDropDown.getSelectedItem();\r\n\r\n if (at.equals(AttributeType.INTEGER)) {\r\n int i = Integer.parseInt(this.defValueTextField.getText());\r\n return new Integer(i);\r\n }\r\n double d = Double.parseDouble(this.defValueTextField.getText());\r\n return new Double(d);\r\n }\r\n return this.defValueTextField.getText();\r\n }", "public static AbsTime factory() throws Time.Ex_TimeNotAvailable\n {\n return new AbsTime();\n }", "protected Value(Value v) {\n flags = v.flags;\n num = v.num;\n str = v.str;\n object_labels = v.object_labels;\n getters = v.getters;\n setters = v.setters;\n excluded_strings = v.excluded_strings;\n included_strings = v.included_strings;\n functionPartitions = v.functionPartitions;\n functionTypeSignatures = v.functionTypeSignatures;\n var = v.var;\n hashcode = v.hashcode;\n }", "public Builder clearMaxEXP() {\n bitField0_ = (bitField0_ & ~0x00020000);\n maxEXP_ = 0;\n onChanged();\n return this;\n }", "private UniverseElement(Universe<T> universe, T val) {\n\t\t\tif (universe == null) throw new IllegalArgumentException(\"universe cannot be null\");\n\t\t\tif (val == null) throw new IllegalArgumentException(\"val cannot be null\");\n\t\t\tthis.universe = universe;\n\t\t\tthis.val = val;\n\t\t}", "CsticValueModel createInstanceOfCsticValueModel(int valueType);", "public void createValue() {\r\n value = new com.timeinc.tcs.epay2.EPay2DTO();\r\n }", "@Override\n\tpublic double value(final Attribute att) {\n\t\treturn 0;\n\t}", "protected T getValue0() {\n\t\treturn value;\n\t}", "public ValueMeaning getValueMeaning(){\n return null;\n }", "public Value setDontEnum() {\n checkNotUnknown();\n if (isDontEnum())\n return this;\n Value r = new Value(this);\n r.flags &= ~ATTR_DONTENUM_ANY;\n r.flags |= ATTR_DONTENUM;\n return canonicalize(r);\n }", "@Override\n\tpublic double classValue() {\n\t\treturn 0;\n\t}", "static <V> Value<V> empty() {\n return new ImmutableValue<>((V) null);\n }", "abstract Valuable createMoney(double value);", "public ImprintValue mo9145p() {\n return new ImprintValue(this);\n }", "public Object getBaseValue() {\r\n return Long.valueOf(0);\r\n }", "Expression() { }", "Exp\ngetExp1();", "public Variable(){\n name = \"\";\n initialValue = 0;\n }", "private OptionalValue(final Value value) {\n this.value = value;\n }", "public Expression asExpression() {\n switch (TYPE) {\n case EXPRESSION:\n return EXPRESSION;\n case IDENTIFIER:\n return new Variable(VALUE);\n case LITERAL:\n if (VALUE.matches(\"\\\\d+\")) {\n return new LInteger(Integer.parseInt(VALUE));\n } else if (VALUE.equals(\"true\") || VALUE.equals(\"false\")) {\n return LBoolean.resolve(VALUE.equals(\"true\"));\n } else if (VALUE.equals(\"null\")) {\n return LNull.NULL;\n } else {\n return new LString(VALUE);\n }\n default:\n throw ErrorLog.get(\"Unexpected symbol '%s'\", VALUE);\n }\n }", "public FiveValue() {\n\t\tsuper(ValueType.FIVE);\n\t\t// TODO Auto-generated constructor stub\n\t}", "Exp\ngetExp2();", "public final Statistic newInstance() {\n Statistic s = new Statistic();\n s.myNumMissing = myNumMissing;\n s.firstx = firstx;\n s.max = max;\n s.min = min;\n s.myConfidenceLevel = myConfidenceLevel;\n s.myJsum = myJsum;\n s.myValue = myValue;\n s.setName(getName());\n s.num = num;\n s.sumxx = sumxx;\n s.moments = Arrays.copyOf(moments, moments.length);\n if (getSaveOption()) {\n s.save(getSavedData());\n s.setSaveOption(true);\n }\n return (s);\n }", "IntegerValue getValueObject();", "@Override\n public Type evaluateType() throws Exception {\n return new IntegerType();\n }", "static <V> Value<V> of(V value) {\n return new ImmutableValue<>(value);\n }", "public com.vodafone.global.er.decoupling.binding.request.RangeValueFullType createRangeValueFullType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.RangeValueFullTypeImpl();\n }", "public abstract ValueType getValueType();", "ObjectValue createObjectValue();", "@Override\n public Double value(TypeOfValue value);", "FloatValue createFloatValue();", "FloatValue createFloatValue();", "private Valuable makeValuable(double value) {\n if (currency.equals(\"Baht\")) {\n if (value == 1 || value == 2 || value == 5 || value == 10)\n return new Coin(value, currency);\n else if (value == 20 || value == 50 || value == 100 || value == 500 || value == 1000) {\n return new BankNote(value, currency);\n }\n } else if (currency.equals(\"Ringgit\")) {\n if (value == 0.05 || value == 0.1 || value == 0.2 || value == 0.5)\n return new Coin(value, currency);\n else if (value == 1 || value == 2 || value == 5 || value == 10 || value == 20 || value == 50 || value == 100)\n return new BankNote(value, currency);\n }\n throw new IllegalArgumentException(\"Cannot create \" + value + \" \" + currency);\n }", "public Valvula(){}", "@VTID(14)\r\n double getValue();", "T getDefaultValue();", "public RTWValue getAsValue(int i);", "@Override\n\tpublic Double get() {\n\t\treturn 0.0;\n\t}", "public Object getDefaultValue();", "public Object getDefaultValue();", "V getValue();", "V getValue();", "V getValue();", "static <V> Value<V> of(Value<V> value) {\n return new ImmutableValue<>(value.get());\n }", "public void setMissingValueCode(double mv);", "protected static Object createValue(Class type)\n {\n Object rv = null;\n\n if (type.isPrimitive()) {\n if (type == Boolean.TYPE)\n rv = new Boolean(false);\n \n else if (type == Byte.TYPE)\n rv = new Byte((byte)0);\n \n else if (type == Character.TYPE)\n rv = new Character((char)0);\n \n else if (type == Short.TYPE)\n rv = new Short((short)0);\n \n else if (type == Integer.TYPE)\n rv = new Integer(0);\n \n else if (type == Long.TYPE)\n rv = new Long(0);\n \n else if (type == Float.TYPE)\n rv = new Float(0);\n \n else if (type == Double.TYPE)\n rv = new Double(0);\n \n else if (type == Void.TYPE)\n rv = null;\n \n else \n throw new Error(\"unreachable\");\n }\n\n return rv;\n }", "Object value();", "Object getValue();" ]
[ "0.6114333", "0.6059513", "0.5963115", "0.591625", "0.59048176", "0.58595186", "0.57808053", "0.5729256", "0.57107407", "0.5692739", "0.5677342", "0.5642526", "0.5639941", "0.5608162", "0.5537895", "0.5522309", "0.54818654", "0.54609114", "0.54567355", "0.5439286", "0.54217887", "0.54217887", "0.5408406", "0.5403448", "0.54009223", "0.53956026", "0.5389648", "0.5354141", "0.5346231", "0.5325008", "0.5313019", "0.5313019", "0.529226", "0.5289166", "0.526427", "0.5262591", "0.5260145", "0.5255862", "0.52379364", "0.5228261", "0.5216437", "0.5209893", "0.5209792", "0.51894426", "0.5186937", "0.51814026", "0.51747155", "0.51699907", "0.51696867", "0.516727", "0.5166382", "0.5162671", "0.5158864", "0.51585925", "0.51584584", "0.5152964", "0.51494926", "0.51391786", "0.5137559", "0.5137273", "0.51277906", "0.5119883", "0.5118924", "0.5111944", "0.5106409", "0.51042354", "0.5101783", "0.5094823", "0.5085482", "0.50831485", "0.50752527", "0.50611764", "0.5059254", "0.5056781", "0.504911", "0.5047671", "0.5039994", "0.503692", "0.5029155", "0.5026846", "0.5024564", "0.50231314", "0.5018392", "0.5018392", "0.5018186", "0.5017138", "0.50118643", "0.5003575", "0.49956548", "0.49807325", "0.497889", "0.497889", "0.49776304", "0.49776304", "0.49776304", "0.49753144", "0.49722007", "0.4965553", "0.49649113", "0.49598745" ]
0.85255975
0
Returns a new object of class 'Variable'.
<C, PM> Variable<C, PM> createVariable();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Variable createVariable();", "Variable createVariable();", "public VariableIF createVariable(VariableDecl decl);", "VariableExp createVariableExp();", "public Variable(String name){\n this.name = name;\n }", "public static Variable variable( String name )\n {\n NullArgumentException.validateNotNull( \"Variable name\", name );\n return new Variable( name );\n }", "public Variable(String name) {\r\n\tthis.name = name;\r\n }", "public Variable(String name) {\n this.name = name;\n checkRep();\n }", "DynamicVariable createDynamicVariable();", "Variable(String _var) {\n this._var = _var;\n }", "public Variable(String variableName) {\n super(null);\n this.variableName = variableName;\n }", "VariableRef createVariableRef();", "public Variable(String name) {\r\n\t\tName = name;\r\n\t\tValues = new ArrayList<>();\r\n\t\tParents = new ArrayList<>();\r\n\t\tCPT = new TreeMap<>();\r\n\t}", "VarAssignment createVarAssignment();", "public Variable(){\n name = \"\";\n initialValue = 0;\n }", "Variables createVariables();", "VarReference createVarReference();", "public static Variable in(Object byValue) {\n\t\treturn new Variable(byValue);\n\t}", "@Override\n\tprotected String getVariableClassName() {\n\t\treturn \"variable\";\n\t}", "public static MethodModel.Variable createVariable(CompilationController controller, VariableElement variableElement) {\n Parameters.notNull(\"controller\", controller); //NOI18N\n Parameters.notNull(\"variableElement\", variableElement); //NOI18N\n return MethodModel.Variable.create(\n getTypeName(variableElement.asType()),\n variableElement.getSimpleName().toString(),\n variableElement.getModifiers().contains(Modifier.FINAL)\n );\n }", "<C, PM> VariableExp<C, PM> createVariableExp();", "public Var(String var) {\r\n this.variable = var;\r\n }", "public Variable getVariable(String name);", "static Pool newVariablePool() {\n return new VariablePool();\n }", "ControlVariable createControlVariable();", "VariableDeclaration createVariableDeclaration();", "public ActRuVariable() {\n this(DSL.name(\"act_ru_variable\"), null);\n }", "Variable(Object names[]) {\n _vname = makeName(names).intern();\n _names = names;\n \n }", "public ActRuVariable(Name alias) {\n this(alias, ACT_RU_VARIABLE);\n }", "public IAspectVariable<V> createNewVariable(PartTarget target);", "public interface IVariable<A extends AbstractDomain<?>> extends IReferenceHolder<A>, ITerm {\n\n\t@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic default Set<IVariable<?>> getVariables() {\n\t\tSet<IVariable<?>> values = new HashSet<>();\n\t\tvalues.add((IVariable<AbstractDomain<?>>) this);\n\t\treturn values;\n\t}\n\n\t/**\n\t * Lets the visitor visit the variable.\n\t * \n\t * @param IVariableVisitor\n\t * The visitor.\n\t */\n\tpublic void processWith(IVariableVisitor iVariableVisitor);\n\n\t/**\n\t * Returns whether it is a constant.\n\t * \n\t * @return Whether it is a constant.\n\t */\n\tpublic boolean isConstant();\n}", "Aliasing getVariable();", "public static Variable in(String byTypeURI) {\n\t\treturn new Variable(byTypeURI);\n\t}", "public VariableNode(String name) {\n\t\tthis.name = name;\n\t}", "public static Expression var(String var) {\n if (var.equals(\"e\")) {\n throw new RuntimeException(\"Variable can't be named e.\");\n }\n\n return new Variable(var);\n }", "public Variable createVariable(String name, int offset, DataType dataType, SourceType source)\n\t\t\tthrows DuplicateNameException, InvalidInputException;", "public AbstractVariable getVariable () {\n try {\n RemoteStackVariable rsv = thread.getCurrentFrame ().getLocalVariable (\"this\"); // NOI18N\n return new ToolsVariable (\n (ToolsDebugger) getDebugger (),\n rsv.getName (),\n rsv.getValue (),\n rsv.getType ().toString ()\n );\n } catch (Exception e) {\n return null;\n }\n }", "public interface TeaVariable extends TeaNamedElement {\n boolean hasInitializer();\n TeaExpression getInitializer();\n void setInitializer(TeaExpression expr) throws IncorrectOperationException;\n TeaType getType();\n// boolean isConst();\n ASTNode findNameIdentifier();\n\n TeaReferenceExpression findNameExpression();\n}", "public IVariable getVariable(Integer id) {\n return null;\n }", "public VariableNode(String attr)\n {\n this.name = attr;\n }", "AliasVariable createAliasVariable();", "public ElementVariable(String name) {\r\n\t\tsuper();\r\n\t\tthis.name = name;\r\n\t}", "public Code visitVariableNode(ExpNode.VariableNode node) {\n beginGen(\"Variable\");\n SymEntry.VarEntry var = node.getVariable();\n Code code = new Code();\n code.genMemRef(staticLevel - var.getLevel(), var.getOffset());\n endGen(\"Variable\");\n return code;\n }", "VarRef createVarRef();", "public final static Variable createVariableFromJSON(final JSONObject varJson) throws JSONException {\n\t\treturn new Variable(varJson.getString(\"name\"));\n\t}", "public ActRuVariable(String alias) {\n this(DSL.name(alias), ACT_RU_VARIABLE);\n }", "public abstract IDecisionVariable getVariable();", "Var getVar();", "private cat.footoredo.mx.ir.Variable ref (Entity entity) {\n return new cat.footoredo.mx.ir.Variable(varType(entity.getType()), entity);\n }", "public IVariable createInternalVariable(String name, IJavaType referencType) {\n IVariable var = new InterpreterVariable(name, referencType, fContext.getVM());\n fInternalVariables.put(name, var);\n return var;\n }", "public VarType createVariable(String id, String value, int order) {\n\t\tVarType var = mappingFactory.createVarType();\n\t\tvar.setId(id);\n\t\tvar.setValue(value);\n\t\tvar.setOrder(order);\n\t\treturn var;\n\t}", "public Variable(String name, int initialValue){\n this.name = name;\n this.initialValue = initialValue;\n }", "public VariablePrimitive(String nom) {\n\t\tsuper(nom, true);\n\t}", "public DataPrimitive withVariableName(String variableName) {\n return new DataPrimitive(\n new VariableName(variableName),\n getDataPurpose(),\n getDataValidator(),\n getPrimitiveType(),\n getAnnotations(),\n getDataObject());\n }", "public static <T extends @TestAnnotation2 Number & Comparable> TypeInstance createTypeVariable() {\n AnnotatedType referencedTypeVariable = getAnnotatedType();\n TypeInstance typeInstance = Diamond.types().from(referencedTypeVariable);\n return typeInstance;\n }", "public Variable(boolean vInitialized, boolean vFinal, Keywords.Type Vtype) {\n\t\tisInitialized = vInitialized;\n\t\tisFinal = vFinal;\n\t\ttype = Vtype;\n\t}", "Node getVariable();", "public Potential addVariable(Node var) {\n \n return (Potential)(new CaseListOutMem());\n}", "public Name getVariable() {\n return variable;\n }", "protected IDecisionVariable getVariable() {\n return variable;\n }", "public Variable(String name,List<String> Values,List<Variable> Parents) {\r\n\t\tthis(name,Values,Parents,new TreeMap<>());\r\n\t}", "public Variables(String name, VariablesHistory VH) {\n this.name = name;\n this.VH = VH;\n }", "ClassVariable getClassVariable();", "public Value( String inName, Variable inVar, int inIndex )\n {\n _var = inVar;\n _name = inName;\n _index = inIndex;\n }", "Variable getTargetVariable();", "static public <T1> Set<Variable> newVariables(\n String name1, T1 value1, Class<? extends T1> type1\n ) {\n return newVariables(\n newVariable(name1, value1, type1)\n );\n }", "public VariableMeta getMeta();", "public static VariableValue createValueObject(int value) {\n\t\treturn new IntegerValue(value);\n\t}", "public VariableToken(String text) {\n super(text);\n }", "private Stmt varDeclaration() {\n Token name = consume(IDENTIFIER, \"Expect variable name.\");\n Expr initializer = null;\n // Parse the initializer if an '=' is present. This branching allows initialization without declaration.\n if(match(EQUAL)) {\n initializer = expression();\n }\n\n consumeSemi(\"Expect ';' after variable declaration.\");\n return new Stmt.Var(name, initializer);\n }", "public IVariable getVariable(int index) {\n return null;\n }", "public Variable(String s, String in, String nom, int a, int b) {\n ident=new String(s);\n internal=new String(in);\n if (nom!=null) {name=new String(nom);} else {name=\"(Variable interne)\";}\n lowbound=a;\n highbound=b;\n noccur=0;\n \n \n }", "public String getVariable();", "protected Variable(final CharSequence name, final Term scope) {\n super(); \n setScope(scope, name);\n }", "public Variable getVariable() {\r\n\t\tObject ob = elementAt(0);\r\n\t\tif (size() == 1 && ob instanceof Variable) {\r\n\t\t\treturn (Variable) ob;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public FunctionVariable (Object names[])\n {\n super(names);\n }", "public Value makeNonPolymorphic() {\n if (var == null)\n return this;\n Value r = new Value(this);\n r.var = null;\n r.flags &= ~(PRESENT_DATA | PRESENT_ACCESSOR);\n return canonicalize(r);\n }", "private SWRLVariable initalizeVariable(String name, SWRLVariable var1) {\n\n if (literalVocabulary.containsKey(name)) {\n var1 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + literalVocabulary.get(name)));\n } else {\n char variable = this.generateVariable();\n literalVocabulary.put(name, String.valueOf(variable));\n var1 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + variable));\n }\n\n return var1;\n }", "public Variable(int power, char notation){\n\t\tthis.power = power;\n\t\tthis.notation = notation;\n\t}", "static Obj NewObj (String name,int kind) {\r\n\t\tObj p, obj = new Obj();\r\n obj.name = new String(name); \r\n\t\tobj.type = null; obj.kind = kind;\r\n\t\tobj.level = curLevel;\r\n\t\tp = topScope.locals;\r\n\t\t/*Para buscar si el nb de la variable nueva ya esta!!!*/\r\n\t\twhile (p != null) { \r\n \t \tif (p.name.equals(name)) Parser.SemError(1);\r\n\t\t\tp = p.next;\r\n\t\t}\r\n \t//FILO!!\r\n obj.next = topScope.locals; \r\n\t\ttopScope.locals = obj;\r\n \t//if (kind == vars) {}\r\n \t//obj.adr = topScope.nextAdr; topScope.nextAdr++;\r\n \t//obj.view();\r\n\t\treturn obj;\r\n }", "public TradeVariables() { /*gets default values*/ }", "public static PortType CreatePortTypeFromVar(List<Variable> LVariable, String Name , Module module)\n\t{\n\t\tPortType porttype = behavFactory.createPortType();\n\t\tfor(Object o : LVariable)\n\t\t{\n\t\t\tVariable var = (Variable) o ; \n\t\t\tDataType dt = var.getType() ; \n\t\t\tDataParameter dp = behavFactory.createDataParameter(); \n\t\t\tdp.setName(var.getName()) ; \n\t\t\tdp.setType(dt) ; \n\t\t\tporttype.getDataParameter().add(dp);\n\t\t}\n\t\tporttype.setName(Name);\n\t\tporttype.setModule(module);\n\t\treturn porttype;\n\t}", "@Override String opStr() { return \"var\"; }", "public Variable addVar(String n) {\n\t\t//System.out.println(\"SymbolTable addVar \" + n);\n\t\tNameSSA ssa = name.get(n);\n\t\tif (ssa != null) {\n\t\t\tVariable lastRenaming = var.get(ssa.current());\n\t\t\tssa.next();\n\t\t\tVariable v;\n\t\t\tif (lastRenaming instanceof ArrayVariable)\n\t\t\t\tv= new ArrayVariable(ssa.current(), lastRenaming.type, ((ArrayVariable)lastRenaming).length(),lastRenaming.use);\n\t\t\telse\n\t\t\t\tv= new Variable(ssa.current(), lastRenaming.type, lastRenaming.use);\n\t\t\tv.setOld(lastRenaming.oldValue());\n\t\t\tvar.put(ssa.current(), v);\n\t\t\tif (VerboseLevel.DEBUG.mayPrint()) {\n\t\t\t\tSystem.out.println(\"SymbolTable.addVar: \" + v.name());\n\t\t\t}\n\t\t\treturn v;\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\t\t\n\t}", "@Override\n\tpublic IBasicObject getForCreateVar() {\n\t\treturn heldObj.getForCreateVar();\n\t}", "protected Element myVar(){\n\t\treturn el(\"bpws:variable\", new Node[]{\n\t\t\t\tattr(\"messageType\", \"nswomo:receiveMessage\"),\n\t\t\t\tattr(\"name\", VARNAME)\n\t\t});\n\t}", "@Override\r\n\tpublic void visitVariable(ExpVariable exp) {\r\n\t\tif (replaceVariables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = replaceVariables.get(exp.getVarname());\r\n\t\t\tgetAttributeClass(replaceVariables.get(exp.getVarname()).name());\r\n\r\n\t\t} else if (variables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = variables.get(exp.getVarname());\r\n\t\t\tif (collectionVariables.contains(exp.getVarname())) {\r\n\t\t\t\tset = true;\r\n\t\t\t}\r\n\t\t\tgetAttributeClass(exp.getVarname());\r\n\t\t} else if (exp.type().isTypeOfClass()) {\r\n\t\t\tIClass clazz = model.getClass(exp.type().shortName());\r\n\t\t\tTypeLiterals type = clazz.objectType();\r\n\t\t\ttype.addTypeLiteral(exp.getVarname());\r\n\t\t\tobject = type.getTypeLiteral(exp.getVarname());\r\n\t\t\tattributeClass = clazz;\r\n\t\t} else {\r\n\t\t\tthrow new TransformationException(\"No variable \" + exp.getVarname() + \".\");\r\n\t\t}\r\n\t}", "public ElementVariable getVariable() {\n\t\treturn variable;\n\t}", "public String getVariable() {\n return variable;\n }", "public GlobalVariable() {\n }", "public static ParameterExpression variable(Class type, String name) { throw Extensions.todo(); }", "public ExprVar(FEContext context, String name)\n {\n super(context);\n this.name = name;\n }", "public ValorVariavel() {\r\n }", "public interface Variable<T> {\n /*\n Get type of the object\n */\n Class<T> getType();\n\n /*\n Returns the data based of what it got previously\n */\n T get(GlobalVariableMap globalVariableMap);\n\n default T getWithTiming(GlobalVariableMap globalVariableMap) {\n long start = System.currentTimeMillis();\n T t = get(globalVariableMap);\n System.out.println(\"Variable GET done took (\" + (System.currentTimeMillis() - start) + \"ms) value: \" + t);\n return t;\n }\n}", "public IdentificationVariableStateObject(StateObject parent, String variable) {\n\t\tsuper(parent, variable);\n\t}", "public static ParameterExpression variable(Class type) { throw Extensions.todo(); }", "public void setVariable(Variable variable) {\n this.variable = variable;\n }", "public Variable add(Variable v) throws IllegalArgumentException {\r\n\t\tif (!variables.contains(v)) {\r\n\t\t\tif (v.getIndex() >= 0) {\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t\t}\r\n\t\t\tv.setIndex(variables.size());\r\n\t\t\tvariables.add(v);\r\n\t\t}\r\n\t\treturn v;\r\n\t}", "@Override\n\tpublic Data getDataModelVariables() {\n\t\treturn new Data();\n\t}", "public String visit(VarDeclaration n, String ourclass) {\n String type, name;\n type = n.f0.accept(this, null);\n name = n.f1.accept(this, null);\n if(!ourclass.contains(\" \")){ //class members variables\n vcounter ++;\n integer++;\n variable x = new variable(type, name, vcounter, integer);\n ClassMembers cm = st.cmgetST(ourclass);\n if(cm.checkSameVar(x)){\n System.out.println(\"Variable already exists\");\n return null;\n }\n cm.var.add(x);\n st.cmputST(ourclass, cm);\n }\n else{ //method's variables\n integer++;\n variable x = new variable(type, name, integer);\n String[] parts = ourclass.split(\" \");\n String classname = parts[0]; \n String methodname = parts[1];\n ClassMembers cm=st.cmgetST(classname);\n Method m=cm.meth.get(methodname);\n m.localvars.add(x);\n cm.meth.put(methodname, m);\n st.cmputST(classname, cm);\n }\n return null; \n }" ]
[ "0.8195601", "0.8195601", "0.7372565", "0.73587966", "0.719862", "0.71694314", "0.70412064", "0.7034903", "0.6970744", "0.6940322", "0.6857108", "0.68048865", "0.67866296", "0.67194444", "0.66995656", "0.6631252", "0.6608376", "0.6584358", "0.6583322", "0.6579213", "0.6569157", "0.65651715", "0.6472515", "0.6470117", "0.63714755", "0.6345662", "0.6336921", "0.6288908", "0.62688756", "0.6224033", "0.619498", "0.61304694", "0.60916144", "0.60765594", "0.6049068", "0.60455906", "0.60263836", "0.6006082", "0.6006071", "0.59726393", "0.59659743", "0.5965701", "0.596241", "0.5958935", "0.5949353", "0.5947241", "0.591077", "0.5896107", "0.5891086", "0.5891004", "0.5869061", "0.58486027", "0.5845945", "0.5839894", "0.5824025", "0.58184433", "0.5812464", "0.5811282", "0.58013684", "0.5797685", "0.5796998", "0.5790847", "0.5750404", "0.5744857", "0.5694395", "0.56834877", "0.56828403", "0.56446", "0.5642774", "0.5629332", "0.5624532", "0.56181365", "0.55803657", "0.55746144", "0.5573293", "0.5563895", "0.55513024", "0.55271816", "0.5513122", "0.5504843", "0.55021423", "0.5488598", "0.5473588", "0.5469314", "0.54670644", "0.5458239", "0.54565674", "0.5454836", "0.5449394", "0.5444303", "0.5397875", "0.53917646", "0.53802836", "0.53725713", "0.53631836", "0.5356912", "0.53546184", "0.53534025", "0.53510886", "0.53425604" ]
0.7152058
6
Returns a new object of class 'Variable Exp'.
<C, PM> VariableExp<C, PM> createVariableExp();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "VariableExp createVariableExp();", "Variable createVariable();", "Variable createVariable();", "public VariableIF createVariable(VariableDecl decl);", "DynamicVariable createDynamicVariable();", "public Variable(String name) {\n this.name = name;\n checkRep();\n }", "public static Expression var(String var) {\n if (var.equals(\"e\")) {\n throw new RuntimeException(\"Variable can't be named e.\");\n }\n\n return new Variable(var);\n }", "public Code visitVariableNode(ExpNode.VariableNode node) {\n beginGen(\"Variable\");\n SymEntry.VarEntry var = node.getVariable();\n Code code = new Code();\n code.genMemRef(staticLevel - var.getLevel(), var.getOffset());\n endGen(\"Variable\");\n return code;\n }", "VarAssignment createVarAssignment();", "public static Variable variable( String name )\n {\n NullArgumentException.validateNotNull( \"Variable name\", name );\n return new Variable( name );\n }", "<C, PM> Variable<C, PM> createVariable();", "public Variable(String name){\n this.name = name;\n }", "public Variable(String name) {\r\n\tthis.name = name;\r\n }", "public Variable(){\n name = \"\";\n initialValue = 0;\n }", "static Pool newVariablePool() {\n return new VariablePool();\n }", "VariableRef createVariableRef();", "public Variable(String name) {\r\n\t\tName = name;\r\n\t\tValues = new ArrayList<>();\r\n\t\tParents = new ArrayList<>();\r\n\t\tCPT = new TreeMap<>();\r\n\t}", "public IAspectVariable<V> createNewVariable(PartTarget target);", "@Override\r\n\tpublic void visitVariable(ExpVariable exp) {\r\n\t\tif (replaceVariables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = replaceVariables.get(exp.getVarname());\r\n\t\t\tgetAttributeClass(replaceVariables.get(exp.getVarname()).name());\r\n\r\n\t\t} else if (variables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = variables.get(exp.getVarname());\r\n\t\t\tif (collectionVariables.contains(exp.getVarname())) {\r\n\t\t\t\tset = true;\r\n\t\t\t}\r\n\t\t\tgetAttributeClass(exp.getVarname());\r\n\t\t} else if (exp.type().isTypeOfClass()) {\r\n\t\t\tIClass clazz = model.getClass(exp.type().shortName());\r\n\t\t\tTypeLiterals type = clazz.objectType();\r\n\t\t\ttype.addTypeLiteral(exp.getVarname());\r\n\t\t\tobject = type.getTypeLiteral(exp.getVarname());\r\n\t\t\tattributeClass = clazz;\r\n\t\t} else {\r\n\t\t\tthrow new TransformationException(\"No variable \" + exp.getVarname() + \".\");\r\n\t\t}\r\n\t}", "VariableDeclaration createVariableDeclaration();", "Variables createVariables();", "Variable(Object names[]) {\n _vname = makeName(names).intern();\n _names = names;\n \n }", "public Variable getVariable(String name);", "VarReference createVarReference();", "public Variable(int power, char notation){\n\t\tthis.power = power;\n\t\tthis.notation = notation;\n\t}", "public interface IVariable<A extends AbstractDomain<?>> extends IReferenceHolder<A>, ITerm {\n\n\t@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic default Set<IVariable<?>> getVariables() {\n\t\tSet<IVariable<?>> values = new HashSet<>();\n\t\tvalues.add((IVariable<AbstractDomain<?>>) this);\n\t\treturn values;\n\t}\n\n\t/**\n\t * Lets the visitor visit the variable.\n\t * \n\t * @param IVariableVisitor\n\t * The visitor.\n\t */\n\tpublic void processWith(IVariableVisitor iVariableVisitor);\n\n\t/**\n\t * Returns whether it is a constant.\n\t * \n\t * @return Whether it is a constant.\n\t */\n\tpublic boolean isConstant();\n}", "Variable(String _var) {\n this._var = _var;\n }", "LetExp createLetExp();", "public ActRuVariable() {\n this(DSL.name(\"act_ru_variable\"), null);\n }", "Aliasing getVariable();", "public ExprVar(FEContext context, String name)\n {\n super(context);\n this.name = name;\n }", "@Override\n\tprotected String getVariableClassName() {\n\t\treturn \"variable\";\n\t}", "public VariableNode(String attr)\n {\n this.name = attr;\n }", "private cat.footoredo.mx.ir.Variable ref (Entity entity) {\n return new cat.footoredo.mx.ir.Variable(varType(entity.getType()), entity);\n }", "public Var(String var) {\r\n this.variable = var;\r\n }", "public interface TeaVariable extends TeaNamedElement {\n boolean hasInitializer();\n TeaExpression getInitializer();\n void setInitializer(TeaExpression expr) throws IncorrectOperationException;\n TeaType getType();\n// boolean isConst();\n ASTNode findNameIdentifier();\n\n TeaReferenceExpression findNameExpression();\n}", "@Override String opStr() { return \"var\"; }", "public Variable(String variableName) {\n super(null);\n this.variableName = variableName;\n }", "public VariableNode(String name) {\n\t\tthis.name = name;\n\t}", "public ElementVariable(String name) {\r\n\t\tsuper();\r\n\t\tthis.name = name;\r\n\t}", "public abstract IDecisionVariable getVariable();", "public Variable createVariable(String name, int offset, DataType dataType, SourceType source)\n\t\t\tthrows DuplicateNameException, InvalidInputException;", "public VariablePrimitive(String nom) {\n\t\tsuper(nom, true);\n\t}", "public IVariable createInternalVariable(String name, IJavaType referencType) {\n IVariable var = new InterpreterVariable(name, referencType, fContext.getVM());\n fInternalVariables.put(name, var);\n return var;\n }", "public Variable(String name, int initialValue){\n this.name = name;\n this.initialValue = initialValue;\n }", "public Variables(String name, VariablesHistory VH) {\n this.name = name;\n this.VH = VH;\n }", "Expression createExpression();", "private Stmt varDeclaration() {\n Token name = consume(IDENTIFIER, \"Expect variable name.\");\n Expr initializer = null;\n // Parse the initializer if an '=' is present. This branching allows initialization without declaration.\n if(match(EQUAL)) {\n initializer = expression();\n }\n\n consumeSemi(\"Expect ';' after variable declaration.\");\n return new Stmt.Var(name, initializer);\n }", "ControlVariable createControlVariable();", "AliasVariable createAliasVariable();", "public Expression differentiate(String var) {\r\n // var might be a differentiate of other variable\r\n if (!this.toString().equalsIgnoreCase(var)) {\r\n return (Expression) new Num(0);\r\n }\r\n return (Expression) new Num(1);\r\n\r\n }", "public static MethodModel.Variable createVariable(CompilationController controller, VariableElement variableElement) {\n Parameters.notNull(\"controller\", controller); //NOI18N\n Parameters.notNull(\"variableElement\", variableElement); //NOI18N\n return MethodModel.Variable.create(\n getTypeName(variableElement.asType()),\n variableElement.getSimpleName().toString(),\n variableElement.getModifiers().contains(Modifier.FINAL)\n );\n }", "public Element compileVarDec() {\n\t\tElement ele = null;\n\t\tString type;\n\t\tString token, tokenType;\n\n\t\tElement varDecParent = document.createElement(\"varDec\");\n\n\t\t// \"var\"\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tvarDecParent.appendChild(ele);\n\n\t\t// The type of the var\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\ttype = token;\n\t\tele = createXMLnode(tokenType);\n\t\tvarDecParent.appendChild(ele);\n\n\t\t// The variable identifiers themselves until ;\n\n\t\twhile (!token.equals(\";\")) {\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tvarDecParent.appendChild(ele);\n\t\t\tif (!token.equals(\",\") && !token.equals(\";\")) {\n\t\t\t\t// Adding the variables to the symboltable\n\t\t\t\tsymTable.define(token, type, \"local\");\n\t\t\t}\n\t\t}\n\n\t\treturn varDecParent;\n\n\t}", "public AbstractVariable getVariable () {\n try {\n RemoteStackVariable rsv = thread.getCurrentFrame ().getLocalVariable (\"this\"); // NOI18N\n return new ToolsVariable (\n (ToolsDebugger) getDebugger (),\n rsv.getName (),\n rsv.getValue (),\n rsv.getType ().toString ()\n );\n } catch (Exception e) {\n return null;\n }\n }", "Expression() { }", "Expression getExp();", "public static Variable in(Object byValue) {\n\t\treturn new Variable(byValue);\n\t}", "public static ParameterExpression variable(Class type, String name) { throw Extensions.todo(); }", "<C, PM> LetExp<C, PM> createLetExp();", "ExpOperand createExpOperand();", "public Value( String inName, Variable inVar, int inIndex )\n {\n _var = inVar;\n _name = inName;\n _index = inIndex;\n }", "Node getVariable();", "@Override\n public CodeFragment visitVarDecStat(AlangParser.VarDecStatContext ctx) {\n String name = ctx.ID().getText();\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n\n String reg = this.generateNewRegister(true);\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n\n int arity = ctx.index_to_global_array().size();\n v.setArity(arity);\n if (arity > 0) {\n v.setGlobalArray();\n }\n\n for (int i = 0; i < arity; i++) {\n v.addLevel(Integer.valueOf(ctx.index_to_global_array(i).INT().getText()));\n }\n\n this.globals.put(name, v);\n\n return new CodeFragment(\"\");\n }", "public Object accept(FEVisitor v)\n {\n return v.visitExprVar(this);\n }", "Exp\ngetExp1();", "public FunctionVariable (Object names[])\n {\n super(names);\n }", "public T caseExpresionVar(ExpresionVar object)\n {\n return null;\n }", "public VariableMeta getMeta();", "@Override\r\n\tpublic void visit(VariableExpression variableExpression) {\n\r\n\t}", "public Object visitExpVar(ExpVar exp, Object arg)\n\tthrows Exception\n {\n\tEnvironment env = (Environment) arg;\n\tint val = env.get(exp.getVar());\n\treturn new Integer(val);\n }", "public static ParameterExpression variable(Class type) { throw Extensions.todo(); }", "@Override\n public CodeFragment visitBlockVarDec(AlangParser.BlockVarDecContext ctx) {\n String name = ctx.ID().getText();\n\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n int arity = ctx.index_to_array().size();\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n String reg = this.generateNewRegister(false);\n\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n v.setArity(arity);\n this.vars.get(this.scope).put(name, v);\n\n CodeFragment result = new CodeFragment();\n result.setRegister(reg);\n if (llvmvartype.equals(Types.LLVMZNAK))\n result.setCharRegister();\n\n if (arity > 0) {\n /* alloca n-dimensional array[a1]...[an] on stack with size a1*a2*...*an */\n v.setLocalArray();\n String prevreg = this.generateNewRegister(false);\n String newreg;\n result.addCode(String.format(\"%s = add i32 0, 1\\n\", prevreg));\n for (int i = 0; i < arity; i++) {\n CodeFragment exp = visit(ctx.index_to_array(i).expression());\n result.addCode(exp);\n v.addLevelReg(exp.getRegister());\n\n newreg = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = mul i32 %s, %s\\n\", newreg, prevreg, exp.getRegister()));\n prevreg = newreg;\n }\n result.addCode(String.format(\"%s = alloca %s, i32 %s\\n\", reg, llvmvartype, prevreg));\n return result;\n }\n\n return this.generateNewDeclaration(reg, v.getLLVMDeclareType());\n }", "Var getVar();", "Exp\ngetExp2();", "public VarType createVariable(String id, String value, int order) {\n\t\tVarType var = mappingFactory.createVarType();\n\t\tvar.setId(id);\n\t\tvar.setValue(value);\n\t\tvar.setOrder(order);\n\t\treturn var;\n\t}", "private Symbol.VariableSymbol varSymFromString(String name, String type) {\n Symbol.TypeSymbol typeSymbol = TypeUtils.typeFromStr(type);\n return new Symbol.VariableSymbol(name, typeSymbol);\n }", "static Obj NewObj (String name,int kind) {\r\n\t\tObj p, obj = new Obj();\r\n obj.name = new String(name); \r\n\t\tobj.type = null; obj.kind = kind;\r\n\t\tobj.level = curLevel;\r\n\t\tp = topScope.locals;\r\n\t\t/*Para buscar si el nb de la variable nueva ya esta!!!*/\r\n\t\twhile (p != null) { \r\n \t \tif (p.name.equals(name)) Parser.SemError(1);\r\n\t\t\tp = p.next;\r\n\t\t}\r\n \t//FILO!!\r\n obj.next = topScope.locals; \r\n\t\ttopScope.locals = obj;\r\n \t//if (kind == vars) {}\r\n \t//obj.adr = topScope.nextAdr; topScope.nextAdr++;\r\n \t//obj.view();\r\n\t\treturn obj;\r\n }", "public ActRuVariable(Name alias) {\n this(alias, ACT_RU_VARIABLE);\n }", "public Variable(String name,List<String> Values,List<Variable> Parents) {\r\n\t\tthis(name,Values,Parents,new TreeMap<>());\r\n\t}", "public String visit(VarDeclaration n, String ourclass) {\n String type, name;\n type = n.f0.accept(this, null);\n name = n.f1.accept(this, null);\n if(!ourclass.contains(\" \")){ //class members variables\n vcounter ++;\n integer++;\n variable x = new variable(type, name, vcounter, integer);\n ClassMembers cm = st.cmgetST(ourclass);\n if(cm.checkSameVar(x)){\n System.out.println(\"Variable already exists\");\n return null;\n }\n cm.var.add(x);\n st.cmputST(ourclass, cm);\n }\n else{ //method's variables\n integer++;\n variable x = new variable(type, name, integer);\n String[] parts = ourclass.split(\" \");\n String classname = parts[0]; \n String methodname = parts[1];\n ClassMembers cm=st.cmgetST(classname);\n Method m=cm.meth.get(methodname);\n m.localvars.add(x);\n cm.meth.put(methodname, m);\n st.cmputST(classname, cm);\n }\n return null; \n }", "public Variable addVar(String n) {\n\t\t//System.out.println(\"SymbolTable addVar \" + n);\n\t\tNameSSA ssa = name.get(n);\n\t\tif (ssa != null) {\n\t\t\tVariable lastRenaming = var.get(ssa.current());\n\t\t\tssa.next();\n\t\t\tVariable v;\n\t\t\tif (lastRenaming instanceof ArrayVariable)\n\t\t\t\tv= new ArrayVariable(ssa.current(), lastRenaming.type, ((ArrayVariable)lastRenaming).length(),lastRenaming.use);\n\t\t\telse\n\t\t\t\tv= new Variable(ssa.current(), lastRenaming.type, lastRenaming.use);\n\t\t\tv.setOld(lastRenaming.oldValue());\n\t\t\tvar.put(ssa.current(), v);\n\t\t\tif (VerboseLevel.DEBUG.mayPrint()) {\n\t\t\t\tSystem.out.println(\"SymbolTable.addVar: \" + v.name());\n\t\t\t}\n\t\t\treturn v;\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\t\t\n\t}", "@Override\n\tpublic Expr visit(VarExpr e) {\n\t\treturn e;\n\t}", "VarRef createVarRef();", "public Expression asExpression() {\n switch (TYPE) {\n case EXPRESSION:\n return EXPRESSION;\n case IDENTIFIER:\n return new Variable(VALUE);\n case LITERAL:\n if (VALUE.matches(\"\\\\d+\")) {\n return new LInteger(Integer.parseInt(VALUE));\n } else if (VALUE.equals(\"true\") || VALUE.equals(\"false\")) {\n return LBoolean.resolve(VALUE.equals(\"true\"));\n } else if (VALUE.equals(\"null\")) {\n return LNull.NULL;\n } else {\n return new LString(VALUE);\n }\n default:\n throw ErrorLog.get(\"Unexpected symbol '%s'\", VALUE);\n }\n }", "public Expression assign(String var, Expression expression) {\r\n // if this variable is val no meter if is capital or small letter.\r\n if (this.variable.equalsIgnoreCase(var)) {\r\n return expression;\r\n }\r\n return this;\r\n }", "public Variable(String s, String in, String nom, int a, int b) {\n ident=new String(s);\n internal=new String(in);\n if (nom!=null) {name=new String(nom);} else {name=\"(Variable interne)\";}\n lowbound=a;\n highbound=b;\n noccur=0;\n \n \n }", "public Expression differentiate(String var) {\n Expression sin = new Sin(this.getExp());\n Expression diff = this.getExp().differentiate(var);\n diff = new Neg(diff);\n Expression e = new Mult(diff, sin);\n return e;\n }", "protected Variable(final CharSequence name, final Term scope) {\n super(); \n setScope(scope, name);\n }", "public IExpressionValue getUserDefinedVariable(String key);", "protected IDecisionVariable getVariable() {\n return variable;\n }", "public Potential addVariable(Node var) {\n \n return (Potential)(new CaseListOutMem());\n}", "public IVariable getVariable(Integer id) {\n return null;\n }", "private ELOperandToken readVarToken() {\r\n \t\tfState = STATE_VAR;\r\n \t\tint endOfToken = index;\r\n \t\tint ch;\r\n \t\tint type = ELOperandToken.EL_PROPERTY_NAME_TOKEN;\r\n \t\twhile((ch = readCharBackward()) != -1) {\r\n \t\t\tif (!Character.isJavaIdentifierPart(ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), type) : ELOperandToken.EOF);\r\n \t\t\t}\r\n \t\t}\r\n \t\treleaseChar();\r\n \t\treturn (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), type) : ELOperandToken.EOF);\r\n \t}", "public IVariable getVariable(int index) {\n return null;\n }", "public Variable add(Variable v) throws IllegalArgumentException {\r\n\t\tif (!variables.contains(v)) {\r\n\t\t\tif (v.getIndex() >= 0) {\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t\t}\r\n\t\t\tv.setIndex(variables.size());\r\n\t\t\tvariables.add(v);\r\n\t\t}\r\n\t\treturn v;\r\n\t}", "ElementVariable(IntVar index, IntVar[] list, IntVar value) {\n\n\t\tthis(index, list, value, 0);\n\n\t}", "public interface ExpressionsFactory {\n\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tExpressionsFactory INSTANCE = org.dresdenocl.essentialocl.expressions.impl.ExpressionsFactoryImpl.eINSTANCE;\n\n\t/**\n\t * Returns a new object of class '<em>Variable Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Variable Exp</em>'.\n\t * @generated\n\t */\n\tVariableExp createVariableExp();\n\n\t/**\n\t * Returns a new object of class '<em>Variable</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Variable</em>'.\n\t * @generated\n\t */\n\tVariable createVariable();\n\n\t/**\n\t * Returns a new object of class '<em>Unlimited Natural Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Unlimited Natural Exp</em>'.\n\t * @generated\n\t */\n\tUnlimitedNaturalExp createUnlimitedNaturalExp();\n\n\t/**\n\t * Returns a new object of class '<em>Type Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Type Literal Exp</em>'.\n\t * @generated\n\t */\n\tTypeLiteralExp createTypeLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Tuple Literal Part</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Tuple Literal Part</em>'.\n\t * @generated\n\t */\n\tTupleLiteralPart createTupleLiteralPart();\n\n\t/**\n\t * Returns a new object of class '<em>Tuple Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Tuple Literal Exp</em>'.\n\t * @generated\n\t */\n\tTupleLiteralExp createTupleLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>String Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>String Literal Exp</em>'.\n\t * @generated\n\t */\n\tStringLiteralExp createStringLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Real Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Real Literal Exp</em>'.\n\t * @generated\n\t */\n\tRealLiteralExp createRealLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Property Call Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Property Call Exp</em>'.\n\t * @generated\n\t */\n\tPropertyCallExp createPropertyCallExp();\n\n\t/**\n\t * Returns a new object of class '<em>Operation Call Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Operation Call Exp</em>'.\n\t * @generated\n\t */\n\tOperationCallExp createOperationCallExp();\n\n\t/**\n\t * Returns a new object of class '<em>Undefined Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Undefined Literal Exp</em>'.\n\t * @generated\n\t */\n\tUndefinedLiteralExp createUndefinedLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Let Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Let Exp</em>'.\n\t * @generated\n\t */\n\tLetExp createLetExp();\n\n\t/**\n\t * Returns a new object of class '<em>Iterator Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Iterator Exp</em>'.\n\t * @generated\n\t */\n\tIteratorExp createIteratorExp();\n\n\t/**\n\t * Returns a new object of class '<em>Iterate Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Iterate Exp</em>'.\n\t * @generated\n\t */\n\tIterateExp createIterateExp();\n\n\t/**\n\t * Returns a new object of class '<em>Invalid Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Invalid Literal Exp</em>'.\n\t * @generated\n\t */\n\tInvalidLiteralExp createInvalidLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Integer Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Integer Literal Exp</em>'.\n\t * @generated\n\t */\n\tIntegerLiteralExp createIntegerLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>If Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>If Exp</em>'.\n\t * @generated\n\t */\n\tIfExp createIfExp();\n\n\t/**\n\t * Returns a new object of class '<em>Boolean Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Boolean Literal Exp</em>'.\n\t * @generated\n\t */\n\tBooleanLiteralExp createBooleanLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Collection Item</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Collection Item</em>'.\n\t * @generated\n\t */\n\tCollectionItem createCollectionItem();\n\n\t/**\n\t * Returns a new object of class '<em>Collection Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Collection Literal Exp</em>'.\n\t * @generated\n\t */\n\tCollectionLiteralExp createCollectionLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Collection Range</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Collection Range</em>'.\n\t * @generated\n\t */\n\tCollectionRange createCollectionRange();\n\n\t/**\n\t * Returns a new object of class '<em>Enum Literal Exp</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Enum Literal Exp</em>'.\n\t * @generated\n\t */\n\tEnumLiteralExp createEnumLiteralExp();\n\n\t/**\n\t * Returns a new object of class '<em>Expression In Ocl</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Expression In Ocl</em>'.\n\t * @generated\n\t */\n\tExpressionInOcl createExpressionInOcl();\n\n}", "public Variable getVariable() {\r\n\t\tObject ob = elementAt(0);\r\n\t\tif (size() == 1 && ob instanceof Variable) {\r\n\t\t\treturn (Variable) ob;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "VariableCell createVariableCell();", "public static Variable in(String byTypeURI) {\n\t\treturn new Variable(byTypeURI);\n\t}" ]
[ "0.8673026", "0.739172", "0.739172", "0.73762023", "0.67135465", "0.66741234", "0.66262686", "0.6558778", "0.65377194", "0.6522472", "0.64558434", "0.63823074", "0.63427174", "0.6313478", "0.6245341", "0.62088454", "0.61604893", "0.6133455", "0.6131269", "0.6060477", "0.60561544", "0.6039929", "0.60363954", "0.60350996", "0.6030324", "0.60109264", "0.6008021", "0.60032934", "0.5980556", "0.59639233", "0.5949071", "0.59211993", "0.59196717", "0.5878959", "0.5867507", "0.5862442", "0.58417857", "0.5826845", "0.58208555", "0.57805794", "0.5767665", "0.57603973", "0.57586116", "0.5755589", "0.5727699", "0.572284", "0.56981045", "0.5694654", "0.5690317", "0.56896734", "0.56879187", "0.5682579", "0.56231195", "0.56039995", "0.5570606", "0.5556567", "0.5555064", "0.55464834", "0.55380833", "0.5533528", "0.5529468", "0.5527343", "0.5520887", "0.55105686", "0.5490926", "0.54798627", "0.54772186", "0.5470358", "0.54686767", "0.5467544", "0.5460376", "0.5455941", "0.54528236", "0.54416025", "0.54394877", "0.5434294", "0.54330033", "0.5416187", "0.54114646", "0.54106104", "0.5395708", "0.5394389", "0.53889376", "0.5385785", "0.5384983", "0.5384416", "0.53758955", "0.5373572", "0.5368728", "0.5367886", "0.535827", "0.5356976", "0.53562754", "0.5343793", "0.5331874", "0.53243697", "0.53154874", "0.53057086", "0.5297394", "0.52962464" ]
0.7973473
1
Returns the package supported by this factory.
ExpressionsPackage getExpressionsPackage();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PackageType getRequiredPackage();", "public PackageNode getPackage();", "java.lang.String getPackage();", "public String getPackageName();", "public String getPackageName() {\n return pkg;\n }", "String getPackageName();", "public DsByteString getPackage() {\n return m_strPackage;\n }", "java.lang.String getPackageName();", "public String getPackageName() {\n\t\treturn pkgField.getText();\n\t}", "private static String getPackage() {\n\t\tPackage pkg = EnergyNet.class.getPackage();\n\n\t\tif (pkg != null) {\n\t\t\tString packageName = pkg.getName();\n\n\t\t\treturn packageName.substring(0, packageName.length() - \".api.energy\".length());\n\t\t}\n\n\t\treturn \"ic2\";\n\t}", "io.deniffel.dsl.useCase.useCase.Package getPackage();", "public String getPackageInfomartion() {\n\t\treturn packageInfomartion;\n\t}", "protected abstract String getPackageName();", "default String getPackageName() {\n return declaringType().getPackageName();\n }", "public String getPackageName() {\n return packageName.get();\n }", "String getPackager();", "public Short getPackageType() {\n\t\treturn packageType;\n\t}", "public static String getPackageName() {\n return CELibHelper.sPackageName;\n }", "String getPackage() {\n return mPackage;\n }", "public String getBasePackage() {\n\t\treturn this.basePackage;\n\t}", "String pkg();", "public static String getPackageName() {\n return mPackageName;\n }", "public String getAppPackage() {\n\t\treturn fnh.getOutputAppPackage();\n\t}", "public abstract String getTargetPackage();", "public abstract String getTargetPackage();", "public java.lang.Boolean getServicePackageInfoSupported() {\r\n return servicePackageInfoSupported;\r\n }", "EisPackage getEisPackage();", "private String getPkgName () {\n return context.getPackageName();\n }", "@NonNull\n RepoPackage getPackage();", "public UMLPackageBean getPackage() {\n return umlPkg;\n }", "public String getPackagedJava();", "public String getPackageName() {\n return packageName;\n }", "public String getPackageName() {\n return packageName;\n }", "PiviPackage getPiviPackage();", "public Package.Builder getBuilder() {\n return pkgBuilder;\n }", "public String getPackageName() {\n\t\treturn this.PackageName;\n\t}", "public String getPackaging();", "public String getPackageName() {\n\t\treturn packageName;\n\t}", "public String getPackage() {\n return carrierPackage;\n }", "public abstract String packageName();", "PackageConfiguration getPackageConfiguration();", "protected final Product getProduct() {\n Product.Builder product = new Product.Builder()\n .implementationTitle(getClass())\n .implementationVersion(getClass());\n Optional.ofNullable(getClass().getPackage())\n .flatMap(p -> Optional.ofNullable(p.getSpecificationVersion()))\n .map(specVersion -> \"(specification \" + specVersion + \")\")\n .ifPresent(product::comment);\n return product.build();\n }", "public String getPackageName() {\n JavaType.FullyQualified fq = TypeUtils.asFullyQualified(qualid.getType());\n if (fq != null) {\n return fq.getPackageName();\n }\n String typeName = getTypeName();\n int lastDot = typeName.lastIndexOf('.');\n return lastDot < 0 ? \"\" : typeName.substring(0, lastDot);\n }", "public PersistedBmmPackage getPackage(String packageName) {\n return packages.get(packageName.toUpperCase());\n }", "public abstract String getAndroidPackage();", "NfrPackage getNfrPackage();", "@NonNull\n public String getPackageName() {\n return mPackageName;\n }", "public String getBasePackage() {\n\t\treturn DataStore.getInstance().getBasePackage();\n\t}", "public static String getBukkitPackage() {\n return Bukkit.getServer().getClass().getPackage().getName().split(\"\\\\.\")[3];\n }", "boolean hasPackageName();", "public String getPackageName() {\n Object ref = packageName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n packageName_ = s;\n }\n return s;\n }\n }", "ApiPackage getApiPackage();", "public String getPackageName() {\n final var lastDotIdx = name.lastIndexOf('.');\n\n if (lastDotIdx > 0) {\n return name.substring(0, lastDotIdx);\n } else {\n throw new CodeGenException(String.format(\"Couldn't determine package name of '%s'\", name));\n }\n }", "public String getPackageName() {\n if (mPackageName == null) {\n try {\n mPackageName = mSessionBinder.getPackageName();\n } catch (RemoteException e) {\n Log.d(TAG, \"Dead object in getPackageName.\", e);\n }\n }\n return mPackageName;\n }", "public String getPackageName() {\n Object ref = packageName_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n packageName_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "IrSpecificPackage getIrSpecificPackage();", "public String getPackages() {\n\t\treturn this.packages;\n\t}", "public String getPackageName() {\n return mAppEntry.info.packageName;\n }", "com.google.protobuf.ByteString\n getPackageBytes();", "public static String getCraftBukkitPackage() {\n \t\t// Ensure it has been initialized\n \t\tgetMinecraftPackage();\n \t\treturn CRAFTBUKKIT_PACKAGE;\n \t}", "NgtPackage getNgtPackage();", "public String getProductPack() {\n return (String)getAttributeInternal(PRODUCTPACK);\n }", "public String getModelPackageStr() {\n\t\tString thepackage = getModelXMLTagValue(\"package\");\n\t\treturn thepackage != null ? thepackage + \".\" : \"\";\n\t}", "VmPackage getVmPackage();", "String packageName() {\n return name;\n }", "private PackageService getPackageService() {\n\t\treturn packageService;\n\t}", "private Package_c getPackage(final String name) {\n\t\tPackage_c communication = Package_c.PackageInstance(modelRoot,\n\t\t\t\tnew ClassQueryInterface_c() {\n\n\t\t\t\t\tpublic boolean evaluate(Object candidate) {\n\t\t\t\t\t\tPackage_c selected = (Package_c) candidate;\n\t\t\t\t\t\treturn selected.getName().equals(name);\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\treturn communication;\n\t}", "ParkingPackage getParkingPackage();", "public int getWMCPackaged(){\r\n\t\t \r\n\t\treturn mccabe.getWMCPackage();\t\t\r\n\t}", "private BasePackage getPackageModel()\r\n {\r\n return packageCartService.getBasePackage();\r\n }", "PackageClause getPackageClause();", "NassishneidermanPackage getNassishneidermanPackage();", "public String getPackageDesc() {\n\t\treturn packageDesc;\n\t}", "public String getPkgId() {\n return pkgId;\n }", "public String getVersionsSupported();", "public static String getMinecraftPackage() {\n \t\t// Speed things up\n \t\tif (MINECRAFT_FULL_PACKAGE != null) {\n \t\t\treturn MINECRAFT_FULL_PACKAGE;\n \t\t}\n \n \t\tfinal Server craftServer = Bukkit.getServer();\n \n \t\t// This server should have a \"getHandle\" method that we can use\n \t\tif (craftServer != null) {\n \t\t\ttry {\n \t\t\t\tfinal Class<?> craftClass = craftServer.getClass();\n \t\t\t\tfinal Method getHandle = craftClass.getMethod(\"getHandle\");\n \n \t\t\t\tfinal Class<?> returnType = getHandle.getReturnType();\n \t\t\t\tfinal String returnName = returnType.getCanonicalName();\n \n \t\t\t\t// The return type will tell us the full package, regardless of\n \t\t\t\t// formating\n \t\t\t\tCRAFTBUKKIT_PACKAGE = getPackage(craftClass.getCanonicalName());\n \t\t\t\tMINECRAFT_FULL_PACKAGE = getPackage(returnName);\n \t\t\t\treturn MINECRAFT_FULL_PACKAGE;\n \n \t\t\t} catch (final SecurityException e) {\n \t\t\t\tthrow new RuntimeException(\n \t\t\t\t\t\t\"Security violation. Cannot get handle method.\", e);\n \t\t\t} catch (final NoSuchMethodException e) {\n \t\t\t\tthrow new IllegalStateException(\n \t\t\t\t\t\t\"Cannot find getHandle() method on server. Is this a modified CraftBukkit version?\",\n \t\t\t\t\t\te);\n \t\t\t}\n \n \t\t} else {\n \t\t\tthrow new IllegalStateException(\n \t\t\t\t\t\"Could not find Bukkit. Is it running?\");\n \t\t}\n \t}", "protected EPackage getEPackage() {\r\n return Wps10Package.eINSTANCE;\r\n }", "CommunicationsprogramsPackage getCommunicationsprogramsPackage();", "Shipment_Package getShipment_Package();", "TggPackage getTggPackage();", "List<String> getSystemPackages();", "public boolean isPackage()\n {\n ensureLoaded();\n return m_flags.isPackage();\n }", "public String getSupportedVersion() {\n return supportedVersion;\n }", "ICpPackInfo getPackInfo();", "TypePackage getTypePackage();", "public String getPackingType() {\n return (String)getAttributeInternal(PACKINGTYPE);\n }", "GramaticaPackage getGramaticaPackage();", "default String getPackageId() {\n return getIdentifier().getPackageId();\n }", "Quality_requirements_metamodelPackage getQuality_requirements_metamodelPackage();", "MatchModelPackage getMatchModelPackage();", "public String getProjectPackageName() {\n\t\treturn projectPackageName;\n\t}", "ICpPack getPack();", "public PackageName getRootPackageName() {\n return rootPackageName;\n }", "public GeoPackage getGeoPackage() {\n\t\treturn this.geoPackage;\n\t}", "ReactNativePackage getReactNativePackage();", "HiphopsPackage getHiphopsPackage();", "protected UMLPackage getUMLPackage() {\r\n return currentPackage;\r\n }", "MystPackage getMystPackage();", "public Short getPackageSeries() {\n\t\treturn packageSeries;\n\t}", "public String getPackageId()\n {\n return packageId;\n }", "ThingMLPackage getThingMLPackage();" ]
[ "0.7031596", "0.6824025", "0.6818806", "0.6752645", "0.67181015", "0.6704875", "0.6698022", "0.6678774", "0.6635858", "0.6556546", "0.65183675", "0.6501405", "0.6496429", "0.6481852", "0.6376274", "0.63505894", "0.6338929", "0.63388515", "0.6327788", "0.6314242", "0.63126606", "0.6282504", "0.6273947", "0.625018", "0.625018", "0.6246106", "0.6218379", "0.62113875", "0.61974704", "0.6187816", "0.6176801", "0.6166096", "0.6166096", "0.61538076", "0.61370236", "0.61311126", "0.6119505", "0.6110087", "0.6095738", "0.60568917", "0.60403836", "0.6006883", "0.5988912", "0.59846574", "0.5971428", "0.596663", "0.59435695", "0.59422004", "0.5939782", "0.5931478", "0.59234554", "0.59193766", "0.5917696", "0.5896124", "0.58916557", "0.5884717", "0.5883739", "0.5870814", "0.58519596", "0.584893", "0.58416474", "0.584001", "0.5839548", "0.5827061", "0.5818055", "0.58170223", "0.5803712", "0.5787864", "0.5782273", "0.5762003", "0.57582545", "0.575813", "0.5757836", "0.5753817", "0.5746635", "0.57362497", "0.57329035", "0.57273763", "0.57260066", "0.57190484", "0.57188034", "0.57182175", "0.57047856", "0.57030493", "0.5689773", "0.56865156", "0.56835216", "0.5674978", "0.56738055", "0.56653726", "0.56578237", "0.5646589", "0.56433535", "0.5642557", "0.563893", "0.5638249", "0.56340986", "0.563228", "0.56135017", "0.5610743", "0.5606374" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onFailure(Throwable caught) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void filterChange() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Make a new cell with given key, value, and parent, and with null child links, and BLACK color.
TreeMap_Entry(Object key, Object value, TreeMap_Entry parent/*F=this.F*/) { this.key = key; this.value = value; this.parent = parent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Node(int key, int val, String col){\n\t\t\tid = key;\n\t\t\tcount = val;\n\t\t\tcolour = col;\n\t\t\tleft = nil;\n\t\t\tright = nil;\n\t\t\tparent = nil;\n\t\t}", "private Node createNullLeaf(Node parent) {\n Node leaf = new Node();\n leaf.color = Color.BLACK;\n leaf.isNull = true;\n leaf.parent = parent;\n leaf.count = Integer.MAX_VALUE;\n leaf.ID = Integer.MAX_VALUE;\n return leaf;\n }", "private void emptyCell(Composite parent) {\n new Label(parent, SWT.NONE);\n }", "protected BinarySearchTree<K, V> makeBlack() {\n return new Node<K, V>(this.key, this.value, \n this.c, this.left, \n this.right, true);\n }", "public BNode(int key, int value) {\n this.key = key;\n this.value = value;\n this.left = null;\n this.right = null;\n this.next = null;\n this.height = 0;\n }", "public BNode(int key, int value, BNode next) {\n this.key = key;\n this.value = value;\n this.left = null;\n this.right = null;\n this.next = next;\n this.height = 0;\n }", "public Node(K key, V value) {// this is the constructor of a new Node\n\t\t\tmKey = key;// it takes as an arguments a key\n\t\t\tmValue = value;// and a value\n\t\t\tmParent = mSentinel;// and makes a nodw with no parent\n\t\t\tmLeft = mSentinel;// or children\n\t\t\tmright = mSentinel;// that stores the key and the value\n\t\t}", "public AvlNode(int key) {\n this.key=key;\n this.left=null;\n this.right=null;\n this.parent=null;\n this.height=0; \n }", "Node(K key, V value, java.util.Comparator<? super K> c, boolean black) {\n this.key = key;\n this.value = value;\n this.c = c;\n this.left = new EmptyNode<K, V>(c);\n this.right = new EmptyNode<K, V>(c);\n this.black = black;\n this.size = 1;\n }", "public Entry() \n { \n \tleft = right = parent = -1;\n }", "public Node(T value) {\n this.value = value;\n this.height = 0;\n this.leftChild = null;\n this.rightChild = null;\n this.parent = null;\n }", "public TreeNode(TreeNode parent, Object value)\r\n\t{\r\n\t\tm_parent = parent;\r\n\t\tm_value = value;\r\n\t}", "private Node createNode(EventPair ep, Color c, Node parent) {\n Node node = new Node();\n node.ID = ep.ID;\n node.count = ep.count;\n node.color = c;\n node.left = createNullLeaf(node);\n node.right = createNullLeaf(node);\n node.parent = parent;\n return node;\n }", "public Node(final Object key, final Object value) {\r\n this.k = new Object[]{key};\r\n this.v = new Object[]{value};\r\n this.c = null;\r\n this.kcount = 1;\r\n }", "public Cell(Object value, Cell link)\n { val = value; \n next = link;\n }", "Cell(int x, int y, Color color, boolean flooded) {\r\n this.x = x;\r\n this.y = y;\r\n this.color = color;\r\n this.flooded = flooded;\r\n this.left = null;\r\n this.top = null;\r\n this.right = null;\r\n this.bottom = null;\r\n }", "protected GridCell(int x, int y, GridDomain parent) {\n\t\tcoord = new GridCoord(x, y);\n\t\tthis.parent = parent;\n\t\tcelltype = GridCellType.getDefault();\n\t\tcellCost = celltype.cost;\n\t}", "@Override\n public void normalCell() {\n gCell.setFill(Color.BLACK);\n }", "public Cell gap(int x, int y, Cell parent) {\n return new Cell(Boolean.FALSE, x, y, parent, parent.globalScore - 1);\n }", "public Cell(final ByteBuffer key, final Value value, final long generation) {\n this.key = key;\n this.value = value;\n this.generation = generation;\n }", "public Node(char value) {\n this.value = value;\n this.left = null;\n this.right = null;\n }", "public Cell(T val)\n {\n _value = val;\n _visited = false;\n }", "public NonEmptyTree(K keyIn, V valueIn) {\n\t\tkey = keyIn;\n\t\tvalue = valueIn;\n\t\tleft = right = EmptyTree.getInstance();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n public LeafNode(Key key, Value value) {\r\n keys = (Key[])new Comparable[3]; \r\n values = (Value[])new Object[3];\r\n setKeyValuePairs(key,value);\r\n }", "private int padWithEmptyCells(Composite parent, int col) {\n for (; col < NUM_COL; ++col) {\n emptyCell(parent);\n }\n col = 0;\n return col;\n }", "void addCell(CellID cid, CellID parent){\n db.addCell(cid,parent);\n }", "public\n BaseGenerator\n (\n Comparable key, \n CellPolicy policy\n ) \n throws ParseException\n {\n if(key == null) \n throw new ParseException\n (\"The cell value cannot be (null)!\");\n pCellKey = key;\n\n if(policy == null) \n throw new ParseException\n (\"The key generator cannot be (null)!\"); \n pCellPolicy = policy;\n\n pChildren = new TreeMap<Comparable,BaseGenerator>(); \n }", "public Node(Key key, Value value) {\n\t this.key = key;\n\t this.value = value;\n }", "public AVLNode(IAVLNode parent) {\r\n\t\t\tthis.key = -1;\r\n\t\t\tthis.value = null;\r\n\t\t\tthis.height = -1;\r\n\t\t\tthis.parent = parent;\r\n\t\t\tthis.size = 0;\r\n\t\t\tthis.left = null;\r\n\t\t\tthis.right = null;\r\n\t\t}", "private HashNode() {\r\n key = null;\r\n value = null;\r\n }", "public BSTNode(K key) {\n this.key = key;\n this.left = null;\n this.right = null;\n this.height = 0;\n }", "Cell(int x, int y, Color color, boolean flooded, ACell left, ACell top, ACell right,\r\n ACell bottom) {\r\n this.x = x;\r\n this.y = y;\r\n this.color = color;\r\n this.flooded = flooded;\r\n this.left = left;\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n }", "public CreateRedBlackTree(int header) \n { \n this.header = new RedBlackNode(header); \n this.header.leftChild = nullNode; \n this.header.rightChild = nullNode; \n }", "public JdbTree(Hashtable value) {\r\n super(value);\r\n commonInit();\r\n }", "GroupCell createGroupCell();", "public RBNode<T, E> createRBNode(T key, E value) {\r\n\t\tRBNode<T, E> tempRBNode = new RBNode<T, E>(key, value, 'r');\r\n\t\treturn tempRBNode;\r\n\t}", "TreeNode(TreeNode<T> parent, T value) {\n this.parent = parent;\n this.value = value;\n }", "public Node(int row,int col,int value){\n this.row = row;\n this.col = col;\n this.value = value;\n this.north = null;\n this.south = null;\n this.east =null;\n this.west = null;\n this.visited = false;\n dfs_stack = new Stack<String>();\n exitPath = \" \";\n\n }", "private HashNode(KeyType key, ValueType value) {\r\n this.key = key;\r\n this.value = value;\r\n }", "@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}", "public Cell(){}", "public BstTable() {\n\t\tbst = new Empty<Key, Value>();\n\t}", "public TempTableHeaderCell (List<TempTableHeader> parents , boolean isAny, boolean isDefault, SSBNNode currentSSBNNode) {\r\n\t\t\tthis.parents = parents;\r\n\t\t\tthis.isAny = isAny;\r\n\t\t\tthis.isDefault = isDefault;\r\n\t\t\tthis.cellList = new ArrayList<TempTableProbabilityCell>();\r\n\t\t\tthis.validParentSetCount = 0;\r\n\t\t\tthis.currentSSBNNode = currentSSBNNode;\r\n\t\t\tthis.nestedIfs = new ArrayList<TempTableHeaderCell>();\r\n\t\t}", "private Node putHelper(Node n, K key, V value) {\n if (n == null) {\n n = new Node(key, value);\n } else if (key.compareTo(n.key) < 0) {\n n.leftChild = putHelper(n.leftChild, key, value);\n } else if (key.compareTo(n.key) > 0) {\n n.rightChild = putHelper(n.rightChild, key, value);\n }\n\n return n;\n }", "public HashNode(KeyType key, ValueType value) {\r\n this.key = key;\r\n this.value = value;\r\n }", "@Override HashMapEntry<K, V> constructorNewEntry(\n K key, V value, int hash, HashMapEntry<K, V> next) {\n LinkedEntry<K, V> header = this.header;\n LinkedEntry<K, V> oldTail = header.prv;\n LinkedEntry<K, V> newTail\n = new LinkedEntry<K,V>(key, value, hash, next, header, oldTail);\n return oldTail.nxt = header.prv = newTail;\n }", "@SuppressWarnings(\"unchecked\")\r\n private Node insertHelperSize1(Key key, Value value) {\r\n Node tmp;\r\n if(key.compareTo(keys[0]) < 0) { // add key:value before contents\r\n tmp = children[0].insert(key,value);\r\n if(tmp != children[0]) { // merge interior node that bubbled up\r\n InteriorNode merge = (InteriorNode)tmp;\r\n setKeyValuePairs(merge.keys[0],merge.values[0],keys[0],values[0]);\r\n setChildren(merge.children[0],merge.children[1],children[1]);\r\n }\r\n } else { // add key:value after contents\r\n tmp = children[1].insert(key,value);\r\n if(tmp != children[1]) { // merge interior node that bubbled up\r\n InteriorNode merge = (InteriorNode)tmp;\r\n setKeyValuePairs(keys[0],values[0],merge.keys[0],merge.values[0]);\r\n setChildren(children[0],merge.children[0],merge.children[1]);\r\n }\r\n }\r\n return this;\r\n }", "@Override\n public Cell getKeyValue() {\n Cell cell = ptSearcher.current();\n if (cell == null) {\n return null;\n }\n return new ClonedPrefixTreeCell(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength(),\n cell.getFamilyArray(), cell.getFamilyOffset(), cell.getFamilyLength(),\n cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength(),\n cell.getValueArray(), cell.getValueOffset(), cell.getValueLength(), cell.getTagsArray(),\n cell.getTagsOffset(), cell.getTagsLength(), cell.getTimestamp(), cell.getTypeByte(),\n cell.getSequenceId());\n }", "public void createCell(XSSFWorkbook xssfWorkbook, XSSFRow row,CellStyle cellStyle, String cellValue, int cellNum) {\n if (StringUtils.isNotBlank(cellValue)){\n XSSFCell cell = row.createCell(cellNum);\n cell.setCellValue(cellValue);\n cell.setCellStyle(cellStyle);\n }\n }", "abstract GridPane createEditDashBoard(String primaryKeyValue);", "public void insertNewNode(int newElement ) \n { \n current = parent = grand = header; //set header value to current, parent, and grand node \n nullNode.element = newElement; //set newElement to the element of the null node \n \n //repeat statements until the element of the current node will not equal to the value of the newElement \n while (current.element != newElement) \n { \n great = grand; \n grand = parent; \n parent = current; \n \n //if the value of the newElement is lesser than the current node element, the current node will point to the current left child else point to the current right child. \n current = newElement < current.element ? current.leftChild : current.rightChild; \n \n // Check whether both the children are RED or NOT. If both the children are RED change them by using handleColors() method \n if (current.leftChild.color == RED && current.rightChild.color == RED) \n handleColors( newElement ); \n } \n \n // insertion of the new node will be fail if will already present in the tree \n if (current != nullNode) \n return; \n \n //create a node having no left and right child and pass it to the current node \n current = new RedBlackNode(newElement, nullNode, nullNode); \n \n //connect the current node with the parent \n if (newElement < parent.element) \n parent.leftChild = current; \n else \n parent.rightChild = current; \n handleColors( newElement ); \n }", "private Node put(Node h, int key, PriorityQueue<Integer> val) {\n if (h == null)\n return new Node(key, val, RED, 1);\n\n int cmp = key - h.key;\n if (cmp < 0)\n h.left = put(h.left, key, val);\n else if (cmp > 0)\n h.right = put(h.right, key, val);\n else\n h.val = val;\n\n // fix-up any right-leaning links\n if (isRed(h.right) && !isRed(h.left))\n h = rotateLeft(h);\n if (isRed(h.left) && isRed(h.left.left))\n h = rotateRight(h);\n if (isRed(h.left) && isRed(h.right))\n flipColors(h);\n h.size = size(h.left) + size(h.right) + 1;\n\n return h;\n }", "public ValueCell(String c) {\n super(c);\n }", "void preOrderCell(BSTNode root, int x, int y, java.awt.Color col){\n\t\t\tif(root != null){\n\t\t\t\tcreateMyVertex(root.getKey(), x, y, col);\n\t\t\t\tif(root.getLeft() != null){\n\t\t\t\t\tpreOrderCell(root.getLeft(), (int) (x - getPreferredSize().width/Math.scalb(1, 1 + root.nodeLevel(root()))),\n\t\t\t\t\t\t\ty + deltaY, root.getLeft().getColor());\n\t\t\t\t\tinsertEdge(getDefaultPort(cells.get(root.getKey())),\n\t\t\t\t\t\t\tgetDefaultPort(cells.get(root.getLeft().getKey())));\t\n\t\t\t\t}else{\n\t\t\t\t\tcreateNullVertex((int) (x - getPreferredSize().width/Math.scalb(1, 1 + root.nodeLevel(root()))), y + deltaY, \n\t\t\t\t\t\t\tcells.get(root.getKey()) );\n\t\t\t\t}\n\t\t\t\tif(root.getRight() != null){\n\t\t\t\t\tpreOrderCell(root.getRight(), (int)(x + getPreferredSize().width/Math.scalb(1, 1 + root.nodeLevel(root()))), \n\t\t\t\t\t\t\ty + deltaY, root.getRight().getColor());\n\t\t\t\t\tinsertEdge(getDefaultPort((cells.get(root.getKey()))),\n\t\t\t\t\t\t\tgetDefaultPort(cells.get(root.getRight().getKey())));\n\t\t\t\t}else{\n\t\t\t\t\tcreateNullVertex((int) (x + getPreferredSize().width/Math.scalb(1, 1 + root.nodeLevel(root()))), y + deltaY, \n\t\t\t\t\t\t\tcells.get(root.getKey()) );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "static Node newNode(int key) \n{ \n\tNode node = new Node(); \n\tnode.left = node.right = null; \n\tnode.data = key; \n\treturn node; \n}", "@Override\n\tpublic Cell createCell(int arg0, int arg1) {\n\t\treturn null;\n\t}", "public NotebookCell() {}", "protected GridCell(int x, int y, GridDomain parent,\n\t\t\tGridCellType defaultterrain) {\n\t\tcoord = new GridCoord(x, y);\n\t\tthis.parent = parent;\n\t\tcelltype = defaultterrain;\n\t\tif (celltype == null) celltype = GridCellType.getDefault();\n\t\tcellCost = celltype.cost;\n\t}", "public Node insert(Key key, Value value) { \r\n // inserting into an empty tree results in a single value leaf node\r\n return new LeafNode(key,value);\r\n }", "@Override\n public void writeCell(String name, Object value, int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"<\"+name+\">\");\n if (value != null) {\n this.write(Val.escapeXml(value.toString()));\n }\n this.write(\"</\"+name+\">\");\n }", "MemberCell createMemberCell();", "public TempTableHeaderParent (ResidentNode parent , Entity value) {\r\n\t\t\tthis(parent, value, null);\r\n\t\t}", "public NodeData(int key) {\n this.key = key;\n this.neighborEdges = new HashMap<>();\n this.edgesConnectedToThisNode = new HashMap<>();\n this.weight = Double.MAX_VALUE;\n this.info = \"WHITE\";\n this.tag = -1;\n this.location = new Location(0, 0, 0);\n }", "protected TreeItem createBranch(Object value) {\r\n return createBranch(value, false);\r\n }", "public TreeNode(Object value)\r\n\t{\r\n\t\tthis(null, value);\r\n\t}", "@Override\n public AbstractViewHolder onCreateCellViewHolder(ViewGroup parent, int viewType) {\n return new CellViewHolder(mInflater.inflate(R.layout.table_view_cell_layout, parent, false));\n }", "@Override\n public ColorCell getCell(int row, int column) {\n List<Pair> pairs = prototypes.get(current).getSegments().get(0).getPairs();\n return new ColorCell(row, column, Color.BLUE, Collections.emptyList(), pairs);\n }", "private void makeInvalidNode(final Document doc) {\n Element element;\n\n // create INVALID-textnode in DOM tree\n element = doc.createElement(\"mi\");\n element.setAttribute(\"mathcolor\", \"#F00\");\n element.appendChild(doc.createTextNode(\"#\"));\n\n if (this.getNode().getParentNode() == null) {\n doc.replaceChild(element, this.getNode());\n } else {\n this.getNode().getParentNode()\n .replaceChild(element, this.getNode());\n }\n\n // remove bi-subtree\n this.setNode(element);\n this.child = null;\n this.invalid = true;\n }", "GridDataModel create(int parentRow, GridDataModel parentModel);", "public TableEntry(K key, V value) {\r\n\t\t\tObjects.requireNonNull(key);\r\n\r\n\t\t\tthis.key = key;\r\n\t\t\tthis.value = value;\r\n\t\t}", "public Node insert(Node n, int key, Object object) throws NodeAlreadyExists {\n if (n == null)\n return (new Node(key, null)); //TODO: Determine what type of object to keep\n else {\n if (n.getKey() == key)\n throw new NodeAlreadyExists();\n\n // Insertion\n if (key < n.getKey()) {\n n.setLeft(insert(n.getLeft(), key, object));\n n.getLeft().setParent(n);\n } //if\n else if (key > n.getKey()) {\n n.setRight(insert(n.getRight(), key, object));\n n.getRight().setParent(n);\n } //else-if\n else {\n return n;\n } //else\n } //else\n\n // Right child is RED but left child is BLACK or doesn't exist\n if(isRed(n.getRight()) && !isRed(n.getLeft())){\n n = leftRotate(n);\n swapColors(n, n.getLeft());\n } //if\n\n // Child and parent are REDs\n if(isRed(n.getLeft()) && isRed(n.getLeft().getLeft())){\n n = rightRotate(n);\n swapColors(n, n.getRight());\n } //if\n\n // Both childs are RED\n if(isRed(n.getLeft()) && isRed(n.getRight())){\n n.setColor(!n.isColor());\n n.getLeft().setColor(BLACK);\n n.getRight().setColor(BLACK);\n } //if\n\n root.setColor(BLACK);\n\n return n;\n }", "AttributeCell createAttributeCell();", "public ColorCell(String value, Color color) {\n\t\tsuper();\n\t\tthis.value = value;\n\t\tthis.color = color;\n\t}", "@Override\n\tpublic Component getTreeCellRendererComponent(JTree jtrProperties, Object value, boolean isSelected,\n\t\t\tboolean isExpanded, boolean leaf, int row, boolean hasFocus) {\n\t\tJLabel cell = (JLabel) super.getTreeCellRendererComponent(jtrProperties, value, isSelected, isExpanded, leaf,\n\t\t\t\trow, hasFocus);\n\t\tcell.setText(value.toString());\n\n\t\t// Get the correct icon for the node and set any tool tip text\n\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) value;\n\n\t\tImageIcon icon = null;\n\n\t\tif (node.getLevel() == 1) // Second level - keystore main properties and\n\t\t\t// \"keys\", \"key pairs\"\n\t\t\t// and \"trusted certificates\"\n\t\t{\n\t\t\tTreeNode parent = node.getParent();\n\t\t\tint index = parent.getIndex(node);\n\n\t\t\tif (index == 0) {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.File.image\")));\n\t\t\t} else if (index == 1) {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.Type.image\")));\n\t\t\t} else if (index == 2) {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.Provider.image\")));\n\t\t\t} else if (index == 3) {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.Keys.image\")));\n\t\t\t} else if (index == 4) {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.KeyPairs.image\")));\n\t\t\t} else if (index == 5) {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(\n\t\t\t\t\t\tres.getString(\"PropertiesTreeCellRend.TrustedCertificates.image\")));\n\t\t\t}\n\t\t} else if (node.getLevel() == 2) // Third level - entries\n\t\t{\n\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.Entry.image\")));\n\t\t} else if (node.getLevel() == 3) // Fourth level - includes private\n\t\t\t// keys, certificates of key\n\t\t\t// pairs, public keys of trusted\n\t\t\t// certificates and keys within\n\t\t\t// key entries of all types\n\t\t{\n\t\t\tif (value.toString().equals(res.getString(\"DProperties.properties.PrivateKey\"))) {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.PrivateKey.image\")));\n\t\t\t} else if (value.toString().equals(res.getString(\"DProperties.properties.Certificates\"))) {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.Certificates.image\")));\n\t\t\t} else if (value.toString().equals(res.getString(\"DProperties.properties.PublicKey\"))) {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.PublicKey.image\")));\n\t\t\t} else if (value.toString().equals(res.getString(\"DProperties.properties.SecretKey\"))) {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.SecretKey.image\")));\n\t\t\t}\n\t\t\t// Otherwise use default icon\n\t\t\telse {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.Default.image\")));\n\t\t\t}\n\t\t} else if (node.getLevel() == 5) // Sixth level - includes public keys\n\t\t\t// of key pair\n\t\t\t// certificates\n\t\t{\n\t\t\tif (value.toString().equals(res.getString(\"DProperties.properties.PublicKey\"))) {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.PublicKey.image\")));\n\t\t\t}\n\t\t\t// Otherwise use default icon\n\t\t\telse {\n\t\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.Default.image\")));\n\t\t\t}\n\t\t}\n\t\t// Otherwise use default icon\n\t\telse {\n\t\t\ticon = new ImageIcon(getClass().getResource(res.getString(\"PropertiesTreeCellRend.Default.image\")));\n\t\t}\n\n\t\tcell.setIcon(icon);\n\n\t\treturn cell;\n\t}", "public Node(int iData, double dData) {\r\n this.key = iData;\r\n this.dData = dData;\r\n this.leftChild = null;\r\n this.rightChild = null;\r\n this.parent = null;\r\n }", "public TriStateCellEditor(Composite parent) {\n\t\tthis(parent, defaultStyle);\n\t}", "private NodeTreeBinary<T> insert(NodeTreeBinary<T> h, T key) {\n\t\tif (h == null)\n\t\t\treturn new NodeTreeRB<T>(key, NodeTreeRB.RED);\n\n\t\tint cmp = comparar(h, key);\n\t\t\n\t\tif (cmp > 0)\n\t\t\th.setLeft(insert(h.getLeft(), key));\n\t\telse if (cmp > 0)\n\t\t\th.setRight(insert(h.getRight(), key));\n\t\telse\n\t\t\th.setData(key);\n\t\t\n\t\tif (isRed(h.getRight()) && !isRed(h.getLeft()))\n\t\t\th = rotateLeft(h);\n\t\tif (isRed(h.getLeft()) && isRed(h.getLeft().getLeft()))\n\t\t\th = rotateRight(h);\n\t\tif (isRed(h.getLeft()) && isRed(h.getRight()))\n\t\t\tflipColors(h);\n\n\t\tsetSize(h, getSize(h.getLeft()) + getSize(h.getRight()) + 1);\n\n\t\treturn h;\n\t}", "private static <K extends Comparable<? super K>, V> Node<K, V> putAndCopy0(\n K key, V value, @Var @Nullable Node<K, V> current) {\n\n if (current == null) {\n return new Node<>(key, value);\n }\n\n int comp = key.compareTo(current.getKey());\n if (comp < 0) {\n // key < current.data\n Node<K, V> newLeft = putAndCopy0(key, value, current.left);\n current = current.withLeftChild(newLeft);\n\n } else if (comp > 0) {\n // key > current.data\n Node<K, V> newRight = putAndCopy0(key, value, current.right);\n current = current.withRightChild(newRight);\n\n } else {\n current = new Node<>(key, value, current.left, current.right, current.getColor());\n }\n\n // restore invariants\n return restoreInvariants(current);\n }", "TreeNodeValueModel<T> parent();", "Cell() {\r\n\t\tstate = CellState.EMPTY;\r\n\t}", "Node(K key, V value, \n java.util.Comparator<? super K> c,\n BinarySearchTree<K, V> left,\n BinarySearchTree<K, V> right,\n boolean black) {\n this.key = key;\n this.value = value;\n this.c = c;\n this.left = left;\n this.right = right;\n this.black = black;\n this.size = 1 + this.left.size() + this.right.size();\n }", "private Node(K keyPortion, V valuePortion)\n {\n this(keyPortion, valuePortion, null);\n }", "public void draw(){\n\t\t\tint x = getPreferredSize().width/2;\n\t\t\tint y = 10;\n\t\t\tif (root() != null)\n\t\t\t\tpreOrderCell(root(), x, y, root().getColor());\n\t\t\tjgraph.getGraphLayoutCache().insert(cells.values().toArray());\n\t\t\tjgraph.getGraphLayoutCache().insert(nullnodes.toArray());\n\t\t}", "public JdbNavTree(Hashtable value) {\r\n super(value);\r\n commonInit();\r\n }", "public Entry (E element, int parent) \n {\n this.element = element;\n this.parent = parent;\n left = -1;\n right = -1;\n order = size;\n }", "protected AccountingLineTableCell createPaddingCell() {\n AccountingLineTableCell cell = new AccountingLineTableCell();\n cell.setColSpan(2);\n cell.setNeverEmpty(true);\n return cell;\n }", "private View createDarkCell(){\n return LayoutInflater.from(this.context).inflate(R.layout.back, this.tableRoot, false);\n }", "public Cell createCell(Row row, int column, String cellValue) {\n // Create a cell and put a value in it.\n Cell cell = row.createCell(column);\n cell.setCellValue(cellValue);\n return cell;\n }", "@NotNull\n @Contract(\"!null -> new\")\n static CellValue newInstance(@Nullable Object originalValue) {\n if (originalValue == null) {\n return NULL;\n } else {\n return new CellValue(originalValue);\n }\n }", "public BSTNode delete(int key) {\n BSTNode node = (BSTNode)search(key); \n if (node != null) { \n \tif (node.getLeft() != null && node.getRight() != null) {\n \t\tBSTNode left = (BSTNode)max(node.getLeft()), leftParent = left.getParent();\n \t\treplace(node, left);\n \t\tif (left.getColor() == Color.BLACK) {\n \t\t\tif (node.getColor() == Color.RED)\n \t\t\t\tleft.setColor(Color.RED);\n \t\t\tif (leftParent != node) {\n \t\t\t\tif (leftParent.getRight() != null)\n \t\t\t\t\tleftParent.getRight().setColor(Color.BLACK);\n \t\t\t\telse\n \t\t\t\t\tadjustColorsRemoval(leftParent, false);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tif (left.getLeft() != null)\n \t\t\t\t\tleft.getLeft().setColor(Color.BLACK);\n \t\t\t\telse\n \t\t\t\t\tadjustColorsRemoval(left, true);\n \t\t\t}\n \t\t}\n \t\telse if (node.getColor() == Color.BLACK)\n \t\t\tleft.setColor(Color.BLACK);\n \t}\n \telse if (node.getLeft() == null && node.getRight() == null) {\n \tremove(node, null); \n \tif (root != null && node.getColor() == Color.BLACK)\n \t\tadjustColorsRemoval(node.getParent(), node.getKey() < node.getParent().getKey());\n }\n \telse if (node.getLeft() != null && node.getRight() == null) {\n \t\tremove(node, node.getLeft());\n \t\tnode.getLeft().setColor(Color.BLACK);\n \t}\n\t else {\n\t \tremove(node, node.getRight()); \n\t \tnode.getRight().setColor(Color.BLACK);\n\t }\n }\n return node;\n }", "private void createSetFKParent(){\n Hashtable table=sqlTagsGeneratorTable.getImportedForeignKeyHash();\n Enumeration enum=table.keys();\n\n buffer.append(\" /**\\n\");\n buffer.append(\" * The <b><code>setFKParent</code></b> method is \");\n buffer.append(\"used to initializes Foreign\\n\");\n buffer.append(\" * Key columns within the HCYP_EVENTS table.\\n\");\n buffer.append(\" * @author Booker Northington II\\n\");\n buffer.append(\" * @version 1.0\\n\");\n buffer.append(\" * @param depth how many levels to initialize.\\n\");\n buffer.append(\" * @return none\\n\");\n buffer.append(\" * @since JDK1.3\\n\");\n buffer.append(\" */\\n\");\n buffer.append(spacer);\n buffer.append(\" public void setFKParent(int depth){\\n\");\n buffer.append(spacer);\n buffer.append(\" if(depth>0){\\n\");\n\n for(;enum.hasMoreElements();){\n String key=(String)enum.nextElement();\n SQLTagsGeneratorForeignKey object=(SQLTagsGeneratorForeignKey)\n table.get(key);\n String fkName=object.getFkName();\n buffer.append(\" \"+fkName+\"_PARENT=get\"+fkName+\"_PARENT\");\n buffer.append(\"(depth-1);\\n\");\n }\n buffer.append(\" }\\n\");\n buffer.append(\" return;\\n\");\n buffer.append(\" }// setFKParent() ENDS\\n\");\n }", "public DataCell() {\n super();\n }", "static Node newNode(int key) {\n\t\tNode temp = new Node();\n\t\ttemp.key = key;\n\t\ttemp.left = temp.right = null;\n\t\treturn temp;\n\t}", "TableCell<Annotation, String> wrappableTableCell(final TableColumn<Annotation, String> param) {\n return new TableCell<Annotation, String>() {\n @Override\n protected void updateItem(final String item, final boolean empty) {\n super.updateItem(item, empty);\n if (item == null || empty) {\n setGraphic(null);\n return;\n }\n final Text text = new Text(item);\n text.setWrappingWidth(param.getWidth());\n setPrefHeight(text.getLayoutBounds().getHeight());\n setGraphic(text);\n }\n };\n }", "void createNode(NodeKey key);", "public abstract Cell createDataCell() throws DailyFollowUpException;", "protected BlankRecord(Cell c)\r\n/* 25: */ {\r\n/* 26: 72 */ super(Type.BLANK, c);\r\n/* 27: */ }", "private static <K, V> Node<K, V> colorFlip(Node<K, V> current) {\n Node<K, V> newLeft = current.left.withColor(!current.left.getColor());\n Node<K, V> newRight = current.right.withColor(!current.right.getColor());\n return new Node<>(current.getKey(), current.getValue(), newLeft, newRight, !current.getColor());\n }", "public static void makeCell(StringBuffer aBuf, String aName, String aValue) {\n aBuf.append(aName).append(\": <b>\").append(aValue).append(\"</b>\");\n space(aBuf, 4);\n}", "public CMARichTableCell() {\n super(\"table-cell\");\n }" ]
[ "0.61441445", "0.5764434", "0.57551676", "0.5726596", "0.56585824", "0.549897", "0.54368025", "0.5423986", "0.5392617", "0.5264289", "0.5259527", "0.52391976", "0.521909", "0.5210228", "0.51865876", "0.5175198", "0.51609915", "0.5137273", "0.5132513", "0.51256937", "0.509698", "0.50900793", "0.50892746", "0.50875175", "0.5065072", "0.5046108", "0.5029552", "0.5008348", "0.5004911", "0.5004469", "0.5001909", "0.49994376", "0.4968027", "0.49619028", "0.4956381", "0.49563542", "0.4952718", "0.49388987", "0.49242777", "0.49131936", "0.49052396", "0.49021196", "0.48741594", "0.4874072", "0.4867482", "0.4846745", "0.48254684", "0.482287", "0.481561", "0.48114476", "0.4808529", "0.4799143", "0.47982776", "0.47938251", "0.47931358", "0.47927347", "0.4783205", "0.47687924", "0.4758073", "0.47573048", "0.47560683", "0.47553033", "0.47479573", "0.47405678", "0.4726663", "0.47194138", "0.47165203", "0.47154152", "0.471173", "0.47103754", "0.47042316", "0.4695052", "0.4693006", "0.46919045", "0.46913114", "0.46877232", "0.46833712", "0.467604", "0.46705943", "0.46691024", "0.4669051", "0.46688512", "0.46682876", "0.466242", "0.46618876", "0.46536607", "0.4653135", "0.46429607", "0.46207958", "0.46124697", "0.46095622", "0.459021", "0.4590119", "0.4586933", "0.45847932", "0.45694518", "0.45681325", "0.4566155", "0.45646074", "0.45645136" ]
0.48859942
42
Returns the value associated with the key.
public Object getValue() { return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public V getValue(K key);", "public V getValue(K key);", "public Value get(Key key);", "public Value get(Key key) ;", "public V getValue(Object key) {\n\t\treturn super.get(key);\n\t}", "public V get(K key) {\n if (null == key) {\n throw new IllegalStateException(\"Null value for key is \" +\n \"unsupported!\");\n }\n\n V result = null;\n\n Node<Pair<K, V>> node = findItem(key);\n\n if (node != null) {\n result = node.getData().value;\n }\n\n return result;\n\n }", "public Value get(Value key) {\n\t\treturn storage.get(key);\n\t}", "public V getValue(K key)\n {\n V result = null;\n int keyIndex = locateIndex(key);\n if ((keyIndex < numberOfEntries) && \n key.equals(dictionary[keyIndex].getKey()))\n result = dictionary[keyIndex].getValue();\n return result;\n }", "private DataValue getValueForKey(String key) {\n DataValue value = valueMap.get(key);\n if (value == null) {\n return DataValue.NO_VALUE;\n } else {\n return value;\n }\n }", "public T getValue(String key) {\r\n\t\tNode node = getNode(root, key, 0);\r\n\t\treturn node == null ? null : node.value;\r\n\t}", "public V value(K key) {\n for(MapEntry<K, V> t : this) {\n if (t == null) continue;\n if (t.key().equals(key)) return t.value();\n }\n\n return null;\n }", "public V get(K key);", "public Object get(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null)\n\t\t\treturn null;\n\t\treturn value.value;\n\t}", "public V getValue(K key)\r\n\t{\r\n\t\tint slot = findSlot(key, false);\r\n\t\t\r\n\t\tif (slot < 0) \r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tMapEntry<K, V> e = table[slot];\r\n\t\treturn e.getValue();\r\n\t}", "V get(Object key);", "public V get(String key);", "public CompoundValue getValue(Object key);", "public V get(K key)\r\n\t{\r\n\t\tEntry retrieve = data.get(new Entry(key, null));\r\n\t\t\r\n\t\tif(retrieve != null)\r\n\t\t{\r\n\t\t\treturn retrieve.value;\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public String get(String key) {\n return getData().get(key);\n }", "<T> T getValue(DataKey<T> key);", "String getValue(String type, String key);", "V get(final K key);", "public V get(K key) {\n V value = null;\n\n if (key != null) {\n int index = indexFor(key);\n if (container[index] != null) {\n value = (V) container[index].value;\n }\n }\n return value;\n }", "public V get(K key) {\r\n\t\t\tif (key == null) {\r\n\t\t\t\tthrow new NullPointerException();\r\n\t\t\t} else if (find(key) == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\t\t\t\treturn find(key).value;\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic V get(Object key) {\n\t\treturn map.get(key);\n\t}", "V get(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "V get(K key);", "public String getValue(String key) {\r\n\t\t\treturn prop.getProperty(key);\r\n\t\t}", "public Object get(String key);", "public V getValue(K key) {\n int i = findPosition(key);\n if (i==DsConst.NOT_FOUND) {\n return null;\n }\n DictionaryPair p = list.get(i);\n return p.getValue();\n }", "public V get(Object key) { return _map.get(key); }", "public String get(String key) {\n return this.map.get(key);\n }", "public String getValue(final String key)\r\n {\r\n m_keys.addElement(key);\r\n return m_value;\r\n }", "Object get(String key);", "Object get(String key);", "public Object get(String key) {\n \t\treturn this.get(null, key);\n \t}", "V getValue(final E key) {\r\n for (int i=0;i<kcount;i++) {\r\n if (equal(key, (E)k[i])) return (V)v[i];\r\n }\r\n return null;\r\n }", "public V get(final K key)\n {\n final StackElement element = this.hashMap.get(key);\n\n if (element != null)\n {\n return element.value;\n }\n\n return null;\n }", "public int get(int key) {\n return store[key]; // get the value for the key\n }", "public Value get(String key)\r\n {\r\n if (key.equals(\"\")) return null_str_val;\r\n Node<Value> x = get(root, key, 0);\r\n return x == null ? null : x.val;\r\n }", "public Object get(Object key){\n\t\tNode tempNode = _locate(key);\r\n\t\tif(tempNode != null){\r\n\t\t\treturn tempNode._value;\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public V getValue( K key ) {\r\n\t\tint bucketIndex = getBucketIndex( key );\r\n\t\tMapNode<K, V> head = buckets.get(bucketIndex);\r\n\t\twhile( head != null ) {\r\n\t\t\tif( head.key.equals(key)) {\r\n\t\t\t\treturn head.value;\r\n\t\t\t}\r\n\t\t\thead = head.next;\r\n\t\t}\r\n\t\treturn null;\t\r\n\t}", "public V searchValue (K key) {\n\t\tfor (Map.Entry<K, V> entry : this.entrySet()) {\n\t\t\tif (entry.getKey() == key) {\n\t\t\t\treturn entry.getValue();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public V get(K key) {\n int index = findIndex(key);\n if (keys[index] == null)\n return null;\n else\n return values[index];\n }", "public native V get(K key);", "public abstract V get(K key);", "public Value get(Key key) {\r\n\t\t\tValue ret = null;\r\n\t\t\t\r\n\t\t\tdata.reset();\r\n\t\t\tfor (int i = 0; i < data.size(); i++) {\r\n\t\t\t\tif (data.get().getKey().compareTo(key) == 0) {\r\n\t\t\t\t\tret = data.get().getValue();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tdata.next();\r\n\t\t\t}\r\n\t\t\tdata.reset();\r\n\t\t\t\r\n\t\t\treturn ret;\r\n\t\t}", "Object get(Object key);", "String getValue(Key key) {\n return this.parameters.get(key);\n }", "public Object get(String key){ \r\n\t\treturn this.context.getValue(key);\r\n\t}", "public static String getValue(String key) {\r\n\t\tload();\r\n\t\treturn properties.getProperty(key);\r\n\t}", "protected abstract V get(K key);", "public Object getValue(String key)\n {\n if (otherDetails == null)\n {\n return null;\n }\n else\n {\n return otherDetails.get(key);\n }\n }", "String get(Integer key);", "public V get(K key) {\n if (key == null) {\n MyEntry<K, V> entry = null;\n try {\n entry = bucket[0];\n if (entry != null) {\n return entry.getValue();\n }\n } catch (NullPointerException e) {\n }\n } else {\n // other keys\n MyEntry<K, V> entry = null;\n int location = hashFunction(key.hashCode());\n entry = bucket[location];\n if (entry != null && entry.getKey() == key) {\n return entry.getValue();\n }\n }\n return null;\n }", "public final synchronized V get(final K key) {\n\t\treturn map.get(key);\n\t}", "public V get(K key) throws InvalidKeyException;", "public V get(K key){\n\t\t\n\n\t\tNode n=searchkey(root, key);\n\n\t\t\n\t\tif(n!=null && n.value!=null){\n\t\t\treturn n.value;\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "public V get(K key) {\n\t\treturn table.get(calcIndex(key)).get(key);\n\t}", "public T get(K key);", "public String get(String key) {\n return mMap.get(key);\n }", "public String get(int key) {\n String sql = \"SELECT data_val FROM data_map WHERE data_key = ?\";\n\n String value = null;\n try (Connection con = this.connect();\n PreparedStatement pstmt = con.prepareStatement(sql)) {\n pstmt.setInt(1, key);\n ResultSet rs = pstmt.executeQuery();\n\n if (!rs.isClosed()) {\n value = rs.getString(\"data_val\");\n rs.close();\n }\n }\n catch (SQLException e) {\n value = null;\n }\n\n return value;\n }", "public String get(String key) {\n \ttmp = getNode(key);\n \tif (tmp != null) { \n \t\treturn tmp.getVal();\n \t}\n \treturn null;\n }", "public String getValue(final String key) {\n\n\t\treturn config.getString(StringUtils.lowerCase(key));\n\t\t\t}", "private V get(K key) {\n\t\t\tif (keySet.contains(key)) {\n\t\t\t\treturn valueSet.get(keySet.indexOf(key));\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public String getValue(String key) {\n\t\tfinal Iterator<Map.Entry<String, String>> iter = entries.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tfinal Map.Entry<String, String> entry = iter.next();\n\t\t\tif (entry.getKey().equals(key)) {\n\t\t\t\treturn entry.getValue();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public <T> T get(TypedKey<T> key)\n\t{\n\t\tObject value = map.get(Objects.requireNonNull(key));\n\t\treturn (value == null) ? key.getDefaultValue() : key.cast(value);\n\t}", "public Value get(String key) {\n Node x = get(root, key, 0);\n if (x == null) return null; //node does not exist\n else return (Value) x.val; //found node, but key could be null\n }", "public String get(int key){\n\t\treturn(hashMap[key]);\t\t\n\t}", "public DataValue lookup(String key) {\n if (validateKey(key)) {\n return getValueForKey(key);\n } else {\n return DataValue.NO_VALUE;\n }\n }", "public String get(String key) {\n return this._map.get(key);\n }", "public V get( K key ) {\n WeakReference<V> valueRef = map.get( key );\n return valueRef == null ? null : valueRef.get();\n }", "public V get(String key) {\n int index = hashOf(key);\n if (index >= capacity) return null;\n return (V) values[index];\n }", "public V get(K key)\n\t{\n\t\tcheckForNulls(key);\n\t\tint n = Math.abs(key.hashCode() % entries.length);\n\t\t\n\t\tif (entries[n] == null)\n\t\t\treturn null;\n\t\t\n\t\tfor (Entry e : entries[n])\n\t\t{\n\t\t\tif (key.equals(e.key) == true)\n\t\t\t\treturn e.value;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public String getValue(String key) {\n\t\t\treturn properties.get(key);\n\t\t}", "public Object getDataValue(String key) {\n\t\t if (data.containsKey(key)) {\n\t\t\t return data.get(key);\n\t\t }\n\t\t return null;\n\t }", "public Value get(final Key key) {\n int r = rank(key);\n if (r < size && (keys[r].compareTo(key) == 0)) {\n return values[r];\n }\n return null;\n }", "public V get(Object k) {\n\t\treturn values[findKeyIndex(k)];\n\t}", "public V get(K key) {\n int index = getIndex(getHash(key));\n Entry<K, V> entry = (Entry<K, V>) table[index];\n\n if (entry == null) {\n return null;\n }\n\n if (!entry.hasNext()) {\n return entry.getValue();\n }\n\n while (entry.hasNext()) {\n if (entry.getKey().equals(key))\n return entry.getValue();\n entry = entry.getNext();\n }\n\n if (entry.getKey().equals(key))\n return entry.getValue();\n\n return null;\n }", "public V getValue(K Key){\n\t\tint idx = getIndex(Key);\n\t\tHashNode<K,V> head = myHashTable.get(idx);\n\t\twhile(head!=null){\n\t\t\tif(head.isKey(Key))\n\t\t\t\treturn head.getValue();\n\t\t\thead=head.next();\n\t\t}\n\t\treturn null;\n\t}", "public java.lang.String getKeyValue() {\n return keyValue;\n }", "StoragePrimitive get(String key);", "public Object get(Object key) {\n CacheEntry entry = (CacheEntry)_hash.get(key);\n if (entry != null) {\n touchEntry(entry);\n return entry.getValue();\n } else {\n return null;\n }\n }", "public QxType getValue( final String key ) {\n return getValue( key, null );\n }", "public V get(K key) {\r\n\t\tint place = hash(key.hashCode());\r\n\t\tif (hashMapArray[place] != null) {\r\n\t\t\tLinkedList<KVPair> temp = hashMapArray[place];\r\n\t\t\tfor (KVPair i : temp) {\r\n\t\t\t\tif (i.getKey().equals(key)) {\r\n\t\t\t\t\treturn i.getValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Optional<Value> get(Key k) {\n\t\treturn bst.find(k);\n\t}", "@Override\n public V get(K key) {\n if(containsKey(key)) {\n LinkedList<Entry<K, V>> pointer = entryArr[Math.floorMod(key.hashCode(), entryArr.length)];\n return pointer.stream().filter(x->x.key.equals(key))\n .collect(Collectors.toList()).get(0).value;\n }\n return null;\n }", "public String getVal(String key) {\n Optional<KeyValList> kv = findKeyVal(key);\n\n if (kv.isPresent()) {\n return kv.get().getCfgVal();\n }\n\n return null;\n }", "private String getValueFromProperty(String key) {\n\t\treturn properties.getProperty(key);\n\n\t}", "@Override\n\tpublic V getValue(K key) {\n\t\tNode currentNode = firstNode;\n\t\t\n\t\tif(!isEmpty()){\n\t\t\twhile(currentNode.key != key){\n\t\t\t\tif(currentNode.getNextNode() == null){\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn (V)currentNode.value;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "@Override\n public V get(K key) {\n return getHelper(key, root);\n }", "@Override\n public V get(K key) {\n return get(root, key);\n }", "public V get(K key) {\r\n int hash = key.hashCode() % data.length;\r\n if (hash < 0){\r\n hash *= -1;\r\n }\r\n V result = null;\r\n if (data[hash] != null) {\r\n Node currentNode = data[hash];\r\n while (currentNode != null) {\r\n if (currentNode.key == key || currentNode.key.equals(key)) {\r\n result = (V) currentNode.value;\r\n }\r\n currentNode = currentNode.next;\r\n }\r\n }\r\n return result;\r\n }", "@Override\r\n public V get(Object key) {\r\n return get(key,table);\r\n }", "public String get(String key) {\n Node pos = find(key);\n if (pos == null) {\n return null;\n } else {\n return pos.pairStringString.getValue();\n }\n }", "@Override\r\n public V get(K key){\r\n // Return the value given by overloaded get function\r\n return get(root, key);\r\n }" ]
[ "0.82152027", "0.82152027", "0.81030625", "0.782722", "0.77959144", "0.7769611", "0.7730086", "0.7673952", "0.7663507", "0.76628727", "0.7609714", "0.7584201", "0.751399", "0.7512986", "0.7494465", "0.7487349", "0.7461043", "0.74585", "0.7455296", "0.7450913", "0.74505734", "0.7403025", "0.7382297", "0.7380094", "0.73761225", "0.7355116", "0.7355116", "0.7355116", "0.7355116", "0.7355116", "0.7355116", "0.7355116", "0.7353742", "0.73393065", "0.7310656", "0.729867", "0.72744435", "0.7265143", "0.7243214", "0.7243214", "0.7232728", "0.72284216", "0.72276103", "0.72172457", "0.7194694", "0.7166246", "0.7156358", "0.7151087", "0.71459585", "0.7141967", "0.7138644", "0.7133461", "0.71201855", "0.7101227", "0.709634", "0.7071981", "0.7066599", "0.7065803", "0.70449674", "0.70365316", "0.7029238", "0.70253026", "0.7014677", "0.70050615", "0.698595", "0.69453835", "0.6940513", "0.6939797", "0.69349957", "0.6932845", "0.692933", "0.6918938", "0.69057024", "0.6905637", "0.6896782", "0.6864629", "0.6862302", "0.68543416", "0.68519664", "0.68467957", "0.6823922", "0.6819844", "0.68192405", "0.6816732", "0.6787866", "0.6786545", "0.6784913", "0.6782487", "0.6772888", "0.67650324", "0.67617995", "0.6744043", "0.6733171", "0.6731166", "0.6726529", "0.67188585", "0.6710134", "0.6702426", "0.67016095", "0.6701029", "0.6694883" ]
0.0
-1
Replaces the value currently associated with the key with the given value.
public Object setValue(Object value) { Object oldValue = this.value; this.value = value; return oldValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void replace(K key, V value) {\r\n int hash = key.hashCode() % data.length;\r\n if (hash < 0){\r\n hash *= -1;\r\n }\r\n if (data[hash] == null) {\r\n throw new NullPointerException(\"no such key in the HashMap\" + key);\r\n } else {\r\n Node currentNode = data[hash];\r\n while (currentNode != null) {\r\n if (currentNode.key == key || currentNode.key.equals(key)) {\r\n currentNode.value = value;\r\n break;\r\n }\r\n currentNode = currentNode.next;\r\n }\r\n }\r\n }", "public void setValue(K key, V value);", "Value replaceValue(Entry<Key, Value> entry, Value value);", "public void put(Value key, Value value) {\n\t\tstorage.put(key, value);\n\t}", "public void setValue(K key, V value) {\n this.add(key, value);\n }", "public void put(Key key, Value val);", "public void put(int key, int value) {\n if (get(key) == -1)\n hashMap.add(new int[]{key, value});\n else {\n hashMap.stream().filter(pair -> pair[0] == key)\n .findAny()\n .map(pair -> pair[1] = value);\n }\n }", "public final void set(final String key, final Object value) {\n try {\n synchronized (jo) {\n if (value == null) {\n jo.remove(key);\n } else {\n jo.put(key, value);\n }\n }\n } catch (JSONException e) {\n }\n }", "final void set(String key, String value) {\n set(key, value, false);\n }", "public Value set(Value key, Value value) {\n\t\tif (get(key) != null)\n\t\t\tput(key, value);\n\t\telse if (parent != null)\n\t\t\tparent.put(key, value);\n\t\telse\n\t\t\tput(key, value);\n\t\treturn value;\n\t}", "void set(K key, V value);", "public void removeAndPut(final K key, final V value)\n {\n // First remove the key in case is already there\n this.remove(key);\n\n // Set the new head element\n this.addNewHead(key, value);\n }", "public void setDataValue(String key, Object value) {\n\t\t if (value == null) {\n\t\t\t data.remove(key);\n\t\t }else {\n\t\t\t data.put(key, value);\n\t\t }\n\t }", "public <T> void setValue (String key, T value)\n\t{\n\t\tproperties.get(key).value.setValue(value);\n\t}", "public static void set(String key, String value) {\n stringRedisTemplate.opsForValue().set(key, value);\n }", "@Override\n public V put(K key, V value) {\n reverseMap.put(value, key);\n return super.put(key, value);\n }", "public void set(String key, Object value) {\n set(key, value, 0);\n }", "public void put(String key, Object value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "public V put(K key, V value) {\r\n\t\t// if (this.contains(key)){\r\n\t\t// return this.changeValue(key, value);\r\n\t\t// } else {\r\n\t\treturn linearProbing(key, value);\r\n\t}", "public void put(final Key key, final Value value) {\n if (value == null) {\n delete(key);\n return;\n }\n int r = rank(key);\n if (r < size && keys[r].compareTo(key) == 0) {\n values[r] = value;\n return;\n }\n if (size == keys.length) {\n resize();\n }\n for (int j = size; j > r; j--) {\n keys[j] = keys[j - 1];\n values[j] = values[j - 1];\n }\n keys[r] = key;\n values[r] = value;\n size++;\n }", "public static void put(final String key, final Object value) {\r\n\t\tMap<String, String> map = new HashMap<String, String>(data.get());\r\n\t\tif (value == null) {\r\n\t\t\tmap.remove(key);\r\n\t\t} else {\r\n\t\t\tmap.put(key, value.toString());\r\n\t\t}\r\n\t\tdata.set(Collections.<String, String> unmodifiableMap(map));\r\n\t}", "public void set(String key, Object value) {\r\n\t\tthis.context.setValue(key, value);\r\n\t}", "public void put(K key, V value) {\n\t\ttable.get(calcIndex(key)).put(key, value);\n\t}", "public V put(K key, V value);", "private void put(K key, V value) {\n\t\t\tif (key == null || value == null)\n\t\t\t\treturn;\n\t\t\telse if (keySet.contains(key)) {\n\t\t\t\tvalueSet.set(keySet.indexOf(key), value);\n\t\t\t} else {\n\t\t\t\tkeySet.add(key);\n\t\t\t\tvalueSet.add(keySet.indexOf(key), value);\n\t\t\t\tsize++;\n\t\t\t}\n\t\t}", "public V put(final K key, final V value) {\r\n if (key == null) {\r\n return null;\r\n }\r\n\r\n // find the place to put it and stuff it in, overwriting what was\r\n // previously there\r\n int pos = getKeyPosition(key);\r\n V prevValue = null;\r\n CacheData<K, V> cacheData = getCacheData(pos);\r\n if (cacheData != null) {\r\n prevValue = cacheData.getValue();\r\n cacheData.setKeyValue(key,value);\r\n } else {\r\n setCacheData(pos, factory.createPair(key, value));\r\n }\r\n\r\n return (cacheData == null) ? null : prevValue;\r\n }", "public void put(String key, String value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "final <T> void set(String key, T value) {\n set(key, value, false);\n }", "void putValue(String key, Object data);", "void put(final Key key, final Value value) {\n if (key == null) {\n throw new IllegalArgumentException(\n \"first argument to put() is null\");\n }\n if (value == null) {\n delete(key);\n return;\n }\n int r = rank(key);\n if (r < size && keys[r].compareTo(key) == 0) {\n values[r] = value;\n return;\n }\n for (int i = size; i > r; i--) {\n keys[i] = keys[i - 1];\n values[i] = values[i - 1];\n }\n keys[r] = key;\n values[r] = value;\n size++;\n }", "V put(final K key, final V value);", "public void setPropertyValue(String key, String value) {\n\t\tthis.configMap.put(key, value);\r\n\t}", "public void set(R key, List<S> value){\n map.remove(key);\n map.put(key, value);\n }", "public void put(String key, T value) {\r\n\t\troot = put (root, key, value, 0);\r\n\t}", "public void setValue(String key, Object value)\n {\n if (value != null)\n {\n if (otherDetails == null)\n {\n otherDetails = new Hashtable();\n }\n\n otherDetails.put(key, value);\n }\n }", "public void put(int key, int value) {\n int index = keys.indexOf(key);\n if(index >= 0) {\n values.set(index, value);\n } else {\n keys.add(key);\n values.add(value);\n }\n }", "@Override\n public void putValue(String key, Object value) {\n\n }", "public final synchronized void put(final K key, final V value) {\n\t\tmap.put(key, value);\n\t}", "public void put(String key, Object value) {\r\n\t\tthis.settings.put(key, value);\r\n\t}", "@Override\n public void put(K key, V value) {\n root = put(root, key, value);\n }", "public void put(int key, int value) {\n\n int index = key % n;\n MapNode node = keys[index];\n// System.out.println(key + \" \" + value + \" \" + (node == null));\n for (int i =0; i < node.list.size(); ++i) {\n if (node.list.get(i) == key) {\n node.list.remove(i);\n vals[index].list.remove(i);\n }\n }\n\n node.list.add(key);\n vals[index].list.add(value);\n }", "public void setVal(String key, String val) {\n Optional<KeyValList> kv = findKeyVal(key);\n\n if (kv.isPresent()) {\n // Remove already existing value of the same key\n if (kv.get().getCfgVal().equals(val)) {\n // Key and Value are the same, nothing to do\n return;\n }\n\n // Remove the old value\n this.builder.getKeyValList().remove(kv.get());\n }\n\n if (null == this.builder.getKeyValList()) {\n // This is the first key-value pair, need to create list\n this.builder.setKeyValList(new LinkedList<KeyValList>());\n }\n\n // Build the new key-value pair and add to the list\n KeyValListBuilder kvBuilder = new KeyValListBuilder();\n kvBuilder.setCfgKey(key);\n kvBuilder.setCfgVal(val);\n this.builder.getKeyValList().add(kvBuilder.build());\n }", "public void put (String key, Object value) {\n if (trace) {\n getProfiler().checkPoint(\n String.format(\" %s='%s' [%s]\", key, value, Thread.currentThread().getStackTrace()[2])\n );\n }\n getMap().put (key, value);\n synchronized (this) {\n notifyAll();\n }\n }", "public void put(K key, V value) {\n int keyBucket = hash(key);\n \n HashMapEntry<K, V> temp = table[keyBucket];\n while (temp != null) {\n if ((temp.key == null && key == null) \n || (temp.key != null && temp.key.equals(key))) {\n temp.value = value;\n return;\n }\n temp = temp.next;\n }\n \n table[keyBucket] = new HashMapEntry<K, V>(key, value, table[keyBucket]);\n size++;\n }", "public void put(int key, int value) {\n store[key] = value; // update operation= overwritten \n }", "public V put(K key, V value) throws InvalidKeyException;", "public void put(int key, int value) {\n Node n = null;\n \n if (map.containsKey(key)) {\n n = map.get(key);\n if (n.next != tail) // IMPORTANT!\n putToTail(n);\n n.val = value;\n return;\n }\n \n n = new Node(key, value);\n map.put(key, n);\n putToTail(n);\n \n // if full, remove from head first\n if (size == 0) {\n removeHead();\n } else {\n size--;\n }\n\n }", "public void put(int key, int value) {\n if(map.get(key) != null){\n Node node = map.get(key);\n node.value = value;\n deleteNode(node);\n addToHead(node);\n } else {\n Node node = new Node(key, value);\n map.put(key, node);\n if(size < capacity){\n size++;\n addToHead(node);\n } else {\n map.remove(tail.prev.key);\n deleteNode(tail.prev);\n addToHead(node);\n }\n }\n }", "public void put(String key, Value val) {\n root = put(root, key, 0, val);\n }", "public void put(K key, V value) {\n\t\tif (key == null || value == null) {\n\t\t\tthrow new IllegalArgumentException(\"At least one of the inputs are null\");\n\t\t} else {\n\t\t\tHashMap<K, V> current = map.get(map.size() - 1);\n\t\t\tcurrent.put(key, value);\n\t\t\tmap.remove(map.size() - 1);\n\t\t\tmap.add(current);\n\t\t}\n\t}", "void set(String key, Object value);", "public void put(Key key,Value value){\n\t\troot = insert(root,key,value);\n\t}", "public void put(int key, int value) {\n if(map.containsKey(key)) \n removeNode(map.get(key));\n \n if(map.size() == cap)\n removeNode(tail.prev);\n \n insertNode(new Node(key, value));\n }", "private void put(String aKey, Object aValue) {\n\t\tmData.put(aKey, getValue(aValue));\n\t}", "public String put(String key, String value)\n {\n String previousValue = getMap().put(key, value);\n if (value != previousValue && (value == null || !value.equals(previousValue))) {\n cacheable.setPropertyBoolean(PROPERTY_DIRTY, true);\n updater.deferUpdate();\n }\n return previousValue;\n }", "void put(K key, V value);", "void put(K key, V value);", "public void put(String key, V value) {\n map.computeIfAbsent(key, k -> keepOrder ? new LinkedHashSet<>() : new HashSet<>()).add(value);\n }", "abstract protected DataValue updateValue(String key);", "public void put(int key, int value) {\n Node n = map.get(key);\n if(n == null){\n n = new Node(key, value);\n add(n);\n map.put(key, n);\n }\n else{\n n.val = value;\n update(n);\n }\n if(map.size() > this.capacity ){\n //we need to remove a stale node now\n Node removeNode = tail.prev;\n remove(removeNode);\n map.remove(removeNode.key);\n return;\n }\n return;\n }", "@Override\n public V put(K key, V value) {\n int index = key.hashCode() % table.length;\n if (index < 0) {\n index += table.length;\n }\n if (table[index] == null) {\n // Create a new linked list at table[index].\n table[index] = new LinkedList<Entry<K, V>>();\n }\n\n // Search the list at table[index] to find the key.\n for (Entry<K, V> nextItem : table[index]) {\n // If the search is successful, replace the old value.\n if (nextItem.key.equals(key)) {\n // Replace value for this key.\n V oldVal = nextItem.value;\n nextItem.setValue(value);\n return oldVal;\n }\n }\n\n // assert: key is not in the table, add new item.\n table[index].addFirst(new Entry<K, V>(key, value));\n numKeys++;\n if (numKeys > (LOAD_THRESHOLD * table.length)) {\n rehash();\n }\n return null;\n }", "protected void set(String key, String value)\r\n\t{ this.preferences.put(key, value); }", "public void put(String key, Object value) {\n\t\tgetMap(value.getClass()).put(key, value);\n\t}", "@Override\n public void put(K key, V value) {\n root = putHelper(key,value,root);\n }", "V put(K key, V value);", "public void remove(Object key, Object value) {\n map.get(key).remove(value);\n }", "public void put(K key, V value) {\n int hash = getHash(key.hashCode());\n Entry<K, V> existing = buckets[hash];\n Entry<K, V> entry = new Entry<>(key, value);\n\n if (existing == null) {\n buckets[hash] = entry;\n } else { // using separating chaining collision resolution. Another way is open addressing, resizing the array to reducing collision.\n while(existing.next != null) {\n if (existing.key.equals(key)) {\n existing.value = value;\n return;\n }\n existing = existing.next;\n }\n if (existing.key.equals(key)) {\n existing.value = value;\n } else {\n existing.next = entry;\n }\n }\n }", "public void put(String key, String value) {\n Strings.requireNonNullAndNotEmpty(key);\n if(value == null) {\n value = Strings.EMPTY;\n }\n\n map.put(key.toLowerCase(Locale.ROOT), value);\n isDirty = true;\n }", "public V put(K key, V value) {\n if (null == key) {\n return isertNullKey(key, value);\n } else {\n // inserting other keys\n int location = hashFunction(key.hashCode());\n if (location / capacity >= loadFactor) {\n resize();\n }\n MyEntry<K, V> entry = null;\n entry = bucket[location];\n //if a value exists with same key, we are not overriding that value, just returning the same,\n //in hashMap they actually override the new value\n if (entry != null && key == entry.getKey()) {\n return entry.getValue();\n } else {\n MyEntry ent = new MyEntry();\n ent.setKey(key);\n ent.setValue(value);\n bucket[location] = ent;\n return value;\n }\n\n }\n }", "public void set(String key, Object value)\n {\n if (value == null) remove(key);\n else if (value instanceof Map)\n {\n DataSection section = createSection(key);\n Map map = (Map) value;\n for (Object k : map.keySet())\n {\n section.set(k.toString(), map.get(k));\n }\n }\n else\n {\n data.put(key, value);\n if (!keys.contains(key)) keys.add(key);\n }\n }", "@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic V put(K key, V value) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t * Iterate through new collection: n\n\t */\n\t\t//.getKey().compareTo(null) == 0\n\t\tV oldValue;\n\t\tint j = findIndex(key);\n\t\tif ( map.get(j) == null ) {\n\t\t\toldValue = null;\n\t\t} else {\n\t\t\toldValue = map.get(j).getValue();\n\t\t}\n\t\t\n\t\tif ( j < size() && key.compareTo(map.get(j).getKey()) == 0) {\n\t\t\tmap.get(j).setValue(value);\n\t\t\treturn oldValue;\n\t\t}\n\t\tmap.add(j, new mapEntry<K, V>(key, value));\n\t\treturn null;\n\t}", "public static void set(int key, int value) {\n\t\t// your code here\n\t\tif (!map.containsKey(key)) {\n\t\t\tif (map.size() == size) {\n\t\t\t\tfor (Integer i : map.keySet()) {\n\t\t\t\t\tmap.remove(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tmap.put(key, value);\n\t\t\t}\n\t\t\telse\n\t\t\t\tmap.put(key, value);\n\t\t} else {\n\t\t\tmap.remove(key);\n\t\t\tmap.put(key, value);\n\t\t}\n\n\t}", "@Override\n public T put(String key, T value) {\n T old = null;\n // Do I have an entry for it already?\n Map.Entry<String, T> entry = entries.get(key);\n // Was it already there?\n if (entry != null) {\n // Yes. Just update it.\n old = entry.setValue(value);\n } else {\n // Add it to the map.\n map.put(prefix + key, value);\n // Rebuild.\n rebuildEntries();\n }\n return old;\n }", "public Value putIfExists(Key key, Value value) {\r\n\t\t\tdata.reset();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < data.size(); i++) {\r\n\t\t\t\tif (data.get().getKey().compareTo(key) == 0) {\r\n\t\t\t\t\tValue ret = data.get().getValue();\r\n\t\t\t\t\tdata.get().setValue(value);\r\n\t\t\t\t\treturn ret;\r\n\t\t\t\t}\r\n\t\t\t\tdata.next();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}", "public void setData(@NotNull String key, @NotNull Object value) {\n data.put(key, value);\n }", "public void put(String key, E value) {\n getOrCreateNode(key).data = value;\n }", "public void put(String key, String value) {\n\n\t\t//get the old value of the key\n\t\tString oldValue = get(key);\n\t\t\n\t\t//get this file's text\n\t\tString text = FileIO.read(this.getPath());\n\t\t\n\t\t//if it's the first time you're putting this key in, add a new key-value line\n\t\tif(oldValue==null) {\n\t\t\ttext+=key+\" : \"+value+\"\\n\";\n\t\t}else {\n\t\t\t//else replace oldValue with new value\n\t\t\ttext = text.replace(key+\" : \"+oldValue, key+\" : \"+value);\n\t\t}\n\t\t\n\t\t//push changes\n\t\tFileIO.write(this.getPath(), text);\n\t\t\n\t}", "public void set(String key, String value) {\n if (key.indexOf('=') != -1 || key.indexOf(';') != -1) {\n Log.e(TAG, \"Key \\\"\" + key + \"\\\" contains invalid character (= or ;)\");\n return;\n }\n if (value.indexOf('=') != -1 || value.indexOf(';') != -1) {\n Log.e(TAG, \"Value \\\"\" + value + \"\\\" contains invalid character (= or ;)\");\n return;\n }\n\n mMap.put(key, value);\n }", "public void set(String key, int value) {\n mMap.put(key, Integer.toString(value));\n }", "public void put(Key key, Value value) {\n\t\tNode entry = new Node(key, value, current_node);\n\t\tcurrent_node = entry; size++;\n\t}", "public void put(K key, V value)\n\t{\n\t\tif(queue.contains(key))\n\t\t{\n\t\t\tqueue.remove(key);\n\t\t}\n\t\tqueue.add(0, key);\n\t\tmap.put(key, value);\n\t\t\n\t\tif(queue.size() > maxSize)\n\t\t{\n\t\t\tK old = queue.remove(queue.size()-1);\n\t\t\tmap.remove(old);\n\t\t}\n\t}", "public void put(K key, V value) {\r\n size++;\r\n checkAndModifySize();\r\n\r\n Node newElement = new Node(key, value);\r\n int currentHash = newElement.hash % data.length;\r\n if (currentHash < 0){\r\n currentHash *= -1;\r\n }\r\n\r\n if (data[currentHash] == null) {\r\n data[currentHash] = newElement;\r\n } else {\r\n Node currentElement = data[currentHash];\r\n while (currentElement.next != null) {\r\n if (currentElement.key == key || currentElement.key.equals(key)) {\r\n currentElement.value = value;\r\n size--;\r\n return;\r\n }\r\n currentElement = currentElement.next;\r\n }\r\n currentElement.next = newElement;\r\n }\r\n }", "public void put(Object key, Object value) {\n \t\tLog.i(TAG, String.format(\"Cache put key: %s, value: %s\", key, value.toString()));\n \t\tcacheMap.put(key, value);\n \t}", "public void setSetting(String key, String value) throws SQLException {\n\t\tdb.updateItem(\"settings\", \"value\", value, \"`key`='\"+key+\"'\");\n\t}", "public void put(@NonNull final String key, final String value) {\n put(key, value, -1);\n }", "public void put(K key, T value) {\n synchronized (cacheMap) {\n cacheMap.put(key, new CacheObject(value));\n }\n }", "@Override\n public V put(K key, V value) {\n\n \tV tempValue = get(key);\n \t\n \tLinkedList<Entry> tempBucket = chooseBucket(key);\n \t\n \tif(tempValue != null) {\n \t\tfor(int i=0;i<tempBucket.size();i++) {\n\t \t\tEntry tempEntry = tempBucket.get(i);\n\t \t\t\n\t \t\tif(tempEntry.getKey() == key) {\n\t \t\t\tV returnValue = tempEntry.getValue();\n\t \t\t\ttempEntry.setValue(value);\n\t \t\t\treturn returnValue;\n\t \t\t}\n\t \t}\n \t} else {\n \t\tsize ++;\n \t\ttempBucket.add(new Entry(key, value));\n \t}\n \t\n \tif(size > buckets.length*ALPHA) {\n \t\trehash(GROWTH_FACTOR);\n \t}\n \t\n return tempValue;\n }", "public void put(String key, JsonObject value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "protected abstract void put(K key, V value);", "public void put(String key, int value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "public com.opentext.bn.converters.avro.entity.ContentKey.Builder setKeyValue(java.lang.String value) {\n validate(fields()[1], value);\n this.keyValue = value;\n fieldSetFlags()[1] = true;\n return this;\n }", "public void set(String key, String value){\n\t\tif(first == null){\n\t\t\tfirst = new ListMapEntry(key, value);\n\t\t}\n\t\tListMapEntry temp = first;\n\t\tListMapEntry prev = null;\n\t\twhile(temp!=null && !temp.getKey().equals(key)){\n\t\t\tprev = temp;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\tif(temp==null){\n\t\t\tprev.setNext(new ListMapEntry(key, value));\n\t\t}\n\t\telse{\n\t\t\ttemp.setValue(value);\n\t\t}\n\t}", "public void put(Object key, Object value) {\n\t\tint index = key.hashCode() % SLOTS;\n\t\t// check if key is already present in that slot/bucket.\n\t\tfor(Pair p:table[index]) {\n\t\t\tif(key.equals(p.key)) {\n\t\t\t\tp.value = value; // overwrite value if key already present.\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// if not present, add key-value pair in that slot/bucket.\n\t\tPair pair = new Pair(key, value);\n\t\ttable[index].add(pair);\n\t}", "public void setData(String key, String value) {\r\n\t\tdata.put(key, value);\r\n\t}", "public void put(int key, int value) {\n map.put(key,value);\n }", "public void put(K key, V value) {\n int index = getIndex(getHash(key));\n\n if (table[index] != null) {\n collisionProcessing(key, value, index);\n return;\n }\n\n table[index] = new Entry<>(key, value);\n extend();\n }", "public void setPiece (int oldKey ,int key, Piece value){\n if(pieces.containsKey(oldKey))\n pieces.remove(oldKey);\n pieces.put(key, value); \n }", "public void put(Keys key, String value) {\n\t\tp.put(getRegKey(key), value); //$NON-NLS-1$\n\t}", "public S<T> setPref(String value, String key) {\n\t SharedPreferences settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t SharedPreferences.Editor editor = settings.edit();\n\t editor.putString(key, value);\n\t editor.commit();\n\t return this;\n\t}", "@Override\n public void put(K key, V value) {\n // Note that the putHelper method considers the case when key is already\n // contained in the set which will effectively do nothing.\n root = putHelper(root, key, value);\n size += 1;\n }", "void updateEntry(K key, V value);" ]
[ "0.76091564", "0.7377536", "0.7113977", "0.6743713", "0.66536874", "0.6600562", "0.65333694", "0.643394", "0.6427608", "0.6422654", "0.64066356", "0.64010173", "0.63819605", "0.6363962", "0.6308011", "0.63007003", "0.6291867", "0.6270758", "0.6243066", "0.61994445", "0.61988634", "0.61640006", "0.6161355", "0.615779", "0.61399996", "0.6137048", "0.6135772", "0.613456", "0.61234313", "0.6114587", "0.60950387", "0.60784936", "0.60672307", "0.6065526", "0.6055305", "0.6055018", "0.6046129", "0.60443926", "0.6040765", "0.6024586", "0.60076064", "0.600658", "0.60042965", "0.6001135", "0.5998718", "0.5994415", "0.5990304", "0.5989639", "0.59803945", "0.59740424", "0.5968753", "0.5964864", "0.59641135", "0.59608805", "0.59600335", "0.5954107", "0.5954107", "0.5948132", "0.59379625", "0.5931773", "0.59239435", "0.5922678", "0.5916524", "0.5914164", "0.59063864", "0.5888407", "0.5879796", "0.58618444", "0.5854442", "0.5854349", "0.5852583", "0.584762", "0.58359116", "0.5826937", "0.5823037", "0.5814206", "0.58095133", "0.5803047", "0.57988006", "0.5793856", "0.5786768", "0.57807064", "0.5779624", "0.57725", "0.5768021", "0.5755817", "0.5754682", "0.5754444", "0.57539004", "0.57523775", "0.57522106", "0.57516253", "0.5742784", "0.57403165", "0.57305497", "0.5723968", "0.5721813", "0.5721812", "0.57150465", "0.5714629", "0.56858444" ]
0.0
-1
Adds a new item to the tradId list.
public SecuritiesTradeDetails137 addTradId(String tradId) { getTradId().add(tradId); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addID(int id){\n IDList.add(id);\n }", "public synchronized void addItem(IJABXAdvertisementItem item) {\n\t\tidMap.put(item.getSerialNo(), item);\n\t\titemList.add(item);\n\t}", "II addId();", "void addId(II identifier);", "void add(Item item);", "void addTire(Long orderId, Long tireId);", "public int addItem(Item i);", "void addItem(DataRecord record);", "public String addItem(Item item){\n EntityManager em = emf.createEntityManager();\n try{\n utx.begin();\n em.joinTransaction();\n for(Tag tag : item.getTags()) {\n tag.incrementRefCount();\n tag.getItems().add(item);\n em.merge(tag);\n }\n em.persist(item);\n utx.commit();\n // index item\n if(bDebug) System.out.println(\"\\n***Item id of new item is : \" + item.getItemID());\n indexItem(new IndexDocument(item));\n \n } catch(Exception exe){\n try {\n utx.rollback();\n } catch (Exception e) {}\n throw new RuntimeException(\"Error persisting item\", exe);\n } finally {\n em.close();\n }\n return item.getItemID();\n }", "public void add(T toAdd) {\n\t\tif (load.size() == maxLoad)\n\t\t\tSystem.out.println(\"\tERROR: Not enough room for the given item.\");\n\t\t\n\t\t//checks if this has already been loaded\n\t\telse {\n\n\t\t\tboolean loaded = false;\n\t\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < load.size(); i++) {\n\t\t\t\t\n\t\t\t\t/*System.out.println(\"***********\");\n\t\t\t\tSystem.out.println(load.get(i).getID());\n\t\t\t\tSystem.out.println(toAdd.getID());\n\t\t\t\tSystem.out.println(\"***********\");*/\n\t\t\t\t\n\t\t\t\tif (load.get(i).getID().equals(toAdd.getID()))\n\t\t\t\t\tloaded = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (loaded == false)\n\t\t\t\tload.add(toAdd);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"\tERROR: Invalid item, item with id \" + toAdd.getID() + \" already exists.\");\n\t\t}\n\t}", "public void addItem(Item item) {\n\t\thashOperations.put(KEY, item.getId(), item);\n\t\t//valueOperations.set(KEY + item.getId(), item);\n\t}", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "void add(T item);", "public int addItem(Itemset i);", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "public com.walgreens.rxit.ch.cda.II addNewId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.II target = null;\n target = (com.walgreens.rxit.ch.cda.II)get_store().add_element_user(ID$6);\n return target;\n }\n }", "public int add(Item item) {\r\n Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n int id = 0;\r\n\r\n try {\r\n trans = session.beginTransaction();\r\n\r\n id = (int) session.save(item);\r\n\r\n trans.commit();\r\n } catch (HibernateException e) {\r\n if (trans != null) {\r\n trans.rollback();\r\n }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n return id;\r\n }", "public Item addItem(Item item) {\r\n uniqueCounter++;\r\n items.add(item);\r\n return item;\r\n }", "public void addTransaction(String ID, ArrayList<Products> items){\n\t\ttransactions.put(ID, items);\n\t}", "public void addTradeId(ObjectIdentifiable tradeId) {\n ArgumentChecker.notNull(tradeId, \"tradeId\");\n if (_tradeIds == null) {\n _tradeIds = new ArrayList<ObjectIdentifier>();\n }\n _tradeIds.add(tradeId.getObjectId());\n }", "@Override\n public void addItem(P_CK t) {\n \n }", "public int addTask(Item item) {\n try (Session session = this.factory.openSession()) {\n session.beginTransaction();\n session.save(item);\n session.getTransaction().commit();\n } catch (Exception e) {\n this.factory.getCurrentSession().getTransaction().rollback();\n }\n return item.getId();\n }", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}", "void addCpItem(ICpItem item);", "public void add(TradeItem newItem) {\n if (newItem.isUnique()) {\n removeType(newItem);\n }\n items.add(newItem);\n }", "public void addRandomItem(RandomItem item);", "@Override\n\tpublic int add(Forge_Order_Detail t) {\n\t\treturn 0;\n\t}", "public void adicionar(ItemProduto item) {\n\t\titens.add(item);\n\t}", "InvoiceItem addInvoiceItem(InvoiceItem invoiceItem);", "void addTruck(Truck truck){\n deleteTruck(truck);\n //next insert new user\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_ID, truck.getId());\n values.put(KEY_PLAQUE, truck.getPlaque());\n values.put(KEY_TRUCK_CODE, truck.getTruckCode());\n values.put(KEY_TRUCK_MODEL, truck.getTruckModel());\n db.insert(TABLE_TRUCKS,null,values);\n db.close();\n }", "public void addItem(Item i) {\n this.items.add(i);\n }", "public abstract void addItem(AbstractItemAPI item);", "public void addToDoEntry(String toDoItem) {\n\t\t// adds a new item at the end of the list\n\t\ttoDoList.add(new ToDoEntry(toDoItem));\n\t}", "public void addItem(LibraryItem item){\r\n\t\t// use add method of list.class\r\n\t\tthis.inverntory.add(item);\r\n\t}", "@attribute(value = \"\", required = false)\r\n\tpublic void addItem(Item i) {\r\n\t}", "@Override\r\n\tpublic void addItem(Items item) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t List<Items> allItems = new ArrayList<Items>();\r\n\t\t int flag=0;\r\n\t\t try\r\n\t\t {\r\n\t\t\t allItems = session.createQuery(\"from Items\").list();\r\n\t\t\t for (Items item1 : allItems) {\r\n\t\t\t\t\tif(item1.getUserName().equals(item.getUserName()) && item1.getItemName().equals(item.getItemName())){\r\n\t\t\t\t\t\tflag=1;\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You need to choose other name for this task\", \"Error\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t break;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t} \r\n\t\t\t if(flag==0)\r\n\t\t\t {\r\n\t\t\t\t session.beginTransaction();\r\n\t\t\t\t session.save(item);\r\n\t\t\t\t session.getTransaction().commit();\r\n\t\t\t }\r\n\t\t }\r\n\t\t catch (HibernateException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t if(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t }\r\n\t\t finally\r\n\t\t {\r\n\t\t\t if(session != null) \r\n\t\t\t\t{ \r\n\t\t\t\t\tsession.close(); \r\n\t\t\t\t} \r\n\t\t }\t\r\n\t}", "public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}", "IPayerEntry addId(II value);", "public void AddtoCart(int id){\n \n itemdb= getBooksById(id);\n int ids = id;\n \n for(Books k:itemdb){ \n System.out.println(\"Quantity :\"+k.quantity); \n if (k.quantity>0){\n newcart.add(ids);\n System.out.println(\"Added to cartitem list with bookid\"+ ids);\n setAfterBuy(ids);\n System.out.println(\"Quantity Updated\");\n setCartitem(newcart);\n System.out.println(\"setCartitem :\"+getCartitem().size());\n System.out.println(\"New cart :\"+newcart.size());\n test.add(k);\n }\n else{\n System.out.println(\"Quantity is not enough !\");\n }\n }\n setBookcart(test);\n }", "public void addItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n\n db.insert(TABLE_NAME, null, values); //Insert query to store the record in the database\n db.close();\n\n }", "public int addOrderDetail(List<OrderDetail> lOrderDetails, Order order);", "public Triplet add(Triplet t) throws DAOException;", "protected long insertAndVerifyItem(Item itemToAdd) {\n assertNotNull(\"Null item\", itemToAdd);\n long itemId = mDaoToTest.insertItem(mContext, itemToAdd);\n assertTrue(\"Wrong id\", itemId > 0);\n return itemId;\n }", "public void addId_No(java.lang.String vId_No)\n throws java.lang.IndexOutOfBoundsException\n {\n _id_NoList.addElement(vId_No);\n }", "public void addNewItem(OrderItem newOrderItem){\n itemsInOrder.add(newOrderItem);\n }", "public void add( Order item ) {\n\t\tsuper.internalAdd(item);\n\t}", "Post addAddition(Long additionId, Long id);", "public synchronized void addItem(String itemID, int more) {\n\t\tItemOrder order;\n\t\tboolean found = false;\n\t\tint i = 0;\n\n\t\twhile (!found && i < itemsOrdered.size()) {\n\t\t\torder = itemsOrdered.get(i);\n\t\t\tif (order.getItem().getItemID().equals(itemID)) {\n\t\t\t\tfound = true;\n\t\t\t\torder.setNumItems(order.getNumItems()+more);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tif (!found) {\n\t\t\tItemOrder newOrder = new ItemOrder(Catalogue.instance.getModel().get(itemID));\n\t\t\tnewOrder.setNumItems(more);\n\t\t\titemsOrdered.add(newOrder);\n\t\t}\n\t\treturn;\n\t}", "int addItem(final T pNode);", "public static void addItem(int id,int quantity){\n\t\tif(userCart.containsKey(id)){\n\t\t\tint newQuantity = userCart.get(id).getQuantity() + quantity;\n\t\t\tuserCart.get(id).setQuantity(newQuantity);\n\t\t\tSystem.out.println(CartMessage.ALREADY_ADDED + newQuantity);\n\t\t}\n\t\telse{\n\t\t\tproducts.get(id).setQuantity(quantity);\n\t\t\tuserCart.put(id,products.get(id));\n\t\t\tSystem.out.println(CartMessage.ITEM_ADDED);\n\t\t}\n\t}", "public void add(T ob) throws ToDoListException;", "public void addItem(Object obj) {\n items.add(obj);\n }", "public void setTramiteId(java.lang.String tramiteId) {\n this.tramiteId = tramiteId;\n }", "public void addItem(Item newItem){\n // check for duplicate item ID\n for (Item item: items) {\n if (item.getItemID() == newItem.getItemID()) {\n item.setQuantity(item.getQuantity() + 1);\n return;\n }\n }\n newItem.setQuantity(1);\n this.items.add(newItem);\n }", "public void add(final int item) {\n if (!contains(item)) {\n set[size] = item;\n size += 1;\n }\n }", "@Test\r\n\tpublic void testIdItem() {\r\n\r\n\t\ttry {\r\n\t\t\tItem itemDes = new Item(idItem, \"elixir de Destreza\", 0, 0, 0, 0, 0, 0, null, null);\r\n\r\n\t\t\tAssert.assertEquals(12321, itemDes.getIdItem());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\r\n\t}", "public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}", "@Override\r\n\tpublic Trainee addTrainee(Trainee t) {\n\t\treturn dao.addTrainee(t);\r\n\t}", "public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}", "public boolean add(final OrderedItem item) {\n\t\t\tfinal int i = item.getIndex();\n\t\t\tif (table[index].get(i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttable[index].set(i);\n\t\t\treturn true;\n\t\t}", "public void insert(KeyedItem newItem);", "private void addItem(UndoItem item, RefactoringSession session) {\n if (wasUndo) {\n LinkedList<UndoItem> redo = redoList.get(session);\n redo.addFirst(item);\n } else {\n if (transactionStart) {\n undoList.put(session, new LinkedList<UndoItem>());\n descriptionMap.put(undoList.get(session), description);\n transactionStart = false;\n }\n LinkedList<UndoItem> undo = this.undoList.get(session);\n undo.addFirst(item);\n }\n if (!(wasUndo || wasRedo)) {\n redoList.clear();\n }\n }", "@Override\n\t\tpublic Integer insertItem(String name, int locationID, int descriptionID) {\n\t\t\treturn null;\n\t\t}", "@Override\n\tpublic Boolean insert(Intervention item) {\n\t\treturn true;\n\t}", "public void add(G item,String key){\n int chain=hashFunction(key);\r\n if (electionTable[chain] != null) {\r\n System.out.println(\"input repeated key!!!\");\r\n return;\r\n }\r\n ElectionNode x=new ElectionNode(item);\r\n System.out.println(\"-----------add-------------- \" + chain);\r\n x.next=electionTable[chain];\r\n electionTable[chain]=x;\r\n }", "public void AddReliquias(){\n DLList reliquias = new DLList();\n reliquias.insertarInicio(NombreReliquia); \n }", "public void add(T item) {\n\t\tcounts.put(item, counts.getOrDefault(item, 0) + 1);\n\t}", "public void add (Object t)\r\n {\r\n }", "void add(E item);", "void add(E item);", "void add(E item);", "public void addItem(String nameMeal, String quantity, String idOrder) {\n\n\t\ttry {\n\n\t\t\torderDetails.insertNewOrderDetail(idOrder, quantity, nameMeal);\n\n\t\t} finally {\n\t\t\tmysqlConnect.disconnect();\n\t\t}\n\t}", "public void setTrid(int trid) {\n this.trid = trid;\n }", "Item addItem(IDAOSession session, String title, String description,\n\t\t\tint userId);", "public void add(E item) {\n\t\tDblListnode<E> tmp = lastNode;\n\t\tlastNode.setNext(new DblListnode<E>(item));\n\t lastNode = lastNode.getNext();\n\t lastNode.setPrev(tmp);\n\t numItems++;\n\t}", "@RequestMapping(method=RequestMethod.POST, value = \"/item/{id}\", produces = \"application/json\")\n public void addItem(@RequestBody Item itemToAdd)\n {\n this.itemRepository.addItem(itemToAdd);\n }", "public boolean add(Type item);", "@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}", "private void addRfid( ArrayList<ProductRfid> rfids, JSONObject rfid){\n //parsing the productRfids fields and building it\n String RFID = (String) rfid.get(\"rfid\");\n Integer pId = Integer.parseInt((String) rfid.get(\"pId\"));\n ProductRfid pRFID = new ProductRfid(RFID,pId);\n rfids.add(pRFID);\n }", "public void addRecipient(){\n //mRATable.insert();\n }", "void add( ModelObject modelObject, Long id );", "public BookUser addItemInTable(BookUser item) throws ExecutionException, InterruptedException {\n BookUser entity = Azure.mbook.insert(item).get();\n return entity;\n }", "public void addItemtoInventoryList(String item) {\r\n InventoryList.add(item);\r\n }", "public abstract void add(String element) throws RemoteException;", "private void insertItem() {\n System.out.println(\"What is the priority level of the task: \\n\\tH -> high \\n\\tM -> medium \\n\\tL -> low\");\n char priorityLevel = scanner.next().toUpperCase().charAt(0);\n\n priorityLevel = checkPriorityLevel(priorityLevel);\n Categories category;\n if (priorityLevel == 'H') {\n category = Categories.HIGHPRIORITY;\n } else if (priorityLevel == 'M') {\n category = Categories.MIDPRIORITY;\n } else {\n category = Categories.LOWPRIORITY;\n }\n\n System.out.println(\"Enter the name of the task:\");\n scanner.nextLine();\n String name = scanner.nextLine();\n\n String daysBeforeDue = acceptDaysBeforeDue();\n\n Item item = new Item(name, daysBeforeDue, category);\n toDoList.insert(item);\n System.out.println(\"Added successfully!\");\n\n System.out.println(\"Updated to-do list:\");\n viewList();\n }", "public void addItem(String user, String departure, String destination, String adult, String child, String trip) {\n\n if(user != null)\n {\n MyItem mItem = new MyItem();\n\n mItem.setName(user);\n mItem.setDeparture(\"Departure City: \" + departure);\n mItem.setDestination(\"Destination City: \" + destination);\n mItem.setAdult(\"Number of Adult: \" + adult);\n mItem.setChild(\"Number of Child: \" + child);\n mItem.setTrip(\"Type of Trip: \" + trip);\n\n mItems.add(mItem);\n }\n\n }", "public void addTodoItem(TodoItem item) {\n todoItems.add(item);\n }", "protected UUID add(E entry) {\n\t\treturn add(entry, true);\n\t}", "public void addItem(LineItem item)\r\n {\r\n\t ChangeEvent event = new ChangeEvent(this);\r\n\t if(items.contains(item))\r\n\t {\r\n\t\t \r\n\t\t counter = 0;\r\n\t\t items.add(item);\r\n\t\t //tem.addQuantity();\r\n\t\t //tem.getQuantity();\r\n\t\t for(int i = 0; i < items.size(); i++)\r\n\t\t {\r\n\t\t\t if(items.get(i).equals(item))\r\n\t\t\t {\r\n\t\t\t counter++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t\t System.out.print(\"\\r Quantity of \" + item.toString() + \": \"+ counter);\r\n\t\t \r\n\t }\r\n\t else\r\n\t {\r\n\t\t counter = 1;\r\n\t// item.addQuantity();\r\n\t// item.getQuantity();\r\n\t\t items.add(item);\r\n\t// System.out.println(item.getQuantity());\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t \t\r\n\t \tSystem.out.print(\"\\n Quantity of \" + item.toString() + \": \"+ counter);\r\n\t \r\n\t\t \r\n\t }\r\n\t\t\r\n \r\n }", "public void AddItem( Standard_Transient anentity) {\n OCCwrapJavaJNI.Interface_EntityIterator_AddItem(swigCPtr, this, Standard_Transient.getCPtr(anentity) , anentity);\n }", "public irestads.model.AdsItem create(long adsItemId);", "public TransactionItem addTransactionItem(int transactionId, int productId, int quantity)\n\t{\n\t\tConnect con=Connect.getConnection();\n\t\tcon.executeQuery(\"USE sudutmeong\");\n\t\tTransactionItem x=new TransactionItem();\n\t\tx.setTransactionId(transactionId);\n\t\tx.setProductId(productId);\n\t\tx.setQuantity(quantity);\n\t\tString query = \"INSERT INTO transactionitem VALUES (\"+transactionId+\",\" + productId + \",\"+ quantity +\")\";\n\t\tcon.executeUpdate(query);\n\t\treturn x;\n\t}", "org.hl7.fhir.Identifier addNewIdentifier();", "public void add(E item);", "@Override\n public void takeOrder(List<Item> restItem, int constID) {\n\n }", "public void insert(Object item);", "public abstract void add(T item) throws RepositoryException;", "@Override\n public void onItemAdded(Object toAdd) {\n if(toAdd instanceof SpotifyItem)\n return;\n\n //Reflect changes in the drink list\n DrinkInfo item = (DrinkInfo)toAdd;\n Log.d(TAG, \"Array size = \" + mDrinkInfos.size());\n mDrinkInfos.add(mDrinkInfos.size(), item);\n mDrinkQueueAdapter.notifyDataSetChanged();\n Log.d(TAG, \"Added song: \" + item.getDrinkName());\n }", "@Override\r\n\tpublic void insertEncoreItem(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item1\");\r\n\t}", "public List<String> add( ultrasoundRecord ulr) throws DBException{\r\n List<String> res = Collections.emptyList();\r\n long recordId = -1;\r\n\t\ttry {\r\n recordId = ovData.addReturnGeneratedId(ulr);\r\n\t\t} catch (DBException e) {\r\n\t\t\tres = e.getErrorList();\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif (res.size() == 0) {\r\n\r\n\t\t\tTransactionLogger.getInstance().logTransaction(TransactionType.EDIT_ULTRASOUND, loggedInMID, Long.valueOf(ulr.getPatientMID()), String.valueOf(recordId));\r\n\t\t}\r\n\t\treturn res;\r\n }" ]
[ "0.65049464", "0.63170695", "0.6113008", "0.6071834", "0.6040227", "0.60209817", "0.60136575", "0.59649265", "0.5944308", "0.5888684", "0.586629", "0.58617175", "0.5860557", "0.58090264", "0.5800167", "0.5786684", "0.5773792", "0.57677597", "0.5737504", "0.57191944", "0.56656665", "0.5665028", "0.564376", "0.5603761", "0.5583268", "0.5574244", "0.55731744", "0.55547976", "0.5516305", "0.54850805", "0.5482102", "0.5479071", "0.54748315", "0.5474112", "0.54717445", "0.54694456", "0.54673594", "0.5456041", "0.5442863", "0.5439663", "0.5431461", "0.54211587", "0.54147416", "0.5411361", "0.54024935", "0.53976345", "0.53725946", "0.53722245", "0.5365125", "0.5356464", "0.53551674", "0.53541875", "0.5353627", "0.535177", "0.534949", "0.5345979", "0.53428346", "0.5336389", "0.5327572", "0.53256094", "0.5323949", "0.5321627", "0.5314827", "0.53072125", "0.53059", "0.5304674", "0.5303627", "0.52988595", "0.52974975", "0.52974975", "0.52974975", "0.52970564", "0.52961653", "0.5296005", "0.5292365", "0.5291876", "0.5283482", "0.52817726", "0.528006", "0.5274369", "0.5273795", "0.5271305", "0.52689946", "0.5267363", "0.52613676", "0.5260012", "0.5257811", "0.5254044", "0.5248292", "0.52461493", "0.52437365", "0.5242089", "0.52361435", "0.5220211", "0.52191913", "0.52140737", "0.52137744", "0.52023", "0.5201408", "0.5192609" ]
0.5976339
7
Adds a new item to the collTxId list.
public SecuritiesTradeDetails137 addCollTxId(String collTxId) { getCollTxId().add(collTxId); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String addItem(Item item){\n EntityManager em = emf.createEntityManager();\n try{\n utx.begin();\n em.joinTransaction();\n for(Tag tag : item.getTags()) {\n tag.incrementRefCount();\n tag.getItems().add(item);\n em.merge(tag);\n }\n em.persist(item);\n utx.commit();\n // index item\n if(bDebug) System.out.println(\"\\n***Item id of new item is : \" + item.getItemID());\n indexItem(new IndexDocument(item));\n \n } catch(Exception exe){\n try {\n utx.rollback();\n } catch (Exception e) {}\n throw new RuntimeException(\"Error persisting item\", exe);\n } finally {\n em.close();\n }\n return item.getItemID();\n }", "public void addItem(Item item) {\n\t\thashOperations.put(KEY, item.getId(), item);\n\t\t//valueOperations.set(KEY + item.getId(), item);\n\t}", "public void addTransaction(String ID, ArrayList<Products> items){\n\t\ttransactions.put(ID, items);\n\t}", "public int add(Item item) {\r\n Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n int id = 0;\r\n\r\n try {\r\n trans = session.beginTransaction();\r\n\r\n id = (int) session.save(item);\r\n\r\n trans.commit();\r\n } catch (HibernateException e) {\r\n if (trans != null) {\r\n trans.rollback();\r\n }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n return id;\r\n }", "public synchronized void addItem(IJABXAdvertisementItem item) {\n\t\tidMap.put(item.getSerialNo(), item);\n\t\titemList.add(item);\n\t}", "@Override\r\n\tpublic void insertEncoreItem(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item1\");\r\n\t}", "public void addID(int id){\n IDList.add(id);\n }", "public final void insert(Envelope envelope, final int item) {\n visit(envelope, true, (bin, mapKey) -> {\n /*\n * Note: here we can end-up having several time the same object in the same bin, if\n * the client insert multiple times the same object with different envelopes.\n * However we do filter duplicated when querying, so apart for memory/performance\n * reasons it should work. If this becomes a problem, we can use a set instead of a\n * list.\n */\n bin.add(item);\n nEntries++;\n return false;\n });\n nObjects++;\n }", "public void add(T item) {\n\t\tcounts.put(item, counts.getOrDefault(item, 0) + 1);\n\t}", "public void add(final int item) {\n if (!contains(item)) {\n set[size] = item;\n size += 1;\n }\n }", "public Item addItem(Item item) {\r\n uniqueCounter++;\r\n items.add(item);\r\n return item;\r\n }", "public void addCostItem(CostItem item) throws CostManagerException;", "void add(Item item);", "@Override\n public void addItem(P_CK t) {\n \n }", "public void AddtoCart(int id){\n \n itemdb= getBooksById(id);\n int ids = id;\n \n for(Books k:itemdb){ \n System.out.println(\"Quantity :\"+k.quantity); \n if (k.quantity>0){\n newcart.add(ids);\n System.out.println(\"Added to cartitem list with bookid\"+ ids);\n setAfterBuy(ids);\n System.out.println(\"Quantity Updated\");\n setCartitem(newcart);\n System.out.println(\"setCartitem :\"+getCartitem().size());\n System.out.println(\"New cart :\"+newcart.size());\n test.add(k);\n }\n else{\n System.out.println(\"Quantity is not enough !\");\n }\n }\n setBookcart(test);\n }", "public void addTransaction(Transactions t){\n listOfTransactions.put(LocalDate.now(), t);\n }", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public void add(Item item) {\r\n\t\tcatalog.add(item);\r\n\t}", "public int addTask(Item item) {\n try (Session session = this.factory.openSession()) {\n session.beginTransaction();\n session.save(item);\n session.getTransaction().commit();\n } catch (Exception e) {\n this.factory.getCurrentSession().getTransaction().rollback();\n }\n return item.getId();\n }", "void add(T item);", "void addCpItem(ICpItem item);", "public void addPcktSeqNo(long seq)\n\t{\n\t\tthis.list.add(seq);\n\t}", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}", "int addItem(final T pNode);", "public void add(T toAdd) {\n\t\tif (load.size() == maxLoad)\n\t\t\tSystem.out.println(\"\tERROR: Not enough room for the given item.\");\n\t\t\n\t\t//checks if this has already been loaded\n\t\telse {\n\n\t\t\tboolean loaded = false;\n\t\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < load.size(); i++) {\n\t\t\t\t\n\t\t\t\t/*System.out.println(\"***********\");\n\t\t\t\tSystem.out.println(load.get(i).getID());\n\t\t\t\tSystem.out.println(toAdd.getID());\n\t\t\t\tSystem.out.println(\"***********\");*/\n\t\t\t\t\n\t\t\t\tif (load.get(i).getID().equals(toAdd.getID()))\n\t\t\t\t\tloaded = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (loaded == false)\n\t\t\t\tload.add(toAdd);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"\tERROR: Invalid item, item with id \" + toAdd.getID() + \" already exists.\");\n\t\t}\n\t}", "public int addItem(Item i);", "public void add (int item)\n\t{\n\t\tadd(this.root,item);\n\t}", "void addInvitedTrans(ITransaction transaction, String userId);", "public int addItem(Itemset i);", "public void addElement(Replicated obj)\r\n\t{\n\t\tinsert(obj, seq.size());\r\n\t}", "public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n \t} else return false;\r\n } else {\r\n \titemCollection.put(item.getItemName(), item);\r\n \treturn true;\r\n }\r\n \t\r\n }", "public void addItem(Object obj) {\n items.add(obj);\n }", "@Override\n public boolean add(E item) {\n if (item == null)\n throw new IllegalArgumentException(\"null invalid value for bag\");\n Counter count = map.get(item);\n if (count == null)\n map.put(item, new Counter(1));\n else\n count.increment();\n return true;\n }", "public void add(G item,String key){\n int chain=hashFunction(key);\r\n if (electionTable[chain] != null) {\r\n System.out.println(\"input repeated key!!!\");\r\n return;\r\n }\r\n ElectionNode x=new ElectionNode(item);\r\n System.out.println(\"-----------add-------------- \" + chain);\r\n x.next=electionTable[chain];\r\n electionTable[chain]=x;\r\n }", "public void AddItem( Standard_Transient anentity) {\n OCCwrapJavaJNI.Interface_EntityIterator_AddItem(swigCPtr, this, Standard_Transient.getCPtr(anentity) , anentity);\n }", "public void addTransaction(Transaction tx) {\n this.txPool.addTransaction(tx);\n }", "public void add(IApsEntity entity) throws ApsSystemException;", "public void addItem(LineItem item)\r\n {\r\n\t ChangeEvent event = new ChangeEvent(this);\r\n\t if(items.contains(item))\r\n\t {\r\n\t\t \r\n\t\t counter = 0;\r\n\t\t items.add(item);\r\n\t\t //tem.addQuantity();\r\n\t\t //tem.getQuantity();\r\n\t\t for(int i = 0; i < items.size(); i++)\r\n\t\t {\r\n\t\t\t if(items.get(i).equals(item))\r\n\t\t\t {\r\n\t\t\t counter++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t\t System.out.print(\"\\r Quantity of \" + item.toString() + \": \"+ counter);\r\n\t\t \r\n\t }\r\n\t else\r\n\t {\r\n\t\t counter = 1;\r\n\t// item.addQuantity();\r\n\t// item.getQuantity();\r\n\t\t items.add(item);\r\n\t// System.out.println(item.getQuantity());\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t \t\r\n\t \tSystem.out.print(\"\\n Quantity of \" + item.toString() + \": \"+ counter);\r\n\t \r\n\t\t \r\n\t }\r\n\t\t\r\n \r\n }", "public void addToCart(String userId ,ShoppingCartItem item) {\n\t\t PersistenceManager pm = PMF.get().getPersistenceManager();\r\n\t\t Transaction tx = pm.currentTransaction();\r\n\t\t try{\r\n\t\t\ttx.begin();\r\n\t\t\tShoppingCart cartdb = (ShoppingCart)pm.getObjectById(ShoppingCart.class, userId);\r\n\t\t\tcartdb.addItem(item);\r\n\t\t\ttx.commit();\r\n\r\n\t\t }\r\n\t\t catch (JDOCanRetryException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\tlogger.warning(\"Error updating cart \"+ item);\r\n\t\t\t\tthrow ex;\r\n\t\t\t}\r\n\t\t\tcatch(JDOFatalException fx){\r\n\t\t\tlogger.severe(\"Error updating cart :\"+ item);\r\n\t\t\tthrow fx;\r\n\t\t\t}\r\n\t\t finally{\r\n\t\t\t if (tx.isActive()){\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t }\r\n\t\t\t pm.close();\r\n\t\t }\r\n\t}", "public void addItem(Item item) {\n inventory.add(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n public void add(T obj) {\n generateObjIdIfRequired(obj);\n \n //Try to copy when adding so we can prevent unwanted changes\n obj = getCopyOfT(obj);\n \n if (objects.contains(obj)) throw new DBEntityAlreadyExistsException(obj.toString());\n\n objects.add(obj);\n }", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "public void addTradeId(ObjectIdentifiable tradeId) {\n ArgumentChecker.notNull(tradeId, \"tradeId\");\n if (_tradeIds == null) {\n _tradeIds = new ArrayList<ObjectIdentifier>();\n }\n _tradeIds.add(tradeId.getObjectId());\n }", "public void addItemQty(int itemQty) {\n this.itemQty += itemQty;\n }", "public boolean add(T item) {\n\t\treturn list.add(item);\n\t}", "public abstract void add(T item) throws RepositoryException;", "public AuditComplianceEventInfo addUserIdentitiesItem(ACUserIdentity userIdentitiesItem) {\n if (this.userIdentities == null) {\n this.userIdentities = new ArrayList<ACUserIdentity>();\n }\n this.userIdentities.add(userIdentitiesItem);\n return this;\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "@Override\n\tpublic boolean add(T insertItem) {\n\t\t// TODO Just add the item to the array\n\t\tif (isFull()) {\n\t\t\treturn false;\n\t\t}\n\t\tdata[size++] = insertItem;\n\t\treturn true;\n\t}", "public void addItem(Item item) {\r\n for (Item i : inventoryItems) {\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() + item.getCount());\r\n return;\r\n }\r\n }\r\n inventoryItems.add(item);\r\n }", "public void insert(Object item);", "public void insert(int newItem){\n itemArray[count] = newItem;\n count++;\n }", "public ItemsPk insert(Items dto) throws ItemsDaoException;", "public void addItem(Collectable item){\n \tif (!(item instanceof Token)) {\n \t\titems.add(item);\n \t}\n }", "@Override\n public void insertIntoAuthBooks(long cartid, long itemid) {\n wishListRepository.insertIntoAuthBooks(cartid, itemid);\n\n }", "@Override\r\n\tpublic void addItem(Items item) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t List<Items> allItems = new ArrayList<Items>();\r\n\t\t int flag=0;\r\n\t\t try\r\n\t\t {\r\n\t\t\t allItems = session.createQuery(\"from Items\").list();\r\n\t\t\t for (Items item1 : allItems) {\r\n\t\t\t\t\tif(item1.getUserName().equals(item.getUserName()) && item1.getItemName().equals(item.getItemName())){\r\n\t\t\t\t\t\tflag=1;\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You need to choose other name for this task\", \"Error\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t break;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t} \r\n\t\t\t if(flag==0)\r\n\t\t\t {\r\n\t\t\t\t session.beginTransaction();\r\n\t\t\t\t session.save(item);\r\n\t\t\t\t session.getTransaction().commit();\r\n\t\t\t }\r\n\t\t }\r\n\t\t catch (HibernateException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t if(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t }\r\n\t\t finally\r\n\t\t {\r\n\t\t\t if(session != null) \r\n\t\t\t\t{ \r\n\t\t\t\t\tsession.close(); \r\n\t\t\t\t} \r\n\t\t }\t\r\n\t}", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "public void addItem(int itemCollection_id, Item item) {\n\t\t// Start of user code for method addItem\n\t\t// End of user code\n\t}", "public void addItem(SoldItem item) {\n\n items.add(item);\n log.debug(\"Added \" + item.getName() + \" quantity of \" + item.getQuantity());\n\n }", "public void add(E item);", "public boolean add (T item){\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\t\t\t\t\n\t\t\t\t// find the item and return false if item is in the AVLTree\n\t\t\t\tif (table[index].contains((T)item))\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\tif (!table[index].add(item))\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\t// we will add item, so increment modCount\n\t\t\t\tmodCount++;\n\n\t\t\t\thashTableSize++;\n\n\t\t\t\tif (hashTableSize >= tableThreshold)\n\t\t\t\t\trehash(2 * table.length + 1);\n\n\t\t\t\treturn true;\n\t}", "public void addToPolicyTransactions(entity.AppCritPolicyTransaction element);", "public void addItem(Item newItem){\n // check for duplicate item ID\n for (Item item: items) {\n if (item.getItemID() == newItem.getItemID()) {\n item.setQuantity(item.getQuantity() + 1);\n return;\n }\n }\n newItem.setQuantity(1);\n this.items.add(newItem);\n }", "public BookUser addItemInTable(BookUser item) throws ExecutionException, InterruptedException {\n BookUser entity = Azure.mbook.insert(item).get();\n return entity;\n }", "public void insert(KeyedItem newItem);", "@Override\r\n\tpublic void insertEncoreItem2(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem2\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item2\");\r\n\t}", "public boolean add(final OrderedItem item) {\n\t\t\tfinal int i = item.getIndex();\n\t\t\tif (table[index].get(i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttable[index].set(i);\n\t\t\treturn true;\n\t\t}", "protected long insertAndVerifyItem(Item itemToAdd) {\n assertNotNull(\"Null item\", itemToAdd);\n long itemId = mDaoToTest.insertItem(mContext, itemToAdd);\n assertTrue(\"Wrong id\", itemId > 0);\n return itemId;\n }", "public void add(TradeItem newItem) {\n if (newItem.isUnique()) {\n removeType(newItem);\n }\n items.add(newItem);\n }", "@Test\n\tpublic void addTransaction() {\n\t\tTransaction transaction = createTransaction();\n\t\tint size = transactionService.getTransactions().size();\n\t\ttransactionService.addTransaction(transaction);\n\t\tassertTrue(\"No transaction was added.\", size < transactionService.getTransactions().size());\n\t}", "@Override\n public boolean addItem(T item) {\n //Make sure the item is not already in the set\n if(!this.contains(item)){\n //create a new node with the item, and the current first node\n Node n = new Node(item, first);\n //update first node reference\n first = n;\n //increment numItems\n numItems++;\n return true;\n }\n //if item is already in the set return false\n return false;\n }", "@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}", "@Override\n public void addShopcart(int uid) {\n int maxScid;\n if(shopcartsDao.getMaxScid()==null){\n maxScid = 0;\n }\n else{\n maxScid = shopcartsDao.getMaxScid();\n }\n Shopcarts shopcarts = new Shopcarts();\n shopcarts.setScid(maxScid+1);\n shopcarts.setUid(uid);\n shopcartsDao.addShopcarts(shopcarts);\n }", "void add(E item);", "void add(E item);", "void add(E item);", "public void addItemtoInventoryList(String item) {\r\n InventoryList.add(item);\r\n }", "public void add(E item) {\n\t\tDblListnode<E> tmp = lastNode;\n\t\tlastNode.setNext(new DblListnode<E>(item));\n\t lastNode = lastNode.getNext();\n\t lastNode.setPrev(tmp);\n\t numItems++;\n\t}", "public TransactionItem addTransactionItem(int transactionId, int productId, int quantity)\n\t{\n\t\tConnect con=Connect.getConnection();\n\t\tcon.executeQuery(\"USE sudutmeong\");\n\t\tTransactionItem x=new TransactionItem();\n\t\tx.setTransactionId(transactionId);\n\t\tx.setProductId(productId);\n\t\tx.setQuantity(quantity);\n\t\tString query = \"INSERT INTO transactionitem VALUES (\"+transactionId+\",\" + productId + \",\"+ quantity +\")\";\n\t\tcon.executeUpdate(query);\n\t\treturn x;\n\t}", "public void addReservable(Reservable item){\n // Adds an item to the manager\n listI.add(item);\n }", "public void add(CartItem cartItem){\n\t\tString book_id = cartItem.getBook().getBook_id();\n\t\tint count = cartItem.getCount();\n\t\t// if book exist in cart , change count\n\t\tif(map.containsKey(book_id)){ \n\t\t\tmap.get(book_id).setCount( map.get(book_id).getCount() + count); \n\t\t\t\t\t\n\t\t}else{\n\t\t\t// book not exist in cart, put it to map\n\t\t\tmap.put(cartItem.getBook().getBook_id(), cartItem);\n\t\t}\n\t\t\n\t}", "public void addItem(Item item) {\n _items.add(item);\n }", "void addItem(DataRecord record);", "II addId();", "void addId(II identifier);", "public synchronized void add(int index, T obj) {\n\t\tfor(int i = mIds.size(); i > index; i--) {\n\t\t\tmObjects.put(i, mObjects.get(i - 1));\n\t\t}\n\t\t// Add object to actual end of list\n\t\tmObjects.put(index, obj);\n\t\t// Add null for that object to id list\n\t\tmIds.add(index, null);\n\t\tif(mAutoCommit) AndSync.save(obj);\n\t}", "public void store(Item item) {\n this.items.add(item);\n }", "public void adicionar(ItemProduto item) {\n\t\titens.add(item);\n\t}", "public void add(int item) {\r\n if (!contains(item)) {\r\n items[NumItems++] = item;\r\n } else if (NumItems == MAX_LIST) {\r\n throw new ListFullException(\"List is full\");\r\n }\r\n }", "public void addItem(Item param) {\r\n if (localItem == null) {\r\n localItem = new Item[] { };\r\n }\r\n\r\n //update the setting tracker\r\n localItemTracker = true;\r\n\r\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localItem);\r\n list.add(param);\r\n this.localItem = (Item[]) list.toArray(new Item[list.size()]);\r\n }", "@Override\n\tpublic void add(T t) {\n\t\tc.add(t);\n\t}", "private void add(GroceryItem itemObj, String itemName) {\n\t\tbag.add(itemObj);\n\t\tSystem.out.println(itemName + \" added to the bag.\");\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T item){\n\t\t\n\n\t\tif(currentsize == data.length-1){\n\t\t\tgrow();\n\t\t}\n\n\t\t\n\t\tdata[currentsize] = item;\n\t\tcurrentsize++;\n\n\n\t}", "@Override\n\tpublic long insertObjs(Collection<T> t) {\n\t\treturn insertObjs(false, t);\n\t}", "public void addItem(final Item item) {\n\t\tnumberOfItems++;\n\t}", "public static void addItem(int id,int quantity){\n\t\tif(userCart.containsKey(id)){\n\t\t\tint newQuantity = userCart.get(id).getQuantity() + quantity;\n\t\t\tuserCart.get(id).setQuantity(newQuantity);\n\t\t\tSystem.out.println(CartMessage.ALREADY_ADDED + newQuantity);\n\t\t}\n\t\telse{\n\t\t\tproducts.get(id).setQuantity(quantity);\n\t\t\tuserCart.put(id,products.get(id));\n\t\t\tSystem.out.println(CartMessage.ITEM_ADDED);\n\t\t}\n\t}", "public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}", "public void addTransaction\n \t\t(SIPClientTransaction clientTransaction) {\n \tsynchronized (clientTransactions) {\n \t\tclientTransactions.add(clientTransaction);\n \t}\n }", "@Override\n\tpublic Boolean insert(Intervention item) {\n\t\treturn true;\n\t}" ]
[ "0.6163904", "0.5852526", "0.5815534", "0.57440937", "0.56957877", "0.569567", "0.55667084", "0.55471355", "0.553571", "0.5485551", "0.54614294", "0.5449499", "0.5445032", "0.54364794", "0.5429616", "0.5417678", "0.54065466", "0.54005533", "0.5385658", "0.5375011", "0.5350653", "0.5348149", "0.53074026", "0.52772236", "0.5269474", "0.5244137", "0.5237269", "0.5224553", "0.5222082", "0.52178645", "0.5215689", "0.52011037", "0.51766264", "0.51673365", "0.5137562", "0.51356876", "0.5127218", "0.5111172", "0.5109942", "0.5106971", "0.51021355", "0.5091989", "0.50864017", "0.5083561", "0.50792813", "0.50760967", "0.50718224", "0.5064013", "0.5064013", "0.5063074", "0.5050704", "0.50468254", "0.50414824", "0.50399476", "0.5037988", "0.5036717", "0.5033419", "0.5033306", "0.50321525", "0.50277716", "0.50268483", "0.50190556", "0.5016522", "0.50097084", "0.5004094", "0.49969345", "0.49968055", "0.49920282", "0.49903032", "0.49801987", "0.49759406", "0.49744424", "0.49727765", "0.49721876", "0.49703553", "0.49703553", "0.49703553", "0.4970212", "0.49657798", "0.49619186", "0.49596423", "0.4954797", "0.4953832", "0.4953496", "0.49506325", "0.49482018", "0.49278888", "0.49226785", "0.4917801", "0.4915851", "0.49109152", "0.49079132", "0.49073103", "0.49069735", "0.49059898", "0.49042857", "0.49037787", "0.49036735", "0.49005964", "0.4895903" ]
0.6366583
0
Adds a new item to the tradTxCond list.
public SecuritiesTradeDetails137 addTradTxCond(TradeTransactionCondition5Choice tradTxCond) { getTradTxCond().add(tradTxCond); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToPolicyTransactions(entity.AppCritPolicyTransaction element);", "@Override\n public void addItem(P_CK t) {\n \n }", "public void addCostItem(CostItem item) throws CostManagerException;", "protected /*override*/ void InsertItem(int index, Condition item)\r\n { \r\n CheckSealed();\r\n ConditionValidation(item); \r\n super.InsertItem(index, item); \r\n }", "void addCpItem(ICpItem item);", "public void addTransaction(Transactions t){\n listOfTransactions.put(LocalDate.now(), t);\n }", "private void insertItem() {\n System.out.println(\"What is the priority level of the task: \\n\\tH -> high \\n\\tM -> medium \\n\\tL -> low\");\n char priorityLevel = scanner.next().toUpperCase().charAt(0);\n\n priorityLevel = checkPriorityLevel(priorityLevel);\n Categories category;\n if (priorityLevel == 'H') {\n category = Categories.HIGHPRIORITY;\n } else if (priorityLevel == 'M') {\n category = Categories.MIDPRIORITY;\n } else {\n category = Categories.LOWPRIORITY;\n }\n\n System.out.println(\"Enter the name of the task:\");\n scanner.nextLine();\n String name = scanner.nextLine();\n\n String daysBeforeDue = acceptDaysBeforeDue();\n\n Item item = new Item(name, daysBeforeDue, category);\n toDoList.insert(item);\n System.out.println(\"Added successfully!\");\n\n System.out.println(\"Updated to-do list:\");\n viewList();\n }", "public void addItem(Item item){\n if(ChronoUnit.DAYS.between(LocalDate.now(), item.getBestBefore()) <= 2){\n //testInfoMessage = true; //ONLY FOR TESTING\n infoMessage(item.getName(), item.getBestBefore()); // DISABLE FOR TESTING\n }\n itemList.add(item);\n totalCost += item.getPrice();\n }", "public void add( Order item ) {\n\t\tsuper.internalAdd(item);\n\t}", "public void addNewItem(OrderItem newOrderItem){\n itemsInOrder.add(newOrderItem);\n }", "public void add(TradeItem newItem) {\n if (newItem.isUnique()) {\n removeType(newItem);\n }\n items.add(newItem);\n }", "private void addItem(UndoItem item, RefactoringSession session) {\n if (wasUndo) {\n LinkedList<UndoItem> redo = redoList.get(session);\n redo.addFirst(item);\n } else {\n if (transactionStart) {\n undoList.put(session, new LinkedList<UndoItem>());\n descriptionMap.put(undoList.get(session), description);\n transactionStart = false;\n }\n LinkedList<UndoItem> undo = this.undoList.get(session);\n undo.addFirst(item);\n }\n if (!(wasUndo || wasRedo)) {\n redoList.clear();\n }\n }", "public void addTransaction(String ID, ArrayList<Products> items){\n\t\ttransactions.put(ID, items);\n\t}", "@Override\n\tpublic int insertTrading(TradingVO tvo) {\n\t\treturn sql.insert(\"insertTrading\", tvo);\n\t}", "public void addItem(LineItem item)\r\n {\r\n\t ChangeEvent event = new ChangeEvent(this);\r\n\t if(items.contains(item))\r\n\t {\r\n\t\t \r\n\t\t counter = 0;\r\n\t\t items.add(item);\r\n\t\t //tem.addQuantity();\r\n\t\t //tem.getQuantity();\r\n\t\t for(int i = 0; i < items.size(); i++)\r\n\t\t {\r\n\t\t\t if(items.get(i).equals(item))\r\n\t\t\t {\r\n\t\t\t counter++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t\t System.out.print(\"\\r Quantity of \" + item.toString() + \": \"+ counter);\r\n\t\t \r\n\t }\r\n\t else\r\n\t {\r\n\t\t counter = 1;\r\n\t// item.addQuantity();\r\n\t// item.getQuantity();\r\n\t\t items.add(item);\r\n\t// System.out.println(item.getQuantity());\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t \t\r\n\t \tSystem.out.print(\"\\n Quantity of \" + item.toString() + \": \"+ counter);\r\n\t \r\n\t\t \r\n\t }\r\n\t\t\r\n \r\n }", "public boolean addItem(Item item, Supplier sup){\r\n //forbids the modification PO that has been Validated\r\n if ((this.currentStatusChange != null) &&\r\n \t(this.currentStatusChange.ordinal >= PoStatusCode.VALIDATED.ordinal))\r\n throw new IllegalAccessError(\"Cannot add item to PO already Validated\");\r\n \r\n for (ListIterator iter = poLineItems.listIterator() ; iter.hasNext() ;) {\r\n PoLineItem linetemp = (PoLineItem)iter.next();\r\n //increase quantity if same Item\r\n if (linetemp.getItem().equals(item)) {\r\n linetemp.incrementQuantity(1);\r\n return false;\r\n }\r\n }\r\n //new Item\r\n PoLineItem lineItem = new PoLineItem(item,1,sup);\r\n return this.poLineItems.add(lineItem);\r\n }", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}", "public boolean add(final OrderedItem item) {\n\t\t\tfinal int i = item.getIndex();\n\t\t\tif (table[index].get(i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttable[index].set(i);\n\t\t\treturn true;\n\t\t}", "void addItem(DataRecord record);", "public void addTransaction\n \t\t(SIPClientTransaction clientTransaction) {\n \tsynchronized (clientTransactions) {\n \t\tclientTransactions.add(clientTransaction);\n \t}\n }", "void add(T item);", "private void addValidItem(Item item){\r\n\t\titems.put(item.getItemIdentifier(), item);\r\n\t\ttotal.updateTotal(item);\r\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtEntry addNewDebts();", "public void add(int quantidade) {\r\n myLock.lock();\r\n try {\r\n this.quantidade += quantidade;\r\n myCond.signalAll();\r\n } finally {\r\n myLock.unlock();\r\n }\r\n }", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public void addCust(Event temp){\n eventLine.add(temp);\n }", "@Override\r\n\tpublic void addItem(Items item) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t List<Items> allItems = new ArrayList<Items>();\r\n\t\t int flag=0;\r\n\t\t try\r\n\t\t {\r\n\t\t\t allItems = session.createQuery(\"from Items\").list();\r\n\t\t\t for (Items item1 : allItems) {\r\n\t\t\t\t\tif(item1.getUserName().equals(item.getUserName()) && item1.getItemName().equals(item.getItemName())){\r\n\t\t\t\t\t\tflag=1;\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You need to choose other name for this task\", \"Error\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t break;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t} \r\n\t\t\t if(flag==0)\r\n\t\t\t {\r\n\t\t\t\t session.beginTransaction();\r\n\t\t\t\t session.save(item);\r\n\t\t\t\t session.getTransaction().commit();\r\n\t\t\t }\r\n\t\t }\r\n\t\t catch (HibernateException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t if(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t }\r\n\t\t finally\r\n\t\t {\r\n\t\t\t if(session != null) \r\n\t\t\t\t{ \r\n\t\t\t\t\tsession.close(); \r\n\t\t\t\t} \r\n\t\t }\t\r\n\t}", "@Override\r\n\tpublic void insertEncoreItem(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item1\");\r\n\t}", "@Override\n\t\tpublic void addRawitem(Rawitem Rawitem) {\n\t\t\tString sql=\"INSERT INTO rawitem(suppliedby,rquantity,riprice,rstock)\"\n\t\t\t\t\t+ \" values (:suppliedby,:rquantity,:riprice,:rstock)\";\n\t\t\tnamedParameterJdbcTemplate.update(sql,getSqlParameterByModel(Rawitem));\n\t\t}", "public void addTransaction(CustomerTransaction cust) {\n history.add(cust);\n }", "@Test\n public void CompoundTransaction_AddTransactionTest()\n {\n ct = new CompoundTransaction(\"compound\");\n\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n ct.addTransaction(new Transaction(\"atomic1\", acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),10));\n\n ct.addTransaction(new Transaction(\"atomic2\",acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),40));\n\n Assert.assertEquals(2, ct.getTransaction_list().size());\n }", "public int addTask(Item item) {\n try (Session session = this.factory.openSession()) {\n session.beginTransaction();\n session.save(item);\n session.getTransaction().commit();\n } catch (Exception e) {\n this.factory.getCurrentSession().getTransaction().rollback();\n }\n return item.getId();\n }", "public boolean addTransaction(Transaction trans) {\n if (trans == null) {\n return false;\n }\n if (!previousHash.equals(\"0\")) {\n if (!trans.processTransaction()) {\n System.out.println(\"Transaction failed to process. Transaction discarded!\");\n return false;\n }\n }\n transactions.add(trans);\n System.out.println(\"Transaction successfully added to the block\");\n return true;\n }", "public void addItem(Collectable item){\n \tif (!(item instanceof Token)) {\n \t\titems.add(item);\n \t}\n }", "public void addToLinesOfBusiness(entity.AppCritLineOfBusiness element);", "public boolean add(T item) {\n\t\treturn list.add(item);\n\t}", "@Override\n\tpublic int insertOrderTrading(Order_TradingVO otvo) {\n\t\treturn sql.insert(\"insertOrderTrading\", otvo);\n\t}", "@Override\r\n public boolean add(Item item){\r\n if(item.stackable&&contains(item)){\r\n stream().filter(i -> i.name.endsWith(item.name)).forEach(i -> {\r\n i.quantity += item.quantity;\r\n });\r\n }else if(capacity<=size()) return false;\r\n else super.add(item);\r\n return true;\r\n }", "int insertSelective(ItemStockDO record);", "void addTransaction(String[] transaction) {\t\t\n\t\tItemsets frequentItemsets = itemsetSets.get(0);\n\t\t\n\t\tfor (String item : transaction) {\n\t\t\tfrequentItemsets.addTransactionItemset(new Itemset(item));\n\t\t}\n\t}", "public boolean addItem(Item item) throws RemoteException, ClassNotFoundException, SQLException {\n Connection conn = DBConnection.getConnection();\n PreparedStatement stm = conn.prepareStatement(\"Insert into Item values(?,?,?,?)\");\n Object[] itemData = {item.getCode(), item.getDescription(), item.getUnitPrice(), item.getQtyOnHand()};\n for (int i = 0; i < itemData.length; i++) {\n stm.setObject(i + 1, itemData[i]);\n }\n return stm.executeUpdate() > 0;\n }", "@Override\r\n\tpublic void addTipoTramite(TipoTramite tipoTramite) {\n\t\t\r\n\t}", "public void addItem(Item param) {\r\n if (localItem == null) {\r\n localItem = new Item[] { };\r\n }\r\n\r\n //update the setting tracker\r\n localItemTracker = true;\r\n\r\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localItem);\r\n list.add(param);\r\n this.localItem = (Item[]) list.toArray(new Item[list.size()]);\r\n }", "public void addLineItem (LineItem lineItem){\n if (this.orderStatus != OrderStatus.Closed && !lineItem.isOrdered() && !lineItems.contains(lineItem)){\n lineItems.add(lineItem);\n total += lineItem.getPrice();\n lineItem.setOrdered(true);\n this.getAccount().setBalance(this.getAccount().getBalance() - lineItem.getPrice());\n }\n }", "@Override\n\tpublic int add(Forge_Order_Detail t) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void add(T t) {\n\t\tc.add(t);\n\t}", "public void add(T ob) throws ToDoListException;", "public void addItemAt(MySmsMessage itemTemp,int positionTemp){\n dataset.add(positionTemp,itemTemp);\n notifyItemInserted(positionTemp);\n }", "List<TransactionVO> addPendingTransactions(List<SignedTransaction> transactions);", "protected abstract Transaction createAndAdd();", "public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}", "void addToQueuing(int tu){\n\t\tfor(Request req : queue.list){\n\t\t\tif(req.getReqTime() * 2 > tu){\t//大于当前时间的就不管了\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif(req.getValid() == true){\t//如果没被删除,拷贝一份,删之,并将拷贝添加到Queuing里面\n\t\t\t\tRequest tmp = req.cloneAnObj();\t\t//克隆一个新的对象\n\t\t\t\treq.setValid(false);\n\t\t\t\tqueuing.list.add(tmp);\t//可以用引用对Queuing进行操作\n\t\t\t}\n\t\t}\n\t}", "private void transactionAdd(PlanRecord plan, Context context) {\n final Calendar cal = Calendar.getInstance();\n Locale locale = context.getResources().getConfiguration().locale;\n DateTime date = new DateTime();\n date.setCalendar(cal);\n\n ContentValues transactionValues = new ContentValues();\n transactionValues.put(DatabaseHelper.TRANS_ACCT_ID, plan.acctId);\n transactionValues.put(DatabaseHelper.TRANS_PLAN_ID, plan.id);\n transactionValues.put(DatabaseHelper.TRANS_NAME, plan.name);\n transactionValues.put(DatabaseHelper.TRANS_VALUE, plan.value);\n transactionValues.put(DatabaseHelper.TRANS_TYPE, plan.type);\n transactionValues.put(DatabaseHelper.TRANS_CATEGORY, plan.category);\n transactionValues.put(DatabaseHelper.TRANS_MEMO, plan.memo);\n transactionValues.put(DatabaseHelper.TRANS_TIME, date.getSQLTime(locale));\n transactionValues.put(DatabaseHelper.TRANS_DATE, date.getSQLDate(locale));\n transactionValues.put(DatabaseHelper.TRANS_CLEARED, plan.cleared);\n\n //Insert values into accounts table\n context.getContentResolver().insert(MyContentProvider.TRANSACTIONS_URI, transactionValues);\n }", "int addItem(final T pNode);", "void add(Item item);", "@Override\n public void addItem(ItemType item) {\n if (curArrayIndex > items.length - 1) {\n System.out.println(item.getDetails() + \" - This bin is full. Item cannot be added!\");\n }\n else if (item.getWeight() + curWeight <= maxWeight) {\n curWeight += item.getWeight();\n items[curArrayIndex++] = item;\n }\n else {\n System.out.println(item.getDetails() + \" - Overweighted. This item cannot be added!\");\n }\n if (item.isFragile()) {\n setLabel(\"Fragile - Handle with Care\");\n }\n\n }", "@Override\n\tpublic boolean add(T insertItem) {\n\t\t// TODO Just add the item to the array\n\t\tif (isFull()) {\n\t\t\treturn false;\n\t\t}\n\t\tdata[size++] = insertItem;\n\t\treturn true;\n\t}", "public void addOrderItem(OrderItem item)\r\n\t{\r\n\t\torderItemList.add(item);\r\n\t}", "public void addTransaction(String s) {\r\n\t\ttransactions.add(s);\r\n\t}", "int insertSelective(TbExpressTrace record);", "public void addItemToList(String[] item) {\n \t\n \tcurrentTaskItems.add(item);\n }", "public void insertOrderedItems(TireList orderedItems){\n for(int i=0; i<orderedItems.listSize(); i++){\n int temp = Integer.parseInt(orderedItems.getTire(i).getStock()) - orderedItems.getTire(i).getQuantity();\n orderedItems.getTire(i).setStock(temp + \"\");\n orderedItems.getTire(i).updateTire();\n sql=\"Insert into OrderedItems (OrderID, TireID, Quantity) VALUES ('\"+newID+\"','\"+orderedItems.getTire(i).getStockID()+\"',\"+orderedItems.getTire(i).getQuantity()+\")\";\n db.insertDB(sql); \n }\n }", "public void addItem(CSVItem item)\n\t{\n\t\titemList.add(item);\n\t}", "public boolean insertItem(BPTreeNodeItem item);", "public void addItemToCart(Item item) {\n itemList.add(item);\n this.totalTaxes = totalTaxes.add(item.getTaxes());\n this.totalPrices = totalPrices.add(item.getTtcPrice());\n }", "@attribute(value = \"\", required = false)\r\n\tpublic void addItem(Item i) {\r\n\t}", "public boolean add (T item){\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\t\t\t\t\n\t\t\t\t// find the item and return false if item is in the AVLTree\n\t\t\t\tif (table[index].contains((T)item))\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\tif (!table[index].add(item))\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\t// we will add item, so increment modCount\n\t\t\t\tmodCount++;\n\n\t\t\t\thashTableSize++;\n\n\t\t\t\tif (hashTableSize >= tableThreshold)\n\t\t\t\t\trehash(2 * table.length + 1);\n\n\t\t\t\treturn true;\n\t}", "public void addCargo(Item item) {\n\t\tif (item instanceof Perishable) {\n\t\t\tif (((Perishable) item).getMaxTemp() < maxTemp) {\n\t\t\t\tthis.maxTemp = ((Perishable) item).getMaxTemp();\n\t\t\t\tsetCost(maxTemp);\n\t\t\t}\n\t\t}\n\t}", "private void addToWaitMap(ITransaction tx, ITransactionOperation txOp){\r\n\t\tQueue<ITransactionOperation> waitingTxOps = waitMap.get(tx);\r\n\t\tif(waitingTxOps == null){\r\n\t\t\twaitingTxOps = new LinkedList<>();\r\n\t\t}\r\n\t\t\r\n\t\twaitingTxOps.add(txOp);\r\n\t\twaitMap.put(tx, waitingTxOps);\r\n\t}", "private void addrec() {\n\t\tnmfkpinds.setPgmInd34(false);\n\t\tnmfkpinds.setPgmInd36(true);\n\t\tnmfkpinds.setPgmInd37(false);\n\t\tstateVariable.setActdsp(replaceStr(stateVariable.getActdsp(), 1, 8, \"ADDITION\"));\n\t\tstateVariable.setXwricd(\"INV\");\n\t\ttransactionTypeDescription.retrieve(stateVariable.getXwricd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00003 Trn_Hst_Trn_Type not found on Transaction_type_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwtdsc(all(\"-\", 20));\n\t\t}\n\t\tstateVariable.setXwa2cd(\"EAC\");\n\t\tstateVariable.setUmdes(replaceStr(stateVariable.getUmdes(), 1, 11, um[1]));\n\t\taddrec0();\n\t}", "public boolean add(Type item);", "@Test\n\tpublic void addTransaction() {\n\t\tTransaction transaction = createTransaction();\n\t\tint size = transactionService.getTransactions().size();\n\t\ttransactionService.addTransaction(transaction);\n\t\tassertTrue(\"No transaction was added.\", size < transactionService.getTransactions().size());\n\t}", "public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n \t} else return false;\r\n } else {\r\n \titemCollection.put(item.getItemName(), item);\r\n \treturn true;\r\n }\r\n \t\r\n }", "public void addTransaction(Transaction tx) {\n this.txPool.addTransaction(tx);\n }", "public RetailStore addTransportTask(RetailscmUserContext userContext, String retailStoreId, String name, String start, Date beginTime, String driverId, String truckId, String belongsToId, BigDecimal latitude, BigDecimal longitude , String [] tokensExpr) throws Exception;", "public void add(T item) {\n\t\tcounts.put(item, counts.getOrDefault(item, 0) + 1);\n\t}", "public boolean add(T item) {\n boolean addSuccessful = items.add(item);\n if (addSuccessful) {\n currentSize = -1.0;\n inCapacitySize = -1.0;\n }\n return addSuccessful;\n }", "public final TokenStatement push(final TokenStatement item) {\r\n\t\tthis.ensureCapacity( this.size + 1 ); // Increments modCount!!\r\n\t\tthis.elementData[this.size++] = item;\r\n\t\treturn item;\r\n\t}", "public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}", "@Override\n\tpublic Boolean insert(Intervention item) {\n\t\treturn true;\n\t}", "public void addItem(SalesOrderItem... entity) {\r\n if (toItem == null) {\r\n toItem = Lists.newArrayList();\r\n }\r\n toItem.addAll(Lists.newArrayList(entity));\r\n }", "public synchronized void addItem(IJABXAdvertisementItem item) {\n\t\tidMap.put(item.getSerialNo(), item);\n\t\titemList.add(item);\n\t}", "public void add(T toAdd) {\n\t\tif (load.size() == maxLoad)\n\t\t\tSystem.out.println(\"\tERROR: Not enough room for the given item.\");\n\t\t\n\t\t//checks if this has already been loaded\n\t\telse {\n\n\t\t\tboolean loaded = false;\n\t\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < load.size(); i++) {\n\t\t\t\t\n\t\t\t\t/*System.out.println(\"***********\");\n\t\t\t\tSystem.out.println(load.get(i).getID());\n\t\t\t\tSystem.out.println(toAdd.getID());\n\t\t\t\tSystem.out.println(\"***********\");*/\n\t\t\t\t\n\t\t\t\tif (load.get(i).getID().equals(toAdd.getID()))\n\t\t\t\t\tloaded = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (loaded == false)\n\t\t\t\tload.add(toAdd);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"\tERROR: Invalid item, item with id \" + toAdd.getID() + \" already exists.\");\n\t\t}\n\t}", "private void addToLineItem(LineItem newLineItem) {\r\n LineItem[] tempItems = new LineItem[lineItems.length + 1];\r\n System.arraycopy(lineItems, 0, tempItems, 0, lineItems.length);\r\n tempItems[lineItems.length] = newLineItem;\r\n lineItems = tempItems;\r\n }", "@Test\n\tpublic void testAddItem() {\n\t\tassertEquals(\"testAddItem(LongTermTest): valid enter failure\", 0, ltsTest.addItem(item4, 10)); //can enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid enter failure\", -1, ltsTest.addItem(item4, 100)); // can't enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\t}", "int insertSelective(TRefundOrder record);", "public void addItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n\n db.insert(TABLE_NAME, null, values); //Insert query to store the record in the database\n db.close();\n\n }", "private void addTransactions(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n ensureTransactionsIsMutable();\n transactions_.add(value);\n }", "public void addToDoEntry(String toDoItem) {\n\t\t// adds a new item at the end of the list\n\t\ttoDoList.add(new ToDoEntry(toDoItem));\n\t}", "public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}", "void add(RecordItemValidatorIF itemValidator);", "public void AddItem( Standard_Transient anentity) {\n OCCwrapJavaJNI.Interface_EntityIterator_AddItem(swigCPtr, this, Standard_Transient.getCPtr(anentity) , anentity);\n }", "int insertSelective(EquipmentOrder record);", "public void carry(Item item)\n {\n\n // Check if item to be added doesn't go over carry limit.\n if (!((getPerson(PLAYER).getWeight() + item.getWeight()) > getPerson(PLAYER).getCarryLimit())){\n getPerson(PLAYER).getInventory().getItems().add(item); \n\n removeRoomItem(item);\n System.out.println();\n System.out.println(item.getName() + \" has been added to your bag.\");\n System.out.println(\"You are carrying \" + getPerson(PLAYER).getWeight()+ \"kg.\");\n }\n else {\n System.out.println(\"Your bag is too heavy to add more items.\");\n }\n\n }", "public nc.vo.crd.acc.feeaccr.feeaccrbvo.FeeAccrBVO addNewFeeAccrBVOItem()\n {\n synchronized (monitor())\n {\n check_orphaned();\n nc.vo.crd.acc.feeaccr.feeaccrbvo.FeeAccrBVO target = null;\n target = (nc.vo.crd.acc.feeaccr.feeaccrbvo.FeeAccrBVO)get_store().add_element_user(FEEACCRBVOITEM$2);\n return target;\n }\n }", "public void makeTransaction(Item item, String type) {\n\t\tthis.item = item;\n\t\ttransactionType = type;\n\t}", "public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}", "private void add(GroceryItem itemObj, String itemName) {\n\t\tbag.add(itemObj);\n\t\tSystem.out.println(itemName + \" added to the bag.\");\n\t}", "public abstract void add(T item) throws RepositoryException;" ]
[ "0.5921843", "0.5772508", "0.5710176", "0.56951654", "0.5543576", "0.5422227", "0.54050153", "0.5330981", "0.5312903", "0.52391714", "0.5233763", "0.52088755", "0.52077925", "0.5171025", "0.5143893", "0.5139734", "0.5136381", "0.5136269", "0.5125704", "0.51237696", "0.51170665", "0.5102945", "0.5099284", "0.5098258", "0.50791687", "0.507624", "0.50627154", "0.5056808", "0.50520664", "0.5049821", "0.5046458", "0.50335467", "0.5030018", "0.50271124", "0.5025952", "0.5016993", "0.50125897", "0.5007374", "0.50033695", "0.49964646", "0.49889314", "0.49880642", "0.49654695", "0.49637845", "0.49548265", "0.49535337", "0.4949835", "0.49452335", "0.4939739", "0.49382782", "0.49244243", "0.49205923", "0.49202472", "0.49185604", "0.49149317", "0.4913909", "0.4889883", "0.48851073", "0.48814216", "0.4871748", "0.48678273", "0.48667493", "0.4865883", "0.48594543", "0.48457548", "0.48425442", "0.483648", "0.48345637", "0.48332253", "0.48309952", "0.48281685", "0.4823402", "0.4816414", "0.4813857", "0.48116925", "0.48110738", "0.48035368", "0.47975677", "0.47971624", "0.4796192", "0.47916433", "0.47883993", "0.4784792", "0.4783563", "0.47710234", "0.47665015", "0.47628528", "0.47590262", "0.47584784", "0.47546202", "0.474754", "0.47456288", "0.47434914", "0.47412702", "0.47385162", "0.47372392", "0.47323698", "0.47274888", "0.47271857", "0.47218916" ]
0.59983
0
Adds a new item to the splmtryData list.
public SecuritiesTradeDetails137 addSplmtryData(SupplementaryData1 splmtryData) { getSplmtryData().add(splmtryData); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addItem(DataRecord record);", "void add(Item item);", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "public void addItem(Item param) {\r\n if (localItem == null) {\r\n localItem = new Item[] { };\r\n }\r\n\r\n //update the setting tracker\r\n localItemTracker = true;\r\n\r\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localItem);\r\n list.add(param);\r\n this.localItem = (Item[]) list.toArray(new Item[list.size()]);\r\n }", "public void addFirst(Object item) {\r\n\t\tdata.add(0, item);\r\n\t}", "public void push(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "public void addItem(SoldItem item) {\n\n items.add(item);\n log.debug(\"Added \" + item.getName() + \" quantity of \" + item.getQuantity());\n\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T item){\n\t\t\n\n\t\tif(currentsize == data.length-1){\n\t\t\tgrow();\n\t\t}\n\n\t\t\n\t\tdata[currentsize] = item;\n\t\tcurrentsize++;\n\n\n\t}", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public AdditionalPaymentInformationV07 addSplmtryData(SupplementaryData1 splmtryData) {\n getSplmtryData().add(splmtryData);\n return this;\n }", "public AccountReportV02 addSplmtryData(SupplementaryData1 splmtryData) {\n getSplmtryData().add(splmtryData);\n return this;\n }", "@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}", "public void addItem(Object obj) {\n items.add(obj);\n }", "public void addData(String dataName, Object dataItem){\r\n this.mData.put(dataName, dataItem);\r\n }", "public ReturnBusinessDayInformationV06 addSplmtryData(SupplementaryData1 splmtryData) {\n getSplmtryData().add(splmtryData);\n return this;\n }", "public abstract void addItem(AbstractItemAPI item);", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "public ProprietaryFormatInvestigationV05 addSplmtryData(SupplementaryData1 splmtryData) {\n getSplmtryData().add(splmtryData);\n return this;\n }", "public void addItem(String item){\n adapter.add(item);\n }", "public void addItem(Item item) {\n _items.add(item);\n }", "public void addItem(Item i) {\n this.items.add(i);\n }", "@Override\n public void onItemAdded(Object toAdd) {\n if(toAdd instanceof SpotifyItem)\n return;\n\n //Reflect changes in the drink list\n DrinkInfo item = (DrinkInfo)toAdd;\n Log.d(TAG, \"Array size = \" + mDrinkInfos.size());\n mDrinkInfos.add(mDrinkInfos.size(), item);\n mDrinkQueueAdapter.notifyDataSetChanged();\n Log.d(TAG, \"Added song: \" + item.getDrinkName());\n }", "public void addItem(Object item) {\r\n\t\tlistModel.addElement(item);\r\n\t}", "public void addProduct(Product item)\n {\n stock.add(item);\n }", "public SecuritiesSettlementTransactionAllegementNotificationV02 addSplmtryData(SupplementaryData1 splmtryData) {\n getSplmtryData().add(splmtryData);\n return this;\n }", "@Override\n\tpublic void addDataItem(FinanceData newdata) {\n\t\tlist_fr.add(0, newdata);\n\t}", "public void add(Item item) {\r\n\t\tcatalog.add(item);\r\n\t}", "public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}", "public void addItem(LibraryItem item){\r\n\t\t// use add method of list.class\r\n\t\tthis.inverntory.add(item);\r\n\t}", "public void store(Item item) {\n this.items.add(item);\n }", "public void addItem(Item item) {\n\t\thashOperations.put(KEY, item.getId(), item);\n\t\t//valueOperations.set(KEY + item.getId(), item);\n\t}", "public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}", "void addFruit(Fruit item){\n\t\tfruitList.add(item);\n\t}", "private void addItem(Movie item) {\n mDataset.add(item);\n notifyItemInserted(mDataset.size() );\n notifyDataSetChanged();\n }", "public boolean add(Type item);", "@Override\n public void add(Object item)\n {\n if (size == list.length)\n {\n Object [] itemInListCurrently = deepCopy();\n list = new Object[size * 2];\n\n System.arraycopy(itemInListCurrently, 0, list, 0, size);\n }\n\n list[size++] = item;\n }", "public void addLast(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "public void add(MeasurementItem mi)\r\n {\r\n if(this.measurementItems==null) this.measurementItems=new ArrayList();\r\n measurementItems.add(mi);\r\n \r\n itemsQuantity=(measurementItems!=null)?measurementItems.size():0;\r\n }", "public synchronized void addItem(IJABXAdvertisementItem item) {\n\t\tidMap.put(item.getSerialNo(), item);\n\t\titemList.add(item);\n\t}", "@SuppressWarnings (\"unchecked\") public void add(String item){\n if(item==null)\n return;\n items.add(item.trim());\n }", "public void add(TradeItem newItem) {\n if (newItem.isUnique()) {\n removeType(newItem);\n }\n items.add(newItem);\n }", "public void addCostItem(CostItem item) throws CostManagerException;", "void addCpItem(ICpItem item);", "public void add(Item item) {\n for (int i = 0; i < items.length; i++) {\n if (items[i] == null) {\n items[i] = item;\n break;\n }\n }\n }", "public void addItem(Item item) {\n\t\titems.add(item);\n\t}", "public void addItem(CSVItem item)\n\t{\n\t\titemList.add(item);\n\t}", "public void addItem( Item anItem) {\n currentItems.add(anItem);\n }", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}", "@Override\n public void addItem(P_CK t) {\n \n }", "void addData();", "public void insert(int position, Imgdata spldata) {\n list.add(position, spldata);\n notifyItemInserted(position);\n }", "public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}", "public int addItem(Item i);", "public void addItemtoInventoryList(String item) {\r\n InventoryList.add(item);\r\n }", "public Item addItem(Item item) {\r\n uniqueCounter++;\r\n items.add(item);\r\n return item;\r\n }", "public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}", "public void addItemAt(MySmsMessage itemTemp,int positionTemp){\n dataset.add(positionTemp,itemTemp);\n notifyItemInserted(positionTemp);\n }", "public void addItem(final Item item) {\n\t\tnumberOfItems++;\n\t}", "public void addItem(Item e) {\n\t\tItem o = new Item(e);\n\t\titems.add(o);\n\t}", "public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }", "public void add(T toAdd) {\n\t\tif (load.size() == maxLoad)\n\t\t\tSystem.out.println(\"\tERROR: Not enough room for the given item.\");\n\t\t\n\t\t//checks if this has already been loaded\n\t\telse {\n\n\t\t\tboolean loaded = false;\n\t\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < load.size(); i++) {\n\t\t\t\t\n\t\t\t\t/*System.out.println(\"***********\");\n\t\t\t\tSystem.out.println(load.get(i).getID());\n\t\t\t\tSystem.out.println(toAdd.getID());\n\t\t\t\tSystem.out.println(\"***********\");*/\n\t\t\t\t\n\t\t\t\tif (load.get(i).getID().equals(toAdd.getID()))\n\t\t\t\t\tloaded = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (loaded == false)\n\t\t\t\tload.add(toAdd);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"\tERROR: Invalid item, item with id \" + toAdd.getID() + \" already exists.\");\n\t\t}\n\t}", "public void addItem(Item item) {\r\n if (items == null) {\r\n items = new ArrayList();\r\n }\r\n items.add(item);\r\n }", "public void addItem(Product p) {\n\t\t_items.add(p);\n\t}", "public void add(E item);", "@Override\r\n public boolean add(Item item){\r\n if(item.stackable&&contains(item)){\r\n stream().filter(i -> i.name.endsWith(item.name)).forEach(i -> {\r\n i.quantity += item.quantity;\r\n });\r\n }else if(capacity<=size()) return false;\r\n else super.add(item);\r\n return true;\r\n }", "public void addItem(SalesItem salesItem)\n {\n this.salesItem[numItemsAdded] = salesItem;\n numItemsAdded = numItemsAdded + 1;\n }", "public boolean add(T item) {\n\t\treturn list.add(item);\n\t}", "public void addItem(LineItem item)\r\n {\r\n\t ChangeEvent event = new ChangeEvent(this);\r\n\t if(items.contains(item))\r\n\t {\r\n\t\t \r\n\t\t counter = 0;\r\n\t\t items.add(item);\r\n\t\t //tem.addQuantity();\r\n\t\t //tem.getQuantity();\r\n\t\t for(int i = 0; i < items.size(); i++)\r\n\t\t {\r\n\t\t\t if(items.get(i).equals(item))\r\n\t\t\t {\r\n\t\t\t counter++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t\t System.out.print(\"\\r Quantity of \" + item.toString() + \": \"+ counter);\r\n\t\t \r\n\t }\r\n\t else\r\n\t {\r\n\t\t counter = 1;\r\n\t// item.addQuantity();\r\n\t// item.getQuantity();\r\n\t\t items.add(item);\r\n\t// System.out.println(item.getQuantity());\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t \t\r\n\t \tSystem.out.print(\"\\n Quantity of \" + item.toString() + \": \"+ counter);\r\n\t \r\n\t\t \r\n\t }\r\n\t\t\r\n \r\n }", "public void addItem(LineItem lineItem){\n\t\t\n\t\tlineItems.add(lineItem);\n\t}", "void add(T item);", "@attribute(value = \"\", required = false)\r\n\tpublic void addItem(Item i) {\r\n\t}", "public void addRow(Spedizione spedizione){\n spedizioni.add(spedizione);\n fireTableChanged(new TableModelEvent(this));\n }", "public void addItem(Item item){\n if(ChronoUnit.DAYS.between(LocalDate.now(), item.getBestBefore()) <= 2){\n //testInfoMessage = true; //ONLY FOR TESTING\n infoMessage(item.getName(), item.getBestBefore()); // DISABLE FOR TESTING\n }\n itemList.add(item);\n totalCost += item.getPrice();\n }", "public void addItem(JSONObject obj) {\n coordinates.put(obj);\n }", "public boolean offer(Object item) {\r\n\r\n\t\tdata.add(item);\r\n\t\t// no size restriction so it should always be true\r\n\t\treturn true;\r\n\t}", "public void addGroceryItem(String item){\n groceryList.add(item);\n }", "public void addItem() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter Item Name: \");\n\t\tString itemName = scanner.nextLine();\n\t\tSystem.out.print(\"Enter Item Description: \");\n\t\tString itemDescription = scanner.nextLine();\n\t\tSystem.out.print(\"Enter minimum bid price for item: $\");\n\t\tdouble basePrice = scanner.nextDouble();\n\t\tLocalDate createDate = LocalDate.now();\n\t\tItem item = new Item(itemName, itemDescription, basePrice, createDate);\n\t\taddItem(item);\n\t}", "public void addItem(Collectable item){\n \tif (!(item instanceof Token)) {\n \t\titems.add(item);\n \t}\n }", "public void add(ToDoItem item) {\n mItems.add(item);\n notifyDataSetChanged();\n }", "public void addProduct(Product item){\n inventory.add(item);\n }", "public void add(int index, Object item)\n {\n items[index] = item;\n numItems++;\n }", "public void enterItem(DessertItem item)\n {\n dessertList.add(item);\n }", "private void addNewSpinnerItem() {\n\t\tmscust=ecust.getText().toString();\n\t\tCharSequence textHolder = \"\" +mscust; \n\t\tadapter.insert(textHolder, 0);\n\t\tshome.setAdapter(adapter);\n\t\t}", "public void addTodoItem(TodoItem item) {\n todoItems.add(item);\n }", "public void adicionar(ItemProduto item) {\n\t\titens.add(item);\n\t}", "public void addItem(Item theItem) {\n\t\tif (inventory != null) {\n\t\t\tif (!isAuctionAtMaxCapacity()) {\n\t\t\t\t// Check item doesn't already exist as key in map\n\t\t\t\tif (inventory.containsKey(theItem)) {\n\t\t\t\t\t//ERROR CODE: ITEM ALREADY EXISTS\n\t\t\t\t\tSystem.out.println(\"That item already exists in the inventory.\");\n\t\t\t\t} else\n\t\t\t\t\tinventory.put(theItem, new ArrayList<Bid>());\n\t\t\t} else if (isAuctionAtMaxCapacity()) {\n\t\t\t\t//ERROR CODE: AUCTION AT MAX CAPACITY\n\t\t\t\tSystem.out.println(\"\\nYour auction is at maximum capacity\");\n\t\t\t} \n\t\t} else {\n\t\t\tinventory = new HashMap<Item, ArrayList<Bid>>();\n\t\t\tinventory.put(theItem, new ArrayList<Bid>());\t\t\t\t\n\t\t} \t\t\t\t\t\t\n\t}", "public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}", "public void addToSale(ItemDTO item, int quantity){\n this.saleInfo.addItem(item, quantity);\n }", "@RequestMapping(method=RequestMethod.POST, value = \"/item/{id}\", produces = \"application/json\")\n public void addItem(@RequestBody Item itemToAdd)\n {\n this.itemRepository.addItem(itemToAdd);\n }", "public void add(Object o){\n list.add(o);\n }", "public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n \t} else return false;\r\n } else {\r\n \titemCollection.put(item.getItemName(), item);\r\n \treturn true;\r\n }\r\n \t\r\n }", "public void addItem(View v){\n //Creates a new IngredientModel, adds it to the List<IngredientModel>\n IngredientModel ingredientModel = new IngredientModel(ingredientEditText.getText().toString());\n ingredientModelList.add(ingredientModel);\n //Notifies the adapter the data set has changed in order to update the recyclerView\n ingredientSearchAdapter.notifyDataSetChanged();\n }", "@Override\n\tpublic boolean add(T insertItem) {\n\t\t// TODO Just add the item to the array\n\t\tif (isFull()) {\n\t\t\treturn false;\n\t\t}\n\t\tdata[size++] = insertItem;\n\t\treturn true;\n\t}", "public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}", "void add(E item);", "void add(E item);", "void add(E item);", "public int addItem(Itemset i);" ]
[ "0.7044315", "0.6951915", "0.6786257", "0.6753722", "0.67040086", "0.6646303", "0.662905", "0.65964556", "0.65942633", "0.6554172", "0.6554172", "0.6543905", "0.6542192", "0.65407443", "0.6528813", "0.648355", "0.6467716", "0.6427567", "0.64113224", "0.64003885", "0.6399825", "0.6375353", "0.63709575", "0.6360355", "0.6349741", "0.63483596", "0.6342524", "0.6339467", "0.6312871", "0.631221", "0.63038236", "0.63002616", "0.6299275", "0.6280838", "0.62568206", "0.6256335", "0.6255542", "0.62286246", "0.62173975", "0.6207851", "0.6206209", "0.61965644", "0.618767", "0.61846197", "0.6179922", "0.61795294", "0.6169297", "0.61614203", "0.61569357", "0.6156819", "0.61552817", "0.6154902", "0.6153198", "0.61498743", "0.6148731", "0.6146273", "0.61430347", "0.6141949", "0.6090206", "0.6059438", "0.60568064", "0.60537523", "0.6052023", "0.6051151", "0.6050611", "0.6046907", "0.6041085", "0.6034149", "0.602759", "0.60224605", "0.6022329", "0.60145694", "0.6014359", "0.60026", "0.59884334", "0.59853727", "0.5981338", "0.5981057", "0.59806496", "0.59806216", "0.5978583", "0.5973365", "0.59730446", "0.5972405", "0.59666", "0.5964649", "0.59615666", "0.59571266", "0.59550214", "0.5953727", "0.59471995", "0.59445226", "0.59429574", "0.5935556", "0.59339845", "0.592222", "0.59208775", "0.59208775", "0.59208775", "0.588876" ]
0.632687
28
Loads a single plugin from the file
private void loadPlugin(File file) { JarFile jarFile; try { jarFile = new JarFile(file); } catch (IOException e) { Logger.instance.logf(Level.WARNING, Messages.PLUGIN_JARFILE_CREATE, e); return; } JarEntry pJson = jarFile.getJarEntry("plugin.json"); if (pJson == null) return; try { BufferedReader reader = new BufferedReader(new InputStreamReader(jarFile.getInputStream(pJson))); PluginInfo info = new GsonBuilder().setPrettyPrinting().create().fromJson(reader, PluginInfo.class); if (info != null) { ClassLoader classLoader = new URLClassLoader(new URL[] { file.toURI().toURL() }, this.getClass().getClassLoader()); Plugin plugin; try { plugin = (Plugin) classLoader.loadClass(info.getMain()).newInstance(); plugin.setInfo(info); plugins.add(plugin); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { Logger.instance.logf(Level.WARNING, Messages.PLUGIN_INSTANTIATION, e); return; } Enumeration<JarEntry> entries = jarFile.entries(); while (entries.hasMoreElements()) { JarEntry e = entries.nextElement(); String name = e.getName(); if (name.endsWith(".class")) { try { Class clazz = Class.forName(name.substring(0, name.length() - 6).replace('/', '.'), true, classLoader); if (clazz != null && clazz.getSuperclass().equals(Module.class)) { try { plugin.loadModule((Module) clazz.newInstance()); } catch (InstantiationException | IllegalAccessException exception) { Logger.instance.logf(Level.WARNING, Messages.PLUGIN_CANT_CREATE_MODULE, exception); } } } catch (ClassNotFoundException exception) { Logger.instance.logf(Level.WARNING, Messages.PLUGIN_CANT_LOAD_CLASS, name); } } } } } catch (IOException e) { Logger.instance.logf(Level.WARNING, Messages.PLUGIN_CANT_CREATE_INPUTSTREAM, file.getAbsolutePath()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IPluginResource load( URI path ) throws LoaderException;", "public void load(Maussentials plugin);", "private Plugin loadPlugin(String p) {\n Plugin plugin = this.getServer().getPluginManager().getPlugin(p);\n if (plugin != null && plugin.isEnabled()) {\n getLogger().info(\" Using \" + plugin.getDescription().getName() + \" (v\" + plugin.getDescription().getVersion() + \")\");\n return plugin;\n }\n return null;\n }", "public String loadNewPlugin(final String extPointId);", "public native void loadPlugin(final String plugin);", "<T> T getPluginInstance(Class<T> type, String className, ClassLoader classLoader) throws PluginLoadingException;", "Plugin getPlugin( );", "public void load(File source);", "Plugin getPlugin();", "public PluginInfo load(String apkfile, String packageName) {\n\t\tPluginInfo pluginInfo = new PluginInfo();\n\n\t\ttry {\n\t\t\tboolean ok = pluginInfo.load(context, storagePath, apkfile, packageName);\n\t\t\t\n\t\t\tlog.d(\"load plugin: \" + apkfile + \", name:\" + packageName + \", result:\" + ok);\n\t\t\t\n\t\t\tif (!ok)\n\t\t\t\treturn null;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tsynchronized(this) {\n\t\t\t//Will object information added to the plugin's container\n\t\t\tpluginInfoMap.put(pluginInfo.getPackageName(), pluginInfo);\n\t\t}\n\t\treturn pluginInfo;\n\t}", "public static void load() {\n }", "public boolean load(String file);", "public void load() throws ClassNotFoundException, IOException;", "public void load();", "public void load();", "public abstract Source load(ModuleName name);", "@Override\n\tpublic Object load(String file) {\n\t\treturn null;\n\t}", "public void load (IFile file) throws Exception;", "public Extension loadExtension(String name, String path) {\n if (presetExtensions.containsKey(name)) {\n Extension extension = null;\n try {\n Class clazz = presetExtensions.get(name);\n Constructor<Extension> constructor = clazz.getConstructor(); \n extension = (Extension)constructor.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return extension;\n }\n try {\n File file = new File(path);\n URL[] urls = { file.toURI().toURL() };\n URLClassLoader urlClassLoader = new URLClassLoader(urls);\n JarFile jar = new JarFile(file);\n Extension extension = null;\n for (Enumeration<JarEntry> entries = jar.entries(); entries.hasMoreElements();) {\n JarEntry entry = entries.nextElement();\n String entryName = entry.getName();\n if (!entryName.endsWith(\".class\")) continue;\n String className = entryName.replace(\"/\", \".\").substring(0, entryName.length() - 6);\n try {\n Class clazz = urlClassLoader.loadClass(className);\n if (!Extension.class.isAssignableFrom(clazz)) continue;\n Constructor<Extension> constructor = clazz.getConstructor(String.class, String.class);\n extension = (Extension)constructor.newInstance(name, path);\n } catch (ClassNotFoundException e1) {\n // e1.printStackTrace();\n }\n }\n jar.close();\n urlClassLoader.close();\n return extension;\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "private static void load(){\n }", "public T loadConfig(File file) throws IOException;", "void load(File file);", "public static void load() {\n tag = getPlugin().getConfig().getString(\"Tag\");\n hologram_prefix = getPlugin().getConfig().getString(\"Prefix\");\n hologram_time_fixed = getPlugin().getConfig().getBoolean(\"Hologram_time_fixed\");\n hologram_time = getPlugin().getConfig().getInt(\"Hologram_time\");\n hologram_height = getPlugin().getConfig().getInt(\"Hologram_height\");\n help_message = getPlugin().getConfig().getStringList(\"Help_message\");\n hologram_text_lines = getPlugin().getConfig().getInt(\"Max_lines\");\n special_chat = getPlugin().getConfig().getBoolean(\"Special_chat\");\n radius = getPlugin().getConfig().getBoolean(\"Radius\");\n radius_distance = getPlugin().getConfig().getInt(\"Radius_distance\");\n chat_type = getPlugin().getConfig().getInt(\"Chat-type\");\n spectator_enabled = getPlugin().getConfig().getBoolean(\"Spectator-enabled\");\n dataType = getPlugin().getConfig().getInt(\"Data\");\n mySQLip = getPlugin().getConfig().getString(\"Server\");\n mySQLDatabase = getPlugin().getConfig().getString(\"Database\");\n mySQLUsername = getPlugin().getConfig().getString(\"Username\");\n mySQLPassword = getPlugin().getConfig().getString(\"Password\");\n\n }", "public static void loadFromFile() {\n\t\tloadFromFile(Main.getConfigFile(), Main.instance.getServer());\n\t}", "public void load (File file) throws Exception;", "public void load() ;", "public void load() {\n }", "public void onLoad() {\n // store jar path for plugin loader\n thisJar = this.getFile();\n }", "void load();", "void load();", "public abstract void load();", "public Object GetPlugin()\r\n\t{\r\n\t\tif (_isSingleton)\r\n\t\t{\r\n\t\t\tif (_singletonPlugin == null)\r\n\t\t\t{\r\n\t\t\t\ttry {\r\n\t\t\t\t\t_singletonPlugin = ClassFactory.CreateObject(_pluginType);\r\n\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n if (_configuration != null && !_configuration.equals(\"\"))\r\n {\r\n \tPathUtilities.PushFilename(_filename);\r\n \ttry\r\n \t{\r\n XmlFramework.DeserializeXml(_configuration, _singletonPlugin);\r\n \t}\r\n catch(Exception e)\r\n {\r\n _singletonPlugin = null;\r\n }\r\n \tfinally\r\n \t{\r\n \t\tPathUtilities.PopFilename(_filename);\r\n \t}\r\n }\r\n\t\t\t}\r\n\t\t\treturn _singletonPlugin;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tObject plugin = null;\r\n\t\t\ttry {\r\n\t\t\t\tplugin = ClassFactory.CreateObject(_pluginType);\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n if (_configuration != null && !_configuration.equals(\"\"))\r\n {\r\n \tPathUtilities.PushFilename(_filename);\r\n try\r\n {\r\n XmlFramework.DeserializeXml(_configuration, plugin);\r\n }\r\n catch(Exception e)\r\n {\r\n plugin = null;\r\n }\r\n \tfinally\r\n \t{\r\n \tPathUtilities.PopFilename(_filename);\r\n \t}\r\n }\r\n return plugin;\r\n\t\t}\r\n\t}", "public void loadPluginsStartup();", "public Puzzle loadPuzzle () {\n Puzzle puzzle = null;\n File file;\n if (chooser.showOpenDialog (null) == JFileChooser.APPROVE_OPTION) {\n file = chooser.getSelectedFile ();\n if (file != null) {\n try {\n Scanner scan = new Scanner (file);\n String type = scan.nextLine ();\n puzzle = Puzzle.getConstructor (type);\n puzzle.load (scan);\n } catch (FileNotFoundException e) {\n JOptionPane.showMessageDialog (null, \"File IO Exception\\n\" + e.getLocalizedMessage (), \"Error!\", JOptionPane.ERROR_MESSAGE);\n } catch (IllegalArgumentException e) {\n JOptionPane.showMessageDialog (null, \"A Critical Error Has Occurred\", \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }\n }\n return puzzle;\n }", "public void loadPluginFileBean(){\n\t\tthis.broadcastManager.registerBroadcastReceiver(new String[]{ACTION_PLUGIN_FILE_FINISHED}, this);\n\t\tfor(PluginFileBean pluginFileBean:this.pluginFileBeanList){\n\t\t\tif(pluginFileBean!=null){\n\t\t\t\tpluginFileBean.setBroadcastManager(this.broadcastManager);\n\t\t\t\tpluginFileBean.setJarClassLoader(this.jarClassLoader);\n\t\t\t\tif(pluginFileBean.getPluginDownloader()==null){\n\t\t\t\t\tpluginFileBean.setPluginDownloader(defaultPluginDownloader);\n\t\t\t\t}\n\t\t\t\tpluginFileBean.loadPluginBean();\n\t\t\t}\n\t\t}\n\t}", "public interface PluginProvider {\n\n /**\n * Returns an instance of the specified plugin by loading the plugin class through the specified class loader.\n *\n * @param type plugin type class\n * @param className plugin class name\n * @param classLoader class loader to be used to load the plugin class\n * @param <T> plugin type\n * @return instance of the plugin\n * @throws PluginLoadingException if en error occurred when loading or instantiation of the plugin\n */\n <T> T getPluginInstance(Class<T> type, String className, ClassLoader classLoader) throws PluginLoadingException;\n}", "private void loadScheme(File file)\n\t{\n\t\tString name = file.getName();\n\n\t\ttry\n\t\t{\n\t\t\tBedrockScheme particle = BedrockScheme.parse(FileUtils.readFileToString(file, Charset.defaultCharset()));\n\n\t\t\tthis.presets.put(name.substring(0, name.indexOf(\".json\")), particle);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "default void load(String file) {\n load(new File(file));\n }", "public Resource load(IFile f);", "public void load (String argFileName) throws IOException;", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "private ProviderLoader loadFileProvider(final cacheItem cached) {\n final File file = cached.getFirst();\n final PluginScanner second = cached.getSecond();\n return filecache.get(file, second);\n }", "public interface Loader {\n\t\tpublic void load();\n\t}", "private boolean loadPlugin(PluginCommandManager manager, CommandSender player, String pluginName) {\r\n PluginManager pluginManager = Bukkit.getServer().getPluginManager();\r\n // load and enable the given plugin\r\n File pluginFolder = manager.getPlugin().getDataFolder().getParentFile();\r\n File pluginFile = new File(pluginFolder + File.separator + pluginName);\r\n \r\n boolean fileExists = false;\r\n for (File actualPluginFile : pluginFolder.listFiles()) {\r\n if (actualPluginFile.getAbsolutePath().equalsIgnoreCase(pluginFile.getAbsolutePath())) {\r\n fileExists = true;\r\n pluginFile = actualPluginFile;\r\n break;\r\n }\r\n }\r\n \r\n if (!fileExists) {\r\n // plugin does not exist\r\n manager.sendMessage(player, \"A plugin with the name '\" + pluginName + \"' could not be found at location:\");\r\n manager.sendMessage(player, pluginFile.getAbsolutePath());\r\n return true;\r\n }\r\n // Try and load the plugin\r\n Plugin plugin = null;\r\n try {\r\n plugin = pluginManager.loadPlugin(pluginFile);\r\n } catch (InvalidPluginException e) {\r\n // Something went wrong so set the plugin to null\r\n plugin = null;\r\n } catch (InvalidDescriptionException e) {\r\n // Something went wrong so set the plugin to null\r\n plugin = null;\r\n } catch (UnknownDependencyException e) {\r\n // Something went wrong so set the plugin to null\r\n plugin = null;\r\n }\r\n if (plugin == null) {\r\n // The plugin failed to load correctly\r\n manager.sendMessage(player, \"The plugin '\" + pluginName + \"' failed to load correctly.\");\r\n return true;\r\n }\r\n // plugin loaded and enabled successfully\r\n pluginManager.enablePlugin(plugin);\r\n manager.sendMessage(player, \"The plugin '\" + pluginName + \"' has been succesfully loaded and enabled.\");\r\n m_plugin.cachePluginDetails();\r\n return true;\r\n }", "private PluginLoader<Object> createPluginLoader() {\n return PluginLoader.forType(Object.class)\n .ifVersionGreaterOrEqualTo(JAVA_9).load(pluginTypeBetweenJava9AndJava13.getName())\n .ifVersionGreaterOrEqualTo(JAVA_14).load(pluginTypeAfterJava13.getName())\n .fallback(newInstance(pluginTypeBeforeJava9));\n }", "public abstract void load() throws IOException;", "public void load() {\n\t}", "public Resource load(String filename) throws MalformedURLException;", "void loadPreset(String absolutePath);", "@Override\n public void load() {\n }", "File getLoadLocation();", "@Override\r\n\tpublic void load() {\n\t}", "public void loadFile(File p_file) throws IOException;", "@Override\n public synchronized void load(Map<String, Object> parameters) {\n // fill properly the \"forGroups\" and \"forProjects\" fields\n processTargetGroupsAndProjects();\n\n if (!hasPlugin()) {\n LOGGER.log(Level.SEVERE, \"Configured plugin \\\"{0}\\\" has not been loaded into JVM (missing file?). \"\n + \"This can cause the authorization to fail always.\",\n getName());\n setFailed();\n LOGGER.log(Level.INFO, \"[{0}] Plugin \\\"{1}\\\" {2} and is {3}.\",\n new Object[]{\n getFlag().toString().toUpperCase(),\n getName(),\n hasPlugin() ? \"found\" : \"not found\",\n isWorking() ? \"working\" : \"failed\"});\n return;\n }\n\n setCurrentSetup(new TreeMap<>());\n getCurrentSetup().putAll(parameters);\n getCurrentSetup().putAll(getSetup());\n\n try {\n plugin.load(getCurrentSetup());\n setWorking();\n } catch (Throwable ex) {\n LOGGER.log(Level.SEVERE, \"Plugin \\\"\" + getName() + \"\\\" has failed while loading with exception:\", ex);\n setFailed();\n }\n\n LOGGER.log(Level.INFO, \"[{0}] Plugin \\\"{1}\\\" {2} and is {3}.\",\n new Object[]{\n getFlag().toString().toUpperCase(),\n getName(),\n hasPlugin() ? \"found\" : \"not found\",\n isWorking() ? \"working\" : \"failed\"});\n }", "private SgfReader load(File file)\n {\n \tFileInputStream in;\n \ttry {\n \t in = new FileInputStream(file);\n \t}\n \tcatch(FileNotFoundException e) {\n \t showError(\"File not found!\");\n \t return null;\n \t}\n \n \tSgfReader sgf;\n \ttry {\n \t sgf = new SgfReader(in);\n \t}\n \tcatch (SgfReader.SgfError e) {\n \t showError(\"Error reading SGF file:\\n \\\"\" + e.getMessage() + \"\\\"\");\n \t return null;\n \t}\n \t\n \treturn sgf;\n }", "public void reloadFile() {\n if (configuration == null) {\n file = new File(plugin.getDataFolder(), fileName);\n }\n configuration = YamlConfiguration.loadConfiguration(file);\n\n // Look for defaults in the jar\n Reader defConfigStream = null;\n try {\n defConfigStream = new InputStreamReader(plugin.getResource(fileName), \"UTF8\");\n } catch (UnsupportedEncodingException ex) {}\n\n if (defConfigStream != null) {\n YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);\n configuration.setDefaults(defConfig);\n }\n }", "public void loadingLibrary(String libraryFilename);", "public boolean loadGame(File file){\n\t\treturn true;\n\t}", "private void loadPlugins(){\r\n\t\tKomorebiCoreConfig config = new KomorebiCoreConfig();\r\n\t\t\r\n\t\tif(config.getRootNode().getChildrenCount(\"plugins\") < 1){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tList<ConfigurationNode> pluginNodes = config.getRootNode().getChildren(\"plugins\").get(0).getChildren(\"plugin\");\r\n\t\tfor(int pos=0; pos<pluginNodes.size(); ++pos){\r\n\t\t\tString name = config.getString(\"plugins.plugin(\"+pos+\")[@name]\");\r\n\t\t\tString version = config.getString(\"plugins.plugin(\"+pos+\")[@version]\");\r\n\t\t\tif(version == null || name == null){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tloadPluginsJar(name+\"-\"+version); // check all classes in jar\r\n\t\t}\r\n\t}", "private XMLElement loadPluginDescriptor(String pluginName)\n throws EmuException {\n File file = null;\n for (String projectName : ALL_PROJECTS) {\n file = new File(new File(new File(root, projectName), \"descriptors\"), pluginName + \".xml\");\n if (file.exists()) {\n break;\n }\n }\n if (!file.exists()) {\n throw new EmuException(\"Cannot find plugin descriptor file for '\" +\n pluginName + \"': \" + file.getAbsolutePath());\n }\n BufferedReader br = null;\n try {\n XMLElement elem = new XMLElement();\n br = new BufferedReader(new FileReader(file));\n elem.parseFromReader(br);\n if (!elem.getName().equals(\"plugin\")) {\n throw new EmuException(\"File does not contain a 'plugin' descriptor: \" + file);\n }\n return elem;\n } catch (IOException ex) {\n throw new EmuException(\"Problem reading / parsing plugin descriptor file \" + file, ex);\n } finally {\n try {\n br.close();\n } catch (IOException ex) {\n // ignore\n }\n }\n }", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "ClassLoader loadContribution(Contribution contribution)\n throws ContributionLoadException, MatchingExportNotFoundException;", "public static boolean loadPlugin(Class pluginClass, CytoscapeObj cytoscapeObj,\n CyWindow cyWindow) {\n if (pluginClass == null) {return false;}\n\n\n //System.out.println( \"AbstractPlugin loading: \"+pluginClass );\n\n //look for constructor with CyWindow argument\n if (cyWindow != null) {\n Constructor ctor = null;\n try {\n Class[] argClasses = new Class[1];\n argClasses[0] = CyWindow.class;//cyWindow.getClass();\n ctor = pluginClass.getConstructor(argClasses);\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n\n\n// (SecurityException se) {\n// System.err.println(\"In AbstractPlugin.loadPlugin:\");\n// System.err.println(se.getMessage());\n// se.printStackTrace();\n// return false;\n// } catch (NoSuchMethodException nsme) {\n// //ignore, there are other constructors to look for\n// }\n\n \n\n if (ctor != null) {\n try {\n Object[] args = new Object[1];\n args[0] = cyWindow;\n return ctor.newInstance(args) != null;\n } catch (Exception e) {\n System.err.println(\"In AbstractPlugin.loadPlugin:\");\n System.err.println(\"Exception while constructing plugin instance:\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n return false;\n }\n }\n }\n return false;\n }", "ITaskFactory<?> load(String classname);", "void loadExistingInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // Load the document\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.loadDocument(filename);\n printincomingLobs();\n }", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "@Override\r\n public Component load( int nId, Plugin plugin )\r\n {\r\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT, plugin );\r\n daoUtil.setInt( 1, nId );\r\n daoUtil.executeQuery( );\r\n\r\n Component component = null;\r\n\r\n if ( daoUtil.next( ) )\r\n {\r\n component = new Component( );\r\n\r\n component.setId( daoUtil.getInt( 1 ) );\r\n component.setGroupId( daoUtil.getString( 2 ) );\r\n component.setTitle( daoUtil.getString( 3 ) );\r\n component.setDescription( daoUtil.getString( 4 ) );\r\n component.setArtifactId( daoUtil.getString( 5 ) );\r\n component.setVersion( daoUtil.getString( 6 ) );\r\n component.setComponentType( daoUtil.getString( 7 ) );\r\n }\r\n\r\n daoUtil.free( );\r\n\r\n return component;\r\n }", "private void load() {\n if (loaded) {\n return;\n }\n loaded = true;\n\n if(useDefault){\n ConfigFileLoader.setSource(\n new MhttpdBaseConfigurationSource(\n Bootstrap.getMhttpdBaseFile(), \"server-embed.xml\"));\n }else {\n ConfigFileLoader.setSource(\n new MhttpdBaseConfigurationSource(\n Bootstrap.getMhttpdBaseFile(), getConfigFile()));\n }\n Digester digester = createStartDigester();\n try (ConfigurationSource.Resource resource = ConfigFileLoader.getSource().getServerXml()) {\n InputStream inputStream = resource.getInputStream();\n InputSource inputSource = new InputSource(resource.getUri().toURL().toString());\n inputSource.setByteStream(inputStream);\n digester.push(this);\n digester.parse(inputSource);\n } catch (Exception e) {\n return;\n }\n\n }", "public void reloadMsPlugins(String path);", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "private void loadGame(String fileName){\n\n }", "public interface Plugin\n{\n\tpublic String getPluginName();\n}", "public void loadAllPlugins(final String extPointId);", "@Override\n public void init(File jsonFile) throws PluginException {\n try {\n config = new JsonSimpleConfig(jsonFile);\n reset();\n } catch (IOException e) {\n log.error(\"Error reading config: \", e);\n }\n }", "public interface Plugin {\n void doUsefil();\n}", "public T load(String ServerID)\r\n\t{\r\n\t\tFile f = new File(root,ServerID+\"/\"+instances.get(ServerID).path());\r\n\t\tT obj = instances.get(ServerID);\r\n\t\tif(f.exists() && obj != null)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tScanner s = new Scanner(f,\"UTF-8\");\r\n\t\t\t\tString txt=\"\";\r\n\t\t\t\twhile(s.hasNextLine())\r\n\t\t\t\t{\r\n\t\t\t\t\ttxt = txt+s.nextLine();\r\n\t\t\t\t}\r\n\t\t\t\ts.close();\r\n\t\t\t\treturn (T) obj.fromText(txt, gson);\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\r\n\t}", "public interface LoadFile {\n public String loadFile();\n}", "@Override\r\n\tpublic void load() {\n\r\n\t}", "void loadMyDogPluginParams(MyDogPluginsParams myDogPluginsParams);", "public abstract void loaded();", "public void load(String url);", "public abstract boolean Load();", "private void loadPluginsJar(String jarname){\r\n\t\tURL[] urlList = new URL[1];\r\n\t\ttry{\r\n\t\t\tURL jarUrl = new URL(\"file:\"+jarname+\".jar\");\r\n\t\t\turlList[0] = jarUrl;\r\n\t\t}catch(MalformedURLException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+jarname+\"' could not be loaded (invalid path)\");\r\n\t\t}\r\n\t\t\r\n\t\tURLClassLoader classLoader = new URLClassLoader(urlList);\r\n\t\ttry{\r\n\t\t\tJarFile jfile = new JarFile(jarname+\".jar\");\r\n\t\t\t\r\n\t\t\t// walk through all files of the jar\r\n\t\t\tEnumeration<JarEntry> entries = jfile.entries();\r\n\t\t\twhile(entries.hasMoreElements()){\r\n\t\t\t\tJarEntry entry = entries.nextElement();\r\n\t\t\t\tif(entry.isDirectory() || !entry.getName().endsWith(\".class\")){\r\n\t\t\t\t\tcontinue; // we only care for classes\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString className = entry.getName().substring(0,entry.getName().length()-6).replace('/', '.');\r\n\t\t\t\t\r\n\t\t\t\tClass<IKomorebiPlugin> pluginClass = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tClass<?> cl = classLoader.loadClass(className);\r\n\t\t\t\t\tif(!IKomorebiPlugin.class.isAssignableFrom(cl)){\r\n\t\t\t\t\t\tcontinue; // only care about PlugIn classes\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tpluginClass = (Class<IKomorebiPlugin>) cl;\r\n\t\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Error while registering PlugIns of '\"+jarname+\"': \"+\r\n\t\t\t\t className+\" could not be loaded\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\ttryRegisterPlugin(jarname, pluginClass);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tjfile.close();\r\n\t\t}catch(IOException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+jarname+\"' could not be loaded (does not exist)\");\r\n\t\t}finally{\r\n\t\t\tif(classLoader != null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tclassLoader.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Potential resource leak: class loader could not be closed (reason: \"+e.getMessage()+\")\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private boolean pluginLoading(String pluginName) {\n return pm.getPlugin(pluginName) != null;\n }", "public interface Loader {\n void loadLibrary(String str) throws Exception;\n\n void loadLibraryFromPath(String str) throws Exception;\n }", "@SuppressWarnings(\"ResultOfMethodCallIgnored\")\n @Override\n public LuaValue call(LuaValue arg) {\n String path = arg.checkjstring();\n\n // It's fine to append your path with .lua as it follows Lua standards.\n if (path.startsWith(\"/\")) path.replaceFirst(\"/\", \"\");\n if (!path.endsWith(\".lua\")) path = path + \".lua\";\n\n // Load the script if it's already in memory for this plugin.\n LuaValue possiblyLoadedScript = g.get(\"__lukkitpackages__\").checktable().get(path);\n if (possiblyLoadedScript != null) return possiblyLoadedScript;\n\n // Get the resource as an InputStream from the plugin's resource getter\n InputStream is = plugin.getResource(path);\n if (is != null) {\n try {\n LuaValue calledScript = g.load(new InputStreamReader(is, \"UTF-8\"), path.replace(\"/\", \".\")).call();\n g.get(\"__lukkitpackages__\").checktable().set(path, calledScript);\n return calledScript;\n } catch (LukkitPluginException e) {\n e.printStackTrace();\n addError(e);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }\n\n throw new LukkitPluginException(\"Requested Lua file at \" + path + \" but it does not exist.\");\n }", "public boolean load() throws IOException {\n File db = new File(plugin.getDataFolder(), FILENAME);\n mdb = new YamlConfiguration();\n if(db.exists()) {\n try {\n mdb.load(db);\n } catch (Exception e) {\n mdb = null;\n e.printStackTrace();\n throw new IOException(\"Could not read Courier database!\");\n }\n return true;\n }\n return false;\n }", "public Class loadClass( Plugin plugin, String className ) throws ClassNotFoundException {\n final PluginClassLoader loader;\n synchronized ( this ) {\n loader = classloaders.get( plugin );\n }\n return loader.loadClass( className );\n }", "private static void loadParser() {\n if(parser_ == null)\n parser_ = ConfigIOFactory.getInstance(\"json\");\n }", "public FileConfiguration loadConfiguration(File file);", "public SelectorConfig(Plugin plugin, String name) {\n if (!SelectorManager.getINSTANCE().getSelectorDirectory().exists()) {\n if (!SelectorManager.getINSTANCE().getSelectorDirectory().mkdir()) {\n plugin.getLogger().log(Level.SEVERE, \"Could not create \" + SelectorManager.getINSTANCE().getSelectorDirectory().getPath());\n return;\n }\n }\n\n config = new File(SelectorManager.getINSTANCE().getSelectorDirectory(), name + \".yml\");\n if (!config.exists()) {\n firstTime = true;\n plugin.getLogger().log(Level.INFO, \"Creating \" + config.getPath());\n try {\n if (!config.createNewFile()) {\n plugin.getLogger().log(Level.SEVERE, \"Could not create \" + config.getPath());\n return;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n yml = YamlConfiguration.loadConfiguration(config);\n yml.options().copyDefaults(true);\n\n yml.options().header(\"Plugin by andrei1058.\\n\" +\n \"Replacements example:\\n\" +\n \"'x':\\n\" +\n \" type: ARENA (arena type keeps item-stack configuration in the arena file.\\n\" +\n \" filter-template: none or templateName,skeld,etc\\n\" +\n \" filter-status: loading,separated,by,comma (available: loading,waiting,starting,in_game,ending,none)\\n\" +\n \"'*':\\n\" +\n \" type: NONE or AIR for air.\\n\" +\n \"'=':\\n\" +\n \" type: COMMAND or CMD for items that execute commands when clicked.\\n\" +\n \" commands: \\n\" +\n \" as-player: myStoreLink'\\n' bw open someOtherGUI, etc\\n\" +\n \" as-console: openDonations {player}\\n\" +\n \" item:\\n\" +\n \" material: DIAMOND\\n\" +\n \" data:0 (yes, data. I'm supporting 1.12.)\\n\" +\n \" enchanted: false\\n\" +\n \" amount: 1\");\n\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_PATTERN_PATH, Arrays.asList(\"#########\", \"#***#####\", \"#####===#\", \"##-z#####\", \"#########\"));\n\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".*.\" + \"type\", \"ARENA\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".*.\" + \"filter-template\", \"skeld\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".*.\" + \"filter-status\", \"starting,waiting\");\n\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".=.\" + \"type\", \"ARENA\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".=.\" + \"filter-template\", \"polus\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".=.\" + \"filter-status\", \"none\");\n\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".-.\" + \"type\", \"CMD\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".-.\" + \"commands.as-player\", \"ss join\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".-.\" + \"commands.as-console\", \"\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".-.\" + \"item.material\", \"EMERALD\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".-.\" + \"item.data\", 0);\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".-.\" + \"item.enchanted\", true);\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".-.\" + \"item.amount\", 1);\n\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".z.\" + \"type\", \"CMD\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".z.\" + \"commands.as-player\", \"ss selector spectate\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".z.\" + \"commands.as-console\", \"\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".z.\" + \"item.material\", \"ELYTRA\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".z.\" + \"item.data\", 0);\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".z.\" + \"item.enchanted\", true);\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".z.\" + \"item.amount\", 1);\n\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".#.\" + \"type\", \"ITEM\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".#.\" + \"item.material\", CommonManager.SERVER_VERSION < 13 ? \"STAINED_GLASS_PANE\" : \"GRAY_STAINED_GLASS_PANE\");\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".#.\" + \"item.data\", 7);\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".#.\" + \"item.enchanted\", false);\n yml.addDefault(\"main.\" + SELECTOR_GENERIC_REPLACE_PATH + \".#.\" + \"item.amount\", 1);\n\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_PATTERN_PATH, Arrays.asList(\"#########\", \"#*******#\", \"#*******#\", \"#*******#\", \"4########\"));\n\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".*.\" + \"type\", \"ARENA\");\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".*.\" + \"filter-template\", \"none\");\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".*.\" + \"filter-status\", \"started\");\n\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".#.\" + \"type\", \"ITEM\");\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".#.\" + \"item.material\", CommonManager.SERVER_VERSION < 13 ? \"STAINED_GLASS_PANE\" : \"GRAY_STAINED_GLASS_PANE\");\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".#.\" + \"item.data\", 7);\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".#.\" + \"item.enchanted\", false);\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".#.\" + \"item.amount\", 1);\n\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".4.\" + \"type\", \"CMD\");\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".4.\" + \"commands.as-player\", \"ss selector\");\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".4.\" + \"commands.as-console\", \"\");\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".4.\" + \"item.material\", \"CHEST\");\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".4.\" + \"item.data\", 0);\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".4.\" + \"item.enchanted\", true);\n yml.addDefault(\"spectate.\" + SELECTOR_GENERIC_REPLACE_PATH + \".4.\" + \"item.amount\", 1);\n save();\n }", "public void load() throws IOException {\r\n File file = new File(this.filename);\r\n //if file exist.\r\n if (file.exists() && !file.isDirectory()) {\r\n ObjectInputStream is = null;\r\n try {\r\n //opening and reaind the source file\r\n is = new ObjectInputStream(new FileInputStream(this.filename));\r\n SettingsFile temp = (SettingsFile) is.readObject();\r\n //import the loaded file data to the current core.SettingsFile\r\n this.boardSize = temp.getBoardSize();\r\n this.firstPlayer = temp.getFirstPlayer();\r\n this.secondPlayer = temp.getSecondPlayer();\r\n this.player1Color = temp.getPlayer1Color();\r\n this.player2Color = temp.getPlayer2Color();\r\n } catch (IOException e) {\r\n System.out.println(\"Error while loading\");\r\n } catch (ClassNotFoundException e) {\r\n System.out.println(\"Problem with class\");\r\n } finally {\r\n if (is != null) {\r\n is.close();\r\n }\r\n }\r\n }\r\n //if no file, set default settings.\r\n else {\r\n save(SIZE, FIRST_PLAYER, SECOND_PLAYER, PLAYER1COLOR, PLAYER2COLOR);\r\n }\r\n }", "public static void load(File file) throws IOException {\n while (LogicManager.isUpdating()) {} // wait until current update has finished\n\n LogicManager.setPaused(true);\n\n // clear current scene\n GridManager.clearScene();\n\n // open input stream\n ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(file)));\n\n try {\n // load viewport data\n Point viewport = (Point) in.readObject();\n int scaling = (Integer) in.readObject();\n Window.getCurrentInstance()\n .getGameDisplay()\n .setViewport(viewport);\n Window.getCurrentInstance()\n .getGameDisplay()\n .setScaling(scaling);\n SwingUtilities.invokeLater(() -> {\n Window.getCurrentInstance()\n .getGameDisplay()\n .revalidate();\n Window.getCurrentInstance()\n .getGameDisplay()\n .repaint();\n });\n\n // load point data\n Point[] data;\n data = (Point[]) in.readObject();\n GridManager.loadScene(data);\n } catch (ClassNotFoundException e) {\n in.close();\n throw new IOException(\"File contains illegal data\");\n }\n in.close();\n }", "public final KaranteeniPlugin getPluginInstance(String string) {\r\n\t\treturn (KaranteeniPlugin) kPluginInstances.get(string);\r\n\t}", "public static File getFileInPlugin(IPath path) {\r\n\t\ttry {\r\n\t\t\tURL installURL = getDefault().getBundle().getEntry(path.toString());\r\n\t\t\tURL localURL = FileLocator.toFileURL(installURL);\r\n\t\t\treturn new File(localURL.getFile());\r\n\t\t} catch (IOException ioe) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void\tload(String fileName) throws IOException;", "public void loadShow(File f) {\n \n }" ]
[ "0.74288833", "0.73994714", "0.68974394", "0.6748221", "0.66309977", "0.63628876", "0.6235067", "0.62046725", "0.61642396", "0.6123711", "0.6120795", "0.6115529", "0.6023738", "0.60220724", "0.60220724", "0.59923977", "0.5958128", "0.59509444", "0.59422547", "0.5939008", "0.59297067", "0.59090686", "0.59056455", "0.5891909", "0.5884232", "0.58750176", "0.5855065", "0.58487576", "0.5840331", "0.5840331", "0.5834523", "0.5822358", "0.58208394", "0.581386", "0.5786038", "0.57657", "0.57497597", "0.5748381", "0.5738316", "0.573585", "0.5717363", "0.5698435", "0.56496173", "0.55802864", "0.54949075", "0.54945815", "0.54943484", "0.5445629", "0.5439394", "0.54348904", "0.54201096", "0.5403473", "0.53959376", "0.53931594", "0.5382124", "0.53663725", "0.5363993", "0.5352089", "0.534642", "0.53372157", "0.53174955", "0.5306541", "0.52946115", "0.5293507", "0.52917427", "0.52882516", "0.52882516", "0.528791", "0.5287483", "0.5287034", "0.5282532", "0.5282532", "0.5282532", "0.52722734", "0.5270419", "0.52640694", "0.5259311", "0.52585757", "0.5254924", "0.5252256", "0.5235958", "0.5235512", "0.52351713", "0.52338594", "0.5227523", "0.5223039", "0.5221553", "0.5212433", "0.52120596", "0.5210657", "0.5208868", "0.52020264", "0.5187491", "0.5182759", "0.51783204", "0.5167994", "0.51633227", "0.5154187", "0.51441336", "0.5138092" ]
0.75664794
0
Retrieves a new SYS Session.
public Session getSysSessionForScript(Database db) { Session session = new Session(db, db.getUserManager().getSysUser(), false, false, 0, null, 0); // some old 1.8.0 do not have SET SCHEMA PUBLIC session.setCurrentSchemaHsqlName( db.schemaManager.defaultSchemaHsqlName); session.isProcessingScript = true; return session; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "synchronized public Session newSysSession() {\n\n Session session = new Session(sysSession.database,\n sysSession.getUser(), false, false,\n sessionIdCount, null, 0);\n\n session.currentSchema =\n sysSession.database.schemaManager.getDefaultSchemaHsqlName();\n\n sessionMap.put(sessionIdCount, session);\n\n sessionIdCount++;\n\n return session;\n }", "public Session getSysSession() {\n\n sysSession.currentSchema =\n sysSession.database.schemaManager.getDefaultSchemaHsqlName();\n sysSession.isProcessingScript = false;\n sysSession.isProcessingLog = false;\n\n sysSession.setUser(sysSession.database.getUserManager().getSysUser());\n\n return sysSession;\n }", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "public Session createSession() {\n\t\treturn this.session;\n\t}", "protected abstract SESSION newSessionObject() throws EX;", "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "public static Session getCurrentSession() {\n if(currentSession != null){\n return currentSession;\n } else {\n createNewSession(new Point2D(300,300));\n return getCurrentSession();\n }\n }", "Object getNativeSession();", "SessionManager get();", "public Session createSession() {\n\t\tSession session = new Session();\n\t\tput(session.getId(), session);\n\t\treturn session;\n\t}", "public PSUserSession getSession();", "Session getCurrentSession();", "Session getCurrentSession();", "public static Session getSession() {\n\n if (serverRunning.get() && !session.isClosed()) {\n return session;\n } else {\n if (session.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running\");\n }\n }\n }", "public RDBMSSession getSession() {\r\n\t\treturn (RDBMSSession) session;\r\n\t}", "public static Session openSession() {\n \treturn sessionFactory.openSession();\n }", "com.google.spanner.v1.Session getSessionTemplate();", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "DefaultSession createSession(String id);", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "public synchronized static Session getInstance(){\n if (_instance == null) {\n _instance = new Session();\n }\n return _instance;\n }", "public static Session currentSession() {\n \tif (sessionFactory == null) {\n \t\tinitialize();\n \t}\n \tif (singleSessionMode) {\n \t\tif (singleSession == null) {\n \t\t\tsingleSession = sessionFactory.openSession();\n \t\t}\n \t\treturn singleSession;\n \t} else {\n\t Session s = session.get();\n\t \n\t // Open a new Session, if this Thread has none yet\n\t if (s == null || !s.isOpen()) {\n\t s = sessionFactory.openSession();\n\t session.set(s);\n\t }\n\t return s;\n \t}\n }", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "@Override\r\n\tpublic HttpSession getSession()\r\n\t{\r\n\t\t// This method was implemented as a workaround to __CR3668__ and Vignette Support ticket __247976__.\r\n\t\t// The issue seems to be due to the fact that both local and remote portlets try to retrieve\r\n\t\t// the session object in the same request. Invoking getSession during local portlets\r\n\t\t// processing results in a new session being allocated. Unfortunately, as remote portlets\r\n\t\t// use non-WebLogic thread pool for rendering, WebLogic seems to get confused and associates\r\n\t\t// the session created during local portlet processing with the portal request.\r\n\t\t// As a result none of the information stored originally in the session can be found\r\n\t\t// and this results in errors.\r\n\t\t// To work around the issue we maintain a reference to original session (captured on the\r\n\t\t// first invocation of this method during the request) and return it any time this method\r\n\t\t// is called. This seems to prevent the issue.\r\n\t\t// In addition, to isolate SPF code from the session retrieval issue performed by Axis\r\n\t\t// handlers used during WSRP request processing (e.g. StickyHandler), we also store\r\n\t\t// a reference to the session as request attribute. Newly added com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t// can then use the request attribute value instead of calling request.getSession()\r\n\t\t// which before this change resulted in new session being allocated and associated with\r\n\t\t// the portal request.\r\n\r\n\t\tif (mSession == null) {\r\n\t\t\tmSession = ((HttpServletRequest)getRequest()).getSession();\r\n\r\n\t\t\t// Store session in request attribute for com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t\tgetRequest().setAttribute(ORIGINAL_SESSION, mSession);\r\n\t\t}\r\n\r\n\t\treturn mSession;\r\n\t}", "@Override\r\n\tpublic HttpSession getSession(boolean create)\r\n\t{\r\n\t\treturn getSession();\r\n\t}", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "final protected RobotSessionGlobals getSession() {\n return mSession;\n }", "private TunaFacadeRemote getRemoteSession() {\n TunaFacadeRemote session = null;\n \n // CORBA properties and values and lookup taken after earlier work provided by\n // Todd Kelley (2016) Personal Communication\n System.setProperty(\"org.omg.CORBA.ORBInitialHost\", \"127.0.0.1\");\n System.setProperty(\"org.omg.CORBA.ORBInitialPort\", \"3700\");\n try {\n JOptionPane.showMessageDialog(this, \"Trying for a session...\");\n InitialContext ic = new InitialContext();\n session = (TunaFacadeRemote) ic.lookup(\"java:global/Assignment4/Assignment4-ejb/TunaFacade\");\n JOptionPane.showMessageDialog(this, \"Got a session :) \");\n\n } catch (NamingException e) {\n JOptionPane.showMessageDialog(this, \"Problem. \\n Cause: \\n\" + e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Problem. \\n Cause: \\n\" + e.getMessage());\n }\n return session;\n }", "public Session getSafeSession()\n {\n beginSession(false);\n return session;\n }", "public abstract I_SessionInfo getSession(I_SessionName sessionName);", "protected Session buildOrObtainSession() {\r\n\t\tLOGGER.fine(\"Opening a new Session\");\r\n\t\tSession s = super.buildOrObtainSession();\r\n\r\n\t\tLOGGER.fine(\"Disabling automatic flushing of the Session\");\r\n\t\ts.setFlushMode(FlushMode.MANUAL);\r\n\r\n\t\treturn s;\r\n\t}", "@Override\n\t\tpublic HttpSession getSession(boolean create) {\n\t\t\treturn null;\n\t\t}", "public static Session getSession(SlingHttpServletRequest request) {\n ResourceResolver resourceResolver = request.getResourceResolver();\n return resourceResolver.adaptTo(Session.class);\n }", "public static Session getCurrentSession() {\r\n //LOG.debug(MODULE + \"Get CurrentSession\");\r\n\r\n /* This code is to find who has called the method only for debugging and testing purpose.\r\n try {\r\n throw new Exception(\"Who called Me : \");\r\n } catch (Exception e) {\r\n //LOG.debug(\"I was called by \" + e.getStackTrace()[2].getClassName() + \".\" + e.getStackTrace()[2].getMethodName() + \"()!\");\r\n LOG.debug(\"I was called by : \", e);\r\n }\r\n */\r\n return openSession();\r\n //return sessionFactory.getCurrentSession();\r\n }", "Session getSession();", "Session getSession();", "public Session getSession();", "public static Session getSession() {\n return session;\n }", "public synchronized Session getSession() throws JmsException {\n try {\n if (session == null) {\n Connection conToUse;\n if (connection == null) {\n if (sharedConnectionEnabled()) {\n conToUse = getSharedConnection();\n } else {\n connection = createConnection();\n connection.start();\n conToUse = connection;\n }\n } else {\n conToUse = connection;\n }\n session = createSession(conToUse);\n }\n return session;\n } catch (JMSException e) {\n throw convertJmsAccessException(e);\n }\n }", "public Session getSession() {\n\t\tSession session = this.session;\r\n\t\tif (session == null) {\r\n\t\t\t// 2. altrimenti genera una nuova sessione utilizzando la factory (e.g. Spring MVC)\r\n\t\t\tsession = this.sessionFactory.getCurrentSession();\r\n\t\t}\r\n\t\treturn session;\r\n\t}", "@Override\r\n\t\tpublic Session newSession(Request request, Response response) {\n\t\t\tLoginSession session = new LoginSession(request);\r\n\t\t\tsession.authenticate(\"scott\", \"tiger\");\r\n\t\t\t\r\n\t\t\treturn session;\r\n\t\t}", "@Override\n public synchronized SessionImpl getConnection() {\n if (Framework.getRuntime().isShuttingDown()) {\n throw new IllegalStateException(\"Cannot open connection, runtime is shutting down\");\n }\n SessionPathResolver pathResolver = new SessionPathResolver();\n Mapper mapper = newMapper(pathResolver, true);\n SessionImpl session = newSession(model, mapper);\n pathResolver.setSession(session);\n sessions.add(session);\n sessionCount.inc();\n return session;\n }", "protected abstract SESSION getThisAsSession();", "protected DatabaseSession getDbSession() {\n if(dbSession == null) {\n dbSession = getServerSession();\n }\n return dbSession;\n }", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "DefaultSession getSession(String id);", "private Session getSession(String type) {\n String hostUrl = MigrationProperties.get(type + \".\" + MigrationProperties.PROP_ALFRESCO_HOST_URL);\n String user = MigrationProperties.get(type + \".\" + MigrationProperties.PROP_ALFRESCO_USER);\n String password = MigrationProperties.get(type + \".\" + MigrationProperties.PROP_ALFRESCO_PASSWORD);\n String cmisUrl = MigrationProperties.get(type + \".\" + MigrationProperties.PROP_ALFRESCO_CMIS_URL);\n logger.info(\"Getting session \" + type + \": \" + hostUrl + \", user: \" + user);\n\n return CmisHelper.getSession(hostUrl, user, password, cmisUrl);\n }", "public static Session getCurrentSession() {\n return sessionfactory.getCurrentSession();\n }", "public Session openSession() {\r\n\t\treturn sessionFactory.openSession();\r\n\t}", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "protected Session getCurrentSession()\n \t{\n \t\treturn this.sessionFactory.getCurrentSession();\n \t}", "public HttpSession getHttpSession(boolean createSession) {\n return servletRequest.getSession(createSession);\n }", "public static Session currentSession() {\n Session session = (Session) sessionThreadLocal.get();\n // Open a new Session, if this Thread has none yet\n try {\n if (session == null) {\n session = sessionFactory.openSession();\n sessionThreadLocal.set(session);\n }\n } catch (HibernateException e) {\n logger.error(\"Get current session error: \" + e.getMessage());\n }\n return session;\n }", "public static synchronized Session getCurrentSession(Context context) {\n \tif (Session.currentSession == null) {\n Session.sessionFromCurrentSession(context);\n \t}\n\n \t\treturn Session.currentSession;\n }", "@Override\n\tpublic Session createSession(SessionBasicInfo sessionBasicInfo) {\n\t\tSession session = sessionStore.createSession( sessionBasicInfo);\n\t\tif(session == null)\n\t\t\treturn null;\n\t\tsession._setSessionStore(this);\n\t\tsession.putNewStatus();\n\t\t\n\t\treturn session;\n\t}", "public jkt.hms.masters.business.MasSession getSession () {\n\t\treturn session;\n\t}", "DatabaseSession openSession();", "public static Session getSessionWithKeyspace() {\n\n if (serverRunning.get() && keyspaceCreated.get() && !sessionWithKeyspace.isClosed()) {\n return sessionWithKeyspace;\n } else {\n if (sessionWithKeyspace.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running or keyspace has not been created\");\n }\n }\n }", "private Session getSession (String sessionID) {\n\t\tSession session;\n\t\tif (get(sessionID) != null) {\n\t\t\tsession = get(sessionID);\n\t\t} else {\n\t\t\tsession = new Session();\n\t\t\tput(session.getId(), session);\n\t\t}\n\t\treturn session;\n\t}", "public Session create() {\n // Attempt to generate a random session 5 times then fail\n final int MAX_ATTEMPTS = 5; \n \n // Loop until we have outdone our max attempts\n for(int x = 0; x < MAX_ATTEMPTS; x++) {\n String sessionKey = randomString(SESSION_KEY_SIZE); // SESSION_KEY_SIZE characters\n\n // The session key exists\n if (exists(sessionKey))\n continue;\n\n // Create the new session\n Session session = new Session(sessionKey);\n sessions.put(sessionKey, session, POLICY, EXPIRATION_TIME, EXPIRATION_UNIT); \n return session;\n }\n\n // Failed to generate new session key\n return null;\n }", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "protected Session getServerSession(URI serverUri) throws QueryException {\n Session session = sessionCache.get(serverUri);\n return (session != null) ? session : newSession(serverUri);\n }", "public FlexSession getFlexSession()\n {\n synchronized (lock)\n {\n return flexSession;\n }\n }", "public Session getSession() throws LeaseException {\n return getSession(true);\n }", "public Session getSession() {\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "public Session getCurrentSession() {\r\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "Session get(int id);", "private static Session getInstance() {\n return SingletonHolder.INSTANCE;\n }", "public String getSession() {\n return session;\n }", "protected final Session getSession() {\n return sessionTracker.getSession();\n }", "public static Session getSession() throws HException {\r\n\t\tSession s = (Session) threadSession.get();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (s == null) {\r\n\t\t\t\tlog.debug(\"Opening new Session for this thread.\");\r\n\t\t\t\tif (getInterceptor() != null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\ts = getSessionFactory().withOptions().interceptor(getInterceptor()).openSession();\r\n\t\t\t\t} else {\r\n\t\t\t\t\ts = getSessionFactory().openSession();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthreadSession.set(s);\r\n\t\t\t\tsetConnections(1);\r\n\t\t\t}\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tthrow new HException(ex);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public String getSession() {\n return this.session;\n }", "public Session getSession(boolean create) throws LeaseException {\n return entity.getSession(create);\n }", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session openOrRetrieveSessionForThread() {\n Session session = THREADED_SESSION.get();\n if (session == null) {\n session = getSessionFactory().openSession();\n THREADED_SESSION.set(session);\n }\n return session;\n }", "com.google.spanner.v1.SessionOrBuilder getSessionTemplateOrBuilder();", "public Session() {\n\t\tLogger.log(\"Creating application session\");\n\t}", "public SESSION getCurrentSessionForTest() {\n return currentSession;\n }", "private Session getSession() throws RepositoryException {\n return getRepository().loginAdministrative(null);\n }", "public /*static*/ Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "synchronized Session getSession(long id) {\n return (Session) sessionMap.get(id);\n }", "public static SessionManager get(Context context) {\n \tif (self == null) {\n \t\tself = new SessionManager(context);\n \t}\n \treturn self;\n }", "public IHTTPSession getSession() {\n\t\treturn session;\n\t}", "public static SessionKeeper getInstance(){\r\n if (sessionKeeperInstance == null) sessionKeeperInstance = new SessionKeeper();\r\n return sessionKeeperInstance;\r\n }", "protected synchronized static HTTPSession retrieveSession (HTTPRequest request)\n\t\tthrows SessionMaximumException\n\t{\n\t\t\n\t HTTPSession session = null;\n\t int theReference = Profiler.start (MauiRuntimeEngine.SOURCE_SESSION,\n\t \t\t\t\t\t\t\t\t\t MauiRuntimeEngine.ACTION_GET);\n\t boolean theHasCookie = false;\n\t boolean theGet = true;\n\t String sessionID = HTTPSession.getSessionIDFromRequest (request);\n\t if (sessionID != null && sessionID.startsWith (\"MA_\"))\n\t {\n\t \tsessionID = sessionID.substring (3);\n\t }\n\n\t String theSessionCookie = request.cookieMonster ();\n\t if ((theHasCookie = (theSessionCookie != null)))\n\t {\n\t \tsessionID = theSessionCookie;\n\t }\n\t \n\t if ((session = retrieveSessionFromTable (sessionID)) == null)\n\t {\n\t \t if (sessionMaximum != -1 &&\n\t \t \t getSessionCount () >= sessionMaximum)\n\t \t {\n\t \t \tthrow new SessionMaximumException (sessionMaximum);\n\t \t }\n\t \t \n\t session = new HTTPSession( request.getClientName (),\n\t \t\t\t\t\t\t\t request.isServletBased (),\n\t \t\t\t\t\t\t\t request.getServletURL ());\n\t if (sessionID != null)\n\t {\n\t \tcrossReferences.put (sessionID, session);\n\t \tsession.setCrossReference (sessionID);\n\t }\n\t theGet = false;\n\t addSession (session);\n\t // System.out.println(\"[HTTPSession] - Created new HTTPSession with ID '\" + session.sessionID + \"'.\");\n\t }\n\n \t session.touchTimeoutCounter();\n \t session.setHasCookie (theHasCookie);\n Profiler.finish (theReference,\n \t\t\t\t MauiRuntimeEngine.SOURCE_SESSION,\n \t\t\t\t (theGet ? MauiRuntimeEngine.ACTION_GET :\n \t\t\t\t\t \t\t MauiRuntimeEngine.ACTION_CREATE),\n \t\t\t\t \"Session: \" + sessionID);\n\t return session;\n\t}", "public Session getSession() {\n if (this.session == null) {\n this.logger.error(\"Sessão não iniciada.\");\n throw new IllegalStateException(\"A sessão não foi criada antes do uso do DAO\");\n }\n return this.session;\n }", "public User getSession(){\n\t\treturn this.session;\n\t}", "public Session openSession() {\r\n //Interceptor interceptor= new Interceptor();\r\n //Session regresar = sessionFactory.withOptions().interceptor(interceptor).openSession();\r\n Session regresar = sessionFactory.openSession();\r\n //interceptor.setSession(regresar);\r\n return regresar;\r\n }", "IDAOSession createNewSession();", "public String getSessionID() {\n\t\treturn SID;\n\t}", "DatastoreSession createSession();", "protected Session getSession() { return session; }", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }", "public org.openejb.config.ejb11.Session getSession() {\n return this._session;\n }", "public Session createSession(String sessionId);", "InternalSession createSession(String sessionId);", "@GET(\"sdk/v5/sessions\")\n Call<SessionResponse> getSession(@Header(\"Authorization\") String Authorization);" ]
[ "0.8046659", "0.75667053", "0.6867777", "0.67860484", "0.67480725", "0.6705864", "0.6696343", "0.6674077", "0.6659945", "0.660206", "0.6599074", "0.658788", "0.658788", "0.6561139", "0.654073", "0.6511389", "0.64800847", "0.64157003", "0.6370157", "0.6365868", "0.63637185", "0.63000476", "0.628274", "0.62199247", "0.6171655", "0.61646116", "0.61529434", "0.6147872", "0.61443084", "0.6142467", "0.6132467", "0.6087844", "0.608664", "0.60801214", "0.60736644", "0.60736644", "0.6068987", "0.60524386", "0.6044578", "0.60247225", "0.601747", "0.60151106", "0.5998222", "0.5985406", "0.59776676", "0.5976328", "0.5976298", "0.59698606", "0.59642965", "0.5960652", "0.5959918", "0.5945456", "0.59433484", "0.5933749", "0.59231037", "0.591775", "0.5917232", "0.59029293", "0.5899689", "0.5895328", "0.58756316", "0.58756316", "0.5864549", "0.5851246", "0.58366615", "0.5817192", "0.58119166", "0.58060074", "0.580308", "0.57947654", "0.5788166", "0.57839286", "0.5774194", "0.57706857", "0.57688093", "0.57688093", "0.57688093", "0.5767913", "0.5765876", "0.57629496", "0.5759905", "0.5759684", "0.57541525", "0.5750739", "0.57326305", "0.5726984", "0.5725655", "0.5718599", "0.57171535", "0.571665", "0.5715152", "0.57008415", "0.56937706", "0.56797016", "0.56719893", "0.56647253", "0.5658859", "0.5646685", "0.56440955", "0.5641453" ]
0.6288725
22
Retrieves the common SYS Session.
public Session getSysSession() { sysSession.currentSchema = sysSession.database.schemaManager.getDefaultSchemaHsqlName(); sysSession.isProcessingScript = false; sysSession.isProcessingLog = false; sysSession.setUser(sysSession.database.getUserManager().getSysUser()); return sysSession; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getNativeSession();", "final protected RobotSessionGlobals getSession() {\n return mSession;\n }", "SessionManager get();", "synchronized public Session newSysSession() {\n\n Session session = new Session(sysSession.database,\n sysSession.getUser(), false, false,\n sessionIdCount, null, 0);\n\n session.currentSchema =\n sysSession.database.schemaManager.getDefaultSchemaHsqlName();\n\n sessionMap.put(sessionIdCount, session);\n\n sessionIdCount++;\n\n return session;\n }", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "public RDBMSSession getSession() {\r\n\t\treturn (RDBMSSession) session;\r\n\t}", "Session getCurrentSession();", "Session getCurrentSession();", "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "public static Session getCurrentSession() {\n if(currentSession != null){\n return currentSession;\n } else {\n createNewSession(new Point2D(300,300));\n return getCurrentSession();\n }\n }", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "public static synchronized Session getCurrentSession(Context context) {\n \tif (Session.currentSession == null) {\n Session.sessionFromCurrentSession(context);\n \t}\n\n \t\treturn Session.currentSession;\n }", "public static Session getSession() {\n\n if (serverRunning.get() && !session.isClosed()) {\n return session;\n } else {\n if (session.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running\");\n }\n }\n }", "public PSUserSession getSession();", "public static Session getCurrentSession() {\r\n //LOG.debug(MODULE + \"Get CurrentSession\");\r\n\r\n /* This code is to find who has called the method only for debugging and testing purpose.\r\n try {\r\n throw new Exception(\"Who called Me : \");\r\n } catch (Exception e) {\r\n //LOG.debug(\"I was called by \" + e.getStackTrace()[2].getClassName() + \".\" + e.getStackTrace()[2].getMethodName() + \"()!\");\r\n LOG.debug(\"I was called by : \", e);\r\n }\r\n */\r\n return openSession();\r\n //return sessionFactory.getCurrentSession();\r\n }", "public abstract I_SessionInfo getSession(I_SessionName sessionName);", "protected abstract SESSION getThisAsSession();", "String getAssociatedSession();", "@Override\r\n\tpublic HttpSession getSession()\r\n\t{\r\n\t\t// This method was implemented as a workaround to __CR3668__ and Vignette Support ticket __247976__.\r\n\t\t// The issue seems to be due to the fact that both local and remote portlets try to retrieve\r\n\t\t// the session object in the same request. Invoking getSession during local portlets\r\n\t\t// processing results in a new session being allocated. Unfortunately, as remote portlets\r\n\t\t// use non-WebLogic thread pool for rendering, WebLogic seems to get confused and associates\r\n\t\t// the session created during local portlet processing with the portal request.\r\n\t\t// As a result none of the information stored originally in the session can be found\r\n\t\t// and this results in errors.\r\n\t\t// To work around the issue we maintain a reference to original session (captured on the\r\n\t\t// first invocation of this method during the request) and return it any time this method\r\n\t\t// is called. This seems to prevent the issue.\r\n\t\t// In addition, to isolate SPF code from the session retrieval issue performed by Axis\r\n\t\t// handlers used during WSRP request processing (e.g. StickyHandler), we also store\r\n\t\t// a reference to the session as request attribute. Newly added com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t// can then use the request attribute value instead of calling request.getSession()\r\n\t\t// which before this change resulted in new session being allocated and associated with\r\n\t\t// the portal request.\r\n\r\n\t\tif (mSession == null) {\r\n\t\t\tmSession = ((HttpServletRequest)getRequest()).getSession();\r\n\r\n\t\t\t// Store session in request attribute for com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t\tgetRequest().setAttribute(ORIGINAL_SESSION, mSession);\r\n\t\t}\r\n\r\n\t\treturn mSession;\r\n\t}", "public SESSION getCurrentSessionForTest() {\n return currentSession;\n }", "public FlexSession getFlexSession()\n {\n synchronized (lock)\n {\n return flexSession;\n }\n }", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "protected DatabaseSession getDbSession() {\n if(dbSession == null) {\n dbSession = getServerSession();\n }\n return dbSession;\n }", "public String getSession() {\n return session;\n }", "public String getSession() {\n return this.session;\n }", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "public static Session currentSession() {\n \tif (sessionFactory == null) {\n \t\tinitialize();\n \t}\n \tif (singleSessionMode) {\n \t\tif (singleSession == null) {\n \t\t\tsingleSession = sessionFactory.openSession();\n \t\t}\n \t\treturn singleSession;\n \t} else {\n\t Session s = session.get();\n\t \n\t // Open a new Session, if this Thread has none yet\n\t if (s == null || !s.isOpen()) {\n\t s = sessionFactory.openSession();\n\t session.set(s);\n\t }\n\t return s;\n \t}\n }", "public static Session getSession() {\n return session;\n }", "public Session getSysSessionForScript(Database db) {\n\n Session session = new Session(db, db.getUserManager().getSysUser(),\n false, false, 0, null, 0);\n\n // some old 1.8.0 do not have SET SCHEMA PUBLIC\n session.setCurrentSchemaHsqlName(\n db.schemaManager.defaultSchemaHsqlName);\n\n session.isProcessingScript = true;\n\n return session;\n }", "public synchronized static Session getInstance(){\n if (_instance == null) {\n _instance = new Session();\n }\n return _instance;\n }", "synchronized public String getSessionId()\n\t{\n\t\tif (userInfo != null)\n\t\t\treturn userInfo.getSessionID();\n\t\t\t\n\t\treturn null;\n\t}", "public static Session getCurrentSession() {\n return sessionfactory.getCurrentSession();\n }", "public static Session openSession() {\n \treturn sessionFactory.openSession();\n }", "private String getTopcatSessionId() {\r\n HttpServletRequest request = this.getThreadLocalRequest();\r\n HttpSession session = request.getSession();\r\n String sessionId = null;\r\n if (session.getAttribute(\"SESSION_ID\") == null) { // First time login\r\n try {\r\n sessionId = userManager.login();\r\n session.setAttribute(\"SESSION_ID\", sessionId);\r\n } catch (AuthenticationException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n } else {\r\n sessionId = (String) session.getAttribute(\"SESSION_ID\");\r\n }\r\n return sessionId;\r\n }", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "public String getSessionID() {\n\t\treturn SID;\n\t}", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "protected Session getCurrentSession()\n \t{\n \t\treturn this.sessionFactory.getCurrentSession();\n \t}", "public abstract I_SessionInfo getSessionInfo(I_SessionName sessionName);", "private TunaFacadeRemote getRemoteSession() {\n TunaFacadeRemote session = null;\n \n // CORBA properties and values and lookup taken after earlier work provided by\n // Todd Kelley (2016) Personal Communication\n System.setProperty(\"org.omg.CORBA.ORBInitialHost\", \"127.0.0.1\");\n System.setProperty(\"org.omg.CORBA.ORBInitialPort\", \"3700\");\n try {\n JOptionPane.showMessageDialog(this, \"Trying for a session...\");\n InitialContext ic = new InitialContext();\n session = (TunaFacadeRemote) ic.lookup(\"java:global/Assignment4/Assignment4-ejb/TunaFacade\");\n JOptionPane.showMessageDialog(this, \"Got a session :) \");\n\n } catch (NamingException e) {\n JOptionPane.showMessageDialog(this, \"Problem. \\n Cause: \\n\" + e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Problem. \\n Cause: \\n\" + e.getMessage());\n }\n return session;\n }", "public static Session getSession(SlingHttpServletRequest request) {\n ResourceResolver resourceResolver = request.getResourceResolver();\n return resourceResolver.adaptTo(Session.class);\n }", "protected final Session getSession() {\n return sessionTracker.getSession();\n }", "java.lang.String getSessionHandle();", "public static String getSession(String commond,Connection connection ) throws IOException {\n Session session = null;\n InputStream inputStream = null;\n BufferedReader reader = null;\n StringBuffer buffer = new StringBuffer();\n try {\n// connection = getConnection(HOST_IP,USER_NAME,USER_PASSWORD);\n session = connection.openSession();\n session.execCommand(commond);\n inputStream = new StreamGobbler(session.getStdout());\n reader = new BufferedReader(new InputStreamReader(inputStream));\n String resultLine ;\n while ((resultLine =reader.readLine())!=null){\n buffer.append(resultLine).append(line);\n }\n } catch (IOException e) {\n e.printStackTrace();\n if(connection != null){\n connection.close();\n } if(session != null){\n session.close();\n } if(inputStream != null){\n inputStream.close();\n } if(reader != null){\n reader.close();\n }\n }finally {\n if(connection != null){\n connection.close();\n } if(session != null){\n session.close();\n } if(inputStream != null){\n inputStream.close();\n } if(reader != null){\n reader.close();\n }\n }\n return buffer.toString();\n }", "private static Session getInstance() {\n return SingletonHolder.INSTANCE;\n }", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }", "private Session getSession(String type) {\n String hostUrl = MigrationProperties.get(type + \".\" + MigrationProperties.PROP_ALFRESCO_HOST_URL);\n String user = MigrationProperties.get(type + \".\" + MigrationProperties.PROP_ALFRESCO_USER);\n String password = MigrationProperties.get(type + \".\" + MigrationProperties.PROP_ALFRESCO_PASSWORD);\n String cmisUrl = MigrationProperties.get(type + \".\" + MigrationProperties.PROP_ALFRESCO_CMIS_URL);\n logger.info(\"Getting session \" + type + \": \" + hostUrl + \", user: \" + user);\n\n return CmisHelper.getSession(hostUrl, user, password, cmisUrl);\n }", "public HttpSession getHttpSession() {\n return servletRequest.getSession();\n }", "public String getSessionContext() {\n return this.SessionContext;\n }", "public /*static*/ Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "public Session openOrRetrieveSessionForThread() {\n Session session = THREADED_SESSION.get();\n if (session == null) {\n session = getSessionFactory().openSession();\n THREADED_SESSION.set(session);\n }\n return session;\n }", "public SessionInfo getSessionInfo() {\n\t\treturn sessionInfo;\n\t}", "public IHTTPSession getSession() {\n\t\treturn session;\n\t}", "public jkt.hms.masters.business.MasSession getSession () {\n\t\treturn session;\n\t}", "public String getSessionID ()\n\t{\n\t\treturn sessionID;\n\t}", "public static Session currentSession() {\n Session session = (Session) sessionThreadLocal.get();\n // Open a new Session, if this Thread has none yet\n try {\n if (session == null) {\n session = sessionFactory.openSession();\n sessionThreadLocal.set(session);\n }\n } catch (HibernateException e) {\n logger.error(\"Get current session error: \" + e.getMessage());\n }\n return session;\n }", "public User getSession(){\n\t\treturn this.session;\n\t}", "public String getSessionName();", "public static SessionKeeper getInstance(){\r\n if (sessionKeeperInstance == null) sessionKeeperInstance = new SessionKeeper();\r\n return sessionKeeperInstance;\r\n }", "java.lang.String getSessionID();", "com.google.spanner.v1.Session getSessionTemplate();", "Session getSession();", "Session getSession();", "public static Session getSessionWithKeyspace() {\n\n if (serverRunning.get() && keyspaceCreated.get() && !sessionWithKeyspace.isClosed()) {\n return sessionWithKeyspace;\n } else {\n if (sessionWithKeyspace.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running or keyspace has not been created\");\n }\n }\n }", "public Session getCurrentSession() {\r\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "@Provides\n @Current\n IpcSession getCurrentSession(@Current IpcConnection connection) {\n return connection.getSession();\n }", "public SSLSession mo2014k() {\n return this.f2343d instanceof SSLSocket ? ((SSLSocket) this.f2343d).getSession() : null;\n }", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession();", "@Override\r\n \t\t\tpublic SSession getSession(long sessionId) throws SSessionNotFoundException {\n \t\t\t\treturn null;\r\n \t\t\t}", "public Session getSafeSession()\n {\n beginSession(false);\n return session;\n }", "@RequestMapping(method = RequestMethod.GET)\n public Sessions retrieve(@RequestHeader(\"X-CS-Auth\") String auth,\n @RequestHeader(\"X-CS-Session\") String sessionId) {\n return sessionService.retrieve();\n }", "public ArrayList<UserSessionInfo> getAllSessionInfo() throws SessionManagementException {\n ArrayList<UserSessionInfo> userSessionInfoList = null;\n try {\n userSessionInfoList = SessionContextCache.getInstance(0).getSessionDetails();\n } catch (Exception e) {\n String errorMsg = \"Error is occurred while getting session details \";\n log.error(errorMsg, e);\n throw new SessionManagementException(errorMsg, e);\n }\n return userSessionInfoList;\n }", "public String getSessionId() {\n// synchronized (mSessionObj) {\n// return mSessionId;\n// }\n return \"\";\n }", "SessionManager getSessionManager() {\n\t\treturn sessionManager;\n\t}", "static String getSessionId() {\n if (SESSION_ID == null) {\n // If there is no runtime value for SESSION_ID, try to load a\n // value from persistent store.\n SESSION_ID = Prefs.INSTANCE.getEventPlatformSessionId();\n\n if (SESSION_ID == null) {\n // If there is no value in the persistent store, generate a new value for\n // SESSION_ID, and write the update to the persistent store.\n SESSION_ID = generateRandomId();\n Prefs.INSTANCE.setEventPlatformSessionId(SESSION_ID);\n }\n }\n return SESSION_ID;\n }", "String getSessionID();", "String getSessionID();", "public Session getSession() {\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "com.weizhu.proto.WeizhuProtos.Session getSession();", "private Session getSession() throws RepositoryException {\n return getRepository().loginAdministrative(null);\n }", "public Session getSession() {\n\t\tSession session = this.session;\r\n\t\tif (session == null) {\r\n\t\t\t// 2. altrimenti genera una nuova sessione utilizzando la factory (e.g. Spring MVC)\r\n\t\t\tsession = this.sessionFactory.getCurrentSession();\r\n\t\t}\r\n\t\treturn session;\r\n\t}", "@GET(\"sdk/v5/sessions\")\n Call<SessionResponse> getSession(@Header(\"Authorization\") String Authorization);", "public synchronized Session getSession() throws JmsException {\n try {\n if (session == null) {\n Connection conToUse;\n if (connection == null) {\n if (sharedConnectionEnabled()) {\n conToUse = getSharedConnection();\n } else {\n connection = createConnection();\n connection.start();\n conToUse = connection;\n }\n } else {\n conToUse = connection;\n }\n session = createSession(conToUse);\n }\n return session;\n } catch (JMSException e) {\n throw convertJmsAccessException(e);\n }\n }", "@Override // com.android.server.wm.WindowContainer\n public SurfaceSession getSession() {\n return this.mSession;\n }", "java.lang.String getSessionId();", "public IEvolizerSession getEvolizerSession() throws EvolizerException {\n // IEvolizerSession session = EvolizerSessionHandler.getHandler().getCurrentSession(fDbUrl);\n // return session;\n\n return fSession;\n }", "public Session createSession() {\n\t\treturn this.session;\n\t}", "public String getSessionID() {\n\t\treturn sessionId;\n\t}", "DefaultSession getSession(String id);", "public static String getSessionURL() {\n\n\t\treturn baseURL + \"/rest/site-session\";\n\t}", "int getActiveSessions();", "protected Session getSession() { return session; }", "public org.openejb.config.ejb11.Session getSession() {\n return this._session;\n }", "public String getOneTimeSession(String host)\n\t\tthrows Exception\n\t{\n\t\treturn imperson.getOneTimeSession(host);\n\t}" ]
[ "0.69748336", "0.6884459", "0.68715596", "0.6856334", "0.6803405", "0.6753751", "0.6696838", "0.6696838", "0.6583733", "0.6565605", "0.65019387", "0.6497797", "0.6480251", "0.6444538", "0.6441467", "0.63969105", "0.6386666", "0.63815033", "0.63512564", "0.634555", "0.6294476", "0.626866", "0.62589085", "0.62459224", "0.6243588", "0.6233031", "0.6211367", "0.61891055", "0.61879873", "0.61504793", "0.61319625", "0.6121172", "0.6113994", "0.6097012", "0.6081457", "0.6076029", "0.6059182", "0.6053886", "0.603824", "0.602357", "0.59966147", "0.59761983", "0.5975448", "0.59676653", "0.5964998", "0.5946617", "0.59361166", "0.59361166", "0.59136", "0.59123534", "0.59110403", "0.5906111", "0.58964205", "0.58952934", "0.58941007", "0.5891477", "0.5882381", "0.58805114", "0.58792907", "0.5877323", "0.58747286", "0.5873337", "0.5867191", "0.5847506", "0.5839063", "0.5839063", "0.5821136", "0.58005494", "0.5798751", "0.5790664", "0.5789731", "0.5789731", "0.5789731", "0.57716984", "0.5753788", "0.5751062", "0.5747878", "0.5738894", "0.5738243", "0.57360816", "0.57274073", "0.5720655", "0.5720655", "0.5715045", "0.57097733", "0.5707253", "0.5703855", "0.5696698", "0.5680331", "0.5678651", "0.5676264", "0.566388", "0.56617707", "0.5657125", "0.56476086", "0.5637625", "0.5634556", "0.56249183", "0.56216604", "0.5618741" ]
0.7599047
0
Retrieves a transient transaction session.
synchronized public Session newSysSession() { Session session = new Session(sysSession.database, sysSession.getUser(), false, false, sessionIdCount, null, 0); session.currentSchema = sysSession.database.schemaManager.getDefaultSchemaHsqlName(); sessionMap.put(sessionIdCount, session); sessionIdCount++; return session; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "public static Session getSession() {\n return session;\n }", "public Session getSafeSession()\n {\n beginSession(false);\n return session;\n }", "protected Transaction getTransaction() {\n return sessionFactory.getCurrentSession().getTransaction();\n }", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "public Session getSession() {\n if (this.session == null) {\n this.logger.error(\"Sessão não iniciada.\");\n throw new IllegalStateException(\"A sessão não foi criada antes do uso do DAO\");\n }\n return this.session;\n }", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "private static PersistenceSession getPersistenceSession() {\n return NakedObjectsContext.getPersistenceSession();\n }", "public Session getSession() { return session; }", "public Transaction getTransaction() throws RuntimeException{\n\t\tif(tr == null)\n\t\t\tthrow new RuntimeException(\"The transaction has not been started\");\n\t\treturn tr;\n\t}", "public LocalSession session() { return session; }", "public static Transaction getThreadLocalTransaction() {\n return threadlocal.get();\n }", "public final static Transaction getCurrentTransaction() {\n return (Transaction) transactionTable.get();\n }", "protected final Session getSession() {\n return sessionTracker.getSession();\n }", "public Session getSession() {\n return session;\n }", "public Session session() {\n return session;\n }", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "protected Session getSession() { return session; }", "public Session getSession()\n {\n return session;\n }", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "public static Session currentSession() throws HibernateException {\n Session s = (Session) threadLocal.get();\n\n if (s == null) {\n try {\n\t\t\t\tif (getInterceptor() != null) {\n\t\t\t\t\tlog.debug(\"Using Interceptor: \" + getInterceptor().getClass());\n\t\t\t\t\ts = sessionFactory.openSession(getInterceptor());\n\t\t\t\t} else {\n\t\t\t\t\ts = sessionFactory.openSession();\n\t\t\t\t}\n }\n catch (HibernateException he) {\n System.err.println(\"%%%% Error Creating SessionFactory %%%%\");\n throw new RuntimeException(he);\n }\n }\n return s;\n }", "Session getCurrentSession();", "Session getCurrentSession();", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "public Session getSession() {\n return session;\n }", "public static Session getSession() {\n\n if (serverRunning.get() && !session.isClosed()) {\n return session;\n } else {\n if (session.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running\");\n }\n }\n }", "Transaction getCurrentTransaction();", "protected abstract SESSION getThisAsSession();", "public GlobalTransaction getCurrentTransaction()\n {\n return getCurrentTransaction(true);\n }", "public static Session currentSession() {\n Session session = (Session) sessionThreadLocal.get();\n // Open a new Session, if this Thread has none yet\n try {\n if (session == null) {\n session = sessionFactory.openSession();\n sessionThreadLocal.set(session);\n }\n } catch (HibernateException e) {\n logger.error(\"Get current session error: \" + e.getMessage());\n }\n return session;\n }", "public Session getSession() {\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "Session getSession();", "Session getSession();", "public Session getSession() {\n\t\tSession session = this.session;\r\n\t\tif (session == null) {\r\n\t\t\t// 2. altrimenti genera una nuova sessione utilizzando la factory (e.g. Spring MVC)\r\n\t\t\tsession = this.sessionFactory.getCurrentSession();\r\n\t\t}\r\n\t\treturn session;\r\n\t}", "public Session getSession();", "@Override\r\n\tpublic Transaction getTransaction() throws SystemException {\r\n\t\tif (threadTransaction.get()==null)\r\n\t\t\tsetNewTransaction();\r\n\t\treturn threadTransaction.get();\r\n\t}", "public AbstractSession getSession() {\n return session;\n }", "public static Transaction getRequiredThreadLocalTransaction() {\n Transaction tx = threadlocal.get();\n\n if (tx == null) {\n throw new NoTransactionFoundException(\"No transaction is found on the ThreadLocalTransaction\");\n }\n\n return tx;\n }", "private Session getCurrentSession() {\n return sessionFactory.getCurrentSession();\n }", "private Session getSession (String sessionID) {\n\t\tSession session;\n\t\tif (get(sessionID) != null) {\n\t\t\tsession = get(sessionID);\n\t\t} else {\n\t\t\tsession = new Session();\n\t\t\tput(session.getId(), session);\n\t\t}\n\t\treturn session;\n\t}", "@Override\n public Session getSession() throws SQLException {\n // If we don't yet have a live transaction, start a new one\n // NOTE: a Session cannot be used until a Transaction is started.\n if (!isTransActionAlive()) {\n sessionFactory.getCurrentSession().beginTransaction();\n configureDatabaseMode();\n }\n // Return the current Hibernate Session object (Hibernate will create one if it doesn't yet exist)\n return sessionFactory.getCurrentSession();\n }", "public static Session getCurrentSession() {\n return sessionfactory.getCurrentSession();\n }", "@Override\r\n\t@Transactional\r\n\tpublic Transactions getTransaction() {\r\n\r\n\t\tArrayList<Transactions> closedTransactions=null;\r\n\t\tif(closedTransactions == null)\r\n\t\t{\r\n\t\tclosedTransactions = new ArrayList<Transactions>();\r\n\t\tclosedTransactions = this.getClosedTransactions();\r\n\t\t}\r\n\r\n\r\n\t\tif (index < closedTransactions.size()) {\r\n\t\t\tTransactions transaction = closedTransactions.get(index++);\r\n\t\t\treturn transaction;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public /*static*/ Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "@Override\n public SimpleTransaction getTransaction() throws SystemException {\n SimpleTransaction txn = txns.get();\n if (txn == null) {\n txn = new SimpleTransaction();\n txn.setStatus(Status.STATUS_ACTIVE);\n txns.set(txn);\n }\n return txn;\n }", "public Session getCurrentSession() {\r\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "public jkt.hms.masters.business.MasSession getSession () {\n\t\treturn session;\n\t}", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "@Override\n public Session getSession() throws HibernateException {\n Session session = threadLocal.get();\n\n if (session == null || !session.isOpen()) {\n session = (sessionFactory != null) ? sessionFactory.openSession()\n : null;\n threadLocal.set(session);\n }\n return session;\n }", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "Transaction getTransaction() { \r\n return tx;\r\n }", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "public Session createTransactionAwareSession() throws TopLinkException {\n\t\tthrow new UnsupportedOperationException(\"SingleSessionFactory does not support transaction-aware Sessions\");\n\t}", "public Transaction getTransaction()\n {\n return transaction;\n }", "public String getSession() {\n return session;\n }", "protected Session getCurrentSession()\n \t{\n \t\treturn this.sessionFactory.getCurrentSession();\n \t}", "private Session getHibernateSession() throws AuditException {\r\n return this.session;\r\n }", "public RDBMSSession getSession() {\r\n\t\treturn (RDBMSSession) session;\r\n\t}", "protected Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "Transaction get(String id) throws Exception;", "public Session createSession() {\n\t\treturn this.session;\n\t}", "Object getNativeSession();", "public User getSession(){\n\t\treturn this.session;\n\t}", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "public String getSession() {\n return this.session;\n }", "public Transaction getTransaction() {\n return transaction;\n }", "Session get(int id);", "public static HttpSession getSession(Boolean session) {\r\n\t\treturn (HttpSession) FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getSession(false);\r\n\t}", "public Transaction getTransaction() {\n return this.transaction;\n }", "protected Session getSession() {\r\n if (session == null || !session.isOpen()) {\r\n LOG.debug(\"Session is null or not open...\");\r\n return HibernateUtil.getCurrentSession();\r\n }\r\n LOG.debug(\"Session is current...\");\r\n return session;\r\n }", "private Session fetchSession()\n\t{\n\t\t\tlog.info (\"******Fetching Hibernate Session\");\n\n\t\t\tSession session = HibernateFactory.currentSession();\n\n\t\t\treturn session;\n\t \n\t}", "public IEvolizerSession getEvolizerSession() throws EvolizerException {\n // IEvolizerSession session = EvolizerSessionHandler.getHandler().getCurrentSession(fDbUrl);\n // return session;\n\n return fSession;\n }", "public IHTTPSession getSession() {\n\t\treturn session;\n\t}", "public Session getSession() throws LeaseException {\n return getSession(true);\n }", "private void getHibernateSession() {\n try {\n session = em.unwrap(Session.class)\n .getSessionFactory().openSession();\n\n } catch(Exception ex) {\n logger.error(\"Failed to invoke the getter to obtain the hibernate session \" + ex.getMessage());\n ex.printStackTrace();\n }\n\n if(session == null) {\n logger.error(\"Failed to find hibernate session from \" + em.toString());\n }\n }", "DatastoreSession createSession();", "public TransactionObj getTransaction(String sID){\n\t\treturn hmTransaction.get(sID);\n\t}", "com.google.spanner.v1.Session getSessionTemplate();", "public Transaction currentTransaction() {\r\n\t\treturn threadTransaction.get();\r\n\t}", "com.google.spanner.v1.SessionOrBuilder getSessionTemplateOrBuilder();", "public Transaction getTransaction() {\n\t\treturn null;\n\t}", "public GlobalTransaction getCurrentTransaction(Transaction tx)\n {\n return getCurrentTransaction(tx, true);\n }", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n if (sessionBuilder_ != null) {\n return sessionBuilder_.getMessageOrBuilder();\n } else {\n return session_;\n }\n }", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n if (sessionBuilder_ == null) {\n return session_;\n } else {\n return sessionBuilder_.getMessage();\n }\n }", "synchronized Session getSession(long id) {\n return (Session) sessionMap.get(id);\n }", "public Session getSession() throws DAOException {\n // Injection fails for this non-managed class.\n DAOException ex = null;\n String pu = PERSISTENCE_UNIT;\n if(session == null || !em.isOpen()) {\n session = null;\n try {\n em = (EntityManager)new InitialContext().lookup(pu);\n } catch(Exception loopEx) {\n ex = new DAOException(loopEx);\n logger.error(\"Persistence unit JNDI name \" + pu + \" failed.\");\n }\n }\n\n getHibernateSession();\n if(ex != null) {\n ex.printStackTrace();\n }\n return session;\n }", "public Session getHibernateSession() throws EvolizerException {\n return getEvolizerSession().getHibernateSession();\n }", "public Session createSession() {\n\t\tSession session = new Session();\n\t\tput(session.getId(), session);\n\t\treturn session;\n\t}", "public synchronized Session getSession() throws JmsException {\n try {\n if (session == null) {\n Connection conToUse;\n if (connection == null) {\n if (sharedConnectionEnabled()) {\n conToUse = getSharedConnection();\n } else {\n connection = createConnection();\n connection.start();\n conToUse = connection;\n }\n } else {\n conToUse = connection;\n }\n session = createSession(conToUse);\n }\n return session;\n } catch (JMSException e) {\n throw convertJmsAccessException(e);\n }\n }", "public static Session getSessionWithKeyspace() {\n\n if (serverRunning.get() && keyspaceCreated.get() && !sessionWithKeyspace.isClosed()) {\n return sessionWithKeyspace;\n } else {\n if (sessionWithKeyspace.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running or keyspace has not been created\");\n }\n }\n }", "public static Session currentSession() {\n \tif (sessionFactory == null) {\n \t\tinitialize();\n \t}\n \tif (singleSessionMode) {\n \t\tif (singleSession == null) {\n \t\t\tsingleSession = sessionFactory.openSession();\n \t\t}\n \t\treturn singleSession;\n \t} else {\n\t Session s = session.get();\n\t \n\t // Open a new Session, if this Thread has none yet\n\t if (s == null || !s.isOpen()) {\n\t s = sessionFactory.openSession();\n\t session.set(s);\n\t }\n\t return s;\n \t}\n }", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n return session_;\n }", "protected DatabaseSession getDbSession() {\n if(dbSession == null) {\n dbSession = getServerSession();\n }\n return dbSession;\n }", "protected abstract Object getTransactionObject() throws TransactionInfrastructureException;", "@Override\n\tpublic Session getSession() throws Exception {\n\t\treturn null;\n\t}" ]
[ "0.65066457", "0.64741814", "0.6468158", "0.64574945", "0.63480604", "0.6310349", "0.62511086", "0.6248309", "0.6242815", "0.623865", "0.6230411", "0.62226117", "0.62077206", "0.62009495", "0.61532265", "0.61521465", "0.6131782", "0.6131782", "0.6131782", "0.61266404", "0.6126617", "0.6118836", "0.61059415", "0.60904664", "0.60836697", "0.60836697", "0.6071025", "0.6063759", "0.6055471", "0.60321754", "0.603032", "0.60264575", "0.6025077", "0.6021201", "0.60143876", "0.60143876", "0.5999447", "0.598284", "0.5954549", "0.5938707", "0.593185", "0.5926729", "0.59214365", "0.59114903", "0.5899518", "0.58988374", "0.5895959", "0.58882993", "0.5877922", "0.5876022", "0.5872416", "0.5856365", "0.5850996", "0.58392423", "0.58318603", "0.58318603", "0.5828531", "0.58241117", "0.5822144", "0.58033985", "0.57968915", "0.5785444", "0.57818955", "0.577003", "0.5764432", "0.57626706", "0.57506675", "0.5742112", "0.573755", "0.5737166", "0.573633", "0.57348806", "0.5730646", "0.5730414", "0.5724471", "0.5712954", "0.5708987", "0.56556064", "0.56466186", "0.56383", "0.5635441", "0.56276065", "0.5626312", "0.5615329", "0.5589126", "0.5577675", "0.55589986", "0.5555817", "0.5551202", "0.555032", "0.5548567", "0.55375063", "0.5533412", "0.552083", "0.5513488", "0.5512673", "0.550788", "0.55031073", "0.54909116", "0.5481372", "0.5480802" ]
0.0
-1
Closes all Sessions registered with this SessionManager.
public void closeAllSessions() { // don't disconnect system user; need it to save database Session[] sessions = getAllSessions(); for (int i = 0; i < sessions.length; i++) { sessions[i].close(); } synchronized(this) { sessionMap.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "synchronized void close() {\n\n closeAllSessions();\n sysSession.close();\n sysLobSession.close();\n }", "public void close() {\n\t\tif (this.session instanceof DatabaseSession) {\n\t\t\t((DatabaseSession) this.session).logout();\n\t\t}\n\t\tthis.session.release();\n\t}", "protected final void closeSession() {\n Session currentSession = sessionTracker.getOpenSession();\n if (currentSession != null) {\n currentSession.close();\n }\n }", "public void closeSession() {\n if (session != null) {\n session.close();\n session = null;\n }\n }", "public static void closeSession() {\n \tif (singleSessionMode) {\n \t\tif (singleSession != null) {\n \t\t\tsingleSession.close();\n \t\t\tsingleSession = null;\n \t\t}\n \t} else {\n\t Session s = session.get();\n\t if (s != null && s.isOpen()) {\n\t try {\n\t \ts.close();\n\t } finally {\n\t \tsession.set(null); \t\n\t }\n\t }\n\t \n \t}\n }", "void closeSession();", "void closeSession();", "public void close() {\n\n try {\n try {\n try {\n if (exception == null) {\n flushSessions();\n }\n\n } catch (Throwable exception) {\n exception(exception);\n } finally {\n\n try {\n if (exception == null) {\n transactionContext.commit();\n }\n } catch (Throwable exception) {\n exception(exception);\n }\n transactionContext.rollback();\n }\n } catch (Throwable exception) {\n exception(exception);\n } finally {\n closeSessions();\n\n }\n } catch (Throwable exception) {\n exception(exception);\n } \n\n // rethrow the original exception if there was one\n if (exception != null) {\n if (exception instanceof Error) {\n throw (Error) exception;\n } else if (exception instanceof RuntimeException) {\n throw (RuntimeException) exception;\n }\n }\n }", "protected final void closeSessionAndClearTokenInformation() {\n Session currentSession = sessionTracker.getOpenSession();\n if (currentSession != null) {\n currentSession.closeAndClearTokenInformation();\n }\n }", "public static void closeSession() {\n Session session = (Session) sessionThreadLocal.get();\n sessionThreadLocal.set(null);\n try {\n if (session != null)\n session.close();\n } catch (HibernateException e) {\n logger.error(\"Close current session error: \" + e.getMessage());\n }\n }", "private static void closeSession() {\n isSessionOpen = false;\n }", "private void doCloseSession()\n {\n if (session != null)\n {\n try\n {\n database.closeHibernateSession(session);\n }\n finally\n {\n session = null;\n }\n }\n }", "public void close() {\n for (final BasicServerMetrics metrics : myServerMetrics.values()) {\n metrics.close();\n }\n myServerMetrics.clear();\n }", "@Override\n\t\tpublic void closeAll() {\n\t\t\tfor (ClientHandler clientHandler : new ArrayList<ClientHandler>(this.running)) {\n\t\t\t\tclientHandler.close();\n\t\t\t}\n\t\t}", "public void endSession() {\n if (sqlMngr != null) {\n sqlMngr.disconnect();\n }\n if (sc != null) {\n sc.close();\n }\n sqlMngr = null;\n sc = null;\n }", "public synchronized void closeAllConnections() {\n\t\tstop();\n\t}", "public /*static*/ void close() {\n sessionFactory.close();\n }", "public void closeConnections() {\n for (Object i : connections.keySet().toArray()) {\n connections.get(i).closeConnection();\n }\n\n }", "public static void close() {\r\n\t\tif (sessionFactory != null)\r\n\t\t\tsessionFactory.close();\r\n\t\tsessionFactory = null;\r\n\r\n\t}", "public static void close() {\r\n if (sessionFactory != null) {\r\n sessionFactory.close();\r\n }\r\n sessionFactory = null;\r\n }", "public static void close() {\r\n if (sessionFactory != null) {\r\n sessionFactory.close();\r\n }\r\n sessionFactory = null;\r\n }", "public static void close() {\n HashMap<String, Transaction> map = instance.getTransactions();\n for (Transaction transaction : map.values()) {\n transaction.destroy();\n }\n map.clear();\n instance.transactions.remove();\n }", "@PreDestroy\n public void close() {\n connectionManagers.values().forEach(ConnectionManager::close);\n }", "public final void closeSession() {\n\t\t// Call the base class\n\t\tSystem.out.print(\"Session Closed\");\n\t\tsuper.closeSession();\n\n\t\tif ( m_sock != null) {\n\t\t\ttry {\n\t\t\t\tm_sock.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_sock = null;\n\t\t}\n\n\t\tif ( m_in != null) {\n\t\t\ttry {\n\t\t\t\tm_in.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_in = null;\n\t\t}\n\n\t\tif ( m_out != null) {\n\t\t\ttry {\n\t\t\t\tm_out.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_out = null;\n\t\t}\n\n\n\t}", "protected void closeSession(SessionImpl session) {\n sessions.remove(session);\n sessionCount.dec();\n }", "public static void shutdown() {\n\t\tgetSessionFactory().close();\n\t}", "void closeAll();", "@OnClose\n\tpublic void close(Session session) {\n\t\tsessionHandler.removeSession(session);\n\t}", "static synchronized void closeAll() {\n List<BlackLabEngine> copy = new ArrayList<>(engines);\n engines.clear();\n for (BlackLabEngine engine : copy) {\n engine.close();\n }\n }", "@Override\n public void close() {\n\n LOG.log(Level.FINER, \"Closing the evaluators - begin\");\n\n final List<EvaluatorManager> evaluatorsCopy;\n synchronized (this) {\n evaluatorsCopy = new ArrayList<>(this.evaluators.values());\n }\n\n for (final EvaluatorManager evaluatorManager : evaluatorsCopy) {\n if (!evaluatorManager.isClosedOrClosing()) {\n LOG.log(Level.WARNING, \"Unclean shutdown of evaluator {0}\", evaluatorManager.getId());\n evaluatorManager.close();\n }\n }\n\n LOG.log(Level.FINER, \"Closing the evaluators - end\");\n }", "public static void close() {\r\n if (sessionFactory != null) {\r\n sessionFactory.close();\r\n }\r\n LOG.debug(MODULE + \"SessionFactory Close\");\r\n sessionFactory = null;\r\n }", "public void close() {\n if (adminPool != null) {\n try {\n adminPool.close();\n } catch (Exception e) {\n log.warn(\"Error while closing LDAP connection pool\", e);\n }\n adminPool = null;\n }\n if (userPool != null) {\n try {\n userPool.close();\n } catch (Exception e) {\n log.warn(\"Error while closing LDAP connection pool\", e);\n }\n userPool = null;\n }\n }", "public void stop() {\n session.close(false);\n }", "public void close() {\n synchronized (lock) {\n info(\"Closing all sync producers\");\n Iterator<SyncProducer> iter = syncProducers.values().iterator();\n while (iter.hasNext())\n iter.next().close();\n }\n }", "public void destroySession() {\n existingSession().ifPresent(session -> {\n session.clear();\n context().session().clear();\n });\n }", "public void closeAll(){\n\t\t\n\t\tshowMessage(\"\\n Closing all connections...\");\n\t\tableToType(false);\n\t\ttry {\n\t\t\t\n\t\t\tinput.close();\n\t\t\toutput.close();\n\t\t\tconnection.close();\n\t\t\t\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public void closeAllEntityManagers() {\n entityManagerFactory.close();\n }", "private void closeAll(){\r\n\t\t\r\n\t}", "public void closeAllOpenScriptInstances() {\n\n\t\tboolean closedConn = false;\n\n\t\ttry {\n\t\t\t// if the map is not empty\n\t\t\tif (!scriptInstanceMap.isEmpty()) {\n\n\t\t\t\tscriptInstanceMap.clear();\n\n\t\t\t\tclosedConn = true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.warn(\"Exception::\", e);\n\t\t}\n\n\t\tif (!closedConn) {\n\t\t\tLOGGER.info(\"No open script instances found!\");\n\t\t}\n\t}", "@Override\n\tpublic void close() {\n\t\tfor (Communication communication: listCommunication) {\n\t\t\tcommunication.close();\n\t\t}\n\t}", "public synchronized void closeAllConnections() {\n closeConnections(availableConnections);\n availableConnections = new Vector();\n closeConnections(busyConnections);\n busyConnections = new Vector();\n }", "public synchronized void closeAllConnections() {\n closeConnections(availableConnections);\n availableConnections = new Vector();\n closeConnections(busyConnections);\n busyConnections = new Vector();\n }", "public void closeAll() throws IOException {\n\t\tscMessages.close();\n\t\tscFiles.close();\n\t}", "public static void closeSession() throws HException {\r\n\t\ttry {\r\n\t\t\tcommitTransaction();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\trollbackTransaction();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tSession s = (Session) threadSession.get();\r\n\t\t\tthreadSession.set(null);\r\n\t\t\tthreadTransaction.set(null);\r\n\t\t\tif (s != null && s.isOpen()) {\r\n\t\t\t\ts.close();\r\n\t\t\t\tsetConnections(-1);\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "void closeSessionFactory();", "public void closeConnection() {\n this.session.close();\n }", "@Override\r\n @SuppressWarnings(\"empty-statement\")\r\n public void close()\r\n {\r\n curDb_ = null;\r\n curConnection_ = null;\r\n try\r\n {\r\n for(Map.Entry<Db_db, Connection> entry: connections_.entrySet())\r\n {\r\n entry.getValue().close();\r\n }\r\n }catch(Exception e){};\r\n \r\n connections_.clear();\r\n }", "public void shutdown() {\n for (Entry<String,Session> entry : _sessions.entrySet())\n entry.getValue().disconnect();\n \n writeLine(\"\\nDebugServer shutting down.\");\n close();\n }", "@Override\n public void closeSession() throws HibernateException {\n Session session = threadLocal.get();\n threadLocal.set(null);\n\n if (session != null) {\n session.close();\n }\n }", "public void closeAllFrames() {\r\n\t\tfor (int i = 0; i < frames.size(); i++) {\r\n\t\t\tframes.get(i).attemptClose();\r\n\t\t}\r\n\t}", "public static void closeSession() throws HibernateException {\n\t\tSession session = (Session) threadLocal.get();\n threadLocal.set(null);\n\n if (session != null && session.isOpen()) {\n session.close();\n }\n }", "public void closeAll() throws IOException {\n\t\tfor (BufferedWriter writer : writers.values()) {\n\t\t\twriter.close();\n\t\t}\n\t\twriters.clear();\n\t}", "public void closeAllRoomWindows(){\n\t\tIterator it = roomlist.getAllOpenChatRooms();\n\t\twhile (it.hasNext()){\n\t\t\tString roomname = (String) it.next();\n\t\t\troomlist.get(roomname).closeWindow();\n\t\t\troomlist.remove(roomname);\n\t\t\t\n\t\t}\n\t\n\t}", "public void closeAll()\n {\n closeAllTopicPublishers();\n closeAllTopicSubscribers();\n closeAllTopicDurableSubscribers();\n }", "public void closeSession (HttpServletRequest request) {\n isConnected(request);\n String consumerSession = getConsumerSession(request);\n \n request.getSession().invalidate(); // Clear all session data\n secureMap.remove(consumerSession);\n }", "public void shutdown() {\n for (Connection connection : connections) { //Try closing all connections\n closeConnection(connection);\n }\n }", "public void finSession(Session session){\n obtenerConexion().closeSession(session);\n }", "public void closeAllTopicSubscribers()\n {\n for(int ii = 0; ii < topicSubscriberList.size(); ii++)\n {\n TopicSubscriber subscriber = (TopicSubscriber)topicSubscriberList.get(ii);\n try\n {\n subscriber.close();\n }\n catch(JMSException exc)\n {\n\n }\n }\n }", "static public void close() {\n renewalTimer.cancel();\n delegationTokens.clear();\n }", "public void closeIdleConnections()\n {\n \n }", "void clearSessionListeners();", "public static void closeAllDb() {\r\n\t\tlogger.info(\"Close all database connections\");\r\n\t\tcloseAllMsiDb();\r\n\t\tcloseUdsDb();\r\n\t}", "@Override\n public void close() {\n for ( TunnelConnection tunnelConnection : tunnelConnections ) {\n IOUtils.closeAndLogException( tunnelConnection );\n }\n }", "public void closeAndReopenSession() {\n\n\t\ttry {\n\t\t\tif (getHSession() != null) {\n\t\t\t\tgetHSession().close();\n\t\t\t}\n\t\t\tsetHSession(HibernateUtil.getNewSession());\n\t\t} catch (HibernateException he) {\n\t\t\tgetLog().error(he);\n\t\t}\n\t}", "private void closeConnections() {\r\n for (Iterator<Connection> it = connections.values().iterator(); it.hasNext();) {\r\n TransConnection conn = (TransConnection) it.next();\r\n try {\r\n conn.setCloseAllowed(true);\r\n conn.close();\r\n } catch (SQLException ex) {\r\n log.severe(\"Connection close failure: \" + ex.getMessage());\r\n }\r\n }\r\n connections.clear();\r\n }", "@OnClose\r\n\tpublic void onClose(Session session) {\r\n\t\tSystem.out.println(\"Session \" + this.uniqueId + \" has ended\");\r\n\t\tsockets.remove(this.uniqueId);\r\n\t\tfor (EchoServer socket : sockets.values()) {\r\n\t\t\t/*if (socket != this){\r\n\t\t\t\tsocket.sendClient(uniqueId + \" Connection closed\");\t\t\t\t\r\n\t\t\t}*/\r\n\t\t\tsocket.sendClient(uniqueId + \" Connection closed\");\r\n\t\t}\r\n\t\tthis.session = null;\r\n\t}", "@Override\r\n \t\t\tpublic void deleteSessions() {\n \t\t\t\t\r\n \t\t\t}", "public void close()\n {\n getConnectionManager().shutdown();\n }", "public void close() throws SSLException {\r\n // Indicate that application is done with engine\r\n tlsEngine.closeOutbound();\r\n }", "@PreDestroy\n\tprivate void closeAnalyser() {\n\t\tlog.info(\"Terminating all analysers\");\n\t\tfor (AnalyserPool analyserPool : analyserPools.values()) {\n\t\t\tanalyserPool.destroyAllAnalysers();\n\t\t}\n\t}", "public synchronized void close() {\n if (session != null) {\n if (!suspended) {\n try {\n if (transacted == Transacted.Jms) {\n if (rollbackOnly) {\n session.rollback();\n } else {\n session.commit();\n }\n afterClose();\n } else if (transacted == Transacted.Xa) {\n destroy();\n try {\n if (rollbackOnly) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Rolling back XA transaction\");\n }\n transactionManager.rollback();\n } else {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Committing XA transaction\");\n }\n transactionManager.commit();\n }\n } catch (Exception e) {\n throw new TransactionException(e);\n }\n } else if (transacted == Transacted.ClientAck) {\n if (message != null) {\n if (!rollbackOnly) {\n message.acknowledge();\n } else {\n destroyConsumer();\n }\n }\n afterClose();\n } else {\n afterClose();\n }\n } catch (JMSException e) {\n destroy();\n throw convertJmsAccessException(e);\n }\n }\n }\n }", "public void removeAllInvalidSessions(){\n\t\tfor(Session s: getSessionSet()){\n\t\t\tif(!s.isValid())\n\t\t\t\ts.delete();\n\t\t}\n\t}", "public void logout() throws SessionException{\n\t\t\n\t\tLog.getLogger().info(\"Logging out of session\");\n\t\tRestAPIDelete logout = new RestAPIDelete(\"/session\");\n\t\tlogout.execute(this);\n\t}", "public void endSession(){\n\t\t//remove this session from the server's list of sessions\n\t\tgameServer.removeSession(this.sessionID); \t\t\t\t\n\t\tbroadCastMessage(\"@quitGame\"); //remove all clients from the session\n\t\tconnectedClientSockets.clear();\n\t}", "void flushAndClearSession();", "private void closeDictAndItemStreams()\n {\n for (ChannelSession channelSession : channelSessions)\n dictionaryHandler.closeStreams(channelSession, error);\n }", "public void close()\n {\n synchronized (m_lock)\n {\n // We are closed hence, decouple all threads from the pool\n for (int i = 0; i < m_pool.length; i++)\n {\n if (null != m_pool[i])\n {\n m_pool[i].release();\n \n m_pool[i] = null;\n }\n }\n \n m_closed = true;\n }\n }", "@Override\n public void close() {\n for (Servlet registeredServlet : registeredServlets) {\n paxWeb.unregisterServlet(registeredServlet);\n }\n for (Filter filter : registeredFilters) {\n paxWeb.unregisterFilter(filter);\n }\n for (EventListener eventListener : registeredEventListeners) {\n paxWeb.unregisterEventListener(eventListener);\n }\n for (String alias : registeredResources) {\n paxWeb.unregister(alias);\n }\n }", "public void destroy()\n {\n if ( cacheManager == null )\n {\n return;\n }\n\n LOG.info( \"clearing all the caches\" );\n\n cacheManager.close();\n cacheManager = null;\n //cacheManager.clearAll();\n //cacheManager.shutdown();\n }", "public void close() {\n try {\n socket.close();\n sInput.close();\n sOutput.close();\n sInput = null;\n socket = null;\n } catch (IOException e) {\n System.out.println(\"Logged Out.\");\n }\n }", "public void closeAllTopicPublishers()\n {\n for(int ii = 0; ii < topicPublisherList.size(); ii++)\n {\n TopicPublisher publisher = (TopicPublisher)topicPublisherList.get(ii);\n try\n {\n publisher.close();\n }\n catch(JMSException exc)\n {\n\n }\n }\n }", "public void closeAll() throws IOException {\r\n\t\ttry {\r\n\t\t\t// Close the socket\r\n\t\t\tif (this.clientSocket != null)\r\n\t\t\t\tthis.clientSocket.close();\r\n\t\t\t// Close the output stream\r\n\t\t\tif (this.out != null)\r\n\t\t\t\tthis.out.close();\r\n\t\t\t// Close the input stream\r\n\t\t\tif (this.in != null)\r\n\t\t\t\tthis.in.close();\r\n\t\t} finally {\r\n\t\t\t// Set the streams and the sockets to NULL no matter what.\r\n\t\t\tthis.in = null;\r\n\t\t\tthis.in = null;\r\n\t\t\tthis.clientSocket = null;\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void clearSessionManager(HttpSession p_session)\n {\n SessionManager sessionMgr =\n (SessionManager)p_session.getAttribute(SESSION_MANAGER);\n\n sessionMgr.clear();\n }", "@Override\r\n\tpublic void dispose(IoSession session) throws Exception {\n\r\n\t}", "@Override\n public void close() {\n try {\n if (tunnelSession != null) {\n tunnelSession.close();\n tunnelSession = null;\n }\n if (sshclient != null) {\n sshclient.stop();\n sshclient = null;\n }\n } catch (final Throwable t) {\n throw new RuntimeException(t);\n }\n }", "public static void unjoinAndClose(){\n Session s = (Session)_sessionRef.get();\n if(s != null){\n s.close();\n }\n }", "public void exitAllRooms() {\n\t\tfor (RoomSetting roomSetting : roomSettings) {\n\t\t\troomSetting.getRoom().removeClient(this);\n\t\t}\n\t\troomSettings.clear();\n\t}", "public void closeSessionForThread() {\n Session session = THREADED_SESSION.get();\n THREADED_SESSION.set(null);\n THREADED_TRANSACTION.set(null);\n if (session != null) {\n if (session.isOpen()) {\n session.close();\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\t public void close() throws IOException, InterruptedException {\r\n\t for (RecordWriter writer : recordWriters.values()) {\r\n\t writer.close(context);\r\n\t }\r\n\t }", "public void close() {\n\t\tcloseConnection();\n\t\tcloseStatement();\n\t\tcloseResultSet();\n\t}", "public static void closeAllWindows() {\n\t\tcloseAllWindows(false);\n\t}", "public void closePrivateSession(){\n if(sqlSession != null){\n sqlSession.close();\n }\n }", "final private void closeAll() throws IOException {\n // This method is final since version 2.2\n\n try {\n // Close the socket\n if (clientSocket != null)\n clientSocket.close();\n\n // Close the output stream\n if (output != null)\n output.close();\n\n // Close the input stream\n if (input != null)\n input.close();\n } finally {\n // Set the streams and the sockets to NULL no matter what\n // Doing so allows, but does not require, any finalizers\n // of these objects to reclaim system resources if and\n // when they are garbage collected.\n output = null;\n input = null;\n clientSocket = null;\n }\n }", "public void closeAll() {\n\t\tInteger[] keys = visible.keySet().stream().toArray(Integer[]::new);\n\t\tfor (int k : keys) {\n\t\t\tclose(k >> 16, k & 0xFFFF);\n\t\t}\n\t}", "public void close() {\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = ( ReplicaCatalog )it.next();\n catalog.close();\n }\n }", "@PreDestroy\n protected void destroy() {\n sessionFactory.getCurrentSession().close();\n }", "public void close()\n {\n ServiceLocator.getInstance().shutdown();\n }", "public void close() {\n this.consoleListenerAndSender.shutdownNow();\n this.serverListenerAndConsoleWriter.shutdownNow();\n try {\n this.getter.close();\n this.sender.close();\n this.socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void close() {\n dispose();\n }", "public void logout(){\r\n\t\tallUser.remove(this.sessionID);\r\n\t\tthis.sessionID = -1;\r\n\t}" ]
[ "0.76338637", "0.67828083", "0.67354286", "0.663764", "0.6630964", "0.63954306", "0.63954306", "0.63861203", "0.630896", "0.6223543", "0.61534697", "0.612155", "0.6121266", "0.61184895", "0.60707104", "0.6061668", "0.6045382", "0.6032758", "0.6032117", "0.6016703", "0.6013619", "0.6011146", "0.5996809", "0.59859216", "0.58963794", "0.5876006", "0.5870243", "0.5863336", "0.58265567", "0.5806356", "0.57884586", "0.5709525", "0.56929666", "0.5682442", "0.5671416", "0.56649524", "0.5654073", "0.56538427", "0.5651659", "0.56459117", "0.5635385", "0.5635385", "0.5619009", "0.5613926", "0.5602", "0.5598754", "0.55696934", "0.5565743", "0.55629337", "0.55257875", "0.5520529", "0.55103505", "0.54975456", "0.5488523", "0.5424227", "0.54216045", "0.54191816", "0.5406978", "0.53955954", "0.53861785", "0.537471", "0.5370365", "0.53693885", "0.53640336", "0.5343311", "0.5329266", "0.5323199", "0.5316664", "0.53161585", "0.5311852", "0.52845204", "0.5282661", "0.5280375", "0.5278948", "0.5266132", "0.5262783", "0.5261555", "0.52547896", "0.5247246", "0.5246086", "0.52456665", "0.5230845", "0.5220409", "0.52126306", "0.5210843", "0.5210286", "0.5210121", "0.5209614", "0.52073467", "0.52011126", "0.5200656", "0.51813716", "0.51797384", "0.5179139", "0.5177279", "0.5172145", "0.5167453", "0.5164162", "0.5163797", "0.5163314" ]
0.83010125
0
Removes the session from management and disconnects.
synchronized void removeSession(Session session) { sessionMap.remove(session.getId()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void disconnect(){\n Session session = (Session)_sessionRef.get();\n if(session != null && session.isConnected()){\n session.disconnect();\n _sessionRef.set(null);\n }\n }", "public void endSession() {\n if (sqlMngr != null) {\n sqlMngr.disconnect();\n }\n if (sc != null) {\n sc.close();\n }\n sqlMngr = null;\n sc = null;\n }", "public void destroySession() {\n existingSession().ifPresent(session -> {\n session.clear();\n context().session().clear();\n });\n }", "public void logout(){\r\n\t\tallUser.remove(this.sessionID);\r\n\t\tthis.sessionID = -1;\r\n\t}", "public void endSession(){\n\t\t//remove this session from the server's list of sessions\n\t\tgameServer.removeSession(this.sessionID); \t\t\t\t\n\t\tbroadCastMessage(\"@quitGame\"); //remove all clients from the session\n\t\tconnectedClientSockets.clear();\n\t}", "public void disconnect()\n\t{\n\t\tif (isConnected)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvimPort.logout(serviceContent.getSessionManager());\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlogger.trace(\"Failed to logout esx: \" + host, e);\n\t\t\t}\n\t\t}\n\t\tisConnected = false;\n\t}", "public void closeSession (HttpServletRequest request) {\n isConnected(request);\n String consumerSession = getConsumerSession(request);\n \n request.getSession().invalidate(); // Clear all session data\n secureMap.remove(consumerSession);\n }", "public static void logout() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.logoutUser());\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void onDestroy() {\n super.onDestroy();\n Object object = this.mLock;\n synchronized (object) {\n Iterator<MediaSession2> iterator = this.getSessions().iterator();\n do {\n if (!iterator.hasNext()) {\n this.mSessions.clear();\n this.mNotifications.clear();\n // MONITOREXIT [2, 3, 4] lbl9 : MonitorExitStatement: MONITOREXIT : var1_1\n this.mStub.close();\n return;\n }\n this.removeSession(iterator.next());\n } while (true);\n }\n }", "void clearSession();", "void clearSession();", "void exitSession()\n\t{\n\t\t// clear out our watchpoint list and displays\n\t\t// keep breakpoints around so that we can try to reapply them if we reconnect\n\t\tm_displays.clear();\n\t\tm_watchpoints.clear();\n\n\t\tif (m_fileInfo != null)\n\t\t\tm_fileInfo.unbind();\n\n\t\tif (m_session != null)\n\t\t\tm_session.terminate();\n\n\t\tm_session = null;\n\t\tm_fileInfo = null;\n\t}", "public void doLogout() {\r\n\t\tdestroy();\r\n\r\n\t\t/* ++++++ Kills the Http session ++++++ */\r\n\t\t// HttpSession s = (HttpSession)\r\n\t\t// Sessions.getCurrent().getNativeSession();\r\n\t\t// s.invalidate();\r\n\t\t/* ++++++ Kills the zk session +++++ */\r\n\t\t// Sessions.getCurrent().invalidate();\r\n\t\tExecutions.sendRedirect(\"/j_spring_logout\");\r\n\r\n\t}", "public void disconnect() {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mApplicationContext);\n prefs.edit().putBoolean(\"xmpp_logged_in\", false).commit();\n\n if (mConnection != null) {\n mConnection.disconnect();\n }\n\n mConnection = null;\n // Unregister the message broadcast receiver.\n if (uiThreadMessageReceiver != null) {\n mApplicationContext.unregisterReceiver(uiThreadMessageReceiver);\n uiThreadMessageReceiver = null;\n }\n }", "@CallSuper\n public void clearSession() {\n callback = null;\n }", "protected void destroy() {\n JmsUtils.closeSession(session);\n JmsUtils.closeConnection(connection);\n session = null;\n connection = null;\n }", "public void Logout()\n {\n isLoggedIn = false;\n connection.Disconnect(); \n connection = null;\n }", "protected final void closeSessionAndClearTokenInformation() {\n Session currentSession = sessionTracker.getOpenSession();\n if (currentSession != null) {\n currentSession.closeAndClearTokenInformation();\n }\n }", "void clearSessionListeners();", "public void clearSession(){\n mIsLoggedIn = false;\n mUser = null;\n clearSharedPreference();\n }", "public void logout() {\n getRequest().getSession().invalidate();\n }", "public static void unjoinAndClose(){\n Session s = (Session)_sessionRef.get();\n if(s != null){\n s.close();\n }\n }", "public void stop() {\n session.close(false);\n }", "@Override\n\tpublic void clearSession() throws Exception {\n\t\t\n\t}", "void flushAndClearSession();", "@Test\r\n public void testRemoveSession() {\r\n System.out.println(\"removeSession\");\r\n assertNotNull(sm);\r\n boolean res = sm.initSession(\"test4\", programsHome, programsHome + \"files4/\", requester);\r\n assertTrue(res);\r\n \r\n ISimulationSessionInfo result = sm.getSession(\"test4\");\r\n assertNotNull(result);\r\n assertEquals(result.getRequester(), \"junit\");\r\n \r\n res = sm.removeSession(\"test4\");\r\n assertTrue(res);\r\n \r\n result = sm.getSession(\"test4\");\r\n assertNull(result);\r\n }", "@Override\n public void afterConnectionClosed(WebSocketSession session, CloseStatus status) {\n System.out.println(\"SocketController: afterConnectionClosed rad 84\");\n socketService.removeSession(session);\n }", "public void endSession(){\n currentUser = null;\n ui.returnCard();\n }", "public void disconnect() throws IOException {\n this.session.disconnect();\n this.session = null;\n }", "void unsetSessionID();", "void closeSession();", "void closeSession();", "private void _logout() throws SessionException {\n\n if (this._client != null && this._client.isLoggedOn())\n this._client.logout();\n }", "@Override\n public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {\n sessionMap.remove(session.getId());\n }", "@Override\r\n \t\t\tpublic void deleteSessions() {\n \t\t\t\t\r\n \t\t\t}", "private void cleanUp(){\n\t\tSSHUtil sSHUtil=(SSHUtil) SpringUtil.getBean(\"sSHUtil\");\n\t\ttry {\n\t\t\tsSHUtil.disconnect();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void logout() throws SessionException{\n\t\t\n\t\tLog.getLogger().info(\"Logging out of session\");\n\t\tRestAPIDelete logout = new RestAPIDelete(\"/session\");\n\t\tlogout.execute(this);\n\t}", "protected void closeSession(SessionImpl session) {\n sessions.remove(session);\n sessionCount.dec();\n }", "public void forceLogout()\n\t{\n\t\tif(getSession() != null && getSession().getLoggedIn())\n\t\t\tgetSession().close();\n\t\telse\n\t\t\tGameServer.getServiceManager().getNetworkService().getLogoutManager().queuePlayer(this);\n\t}", "public void disconnect()\n {\n this.uri = null;\n this.userAddress = null;\n this.password = null;\n connected = false;\n }", "private void logout() {\n\t\tgetUI().get().navigate(\"login\");\r\n\t\tgetUI().get().getSession().close();\r\n\t}", "@Override\n\tpublic void exitSessionUser() {\n\t\tgetThreadLocalRequest().getSession().invalidate();\n\t\t\n\t}", "private void ungetSession(final Session session) {\n if (session != null) {\n try {\n session.logout();\n } catch (Throwable t) {\n LOGGER.error(\"Unable to log out of session: \" + t.getMessage(), t);\n }\n }\n }", "public synchronized void deRegister()\n {\n // stop the thread running...\n logger.debug(\"deregister called - invalidating session\");\n\n // remove from registered listeners and then invalidate the ScriptSession\n clients.remove(wctx.getScriptSession().getId());\n wctx.getScriptSession().invalidate();\n\n if (clients.size() == 0)\n {\n // might as well stop thread since we have no registered listeners\n this.active = false;\n }\n\n }", "DefaultSession removeSession(String id, boolean invalidate);", "public void disconnect() {\n SocketWrapper.getInstance(mContext).disConnect();\n }", "void disconnect() {\n connector.disconnect();\n // Unregister from activity lifecycle tracking\n application.unregisterActivityLifecycleCallbacks(activityLifecycleTracker);\n getEcologyLooper().quit();\n }", "private static void closeSession() {\n isSessionOpen = false;\n }", "public void disconnect() {\n try {\n theCoorInt.unregisterForCallback(this);\n theCoorInt = null;\n }\n catch (Exception e) {\n simManagerLogger.logp(Level.SEVERE, \"SimulationManagerModel\", \n \"closeSimManager\", \"Exception in unregistering Simulation\" +\n \"Manager from the CAD Simulator.\", e);\n }\n }", "@Override\n public void sessionDestroyed(HttpSessionEvent event) {\n String broadcasterId = event.getSession().getId();\n LOG.debug(\"Removing broadcaster: {}\", broadcasterId);\n BroadcasterFactory.getDefault().remove(broadcasterId);\n }", "@Override\n public void remove() throws IOException {\n try {\n if (connection != null) {\n connection.close(session);\n }\n connection = null;\n session = null;\n } catch (Exception ex) {\n throw new IOException(ex);\n }\n }", "public void disconnect() throws OOBException {\n \t\tsession.disconnect();\n \t}", "private void destroySession(Session session) {\n\r\n\t}", "public void deconnect_station(Station s) throws Exception{\r\n\t\ts.remove_user(this);\r\n\t}", "public void terminateSession(){\n\t\t\t\n\t\t\tsendMessage2Client(\"Session Terminated\");\n\t\t\t\n\t\t\tdb.getRecord(keyname).setClientStatus(\"TERMINATED\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tccSocket.close();\n\t\t\t\t\t\t\t\t\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t\tdb.getRecord(keyname).setClientStatus(\"LOST\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "public void disconnect(){\n\n\t\tserverConnection.disconnect();\n\t}", "public final void closeSession() {\n\t\t// Call the base class\n\t\tSystem.out.print(\"Session Closed\");\n\t\tsuper.closeSession();\n\n\t\tif ( m_sock != null) {\n\t\t\ttry {\n\t\t\t\tm_sock.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_sock = null;\n\t\t}\n\n\t\tif ( m_in != null) {\n\t\t\ttry {\n\t\t\t\tm_in.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_in = null;\n\t\t}\n\n\t\tif ( m_out != null) {\n\t\t\ttry {\n\t\t\t\tm_out.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_out = null;\n\t\t}\n\n\n\t}", "public void disconnect() {\n\t\tdisconnect(null);\n\t}", "public void close() {\n\t\tif (this.session instanceof DatabaseSession) {\n\t\t\t((DatabaseSession) this.session).logout();\n\t\t}\n\t\tthis.session.release();\n\t}", "public void closeSession() {\n if (session != null) {\n session.close();\n session = null;\n }\n }", "public void remove() {\n session.removeAttribute(\"remoteUser\");\n session.removeAttribute(\"authCode\");\n setRemoteUser(\"\");\n setAuthCode(AuthSource.DENIED);\n }", "private void disconnect() {\n activityRunning = false;\n MRTClient.getInstance().doHangup();\n MRTClient.getInstance().removeClientListener(this);\n\n finish();\n }", "private void logOut() {\n mApi.getSession().unlink();\n\n // Clear our stored keys\n clearKeys();\n // Change UI state to display logged out version\n setLoggedIn(false);\n }", "private void clearSessionManager(HttpSession p_session)\n {\n SessionManager sessionMgr =\n (SessionManager)p_session.getAttribute(SESSION_MANAGER);\n\n sessionMgr.clear();\n }", "public static void shutdown() {\n\t\tgetSessionFactory().close();\n\t}", "public void logout() {\n\t\tthis.setCurrentUser(null);\n\t\tthis.setUserLoggedIn(false);\t\t\n\t}", "public void disconnect() {\n\t\tdisconnect(true);\n\t}", "public void disconnectSSH(){\n\t log.info(\"Trying to disconnect to device \"+deviceIP+\" ...\\n\");\n\t session.disconnect();\n\t if(!session.isConnected())\n\t\t log.info(\"Successfully disconnected from device \"+deviceIP+\"\\n\");\n\t else\n\t\t log.error(\"Unable to disconnect to the device \"+deviceIP+\"\\n\");\n\t if(FETCHING_DATA_VIA_DATABASE){\n\t\t dbConnect.closeConnection();\n\t\t log.info(\"Successfully closed the database. \");\n\t }\n }", "public void closeConnection(){\r\n\t\t_instance.getServerConnection().logout();\r\n\t}", "public void disconnect() {\r\n\t\tif (connected.get()) {\r\n\t\t\tserverConnection.getConnection().requestDestToDisconnect(true);\r\n\t\t\tconnected.set(false);\r\n\t\t}\r\n\t}", "private void doLogout() {\n mRtmClient.logout(null);\n MessageUtil.cleanMessageListBeanList();\n }", "public void endSession(WebSocket conn) {\n String token = reverseMap.get(conn);\n \n // Token can be null if user connected but never logged in\n if (token == null) {\n return;\n }\n \n activeSessions.remove(token);\n reverseMap.remove(conn);\n }", "@OnClose\n\tpublic void onClose(Session session) {\n\t\tclients.remove(session);\n\t}", "@OnClose\n\tpublic void onClose(Session session) {\n\t\tclients.remove(session);\n\t}", "public void removeAllSessionPanels() {\n Thread removeAllSessionPanelsThread = new Thread ( new Runnable() {\n public void run() {\n while (sessionV.size() > 0)\n {\n removeSessionPanel((SessionDetailPanel) sessionV.get(0));\n }\n }\n });\n\n removeAllSessionPanelsThread.setDaemon(false);\n removeAllSessionPanelsThread.setName(\"removeAllSessionPanels\");\n removeAllSessionPanelsThread.start();\n }", "public void disconnect() {\n \ttry {\n \t\tctx.unbindService(apiConnection);\n } catch(IllegalArgumentException e) {\n \t// Nothing to do\n }\n }", "public void onSessionDestroyed() {\n }", "public void disconnect() {\n\t\tif (con.isConnected()) {\n\t\t\tcon.disconnect();\n\t\t}\n\t}", "@Override\n\tpublic final void destroy() {\n\t\tsynchronized (this.connectionMonitor) {\n\t\t\tif (connection != null) {\n\t\t\t\tthis.connection.destroy();\n\t\t\t\tthis.connection = null;\n\t\t\t}\n\t\t}\n\t\treset();\n\t}", "@OnWebSocketClose\n public void closed(Session session, int code, String reason) {\n String id = getSessionID(session);\n sessions.get(id).remove(session);\n if (sessions.get(id).isEmpty()) {\n sessions.remove(id);\n }\n }", "public void logout(){\n\t\t\n\t\tcurrentUser.logout();\n\t\tcurrentUser = null;\n\t\tchangeViewPort(new GUI_Logout(\"\", \"\", this));\n\t}", "void sessionDestroyed(SessionEvent se);", "public final void unsubscribe() throws InvalidSubscriptionException {\r\n WritableSession session = (WritableSession) WebsocketActionSupport.getInstance().getSession();\r\n if (!sessions.contains(session)) {\r\n throw new InvalidSubscriptionException(\"Current session is not subscribed to this topic\");\r\n }\r\n sessions.remove(session);\r\n afterUnsubscribe(session);\r\n }", "protected void disconnect() {\n try {\n if (connection != null) {\n connection.close();\n }\n connection = null;\n queryRunner = null;\n thread = null;\n queries = null;\n } catch (SQLException ex) {\n Logger.getGlobal().log(Level.WARNING, ex.getMessage(), ex);\n }\n }", "public static void closeSession() {\n \tif (singleSessionMode) {\n \t\tif (singleSession != null) {\n \t\t\tsingleSession.close();\n \t\t\tsingleSession = null;\n \t\t}\n \t} else {\n\t Session s = session.get();\n\t if (s != null && s.isOpen()) {\n\t try {\n\t \ts.close();\n\t } finally {\n\t \tsession.set(null); \t\n\t }\n\t }\n\t \n \t}\n }", "@Override\n public void disconnect() {\n super.disconnect();\n if (playStateSubscription != null) {\n playStateSubscription.unsubscribe();\n playStateSubscription = null;\n }\n connected = false;\n }", "public void logout(){\r\n\t\t// Creating register message\r\n\t\tmessageToServer = GET_LOGOUT_KEYWORD;\t\t\t\t\r\n\r\n\t\t// Sending message\r\n\t\tpw.println(messageToServer);\t\t\r\n\t\tpw.flush();\r\n\r\n\t\t// Closing connection\r\n\t\ttry {\r\n\r\n\t\t\tif(client != null) \r\n\t\t\t\tclient.close();\r\n\r\n\t\t\tif(pw != null) \r\n\t\t\t\tpw.close();\r\n\r\n\t\t\tif(br != null) \r\n\t\t\t\tbr.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"[EXCEPTION] closing streams, socket\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void sessionClosed(IoSession session) throws Exception {\n\t\tSystem.out.println(\"Client Closed :\" + session.getRemoteAddress());\n\t\tcli.delCli(session);\n\t\t/*\n\t\t * other operate\n\t\t * */\n\t}", "@AfterClass\n public static void tearDownClass() {\n ApplicationSessionManager.getInstance().stopSession();\n }", "public void logOut() {\n sp.edit().clear().commit();\n }", "public void remove(Session session);", "public synchronized void logout(String session_id){\r\n try {\r\n dao.deleteUserBySession(session_id);\r\n }catch(Exception e) {\r\n ExceptionBroadcast.print(e);\r\n }\r\n }", "public void shutdown() {\n for (Entry<String,Session> entry : _sessions.entrySet())\n entry.getValue().disconnect();\n \n writeLine(\"\\nDebugServer shutting down.\");\n close();\n }", "void remove(InternalSession session);", "@OnClose\n\tpublic void close(Session session) {\n\t\tsessionHandler.removeSession(session);\n\t}", "public static void unjoin(){\n _sessionRef.set(null);\n }", "public void logout(){\n\t\ttry{\n\t\t\tif(sock.isConnected()){\n\t\t\t\tOutputStream sout = sock.getOutputStream();\n\t\t\t\tCryptoHelper ch = new CryptoHelper();\n\t\t\t\t\n\t\t\t\t// Send K{LOGOUT} to server\n\t\t\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\t\t\tHashHelper.WriteInt(out, LOGOUT);\n\t\t\t\tbyte[] msg = ch.symEncrypt(symK, out.toByteArray());\n\t\t\t\tHashHelper.WriteInt(sout, msg.length);\n\t\t\t\tsout.write(msg);\n\t\t\t\tlogout = true;\n\t\t\t\tsock.close();\n\t\t\t\tlistenerSock.close();\n\t\t\t\tSystem.out.println(\"Client logged out\");\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t}\n\t\n\n\t}", "private void logout(){\r\n\t\ttry {\r\n\t\t\tserver.rmvClient(user);\r\n\t\t} catch (RemoteException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tSystem.exit(0);\r\n\t}", "public static void removeSession (HTTPSession aSession)\n\t{\n\t\tString theSessionID = aSession.getSessionID ();\n\t\tif (sessionHashtable.containsKey (theSessionID))\n\t\t{\n\t\t\tHTTPSession theSession = getSession (theSessionID);\n\t\t\tsessionHashtable.remove (theSessionID);\n\t\t\tif (theSession.getCachedMauiApplications ().length > 0)\n\t\t\t{\n\t\t\t\ttheSession.removeApplication (null);\n\t\t\t}\n\t\t\ttheSession.removeCrossReference ();\n\t\t\ttheSession.thread.interrupt ();\n\t\t\tnotifySessionListeners (aSession, null, false);\n\t\t}\n\t}", "public void disconnect() {\n try {\n client.disconnect(null, null);\n } catch (MqttException e) {\n Debug.logError(e, MODULE);\n }\n }" ]
[ "0.7637894", "0.72518617", "0.7026846", "0.7018215", "0.68382204", "0.68153524", "0.67816085", "0.67424047", "0.6727741", "0.67237353", "0.67237353", "0.66751826", "0.66700715", "0.6668565", "0.6662937", "0.6623248", "0.6622374", "0.6582015", "0.6554589", "0.65370363", "0.6508296", "0.6489912", "0.64849675", "0.6473972", "0.6438521", "0.64380485", "0.6428998", "0.64251125", "0.64207673", "0.64182323", "0.6409047", "0.6409047", "0.6389542", "0.6383344", "0.63748735", "0.63586164", "0.63502157", "0.6348899", "0.63397163", "0.6332174", "0.6324618", "0.6321641", "0.6315723", "0.63131577", "0.6306173", "0.62901986", "0.6285665", "0.6255894", "0.6244204", "0.6243513", "0.62413114", "0.62387174", "0.6223386", "0.6218507", "0.62076086", "0.62073565", "0.6201652", "0.6185248", "0.6184981", "0.61782134", "0.6165271", "0.6154513", "0.61527455", "0.6147383", "0.61330867", "0.6122684", "0.61220825", "0.611964", "0.6118246", "0.61106205", "0.61063176", "0.6103091", "0.6101577", "0.6101577", "0.6096288", "0.60890216", "0.60798687", "0.60604215", "0.60394555", "0.603874", "0.6037086", "0.60348606", "0.60203093", "0.6018867", "0.6011908", "0.6008646", "0.6005425", "0.6001313", "0.6001134", "0.5996957", "0.5993124", "0.59911615", "0.5979101", "0.59758013", "0.59754497", "0.5969135", "0.5964934", "0.59638697", "0.5962283", "0.5961339" ]
0.6039771
78
Closes all sessions and system
synchronized void close() { closeAllSessions(); sysSession.close(); sysLobSession.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void closeAllSessions() {\n\n // don't disconnect system user; need it to save database\n Session[] sessions = getAllSessions();\n\n for (int i = 0; i < sessions.length; i++) {\n sessions[i].close();\n }\n\n synchronized(this) {\n sessionMap.clear();\n }\n }", "public void close() {\n\t\tif (this.session instanceof DatabaseSession) {\n\t\t\t((DatabaseSession) this.session).logout();\n\t\t}\n\t\tthis.session.release();\n\t}", "void closeSession();", "void closeSession();", "protected final void closeSessionAndClearTokenInformation() {\n Session currentSession = sessionTracker.getOpenSession();\n if (currentSession != null) {\n currentSession.closeAndClearTokenInformation();\n }\n }", "private static void closeSession() {\n isSessionOpen = false;\n }", "protected final void closeSession() {\n Session currentSession = sessionTracker.getOpenSession();\n if (currentSession != null) {\n currentSession.close();\n }\n }", "public static void closeSession() {\n \tif (singleSessionMode) {\n \t\tif (singleSession != null) {\n \t\t\tsingleSession.close();\n \t\t\tsingleSession = null;\n \t\t}\n \t} else {\n\t Session s = session.get();\n\t if (s != null && s.isOpen()) {\n\t try {\n\t \ts.close();\n\t } finally {\n\t \tsession.set(null); \t\n\t }\n\t }\n\t \n \t}\n }", "public static void shutdown() {\n\t\tgetSessionFactory().close();\n\t}", "void closeAll();", "private void closeAll(){\r\n\t\t\r\n\t}", "public void closeSession() {\n if (session != null) {\n session.close();\n session = null;\n }\n }", "public final void closeSession() {\n\t\t// Call the base class\n\t\tSystem.out.print(\"Session Closed\");\n\t\tsuper.closeSession();\n\n\t\tif ( m_sock != null) {\n\t\t\ttry {\n\t\t\t\tm_sock.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_sock = null;\n\t\t}\n\n\t\tif ( m_in != null) {\n\t\t\ttry {\n\t\t\t\tm_in.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_in = null;\n\t\t}\n\n\t\tif ( m_out != null) {\n\t\t\ttry {\n\t\t\t\tm_out.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_out = null;\n\t\t}\n\n\n\t}", "@Override\n public void close() {\n try {\n if (tunnelSession != null) {\n tunnelSession.close();\n tunnelSession = null;\n }\n if (sshclient != null) {\n sshclient.stop();\n sshclient = null;\n }\n } catch (final Throwable t) {\n throw new RuntimeException(t);\n }\n }", "public void endSession() {\n if (sqlMngr != null) {\n sqlMngr.disconnect();\n }\n if (sc != null) {\n sc.close();\n }\n sqlMngr = null;\n sc = null;\n }", "public void close() {\n\n try {\n try {\n try {\n if (exception == null) {\n flushSessions();\n }\n\n } catch (Throwable exception) {\n exception(exception);\n } finally {\n\n try {\n if (exception == null) {\n transactionContext.commit();\n }\n } catch (Throwable exception) {\n exception(exception);\n }\n transactionContext.rollback();\n }\n } catch (Throwable exception) {\n exception(exception);\n } finally {\n closeSessions();\n\n }\n } catch (Throwable exception) {\n exception(exception);\n } \n\n // rethrow the original exception if there was one\n if (exception != null) {\n if (exception instanceof Error) {\n throw (Error) exception;\n } else if (exception instanceof RuntimeException) {\n throw (RuntimeException) exception;\n }\n }\n }", "public void stop() {\n session.close(false);\n }", "private void doCloseSession()\n {\n if (session != null)\n {\n try\n {\n database.closeHibernateSession(session);\n }\n finally\n {\n session = null;\n }\n }\n }", "public synchronized void closeAllConnections() {\n\t\tstop();\n\t}", "static public void close() {\n renewalTimer.cancel();\n delegationTokens.clear();\n }", "public void close() {\n this.consoleListenerAndSender.shutdownNow();\n this.serverListenerAndConsoleWriter.shutdownNow();\n try {\n this.getter.close();\n this.sender.close();\n this.socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public /*static*/ void close() {\n sessionFactory.close();\n }", "public void close() {\n try {\n socket.close();\n sInput.close();\n sOutput.close();\n sInput = null;\n socket = null;\n } catch (IOException e) {\n System.out.println(\"Logged Out.\");\n }\n }", "public static void close() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Chiusura connessione\");\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.CLOSE;\n\t\t\tsend(rp);\n\t\t\tClient.LoggedUser.anagrafica = null;\n\t\t\tois.close();\n\t\t\toos.close();\n\t\t\ts.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Errore close client connection\");\n\t\t}\n\t}", "public void close() {\n for (final BasicServerMetrics metrics : myServerMetrics.values()) {\n metrics.close();\n }\n myServerMetrics.clear();\n }", "public void closeConnection(){\r\n\t\t_instance.getServerConnection().logout();\r\n\t}", "public void close() {\n if (adminPool != null) {\n try {\n adminPool.close();\n } catch (Exception e) {\n log.warn(\"Error while closing LDAP connection pool\", e);\n }\n adminPool = null;\n }\n if (userPool != null) {\n try {\n userPool.close();\n } catch (Exception e) {\n log.warn(\"Error while closing LDAP connection pool\", e);\n }\n userPool = null;\n }\n }", "@Override\n\t\tpublic void closeAll() {\n\t\t\tfor (ClientHandler clientHandler : new ArrayList<ClientHandler>(this.running)) {\n\t\t\t\tclientHandler.close();\n\t\t\t}\n\t\t}", "public static void closeSession() {\n Session session = (Session) sessionThreadLocal.get();\n sessionThreadLocal.set(null);\n try {\n if (session != null)\n session.close();\n } catch (HibernateException e) {\n logger.error(\"Close current session error: \" + e.getMessage());\n }\n }", "public static void close() {\n HashMap<String, Transaction> map = instance.getTransactions();\n for (Transaction transaction : map.values()) {\n transaction.destroy();\n }\n map.clear();\n instance.transactions.remove();\n }", "@PreDestroy\n public void close() {\n connectionManagers.values().forEach(ConnectionManager::close);\n }", "public void closeAll() throws IOException {\n\t\tscMessages.close();\n\t\tscFiles.close();\n\t}", "public void closeAll(){\n\t\t\n\t\tshowMessage(\"\\n Closing all connections...\");\n\t\tableToType(false);\n\t\ttry {\n\t\t\t\n\t\t\tinput.close();\n\t\t\toutput.close();\n\t\t\tconnection.close();\n\t\t\t\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public static void close() {\r\n\t\tif (sessionFactory != null)\r\n\t\t\tsessionFactory.close();\r\n\t\tsessionFactory = null;\r\n\r\n\t}", "public static void unjoinAndClose(){\n Session s = (Session)_sessionRef.get();\n if(s != null){\n s.close();\n }\n }", "public void closeAllBrowsers() {\n\n driver.quit();\n\n\n }", "public void doLogout() {\r\n\t\tdestroy();\r\n\r\n\t\t/* ++++++ Kills the Http session ++++++ */\r\n\t\t// HttpSession s = (HttpSession)\r\n\t\t// Sessions.getCurrent().getNativeSession();\r\n\t\t// s.invalidate();\r\n\t\t/* ++++++ Kills the zk session +++++ */\r\n\t\t// Sessions.getCurrent().invalidate();\r\n\t\tExecutions.sendRedirect(\"/j_spring_logout\");\r\n\r\n\t}", "static synchronized void closeAll() {\n List<BlackLabEngine> copy = new ArrayList<>(engines);\n engines.clear();\n for (BlackLabEngine engine : copy) {\n engine.close();\n }\n }", "private void closeEverything() {\n\t \t// free up I/O streams and close the socket connection\n \ttry {\n \tif (in != null)\n \t\tin.close();\n \t} catch (Exception ignored) {}\n \ttry {\n \tif (out != null)\n \t\tout.close();\n \t} catch (Exception ignored) {}\n \ttry {\n \tif (out != null)\n \t\tout.close();\n \t} catch (Exception ignored) {}\n \ttry {\n \tif (in != null)\n \t\tin.close();\n \t} catch (Exception ignored) {}\n \ttry {\n \t\tif (inToRobot != null){\n \t\t\tinToRobot.close();\n \t\t}\n \t} catch (Exception ignored) {}\n \ttry {\n \t\tif (outFromRobot != null){\n \t\t\toutFromRobot.close();\n \t\t}\n \t} catch (Exception ignored) {}\n\t}", "public void closeBrowserSession() {\n\t\tdriver.quit();\n\t}", "void exitSession()\n\t{\n\t\t// clear out our watchpoint list and displays\n\t\t// keep breakpoints around so that we can try to reapply them if we reconnect\n\t\tm_displays.clear();\n\t\tm_watchpoints.clear();\n\n\t\tif (m_fileInfo != null)\n\t\t\tm_fileInfo.unbind();\n\n\t\tif (m_session != null)\n\t\t\tm_session.terminate();\n\n\t\tm_session = null;\n\t\tm_fileInfo = null;\n\t}", "public void closeSession (HttpServletRequest request) {\n isConnected(request);\n String consumerSession = getConsumerSession(request);\n \n request.getSession().invalidate(); // Clear all session data\n secureMap.remove(consumerSession);\n }", "public void close() {\n\t\ttry {\n\t\t\texecutorService.shutdownNow();\n\t\t\toutput.close();\n\t\t\tinput.close();\n\t\t\tconnection.close();\n\t\t} catch (IOException ioe) {\n\t\t\tMain.LOGGER.log(Level.SEVERE, \"Error closing GameHandler\", ioe);\n\t\t} \n\t}", "public static void close() {\r\n if (sessionFactory != null) {\r\n sessionFactory.close();\r\n }\r\n sessionFactory = null;\r\n }", "public static void closeSession() throws HException {\r\n\t\ttry {\r\n\t\t\tcommitTransaction();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\trollbackTransaction();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tSession s = (Session) threadSession.get();\r\n\t\t\tthreadSession.set(null);\r\n\t\t\tthreadTransaction.set(null);\r\n\t\t\tif (s != null && s.isOpen()) {\r\n\t\t\t\ts.close();\r\n\t\t\t\tsetConnections(-1);\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public static void closeAllWindows() {\n\t\tcloseAllWindows(false);\n\t}", "@Override\r\n @SuppressWarnings(\"empty-statement\")\r\n public void close()\r\n {\r\n curDb_ = null;\r\n curConnection_ = null;\r\n try\r\n {\r\n for(Map.Entry<Db_db, Connection> entry: connections_.entrySet())\r\n {\r\n entry.getValue().close();\r\n }\r\n }catch(Exception e){};\r\n \r\n connections_.clear();\r\n }", "public void shutdown() {\n for (Entry<String,Session> entry : _sessions.entrySet())\n entry.getValue().disconnect();\n \n writeLine(\"\\nDebugServer shutting down.\");\n close();\n }", "public void close() {}", "public void closeSessionForThread() {\n Session session = THREADED_SESSION.get();\n THREADED_SESSION.set(null);\n THREADED_TRANSACTION.set(null);\n if (session != null) {\n if (session.isOpen()) {\n session.close();\n }\n }\n }", "public static void close() {\r\n if (sessionFactory != null) {\r\n sessionFactory.close();\r\n }\r\n sessionFactory = null;\r\n }", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "public static void closeAllBrowser() {\n\t\tLOG.info(\"Closing all browser window.\");\n\t\tConstants.driver.quit();\n\t\tLOG.info(\"Closed all browser window.\");\n\t}", "public static void closeAllDb() {\r\n\t\tlogger.info(\"Close all database connections\");\r\n\t\tcloseAllMsiDb();\r\n\t\tcloseUdsDb();\r\n\t}", "public void closeIdleConnections()\n {\n \n }", "public void close() {\n saveConfigurationSettings();\n removeAllLogHandlers();\n try {\n Constants.PREFS.flush();\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void contextDestroyed(ServletContextEvent event)\n\t{\n\t\tlogger.debug(\"应用程序关闭,这里负责销毁所有Session\");\n\t}", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();" ]
[ "0.82363725", "0.72900003", "0.72496027", "0.72496027", "0.7092763", "0.7078581", "0.7020772", "0.69816124", "0.69608426", "0.6957251", "0.68461585", "0.68240446", "0.67687666", "0.67171085", "0.66792166", "0.6667553", "0.6617914", "0.6596409", "0.65767103", "0.6552076", "0.65492207", "0.6541986", "0.6532263", "0.65294075", "0.6508254", "0.64858705", "0.6482157", "0.64387053", "0.64358896", "0.636962", "0.63610786", "0.6358473", "0.6352092", "0.63419193", "0.6332745", "0.6328027", "0.63195455", "0.63124377", "0.6309099", "0.63071615", "0.6299428", "0.62889177", "0.6279155", "0.6258801", "0.6257607", "0.6251536", "0.62498575", "0.62464255", "0.6243881", "0.6243472", "0.6207823", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201888", "0.6201592", "0.61999893", "0.6198128", "0.6195408", "0.618986", "0.61823815", "0.61823815", "0.61823815", "0.61823815", "0.61823815", "0.61823815", "0.61823815", "0.61823815", "0.61823815" ]
0.87627465
0
Returns true if no session exists beyond the sys session.
synchronized boolean isEmpty() { return sessionMap.isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasSession();", "public boolean inAnySession() {\n\t\treturn getSession(player).isPresent();\n\t}", "public boolean hasSession() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasSession() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "boolean hasSessionTemplate();", "private boolean isInSession()\n {\n return EngagementActivityManager.getInstance().getCurrentActivityAlias() != null;\n }", "public boolean isSession() {\n\t\treturn config.getBoolean(QuestConfigurationField.SESSION.getKey(), \n\t\t\t\t(boolean) QuestConfigurationField.SESSION.getDefault());\n\t}", "boolean hasSessionId();", "boolean hasSessionId();", "boolean hasSessionId();", "boolean hasSessionId();", "boolean hasSessionId();", "boolean hasSessionId();", "@Override\n public boolean isSessionAlive() {\n return sessionFactory.getCurrentSession() != null && sessionFactory.getCurrentSession().isOpen();\n }", "protected final boolean isSessionOpen() {\n return sessionTracker.getOpenSession() != null;\n }", "public boolean isSessionValid() {\n\t\treturn stateMachine.getCurrent() instanceof SessionValid;\n\t}", "public boolean CheckSession(String session) { return validSessions.containsKey(session); }", "boolean hasClientSessionID();", "public boolean hasSessionId() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasSessionId() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean isEnsureCleanSession() {\n return ensureCleanSession;\n }", "public boolean exists(String sessionKey) {\n return sessions.keySet().contains(sessionKey);\n }", "@Override\n public boolean isValid() {\n return (connection != null && session != null && session.isOpen());\n }", "public boolean sessionExists(String sessionId) {\n return getOIDCSessionState(sessionId) != null;\n }", "public boolean hasSystemID()\n {\n \treturn getSiteID() != null;\n }", "public boolean exist() {\n\t\treturn false;\n\t}", "protected boolean atGlobalScope() {\n return !currentScope.hasParent();\n }", "private void checkSessionState() {\n // get logged in mUser\n mUser = getStoredUser();\n // check if valid\n mIsLoggedIn = (mUser != null && mUser.getId() != null);\n }", "boolean isSetSessionID();", "public boolean exists() {\n return exists(Datastore.fetchDefaultService());\n }", "public boolean hasClientSessionID() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "InternalSession createEmptySession();", "private boolean isSessionLost( )\n {\n return _listFormColumn == null || _listFormFilterDisplay == null || _listFormColumnDisplay == null || _listFormPanelDisplay == null\n || _formPanelDisplayActive == null;\n }", "public boolean hasClientSessionID() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "@Override\r\n\tpublic boolean exists() {\n\t\treturn false;\r\n\t}", "public Session createEmptySession();", "@Override\r\n\tpublic boolean isExist() {\n\t\treturn false;\r\n\t}", "public boolean isCleanSession() {\n\t\tboolean enabled = true;\n\t\tString value = options.getProperty(\"Clean-Session\");\n\t\tif(value == null) {\n\t\t\tvalue = options.getProperty(\"clean-session\");\n\t\t}\n\t\tif(value != null) {\n\t\t\tenabled = Boolean.parseBoolean(trimedValue(value));\n\t\t} \n\t\treturn enabled;\n\t}", "@Override\n\tpublic boolean isNew(String appKey, String sessionID) {\n\t\treturn this.sessionStore.isNew(appKey, sessionID);\n\t}", "protected boolean closeSession(MessageExchange exchange) {\n\t\tif (sessions == null || sessions.size() <= 0) {\n\t\t\t// logger.warn(\"There no session exist!\");\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (MessageSession s : sessions) {\n\t\t\tif (s.isBelongs(exchange)) {\n\t\t\t\tlogger.info(\"Removing the session(\" + s.getSessionID()\n\t\t\t\t\t\t+ \") from the list\");\n\t\t\t\tsessions.remove(s);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n boolean boolean0 = DBUtil.existsEnvironment(\"alter session\");\n assertFalse(boolean0);\n }", "public boolean hasSock() {\n\t\t\treturn sock_ != null;\n\t\t}", "public boolean isInEnv()\n {\n return environment().objectAt(location()) == this;\n }", "public boolean hasUsers() {\n\t\treturn !this.userNames.isEmpty();\n\t}", "public static boolean shouldLogin() {\n if (AppPreference.getInstance().getUserLoggedIn() == null ) {\n //|| deltaActive > Constant.SESSION_EXIPRED_TIME) {\n return true;\n }\n\n return false;\n }", "@Override\n\tpublic boolean exists() {\n\t\treturn false;\n\t}", "@Test\n public void getNotExistingSession() throws Exception {\n addDevice();\n assertEquals(\"Session should be created\", snmpSession, snmpController.getSession(device.deviceId()));\n assertEquals(\"Map should contain session\", 1, snmpController.snmpDeviceMap.size());\n assertEquals(\"Session should be fetched from map\", snmpSession, snmpController.getSession(device.deviceId()));\n }", "public static boolean hasConnection() {\n \t\treturn connPool.getConnectionCount() > 0;\n \t}", "boolean isSessionValid(Object session);", "boolean hasSysID();", "public boolean hasGetUserHistory() {\n return getUserHistory_ != null;\n }", "public boolean isReuseSessionID() {\n return isReuseSessionID;\n }", "public boolean isExistingUser() {\r\n return isExistingUser;\r\n }", "@Override\n\tpublic boolean terminatesPossession() {\n\t\treturn false;\n\t}", "public static boolean isInitialized() {\n \treturn sessionFactory != null;\n }", "public boolean exists() {\n try {\n return open() != null;\n } catch (IOException e) {\n return false;\n }\n }", "public boolean isConnected() {\n return (this.session != null && this.session.isConnected());\n }", "Boolean exists(Session session, IRI identifier);", "public boolean isExists() {\n\t\treturn exists();\n\t}", "public boolean exists()\n\t{\n\n\t\treturn true;\n\t}", "private static boolean isStackEmpty(SessionState state)\n\t{\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\treturn operations_stack.isEmpty();\n\t}", "public boolean isOpen() {\n\t\treturn luaState != 0;\n\t}", "public boolean requiresActiveSys() {\n\t\treturn false;\n\t}", "public boolean hasLogin() {\n return login_ != null;\n }", "public boolean isMorningSessionFilledUp() {\n\n\t\treturn morningSession.getCurrentConsumedCapacity() == PropertiesConfig.getMorningUnitsCapacity();\n\t}", "public final boolean hasNoTimeout() {\n\t\treturn m_tmo == NoTimeout ? true : false;\n\t}", "public boolean isSetSysuserId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SYSUSERID_ISSET_ID);\n }", "private Boolean isInSession(String token, String username) {\n \treturn true;\n }", "public boolean hasUsers() {\n\n return !realm.where(User.class).findAll().isEmpty();\n }", "@Override\n\tpublic boolean isUserLoggedIn() {\n\t\treturn sessionService.getCurrentUserId() != null;\n\t}", "public boolean getExists() {\n try {\n return getExecutable(new Launcher.LocalLauncher(new StreamTaskListener(new NullStream()))) != null;\n } catch(IOException ex) {\n return false;\n } catch(InterruptedException e) {\n return false;\n }\n }", "public boolean envShouldExist() {\n return envShouldExist;\n }", "private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}", "@Override\n\tpublic boolean isProcessForSessionAllocation() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isLoggedIn() {\n\t\treturn false;\n\t}", "public boolean isSetLastLoggedIn() {\n return this.lastLoggedIn != null;\n }", "private boolean delete() {\r\n\t\tboolean rtn = false;\r\n\t\ttry {\r\n\t\t\tif ( _where != null ) {\r\n\t\t\t\tif (_where.has(SESSIONID)) {\r\n\t\t\t\t\tString id = _where.getString(SESSIONID);\r\n\t\t\t\t\tif (id.equalsIgnoreCase(ALL)) {\r\n\t\t\t\t\t\trtn = SessionMgr.removeAllSessions();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\trtn = SessionMgr.removeSession(id);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (_session != null) {\r\n\t\t\t\tSessionMgr.removeSession(_session.getKey());\r\n\t\t\t\t_session = null;\r\n\t\t\t\t_dbi.clearSession();\r\n\t\t\t}\r\n\t\t\trtn = true;\r\n\t\t} catch (Exception e) {\r\n\t\t\tsetError(e);\r\n\t\t} finally {\r\n\t\t\tif (_transaction != null) {\r\n\t\t\t\t_transaction.setSession(_session);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn rtn;\r\n\t}", "public boolean is_NT_EMPTY() {\n return (0 == this.nt.get_NT().length()) ? true : false;\n }", "public boolean _non_existent() {\n return false;\n }", "private void isSystemReady() {\n\tif ((moStore.getAuthenticationDefinition().getQuery() == null)\n\t\t|| moStore.getJdbcConnectionDetails() == null) {\n\t moSessionStore.setSystemToHaltState();\n\n\t return;\n\t}// if ((moStore.getAuthenticationDefinition().getQuery() == null)\n\n\tmoSessionStore.setSystemToReadyState();\n }", "public boolean hasLocation()\n\t{\n\t\treturn location != null;\n\t}", "public boolean hasUser(){\n return numUser < MAX_USER;\n }", "public boolean hasUser() {\n return user_ != null;\n }", "public boolean hasUser() {\n return user_ != null;\n }", "protected boolean shouldValidateSession ()\n {\n return false;\n }", "private boolean validateFBLogin() {\n\t\tSession session = Session.getActiveSession();\n\t\tif (session != null && session.isOpened()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSession sessionNew = Session.openActiveSessionFromCache(this);\n\n\t\t\tif (sessionNew != null && sessionNew.isOpened()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isLoggedIn()\n {\n AccessToken accessToken = AccessToken.getCurrentAccessToken();\n return (accessToken != null);\n }", "public boolean isLoggedIn() {\n AccessToken accessToken = AccessToken.getCurrentAccessToken();\n if (accessToken == null) {\n return false;\n }\n return !accessToken.isExpired();\n }", "public boolean hasSock() {\n\t\t\t\treturn sockBuilder_ != null || sock_ != null;\n\t\t\t}", "public boolean hasUser() {\n return instance.hasUser();\n }", "public boolean hasUser() {\n return user_ != null;\n }", "public static boolean isLoggedIn() {\n\t\treturn arcade.hasPlayer();\n\t}", "Session getValidSession() {\n final Session session = sessionProvider.getActiveSession();\n // Only use session if it has auth token.\n if (session != null && session.getAuthToken() != null &&\n !session.getAuthToken().isExpired()) {\n return session;\n } else {\n return null;\n }\n }", "public Boolean isExist() {\n\t\tif(pfDir.exists())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "@Override\n public boolean enforceAccessWindowsForActiveSessions() throws GuacamoleException {\n return getProperty(\n MySQLGuacamoleProperties.MYSQL_ENFORCE_ACCESS_WINDOWS_FOR_ACTIVE_SESSIONS,\n true);\n }", "boolean playerExists() {\n return this.game.h != null;\n }", "public boolean isSetScope() {\r\n return this.scope != null;\r\n }", "public boolean isSetDb()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(DB$2) != 0;\r\n }\r\n }", "public boolean hasTransaction() {\n\t\treturn (this.transactionStatus != null);\n\t}", "public boolean isOpen() {\r\n\t\treturn false;\r\n\t}" ]
[ "0.75405425", "0.7357852", "0.7344585", "0.7296153", "0.6865383", "0.6820676", "0.6699715", "0.6614011", "0.6614011", "0.6614011", "0.6614011", "0.6614011", "0.6614011", "0.6460587", "0.64398605", "0.6328911", "0.6294471", "0.61425674", "0.61339444", "0.61119956", "0.6101228", "0.60965794", "0.6093244", "0.6049814", "0.60406405", "0.60389286", "0.5966701", "0.5935017", "0.5924772", "0.58789164", "0.58654577", "0.58405405", "0.5839279", "0.5838599", "0.583347", "0.5811851", "0.5809667", "0.5797853", "0.5789557", "0.57893264", "0.5776879", "0.57759345", "0.5775606", "0.5767707", "0.5761151", "0.57590616", "0.5758953", "0.57581484", "0.57472885", "0.5733697", "0.57326597", "0.5718076", "0.5709999", "0.5705419", "0.57011956", "0.56926286", "0.56689745", "0.5663034", "0.5652142", "0.5648989", "0.5645469", "0.5626257", "0.5598356", "0.55927503", "0.55760425", "0.55692756", "0.5567341", "0.55608815", "0.555819", "0.5550569", "0.5550152", "0.55487037", "0.55438745", "0.5542385", "0.55350727", "0.55297816", "0.55283594", "0.55267185", "0.55058", "0.54991496", "0.54957044", "0.5494287", "0.5487441", "0.5487441", "0.54838866", "0.5480478", "0.546437", "0.54637593", "0.5452607", "0.54494166", "0.5447362", "0.54358184", "0.5435291", "0.5423428", "0.5414149", "0.5408086", "0.5405335", "0.54041", "0.5400949", "0.54007155" ]
0.6642192
7
Retrieves a list of the Sessions in this container that are visible to the specified Session, given the access rights of the Session User.
public synchronized Session[] getVisibleSessions(Session session) { return session.isAdmin() ? getAllSessions() : new Session[]{ session }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Session[] findSessions();", "List<Session> getAllSessions();", "public List<String> getSessionList(){\r\n \t\r\n \tList<String> sessionIds = new ArrayList<String>();\r\n \tfor (Entry<String, AccessDetailVO> curPage : pageAccess.entrySet()) {\r\n \t\tAccessDetailVO currLock = curPage.getValue();\r\n \t\tif(!sessionIds.contains(currLock.getSessionId())){\r\n \t\t\tsessionIds.add(currLock.getSessionId());\r\n \t\t}\t\r\n \t}\r\n \t\r\n \treturn sessionIds;\r\n }", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Session> \n getSessionsList();", "public Collection<Long> getSessions() {\n return dataTree.getSessions();\n }", "public static List getAllSessions() {\n\t\tsynchronized (FQN) {\n\t\t\tList<MemberSession> msList = new ArrayList<MemberSession>();\n//\t\t\tObject object = cache.getValues(FQN);\n\t\t\tObject object = null;\n\t\t\tif (object != null) {\n\t\t\t\tmsList = (List<MemberSession>) object;\n\t\t\t\treturn new ArrayList(msList);\n\t\t\t} else {\n\t\t\t\tCollection list = new ArrayList();\n\t\t\t\tobject = cache.getValues(FQN);\n\t\t\t\tif(object != null){\n\t\t\t\t\tlist = (Collection) object;\n\t\t\t\t}\n\t\t\t\tmsList = new ArrayList(list);\n//\t\t\t\tfor (MemberSession ms : msList) {\n//\t\t\t\t\tcache.add(FQN, ms.getSessionId(), ms);\n//\t\t\t\t}\n\t\t\t\treturn msList;\n\t\t\t}\n\n\t\t}\n\t}", "public final List<MediaSession2> getSessions() {\n ArrayList<MediaSession2> arrayList = new ArrayList<MediaSession2>();\n Object object = this.mLock;\n synchronized (object) {\n arrayList.addAll(this.mSessions.values());\n return arrayList;\n }\n }", "@GET\n public List<Session> getAllSessions() {\n log.debug(\"REST request to get all Sessions\");\n List<Session> sessions = sessionRepository.findAll();\n return sessions;\n }", "public UserSession[] getUserSessions() throws SessionQueryException\n {\n UserSession[] userArray = null;\n\n \n // Get all of the users from the SMS\n UserLoginStruct[] userStructs;\n try {\n userStructs = getSessionManagementAdminService().getUsers(false);\n\n GUILoggerHome.find().debug(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.USER_SESSION,\n userStructs);\n if (GUILoggerHome.find().isInformationOn()) {\n GUILoggerHome.find().information(\"AbstractSessionInfoManager\",\n GUILoggerSABusinessProperty.USER_SESSION, \"Found \" + userStructs.length + \" User Sessions\");\n }\n\n userArray = new UserSession[userStructs.length];\n UserSession userSession = null;\n\n for (int i = 0; i < userStructs.length; i++) {\n if (userStructs[i].sourceComponents != null && userStructs[i].sourceComponents.length == 1\n && userStructs[i].sourceComponents[0].length() == 0) {\n userSession = new UserSession(new User(userStructs[i].userId, userStructs[i].loggedIn),\n new String[0]);\n } else {\n userSession = new UserSession(new User(userStructs[i].userId, userStructs[i].loggedIn),\n userStructs[i].sourceComponents);\n }\n userArray[i] = userSession;\n }\n\n // Sort the list of users in alphabetical order by Name\n Arrays.sort(userArray, getNameComparator());\n\n } catch (Exception e) {\n throw new SessionQueryException(\"Could not acquire user sessions information.\" ,e);\n }\n \n return userArray;\n }", "public List<Session> getListSessionApprenant() {// OK\r\n\r\n\t\tif (utilisateur.getListeSessionsApprenantAccessible().isEmpty()) {\r\n\t\t\tList<Session> liste = new ArrayList<Session>();\r\n\t\t\tliste = getListeSessionsParam(\"sessionsAcc\", \"role\", \"apprenant\");\r\n\t\t\tutilisateur.setListeSessionsApprenantAccessible(liste);\r\n\t\t\treturn liste;\r\n\t\t} else {\r\n\t\t\treturn utilisateur.getListeSessionsApprenantAccessible();\r\n\t\t}\r\n\t}", "public static ArrayList<Session> getSessions() {\r\n\t\treturn sessions;\r\n\t}", "public abstract I_SessionInfo[] getSessions();", "public ArrayList<UserSessionInfo> getAllSessionInfo() throws SessionManagementException {\n ArrayList<UserSessionInfo> userSessionInfoList = null;\n try {\n userSessionInfoList = SessionContextCache.getInstance(0).getSessionDetails();\n } catch (Exception e) {\n String errorMsg = \"Error is occurred while getting session details \";\n log.error(errorMsg, e);\n throw new SessionManagementException(errorMsg, e);\n }\n return userSessionInfoList;\n }", "@GetMapping\n public List<Session> list() {\n return sessionRepository.findAll();\n }", "public Collection<RaftSession> getSessions() {\n return sessions.values();\n }", "@GetMapping(\"tv_watching_sessions\")\n\tpublic List<TvWatchingSession> listSessions(){\n\t\treturn svc.allActiveSessionsByUser(userName);\n\t}", "public ArrayList<Session> getActiveSessions()\r\n\t{\r\n\t\treturn this.activeSessions;\r\n\t}", "@GetMapping(path=\"/showActivity\",produces = MediaType.APPLICATION_JSON_VALUE)\n public @ResponseBody Iterable<user_activity> getactivity(HttpSession session) {\n return activityService.getactivity(session.getAttribute(\"name\").toString());\n }", "public List<com.scratch.database.mysql.jv.tables.pojos.Session> fetchByLifetime(Integer... values) {\n return fetch(Session.SESSION.LIFETIME, values);\n }", "public List<SessionDetailVO> getSessionDetail(){\r\n \t\r\n \tList<AccessDetailVO> accessDetails = getLockList();\r\n \tIterator<AccessDetailVO> iter = accessDetails.iterator();\r\n \tString prevSessionId = \"\";\r\n \tList<SessionDetailVO> sessionList = new ArrayList<SessionDetailVO>();\r\n \t\r\n \tSessionDetailVO sessionTmp = new SessionDetailVO();\r\n \twhile(iter.hasNext()){\r\n \t\tAccessDetailVO accessDetail = iter.next();\r\n \t\tif(accessDetail.getSessionId() != prevSessionId){\r\n \t\t\tsessionTmp = new SessionDetailVO();\r\n \t\t\tsessionTmp.setSessionId(accessDetail.getSessionId());\r\n \t\t\tsessionTmp.setSessionDetail(new ArrayList<AccessDetailVO>());\r\n \t\t\tprevSessionId = accessDetail.getSessionId();\r\n \t\t\tsessionList.add(sessionTmp);\r\n \t\t}\r\n \t\tsessionTmp.getSessionDetail().add(accessDetail);\r\n \t\t\r\n \t}\r\n \t\r\n \treturn sessionList;\r\n }", "public static Object listUsers(String sessionToken) throws IOException, SQLException {\n if (validateToken(sessionToken)) {\n String callingUsername = getUsernameFromToken(sessionToken);\n if (!hasPermission(callingUsername, EditUser)) { // Require edit users permission\n System.out.println(\"Insufficient permissions, no list of users was retrieved\");\n return InsufficientPermission; // 1. Valid token but insufficient permission\n } else {\n System.out.println(\"Session and permission requirements were valid, list of users was retrieved\");\n return DbUser.listUsers(); // 2. Success, list of users returned\n }\n } else {\n System.out.println(\"Session was not valid, no list of users was retrieved\");\n return InvalidToken; // 3. Invalid Token\n }\n }", "public ImmutableSet<Key<?>> getSessionKeys() {\n return ((SessionKeyExposingObjectify) ofy()).getSessionKeys();\n }", "public List getUserListShowToClient() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n query = session.createQuery(\"select user from app.user.User user where user.currentEmployee = 'true' and user.clientShow = 'TRUE' order by user.lastName, user.firstName\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public abstract String getSessionList();", "List<Joined> findBySession(Long Session);", "public Map<Long, Session> list() throws DAOException {\n\t\tHashMap<Long, Session> result = new HashMap<Long, Session>();\n\t\tTypedQuery<Session> query = em.createQuery(SQL_SELECT, Session.class);\n\t\ttry {\n\t\t\tList<Session> sessions = query.getResultList();\n\t\t\tfor (Session session : sessions)\n\t\t\t\tresult.put(session.getId(), session);\n\t\t} catch (NoResultException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new DAOException(e);\n\t\t}\n\n\t\treturn result;\n\t}", "@OneToMany(mappedBy = Session.Attributes.PARTICIPATION, targetEntity = Participation.class, orphanRemoval = true)\n\tpublic Set<Session> getSessions() {\n\t\treturn this.sessions;\n\t}", "protected final List<String> getSessionPermissions() {\n Session currentSession = sessionTracker.getSession();\n return (currentSession != null) ? currentSession.getPermissions() : null;\n }", "List<Joined> findByUserIdAndSession(String userId, Long session);", "public List getAllSessionList(){\n \tList l=null;\n try {\n Criteria crit=new Criteria();\n l=LecturePeer.doSelect(crit);\n } catch(Exception e) { ServerLog.log(\"Exception in Lecture select \"+e.getMessage());}\n \treturn l;\n }", "public String[] getUsers() {\n\t\tEnumeration enumer = userSessions.keys();\n\t\tVector temp = new Vector();\n\t\twhile (enumer.hasMoreElements())\n\t\t\ttemp.addElement(enumer.nextElement());\n\t\tString[] returns = new String[temp.size()];\n\t\ttemp.copyInto(returns);\n\t\treturn returns;\n\n\t}", "@RequestMapping(method = RequestMethod.GET)\n public Sessions retrieve(@RequestHeader(\"X-CS-Auth\") String auth,\n @RequestHeader(\"X-CS-Session\") String sessionId) {\n return sessionService.retrieve();\n }", "public Session getSession();", "public User getSession(){\n\t\treturn this.session;\n\t}", "public List<com.scratch.database.mysql.jv.tables.pojos.Session> fetchByName(String... values) {\n return fetch(Session.SESSION.NAME, values);\n }", "public PSUserSession getSession();", "public java.util.List findStudentBySession(java.lang.Integer session) throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n String queryString = \"from \" + Student.class.getName() + \" e where e.session like :session \";\n // Add a an order by on all primary keys to assure reproducable results.\n String orderByPart = \"\";\n orderByPart += \" order by e.studentId\";\n queryString += orderByPart;\n Query query = hibernateTemplate.createQuery(queryString);\n hibernateTemplate.setQueryParameter(query, \"session\", session);\n List list = hibernateTemplate.list(query);\n return list;\n } finally {\n log.debug(\"finished findStudentBySession(java.lang.Integer session)\");\n }\n }", "public static HTTPSession [] getAllSessions ()\n\t{\n\t\tObject [] theSessions = sessionHashtable.values ().toArray ();\n\t\tHTTPSession [] retVal = new HTTPSession [theSessions.length];\n\t\tfor (int i = 0; i < retVal.length; i++)\n\t\t{\n\t\t\tretVal [i] = (HTTPSession) theSessions [i];\n\t\t}\n\t\treturn retVal;\n\t}", "int getActiveSessions();", "@Override\n public void getAllSystemsInSession() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getAllSystemsInSession\");\n }\n\n List<SystemInSession> listOfSiS = null;\n EntityManager em = EntityManagerService.provideEntityManager();\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n listOfSiS = SystemInSession.getSystemsInSessionForCompanyForSession(em, choosenInstitutionForAdmin);\n } else {\n listOfSiS = SystemInSession.getSystemsInSessionForActivatedTestingSession();\n }\n } else {\n listOfSiS = SystemInSession.getSystemsInSessionForCompanyForSession(em,\n Institution.getLoggedInInstitution());\n }\n foundSystemsInSession = listOfSiS;\n }", "public static List<ITask> findWorkTaskOfSessionUser() {\r\n\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n }", "@GET(\"sdk/v5/sessions\")\n Call<SessionResponse> getSession(@Header(\"Authorization\") String Authorization);", "public int getActiveSessions();", "public UserSession[] getUserSessions(String name) throws SessionQueryException\n {\n UserSession[] userArray = null;\n\n try\n {\n int sessionId = getSessionManagementAdminService().getSessionByUserId(name);\n //Get all of the users from the SMS\n UserLoginStruct[] userStructs = getSessionManagementAdminService().getUsersForSession(sessionId);\n\n GUILoggerHome.find().debug(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.USER_SESSION, userStructs);\n if (GUILoggerHome.find().isInformationOn())\n {\n GUILoggerHome.find().information(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.USER_SESSION,\n \"Found \" + userStructs.length + \" User Sessions\");\n }\n\n userArray = new UserSession[userStructs.length];\n UserSession userSession = null;\n\n for(int i = 0; i < userStructs.length; i++)\n {\n if(userStructs[i].sourceComponents != null && userStructs[i].sourceComponents.length == 1 &&\n userStructs[i].sourceComponents[0].length() == 0)\n {\n userSession = new UserSession(new User(userStructs[i].userId, userStructs[i].loggedIn), new String[0]);\n }\n else\n {\n userSession = new UserSession(new User(userStructs[i].userId, userStructs[i].loggedIn), userStructs[i].sourceComponents);\n }\n userArray[i] = userSession;\n }\n\n //Sort the list of users in alphabetical order by Name\n Arrays.sort(userArray, getNameComparator());\n }\n catch(NotFoundException e)\n {\n //We are not throwing this back because, finding sessionId for a logged out user always \n //throws this exception. This is handled by the calling method accordingly.\n GUILoggerHome.find().debug(\"Session Not found for user-id \", GUILoggerSABusinessProperty.USER_SESSION, name);\n }\n catch(Exception e)\n {\n // catch the rest and attach the original exception that was the problem.\n throw new SessionQueryException(String.format(\"Could not get session for user name %s.\",name), e);\n }\n \n return userArray;\n }", "@GetMapping(\"/getSession\")\n\tpublic ResponseEntity<?> getUserSesssion(HttpSession session) {\n\t\t//ProductOwner loggedInOwner = productOwnerService.authenticateProductOwner(\"owner\", \"owner\", session);\n\t\t\n\t\tHashMap<String, String> sessionMap = new HashMap<>();\n\t\tif(session.getAttribute(\"userType\") != null) {\n\t\t\tString userType = (String)session.getAttribute(\"userType\"); \n\t\t\t\n\t\t\tswitch (userType) {\n\t\t\tcase \"ProductOwner\":\n\t\t\t\tsessionMap.put(\"userType\", \"ProductOwner\");\n\t\t\t\tsessionMap.put(\"loginName\", (String) session.getAttribute(\"loginName\"));\n\t\t\t\tbreak;\n\t\n\t\t\tcase \"TeamLeader\":\n\t\t\t\tsessionMap.put(\"userType\", \"TeamLeader\");\n\t\t\t\tsessionMap.put(\"loginName\", (String) session.getAttribute(\"teamLeaderLoginName\"));\n\t\t\t\tbreak;\n\t\n\t\t\tcase \"Developer\":\n\t\t\t\tsessionMap.put(\"userType\", \"Developer\");\n\t\t\t\tsessionMap.put(\"loginName\", (String) session.getAttribute(\"developerLoginName\"));\n\t\t\t\tbreak;\n\t\n\t\t\tcase \"Client\":\n\t\t\t\tsessionMap.put(\"userType\", \"Client\");\n\t\t\t\tsessionMap.put(\"loginName\", (String) session.getAttribute(\"loginName\"));\n\t\t\t\tbreak;\n\t\n\n\t\t\tdefault:\n\t\t\t\tsessionMap.put(\"userType\", \"notLoggedIn\");\n\t\t\t\tsessionMap.put(\"loginName\",\"notLoggedIn\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\treturn new ResponseEntity<HashMap<String, String>>(sessionMap, HttpStatus.OK);\t\n\t\t}\n\t\telse {\n\t\t\tsessionMap.put(\"userType\", \"notLoggedIn\");\n\t\t\tsessionMap.put(\"loginName\",\"notLoggedIn\");\n\t\t\treturn new ResponseEntity<HashMap<String, String>>(sessionMap, HttpStatus.OK);\n\t\t}\n\n\t}", "public static List<CourseSession> createSessions() {\n List<CourseSession> list = new ArrayList<CourseSession>();\n list.add(createSession(\"1\"));\n list.add(createSession(\"2\"));\n return list;\n }", "private List<? extends Map<String, ?>> getSessions() {\n List<Map<String, String>> list = new ArrayList<Map<String, String>>();\n sessions = MXChatManager.getInstance().getGroupChatSessions();\n for (MXGroupChatSession session : sessions) {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"topic\", session.getTopic());\n map.put(\"type\", session.isAChat() ? \"Chat\" : \"Meet\");\n\n list.add(map);\n }\n\n return list;\n }", "public Session getSession() { return session; }", "private static I_SessionListener [] getSessionListeners ()\n\t{\n\t\tif (rebuildSessionListeners)\n\t\t{\n\t\t\tObject [] theListeners = sessionListeners.toArray ();\n\t\t\tsessionListenerArray = new I_SessionListener [theListeners.length];\n\t\t\tfor (int i = 0; i < theListeners.length; i++)\n\t\t\t{\n\t\t\t\tsessionListenerArray [i] = (I_SessionListener) theListeners [i];\n\t\t\t}\n\t\t\trebuildSessionListeners = false;\n\t\t}\n\t\treturn sessionListenerArray;\n\t}", "private Set<Session> getOpenServerSessions(){\n ClientContainer jettySocketServer = getWebSocketsContainer();\n return jettySocketServer.getOpenSessions();\n }", "public List<Client> findAll() throws DataAccessLayerException {\n try {\n Subject.doAs(LoginController.getLoginContext().getSubject(), new MyPrivilegedAction(\"CLIENT\", Permission.READ));\n return super.findAll(Client.class);\n } catch (AccessControlException e) {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }", "public List<Project> getListOfAuthorizedProjects(\n String username,\n AccessLevel accessLevel,\n Session session ) throws Exception {\n\n String queryStr = AUTHORIZED_FOR_USER_SQL_QUERY;\n\n if ( accessLevel == AccessLevel.View ) {\n queryStr = queryStr.replace( PROJ_GRP_SUBST_STR, VIEW_PROJECT_GROUP_FIELD );\n }\n else {\n queryStr = queryStr.replace( PROJ_GRP_SUBST_STR, EDIT_PROJECT_GROUP_FIELD );\n }\n\n NativeQuery query = session.createNativeQuery( queryStr );\n String queryUsername = username == null ? UNLOGGED_IN_USER : username;\n query.setParameter( USERNAME_PARAM, queryUsername );\n query.addEntity(\"P\", Project.class);\n List<Project> rtnVal = query.list();\n return rtnVal;\n }", "public static Session getSession() {\n\n if (serverRunning.get() && !session.isClosed()) {\n return session;\n } else {\n if (session.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running\");\n }\n }\n }", "public Session getSession() {\n return session;\n }", "private static void getFromCache(Session session) {\n\t\tCacheManager cm=CacheManager.getInstance();\n\t\tCache cache=cm.getCache(\"namanCache\");\n\t\tfor(int i=0;i<2;i++){\n\t\t\tif(cache.get(i)!=null){\n\t\t\t\tSystem.out.println(((UserDetails)cache.get(1).getObjectValue()).getName());\n\t\t\t}else{\n\t\t\t\tUserDetails user1=(UserDetails)session.get(UserDetails.class, i);\n\t\t\t\tSystem.out.println(user1.getName());\n\t\t\t\tcache.put(new Element(i+1,user1));\n\t\t\t}\n\t\t}\n\t\tcm.shutdown();\n\t}", "public List<com.scratch.database.mysql.jv.tables.pojos.Session> fetchByData(String... values) {\n return fetch(Session.SESSION.DATA, values);\n }", "public ConcurrentHashMap<Long, Integer> getSessionWithTimeOuts() {\n return sessionsWithTimeouts;\n }", "public static Session getSession() {\n return session;\n }", "@Override\n\tpublic Set<SessionOntologySpace> getSessionSpaces(IRI sessionID)\n\t\t\tthrows NonReferenceableSessionException {\n\t\tSet<SessionOntologySpace> result = new HashSet<SessionOntologySpace>();\n\t\t// Brute force search\n\t\tfor (OntologyScope scope : ONManager.get().getScopeRegistry()\n\t\t\t\t.getRegisteredScopes()) {\n\t\t\tSessionOntologySpace space = scope.getSessionSpace(sessionID);\n\t\t\tif (space != null)\n\t\t\t\tresult.add(space);\n\t\t}\n\t\treturn result;\n\t}", "User getBySession(String session);", "public Session getSession()\n {\n return session;\n }", "public Session getSession() {\n return session;\n }", "public List<com.scratch.database.mysql.jv.tables.pojos.Session> fetchById(String... values) {\n return fetch(Session.SESSION.ID, values);\n }", "public static Hashtable getObjects(HttpSession session) {\n Hashtable objects = new Hashtable();\n\n String attribute = null;\n for (Enumeration e = session.getAttributeNames(); e.hasMoreElements(); ) {\n attribute = (String)e.nextElement();\n objects.put(attribute, getObject(session, attribute));\n }\n\n return objects;\n }", "@SuppressWarnings(\"unchecked\")\n private static Map<Integer, FlashScope> getContainer(HttpSession session)\n throws IllegalStateException {\n return (Map<Integer, FlashScope>) session\n .getAttribute(StripesConstants.REQ_ATTR_FLASH_SCOPE_LOCATION);\n }", "protected Session getSession() { return session; }", "public ArrayList<User> getAllLoggedInUser() {\n ArrayList<User> allUsers = new ArrayList<>();\n Realm realm = (mRealm == null) ? Realm.getDefaultInstance() : mRealm;\n\n try {\n RealmResults<User> allUsersInRealm = realm.where(User.class).equalTo(\"IsLoggedIn\", true).findAll();\n List<User> retval = realm.copyFromRealm(new ArrayList<>(allUsersInRealm)); // convert user to unmanaged copy\n allUsers.addAll(retval);\n } catch (Exception ex) {\n // todo handle exception\n }\n\n if (mRealm == null)\n realm.close();\n\n return allUsers;\n }", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "List<T> fetch(Session session);", "Session getSession();", "Session getSession();", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "public AbstractSession getSession() {\n return session;\n }", "public final Set<WritableSession> getSubscribers() {\r\n return sessions;\r\n }", "public String getSession() {\n return session;\n }", "public List getUserListCurrent() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n query = session.createQuery(\"select user from app.user.User user where user.currentEmployee = 'true' order by user.lastName, user.firstName\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<Container> findAll() {\n\t\tSession currentSession = em.unwrap(Session.class);\n\t\t\n\t\t//create the query\n\t\tQuery<Container> query = currentSession.createQuery(\"from Container\", Container.class);\n\t\t\n\t\t//execute query and get result list\n\t\tList<Container> containers = query.getResultList();\n\t\t//System.out.println(containers);\n\t\t//return the results\n\t\treturn containers;\n\t}", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "public Map getSessionMap() {\r\n\t\treturn sessionMap;\r\n\t}", "private boolean isSessionAuthenticated(Session userSession) {\n\t\treturn accountIdsByUserSession.containsKey(userSession);\n\t}", "public static List<ITask> findWorkedTaskOfSessionUser() {\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, FINISHED_MODE, null);\r\n }", "public List<Header> getSessionHeaders() {\n\t\treturn Collections.unmodifiableList(sessionHeaders);\n\t}", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "public static Session getSession(SlingHttpServletRequest request) {\n ResourceResolver resourceResolver = request.getResourceResolver();\n return resourceResolver.adaptTo(Session.class);\n }", "public String getSession() {\n return this.session;\n }", "@GET\r\n\t@Path(\"/getgraphsbyusr\")\r\n\tpublic ArrayList<SnapWorkflowViewModel> getWorkflowsByUser(@HeaderParam(\"x-session-token\") String sSessionId) {\r\n\t\tUtils.debugLog(\"ProcessingResources.getWorkflowsByUser( Session: \" + sSessionId + \" )\");\r\n\r\n\t\tif (Utils.isNullOrEmpty(sSessionId)) {\r\n\t\t\tUtils.debugLog(\"ProcessingResources.getWorkflowsByUser: session null\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tUser oUser = Wasdi.getUserFromSession(sSessionId);\r\n\r\n\t\tif (oUser == null) {\r\n\t\t\tUtils.debugLog(\"ProcessingResources.getWorkflowsByUser( \" + sSessionId + \" ): invalid session\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tif (Utils.isNullOrEmpty(oUser.getUserId())) {\r\n\t\t\tUtils.debugLog(\"ProcessingResources.getWorkflowsByUser: user id null\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tString sUserId = oUser.getUserId();\r\n\r\n\t\tSnapWorkflowRepository oSnapWorkflowRepository = new SnapWorkflowRepository();\r\n\t\tArrayList<SnapWorkflowViewModel> aoRetWorkflows = new ArrayList<>();\r\n\t\ttry {\r\n\r\n\t\t\tList<SnapWorkflow> aoDbWorkflows = oSnapWorkflowRepository.getSnapWorkflowPublicAndByUser(sUserId);\r\n\r\n\t\t\tfor (int i = 0; i < aoDbWorkflows.size(); i++) {\r\n\t\t\t\tSnapWorkflowViewModel oVM = new SnapWorkflowViewModel();\r\n\t\t\t\toVM.setName(aoDbWorkflows.get(i).getName());\r\n\t\t\t\toVM.setDescription(aoDbWorkflows.get(i).getDescription());\r\n\t\t\t\toVM.setWorkflowId(aoDbWorkflows.get(i).getWorkflowId());\r\n\t\t\t\toVM.setOutputNodeNames(aoDbWorkflows.get(i).getOutputNodeNames());\r\n\t\t\t\toVM.setInputNodeNames(aoDbWorkflows.get(i).getInputNodeNames());\r\n\t\t\t\toVM.setPublic(aoDbWorkflows.get(i).getIsPublic());\r\n\t\t\t\toVM.setUserId(aoDbWorkflows.get(i).getUserId());\r\n\t\t\t\toVM.setNodeUrl(aoDbWorkflows.get(i).getNodeUrl());\r\n\t\t\t\taoRetWorkflows.add(oVM);\r\n\t\t\t}\r\n\t\t} catch (Exception oE) {\r\n\t\t\tUtils.debugLog(\"ProcessingResources.getWorkflowsByUser( \" + sSessionId + \" ): \" + oE);\r\n\t\t}\r\n\r\n\t\tUtils.debugLog(\"ProcessingResources.getWorkflowsByUser: return \" + aoRetWorkflows.size() + \" workflows\");\r\n\r\n\t\treturn aoRetWorkflows;\r\n\t}", "List<SessionAccountConnectAttrs> selectAll();", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "public ArrayList<Session> getSessionList(){\n \n ArrayList<Session> sessionList= new ArrayList<Session>(); \n Connection connection=getConnection();\n \n String studentGroup = combo_studentGroup.getSelectedItem().toString();\n\n String query= \"SELECT `SessionId`,`Tag`,`StudentGroup`,`Subject`,`NoOfStudents`,`SessionDuration` FROM `sessions` WHERE StudentGroup='\"+studentGroup+\"' \";\n Statement st;\n ResultSet rs;\n\n try{\n st = connection.createStatement();\n rs= st.executeQuery(query);\n Session session;\n while(rs.next()){\n session = new Session(rs.getInt(\"SessionId\"),rs.getString(\"Tag\"),rs.getString(\"StudentGroup\"),rs.getString(\"Subject\"),rs.getInt(\"NoOfStudents\"),rs.getInt(\"SessionDuration\"));\n sessionList.add(session);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return sessionList; \n }", "@RequestMapping(path = \"/yadaUserJoinList\", method = RequestMethod.GET)\n public ResponseEntity getYadaUserJoinList(HttpSession session) {\n\n String username = (String) session.getAttribute(\"username\");\n User user = users.findFirstByUsername(username);\n\n List<YadaUserJoin> yadaUserJoinsByUser = user.getYadaUserJoinList();\n\n return new ResponseEntity<>(yadaUserJoinsByUser, HttpStatus.OK);\n }", "public static Map<SessionFactory, Session> getSession() {\n\t\tSessionFactory sf = new Configuration().configure(Constants.ONE_TO_MANY).addAnnotatedClass(Instructor.class)\n\t\t\t\t.addAnnotatedClass(InstructorDetail.class).addAnnotatedClass(Course.class).buildSessionFactory();\n\t\tSession s = sf.openSession();\n\n\t\tMap<SessionFactory, Session> tmp = new HashMap<SessionFactory, Session>();\n\t\ttmp.put(sf, s);\n\n\t\treturn tmp;\n\t}", "public String[] getSecureContainerList() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerList, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createStringArray();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }", "List<UserContentAccess> findContentAccess();", "public List<Long> getSessionNodes() {\n List<Long> ret = new ArrayList<>();\n\n for (int i = 0; i < sessionsList.size(); i++) {\n ret.add(sessionsList.get(i).dhtNodes());\n }\n\n return ret;\n }", "List<Item> getItems(IDAOSession session);", "public Collection<AccessUser> getMembers()\n {\n return username_to_profile.values();\n }", "public List showAll() {\n\t\tSession session = null;\n\t\tList temp = new ArrayList();\n\t\ttry {\n\n\t\t\tsession = MyUtility.getSession();// Static Method which makes only\n\t\t\t\t\t\t\t\t\t\t\t\t// one object as method is\n\t\t\t\t\t\t\t\t\t\t\t\t// static\n\n\t\t\tQuery q = session.createQuery(\"FROM AuctionVO \");\n\n\t\t\ttemp = q.list();\n\n\t\t} catch (Exception e) {\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t//session.close();\n\t\t}\n\t\treturn temp;\n\t}", "Session getCurrentSession();" ]
[ "0.69171965", "0.67646694", "0.67346317", "0.65069425", "0.64884686", "0.64114255", "0.63611656", "0.63541496", "0.63461226", "0.6314342", "0.6303021", "0.6289923", "0.6224272", "0.61610544", "0.6153262", "0.6057152", "0.59706837", "0.5955591", "0.5944174", "0.5888947", "0.58820814", "0.5875868", "0.57945716", "0.5758829", "0.57496107", "0.5749593", "0.5739659", "0.57229334", "0.57039464", "0.5662074", "0.56300735", "0.56202835", "0.5614307", "0.56095725", "0.55906695", "0.55787414", "0.5569749", "0.55662984", "0.5550029", "0.5519388", "0.55094427", "0.5507907", "0.5494405", "0.5483591", "0.547718", "0.5469845", "0.5465488", "0.5462116", "0.5439504", "0.54360336", "0.54271805", "0.5425465", "0.5418074", "0.54013497", "0.53958404", "0.5356582", "0.534616", "0.53431416", "0.5341181", "0.53269684", "0.5323144", "0.5315272", "0.5310048", "0.52921724", "0.5286735", "0.52348053", "0.5212659", "0.5211317", "0.5211317", "0.5211317", "0.52111083", "0.52085555", "0.52085555", "0.5199745", "0.51971686", "0.5172035", "0.51709974", "0.5168188", "0.5162977", "0.5149091", "0.5147331", "0.51294494", "0.512879", "0.51265836", "0.51252025", "0.51214594", "0.51175225", "0.51153725", "0.51106334", "0.508787", "0.50853264", "0.5064238", "0.5054951", "0.5049643", "0.5043912", "0.5042796", "0.50314033", "0.5028108", "0.50269866", "0.50193036" ]
0.780193
0
Retrieves the Session with the specified Session identifier or null if no such Session is registered with this SessionManager.
synchronized Session getSession(long id) { return (Session) sessionMap.get(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Session get(String sessionKey) {\n if (!validateKey(sessionKey))\n return null;\n \n if (exists(sessionKey))\n return sessions.get(sessionKey);\n return null;\n }", "InternalSession findSession(String id);", "private Session getSession (String sessionID) {\n\t\tSession session;\n\t\tif (get(sessionID) != null) {\n\t\t\tsession = get(sessionID);\n\t\t} else {\n\t\t\tsession = new Session();\n\t\t\tput(session.getId(), session);\n\t\t}\n\t\treturn session;\n\t}", "public Session getSession(String id)\n\t{\n\t\treturn _sessions.get(id);\n\t}", "public Session findSession(String id) throws IOException;", "Session get(int id);", "DefaultSession getSession(String id);", "public Session getSession(@NotNull Http.Request request) {\n Session session;\n String sessionKey = request.getHeader(SESSION_FIELD_NAME);\n\n // Check Session Key\n if (sessionKey == null || sessionKey.isEmpty()) {\n return null;\n }\n\n // Get Session by Key & check a session was found\n session = this.sessionRepository.getById(sessionKey);\n if (session == null || !session.isValid()) {\n return null;\n }\n\n return session;\n }", "@Override\n\tpublic Session sessionFindById(int id) {\n\t\treturn null;\n\t}", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "@Override\r\n \t\t\tpublic SSession getSession(long sessionId) throws SSessionNotFoundException {\n \t\t\t\treturn null;\r\n \t\t\t}", "@Path(\"/{id}\")\n @GET\n public Response getSession(@PathParam(\"id\") Long id) {\n log.debug(\"REST request to get Session : {}\", id);\n Session session = sessionRepository.find(id);\n return Optional.ofNullable(session)\n .map(result -> Response.status(Response.Status.OK).entity(session).build())\n .orElse(Response.status(Response.Status.NOT_FOUND).build());\n }", "public static Session getSession() {\n return session;\n }", "public SessionModel getSessionById(String sessionId) {\n\t\tSession session = this.sessionRepository.findOne(sessionId);\n\t\treturn session == null ? null : session.toModel(mapper);\n\t}", "public static synchronized SessionState getSession(String sessionid) {\n return statemap.get(sessionid);\n }", "public static HTTPSession getSession (String aSessionID)\n\t{\n\t\treturn (HTTPSession) sessionHashtable.get (aSessionID);\n\t}", "private static HTTPSession retrieveSessionFromTable (String aSessionID)\n\t{\n\t\tHTTPSession retVal = (aSessionID == null ?\n\t\t\t\t\t\t\t\tnull :\n\t\t\t\t\t\t\t\t(HTTPSession) sessionHashtable.get (aSessionID));\n\t\tif (retVal == null && aSessionID != null)\n\t\t{\n\t\t\tretVal = getCrossReference (aSessionID);\n\t\t}\n\t\treturn retVal;\n\t}", "public Session getSession() {\n\t\tSession session = this.session;\r\n\t\tif (session == null) {\r\n\t\t\t// 2. altrimenti genera una nuova sessione utilizzando la factory (e.g. Spring MVC)\r\n\t\t\tsession = this.sessionFactory.getCurrentSession();\r\n\t\t}\r\n\t\treturn session;\r\n\t}", "public static Session getSession() {\n\n if (serverRunning.get() && !session.isClosed()) {\n return session;\n } else {\n if (session.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running\");\n }\n }\n }", "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "public static Session currentSession() {\n \tif (sessionFactory == null) {\n \t\tinitialize();\n \t}\n \tif (singleSessionMode) {\n \t\tif (singleSession == null) {\n \t\t\tsingleSession = sessionFactory.openSession();\n \t\t}\n \t\treturn singleSession;\n \t} else {\n\t Session s = session.get();\n\t \n\t // Open a new Session, if this Thread has none yet\n\t if (s == null || !s.isOpen()) {\n\t s = sessionFactory.openSession();\n\t session.set(s);\n\t }\n\t return s;\n \t}\n }", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "@Override\n\tpublic Session getSession(String appKey,String contextpath, String sessionid) {\n\t\tSession session = this.sessionStore.getSession(appKey, contextpath, sessionid);\n\t\tif(session != null)\n\t\t\tsession._setSessionStore(this);\n\t\treturn session;\n\t}", "public abstract I_SessionInfo getSession(I_SessionName sessionName);", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "public Session getSession();", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "public Session getSession() {\n if (this.session == null) {\n this.logger.error(\"Sessão não iniciada.\");\n throw new IllegalStateException(\"A sessão não foi criada antes do uso do DAO\");\n }\n return this.session;\n }", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public synchronized Session getSession() throws JmsException {\n try {\n if (session == null) {\n Connection conToUse;\n if (connection == null) {\n if (sharedConnectionEnabled()) {\n conToUse = getSharedConnection();\n } else {\n connection = createConnection();\n connection.start();\n conToUse = connection;\n }\n } else {\n conToUse = connection;\n }\n session = createSession(conToUse);\n }\n return session;\n } catch (JMSException e) {\n throw convertJmsAccessException(e);\n }\n }", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "public Session getSessionbyUid(int uid);", "Session getValidSession() {\n final Session session = sessionProvider.getActiveSession();\n // Only use session if it has auth token.\n if (session != null && session.getAuthToken() != null &&\n !session.getAuthToken().isExpired()) {\n return session;\n } else {\n return null;\n }\n }", "public RDBMSSession getSession() {\r\n\t\treturn (RDBMSSession) session;\r\n\t}", "public Session getSession() {\n return session;\n }", "public Session getSession() {\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "public static Session getCurrentSession() {\n return sessionfactory.getCurrentSession();\n }", "public MessageSession getSession(MessageExchange exchange) {\n\t\t// logger.info(\"The target session: \" + exchange.getExchangeId());\n\t\tfor (MessageSession s : sessions) {\n\t\t\tif (s.isBelongs(exchange)) {\n\t\t\t\t// logger.info(\"The Unit's session: \" + s.getSessionID());\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static Session getSession(SlingHttpServletRequest request) {\n ResourceResolver resourceResolver = request.getResourceResolver();\n return resourceResolver.adaptTo(Session.class);\n }", "public Session getSession()\n {\n return session;\n }", "public static Session currentSession() {\n Session session = (Session) sessionThreadLocal.get();\n // Open a new Session, if this Thread has none yet\n try {\n if (session == null) {\n session = sessionFactory.openSession();\n sessionThreadLocal.set(session);\n }\n } catch (HibernateException e) {\n logger.error(\"Get current session error: \" + e.getMessage());\n }\n return session;\n }", "public AbstractSession getSession() {\n return session;\n }", "public /*static*/ Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "public static Session getCurrentSession() {\n if(currentSession != null){\n return currentSession;\n } else {\n createNewSession(new Point2D(300,300));\n return getCurrentSession();\n }\n }", "public Session getSession() { return session; }", "@RequestMapping(method = RequestMethod.GET)\n public Sessions retrieve(@RequestHeader(\"X-CS-Auth\") String auth,\n @RequestHeader(\"X-CS-Session\") String sessionId) {\n return sessionService.retrieve();\n }", "Optional<Resource> find(Session session, IRI identifier);", "@Override\n\tprotected Session doReadSession(Serializable sessionId) {\n\t\treturn null;\n\t}", "protected final Session getSession() {\n return sessionTracker.getSession();\n }", "User getBySession(String session);", "public com.scratch.database.mysql.jv.tables.pojos.Session fetchOneById(String value) {\n return fetchOne(Session.SESSION.ID, value);\n }", "@Override\r\n\tpublic HttpSession getSession()\r\n\t{\r\n\t\t// This method was implemented as a workaround to __CR3668__ and Vignette Support ticket __247976__.\r\n\t\t// The issue seems to be due to the fact that both local and remote portlets try to retrieve\r\n\t\t// the session object in the same request. Invoking getSession during local portlets\r\n\t\t// processing results in a new session being allocated. Unfortunately, as remote portlets\r\n\t\t// use non-WebLogic thread pool for rendering, WebLogic seems to get confused and associates\r\n\t\t// the session created during local portlet processing with the portal request.\r\n\t\t// As a result none of the information stored originally in the session can be found\r\n\t\t// and this results in errors.\r\n\t\t// To work around the issue we maintain a reference to original session (captured on the\r\n\t\t// first invocation of this method during the request) and return it any time this method\r\n\t\t// is called. This seems to prevent the issue.\r\n\t\t// In addition, to isolate SPF code from the session retrieval issue performed by Axis\r\n\t\t// handlers used during WSRP request processing (e.g. StickyHandler), we also store\r\n\t\t// a reference to the session as request attribute. Newly added com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t// can then use the request attribute value instead of calling request.getSession()\r\n\t\t// which before this change resulted in new session being allocated and associated with\r\n\t\t// the portal request.\r\n\r\n\t\tif (mSession == null) {\r\n\t\t\tmSession = ((HttpServletRequest)getRequest()).getSession();\r\n\r\n\t\t\t// Store session in request attribute for com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t\tgetRequest().setAttribute(ORIGINAL_SESSION, mSession);\r\n\t\t}\r\n\r\n\t\treturn mSession;\r\n\t}", "public Session getSafeSession()\n {\n beginSession(false);\n return session;\n }", "public User getUserFromSession(String sessionId) {\n for (User u : table.values()) {\n if (u.hasSession(sessionId)) {\n return u;\n }\n }\n return null;\n }", "public User getUserFromSession(String sessionId) {\n for (User u : table.values()) {\n if (u.hasSession(sessionId)) {\n return u;\n }\n }\n return null;\n }", "public Session getSession() {\n return session;\n }", "public static Session openSession() {\n \treturn sessionFactory.openSession();\n }", "public Session getCurrentSession() {\r\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "@Override\n\tpublic CacheHttpSession getSession(String sessionId) {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}", "Session getCurrentSession();", "Session getCurrentSession();", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "protected Session getSession() { return session; }", "public jkt.hms.masters.business.MasSession getSession () {\n\t\treturn session;\n\t}", "public String getSessionID ()\n\t{\n\t\treturn sessionID;\n\t}", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "public Session getSession() throws DAOException {\n // Injection fails for this non-managed class.\n DAOException ex = null;\n String pu = PERSISTENCE_UNIT;\n if(session == null || !em.isOpen()) {\n session = null;\n try {\n em = (EntityManager)new InitialContext().lookup(pu);\n } catch(Exception loopEx) {\n ex = new DAOException(loopEx);\n logger.error(\"Persistence unit JNDI name \" + pu + \" failed.\");\n }\n }\n\n getHibernateSession();\n if(ex != null) {\n ex.printStackTrace();\n }\n return session;\n }", "public String getSession() {\n return session;\n }", "public String getSession() {\n return this.session;\n }", "protected Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "protected Session getSession() {\r\n if (session == null || !session.isOpen()) {\r\n LOG.debug(\"Session is null or not open...\");\r\n return HibernateUtil.getCurrentSession();\r\n }\r\n LOG.debug(\"Session is current...\");\r\n return session;\r\n }", "public static PlayerSession getSession(CommandSender player) {\r\n \t\tPlayerSession session = playerSessions.get(player.getName());\r\n \t\tif (session == null)\r\n \t\t\tsession = addSession(player);\r\n \t\tsession.setSender(player);\r\n \t\treturn session;\r\n \t}", "Session getSession();", "Session getSession();", "@Override\n\tpublic Session getObject() throws LoginException, RepositoryException\n\t{\n\t\tif ( session == null )\n\t\t{\n\t\t\tsession = repository.login();\n\t\t}\n\t\t\n\t\treturn session;\n\t}", "@Override\n\tpublic Session sessionFindByAgentId(int agentid) {\n\t\treturn null;\n\t}", "public IHTTPSession getSession() {\n\t\treturn session;\n\t}", "Object getNativeSession();", "protected DatabaseSession getDbSession() {\n if(dbSession == null) {\n dbSession = getServerSession();\n }\n return dbSession;\n }", "public User getSession(){\n\t\treturn this.session;\n\t}", "DefaultSession createSession(String id);", "public String getSessionID() {\n\t\treturn sessionId;\n\t}", "@Override\n public Session getSession() throws HibernateException {\n Session session = threadLocal.get();\n\n if (session == null || !session.isOpen()) {\n session = (sessionFactory != null) ? sessionFactory.openSession()\n : null;\n threadLocal.set(session);\n }\n return session;\n }", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }", "public Session session() {\n return session;\n }", "public Session createSession() {\n\t\treturn this.session;\n\t}", "public Session openSession() {\r\n\t\treturn sessionFactory.openSession();\r\n\t}", "private Session fetchSession()\n\t{\n\t\t\tlog.info (\"******Fetching Hibernate Session\");\n\n\t\t\tSession session = HibernateFactory.currentSession();\n\n\t\t\treturn session;\n\t \n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "public Session openSession() {\r\n return sessionFactory.openSession();\r\n }", "public static synchronized Session getCurrentSession(Context context) {\n \tif (Session.currentSession == null) {\n Session.sessionFromCurrentSession(context);\n \t}\n\n \t\treturn Session.currentSession;\n }", "public static Session currentSession() throws HibernateException {\n Session s = (Session) threadLocal.get();\n\n if (s == null) {\n try {\n\t\t\t\tif (getInterceptor() != null) {\n\t\t\t\t\tlog.debug(\"Using Interceptor: \" + getInterceptor().getClass());\n\t\t\t\t\ts = sessionFactory.openSession(getInterceptor());\n\t\t\t\t} else {\n\t\t\t\t\ts = sessionFactory.openSession();\n\t\t\t\t}\n }\n catch (HibernateException he) {\n System.err.println(\"%%%% Error Creating SessionFactory %%%%\");\n throw new RuntimeException(he);\n }\n }\n return s;\n }", "@Override\n\tpublic Session getSession() throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic Session sessionFindByCustomer(String customer) {\n\t\treturn null;\n\t}", "public Session openOrRetrieveSessionForThread() {\n Session session = THREADED_SESSION.get();\n if (session == null) {\n session = getSessionFactory().openSession();\n THREADED_SESSION.set(session);\n }\n return session;\n }" ]
[ "0.7799547", "0.7489885", "0.720012", "0.69845295", "0.6962178", "0.69583005", "0.6711206", "0.66366446", "0.6591684", "0.65843904", "0.65504843", "0.648026", "0.6473518", "0.64368075", "0.63863766", "0.63851464", "0.63679683", "0.6364681", "0.6344557", "0.6336021", "0.63323075", "0.6305941", "0.6270291", "0.6260437", "0.6256047", "0.61943346", "0.6179345", "0.6178853", "0.6166428", "0.61652744", "0.61582303", "0.61582303", "0.61582303", "0.6133269", "0.6119861", "0.61000365", "0.6097289", "0.6081854", "0.6081038", "0.6077193", "0.605899", "0.6030682", "0.5979416", "0.5969114", "0.59565675", "0.59560305", "0.59502137", "0.59478784", "0.5945609", "0.59410775", "0.59295976", "0.59232384", "0.5902675", "0.58936906", "0.5888493", "0.58824897", "0.588156", "0.5852807", "0.5852807", "0.5833633", "0.5827122", "0.58195484", "0.5810743", "0.58047754", "0.58047754", "0.57998914", "0.57997596", "0.5796921", "0.5796914", "0.57780486", "0.57697475", "0.57691455", "0.57605034", "0.5759096", "0.57494473", "0.57483447", "0.57457584", "0.57457584", "0.573533", "0.57212764", "0.5709954", "0.5673672", "0.56732523", "0.56710094", "0.566996", "0.5668078", "0.56445545", "0.5634702", "0.5633321", "0.5632599", "0.56287825", "0.5628246", "0.5619254", "0.5619254", "0.56065613", "0.55974203", "0.5595387", "0.55803216", "0.5578348", "0.55659056" ]
0.71124464
3
Initialize a player with a unique name
public Player(String name) { this.name = name; this.badges = new LinkedList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Player(String name){\n\t\tthis.name = name;\n\t}", "public Player(String name) {\r\n this.name = name;\r\n }", "Player(String playerName) {\n this.playerName = playerName;\n }", "public Player(String name)\n { \n if (name == \"\")\n {\n setName(\"Anonymous\");\n }\n else\n {\n setName(name);\n }\n }", "public Player(String name)\n\t{\n\t\tthis.name = name;\n\t}", "public Player(String name) {\n setName(name);\n setId(++idCounter);\n setHealthPoints(100);\n setYourTurn(false);\n }", "public Player(String name) {\r\n this.name = name;\r\n// Maxnum = 0;\r\n special = 0;\r\n index = 0;\r\n }", "public Player(String name) {\n this(name, null);\n }", "public Player(String name)\n\t{\n\t\tthis.money = START_MONEY;\n\t\tthis.name = name;\n\t}", "public Player(String name)\n {\n // initialise instance variables\n this.name = name;\n // start out with $100 in your wallet\n wallet = new Wallet(100);\n inventory = new HashMap<String, Item>();\n currentRoom = null;\n olcc = new OLCC();\n\n }", "public Player(String name) {\n this.NAME = name;\n this.ownedCountries = new ArrayList<>();\n this.totArmyCount = 0;\n this.PlayerTurn = false;\n }", "public Player(String name) {\n this.name = name;\n gameDeck = new Deck(false);\n wonDeck = new Deck(false);\n }", "public Player(String name) {\n\t\tthis.name = name;\n\t\tscore = 0;\n\t}", "public Player(String name) {\n this.name = name;\n this.points = 0;\n }", "public RandomPlayer(String name)\r\n\t{\r\n\t\tsuper.setName(name);\r\n\t\tguessHistory=new ArrayList<Code>();\r\n\t}", "public HumanPlayer(String name) {\n super(name);\n }", "public Player(Integer nameKey){\n\t\thand = new HashSet<Card>();\n\t\tswitch(nameKey){\n\t\tcase 0:\n\t\t\tname = \"Kasandra Scarlet\"; break;\n\t\tcase 1:\n\t\t\tname = \"Jack Mustard\"; break;\n\t\tcase 2:\n\t\t\tname = \"Diane White\"; break;\n\t\tcase 3:\n\t\t\tname = \"Jacob Green\"; break;\n\t\tcase 4:\n\t\t\tname = \"Eleanor Peacock\"; break;\n\t\tcase 5:\n\t\t\tname = \"Victor Plum\"; break;\n\t\t}\n\t}", "Player(int id, String name){\n\t\tthis();\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}", "boolean InitialisePlayer (String path_name);", "public Player(String name){\r\n\t\tthis.name = name;\r\n\t\tDie die = new Die();\r\n\t\tthis.die = die;\r\n\t}", "public void initPlayer();", "public Player(String name)\n\t{\n\t\tif (name == null || validateName(name) == false)\n\t\t{\n\t\t\tmyName = DEFAULT_NAME;\n\t\t}\n\t\telse if (name.matches(\"[a-zA-Z]+\"))\n\n\t\t{\n\t\t\tmyName = name;\n\t\t}\n\t\tmyHand = new PokerHand(5);\n\t\tmyNumberWins = 0;\n\t\tmyAmAI = false;\n\t}", "void createPlayer(Player player);", "public Player_ex1(String playerName){\n this.name = playerName;\n winner = false;\n }", "public Player(String name, int playerIndex) {\r\n\t\tthis.name = name;\r\n\t\tthis.playerIndex = playerIndex;\r\n }", "public Player(String name) {\r\n\t\tthis.name=name;\r\n\t\tinitializeGameboard();\r\n\t\tlastRedNumber=2; \r\n\t\tlastYellowNumber=2;\r\n\t\tlastGreenNumber=12;\r\n\t\tlastBlueNumber=12;\r\n\t\tnegativePoints=0;\r\n\t}", "public HumanPlayer(String name) {\n\t\tsuper(name);\n\t\tif (name == null) {\n\t\t\tthrow new IllegalArgumentException(\"Name cannot be null\");\n\t\t}\n\t}", "public Player(String name)\n {\n this.name = name;\n cash = 0;\n }", "Player createPlayer();", "public void setPlayerName(String name) {\n \tplayername = name;\n }", "public Player(String name, int id) {\r\n this.name = name;\r\n this.id = id; //to account for array being 0\r\n emptyHand();\r\n \r\n wins =0;\r\n losses = 0;\r\n }", "public Player (String name) {\n this.name = name;\n score = 0;\n usedWords = new HashSet<>();\n }", "Player(String Name){\n\t\tthis.Name=Name;\n\t\tdate=new Date();\n\t\tthis.Score=Score;\n\t\tScore=0;\n\t}", "private HumanGamePlayerOnKeyboard initializePlayer() {\n\t\tHumanGamePlayerOnKeyboard player = new HumanGamePlayerOnKeyboard();\n\t\tplayer.setPlayerName(HUMAN_PLAYER_NAME);\n\t\treturn player;\n\t}", "public Player() {\n this(\"\", \"\", \"\");\n }", "public RandomOpponent(String name) {\n this.name = name;\n }", "private void createHumanPlayer() {\n humanPlayer = new Player(\"USER\");\n players[0] = humanPlayer;\n }", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "public Player(String nickname) {\n this(nickname, -1, -1);\n }", "public RandomPlayer() {\n\t\tsuper(\"Random\");\n\t}", "void initializePlayer();", "public Player2(){\n super();\n name=\"110\";\n }", "public Player(){\n default_init();\n }", "public Player(String name)\n\t{\n\t\tif (name.contains(\" \"))\n\t\t\tthrow new IllegalArgumentException(\"Name cannot contain a space character!\");\n\n\t\tthis.name = name;\n\t\tthis.numPlayed = 0;\n\t\tthis.numCompleted = 0;\n\t\tthis.averageTime = new Time(0);\n\t\tthis.bestTime = new Time(0);\n\t\tthis.accuracy = 0;\n\t}", "public Player()\r\n\t{\r\n\t\tscore = 0;\r\n\t\tsetPlayerName();\r\n\t}", "public Player(String name){\n\t\tthis.name = name;\n\t\t//this.deck = new Deck(1);\n\t\t((Deck) this.deck).buildDeck();\n\t\t//this.inhand = new CardsGroup();\n\t\tthis.bench = new CardsGroup();\n\t\tthis.userDiscardPile = new CardsGroup();\n\t}", "public Player(String Name)\n {\n // initialise instance variables\n score = 0;\n energy = 100;\n this.name = Name;\n items = new ArrayList<>();\n }", "Player(String name, int health)\r\n {\r\n this.name = name;\r\n this.health = health;\r\n }", "public Player()\n\t{\n\t\tmyName = DEFAULT_NAME;\n\t\tmyHand = new PokerHand(5);\n\t\tmyNumberWins = 0;\n\t\tmyAmAI = false;\n\t}", "public Player(String name){\n this.name = name;\n this.gold = 0;\n this.score = 0;\n this.ressource = new HashMap<Ressource, Integer>();\n this.ressource.put(Ressource.ROCHE, 0);\n this.ressource.put(Ressource.BLE, 0);\n this.ressource.put(Ressource.SABLE, 0);\n this.ressource.put(Ressource.BOIS, 0);\n }", "public AutoPlayer(String name, Board board) {\n\t\tsuper(name, board);\n\t\tthis.rand = new Random();\n\t}", "public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}", "public Player(String inName)\n {\n // initialise instance variables\n mName = inName;\n mBrokenRules = new RuleBook();\n }", "public void setPlayerName(String name) {\n\t\tsuper.setPlayerName(name);\n\t}", "public HexComputerPlayer1(String name) {\n // invoke superclass constructor\n super(name); // invoke superclass constructor\n }", "public Player(){\r\n\t\tname = \"\";\r\n\t\tchip = 0;\r\n\t\tbet = 0;\r\n\t\tplayerHand = new PlayerHand();\r\n\t\ttable = null;\r\n\t}", "public void createOwnerPlayer(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player == null) {\r\n// System.out.println(\"Create owner player \" + name);\r\n player = new Player(name, x, y);\r\n inPlayer = player;\r\n players.put(name, player);\r\n }\r\n }", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public static Player make(String n) {\n\t\treturn new NewPlayer(n);\n\t}", "public Player() {}", "public Player() {}", "public Player() {}", "public Player() {}", "public Player()\n\t{\n\t\tsetUserName(\"\");\n\t\tsetFamilyName(\"\");\n\t\tsetGivenName(\"\");\n\t\tsetGamesPlayed(0);\n\t\tsetGamesWon(0);\n\t\tsetGamesDrawn(0);\n\t}", "public Player(){}", "public Player(){}", "public void setPlayer1Name(String name){\n player1 = name;\n }", "public Player() {\t\n\t}", "public Player(String username)\n\t{\n\t\tm_username = username;\n\t\tm_requests = new HashMap<String, RequestType>();\n\t}", "PlayerBean create(String name);", "public Player(String name, Pool p)\n\t{\n\t\tsetName(name); // sets the name for the player\n\t\tsetScore(0); // sets the intial score for the player\n\t\tsetFrame(p); // assigns a frame to the player\n\t}", "private void initPlayers() {\n this.playerOne = new Player(1, 5, 6);\n this.playerTwo = new Player(2, 0, 1);\n this.currentPlayer = playerOne;\n\n }", "public void setName(String name)\n {\n playersName = name;\n }", "public void createPlayer(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player == null) {\r\n// System.out.println(\"Create online player \" + name);\r\n player = new OnlinePlayer(name, x, y);\r\n players.put(name, player);\r\n }\r\n }", "public Player(String name, double chip){\r\n\t\tthis.name = name;\r\n\t\tthis.chip = chip; \r\n\t\tbet = 0;\r\n\t\tplayerHand = new PlayerHand();\r\n\t\ttable = null;\r\n\t}", "public void setCurrentPlayerName(String name)\n {\n currentPlayerName = name;\n startGame();\n }", "public void setPlayerName(String playerName) {\n this.playerName = playerName;\n }", "private void setPlayer() {\n player = Player.getInstance();\n }", "public NimPlayer(String Username, String Familyname, String Givenname) {\n\t\t/*\n\t\t * The constuctor of every player, in which defines players' username,\n\t\t * familyname and givenname.\n\t\t */\n\t\tthis.username = Username;\n\t\tthis.family_name = Familyname;\n\t\tthis.given_name = Givenname;\n\t}", "private void createHumanPlayer(PlayerId pId) {\n\t\tplayers.put(pId, new GraphicalPlayerAdapter());\n\t\tplayerNames.put(pId, texts.get(pId.ordinal() * 2).getText().isEmpty() ? defaultNames[pId.ordinal()] : texts.get(pId.ordinal() * 2).getText());\n\t}", "public void setUpPlayers() {\n this.players.add(new Player(\"Diogo\"));\n this.players.add(new Player(\"Hayden\"));\n this.players.add(new Player(\"Gogo\"));\n }", "public Player2(State state){\n super(state);\n name=\"110\";\n }", "public static void SetPlayerNames () {\n for (int i = 0; i < player_count; i++) {\r\n\r\n // PROMPT THE USER\r\n System.out.print(\"Player \" + (i+1) + \", enter your name: \");\r\n\r\n // INSTANTIATE A NEW PLAYER USING THE NAME THAT'S PROVIDED\r\n player[i] = new Player(input.nextLine());\r\n\r\n // IF THE PLAYER DOESN'T ENTER A NAME, CALL THEM \"BIG BRAIN\"\r\n if (player[i].name.length() == 0) {\r\n player[i].name = \"Big Brain\";\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n\r\n }\r\n\r\n // MAKE SOME SPACE...\r\n System.out.println();\r\n }", "public Player(String name, int x, int y) {\n \t\t\n \t\tsuper(x*Main.gridSize, y*Main.gridSize);\n \t\t\n \t\tsetMaxHP(100);\n \t\tsetMaxPP(100);\n \t\t\n \t\tsetLevel(1);\n \t\tsetExp(0);\n \t\t\n \t\tsetScene(0, 0);\n \t\t\n \t\tthis.name = name;\n \t}", "public SoccerPlayer(String name, String position, TeamDB team){\n\n// Random num = new Random();\n// int randInt1;\n// int randInt2;\n// int randInt3;\n// int randInt4;\n//\n// randInt1 = num.nextInt(10); //fix for height and weight.\n// randInt2 = num.nextInt(190);\n// randInt3 = num.nextInt(300);\n// randInt4 = num.nextInt(10);\n\n playerName = name;\n playerPosition = position;\n playerTeam = new TeamDB(\"\");\n// playerUniform = randInt1;\n// playerHeight = randInt2;\n// playerWeight = randInt3;\n// playerGoals = randInt4;\n }", "Player(String name, int startingX, int startingY, Texture image) {\n super(startingX, startingY, image);\n\n initPlayer(name);\n }", "public Player(String type){\n \n this.type = type;\n }", "public Player(int i){\r\n playerID=i;\r\n }", "Player attackingPlayer(int age, int overall, int potential) {\r\n Player newPlayer = new Player(this.nameGenerator.generateName(), age, overall, potential, 'C' , 'F');\r\n\r\n\r\n\r\n\r\n }", "private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}", "public Player(){\r\n\r\n }", "public Player(){\n\n }", "public Pawn(String player){\r\n this.player=player;\r\n\r\n }", "String getNewPlayerName();", "public Player()\n\t{\n\t\tthis.name = \"\";\n\t\tthis.numPlayed = 0;\n\t\tthis.numCompleted = 0;\n\t\tthis.averageTime = new Time(0);\n\t\tthis.bestTime = new Time(0);\n\t\tthis.accuracy = 0;\n\t}", "void setPlayer1Name(String name) {\n if (!name.isEmpty()) {\n this.player1.setName(name);\n }\n }", "public Multi_Player()\r\n {\r\n \r\n }", "Player()\n\t{\n\t\tiHP = 30;\n\t\tstrEquippedWeapon = \"None\";\n\t\tiLocation = 1;\n\t\tblnPlayerState = true;\n\t\tblnPlayerVictory = false;\n\t\tblnSearchedDirt = false;\n\t\tblnSearchedBarrels = false;\n\t\t\n\t}", "public GamePlayer() {}", "static void setCurrentPlayer()\n {\n System.out.println(\"Name yourself, primary player of this humble game (or type \\\"I suck in life\\\") to quit: \");\n\n String text = input.nextLine();\n\n if (text.equalsIgnoreCase(\"I suck in life\"))\n quit();\n else\n Player.current.name = text;\n }" ]
[ "0.77695215", "0.776008", "0.7724894", "0.7694195", "0.76887494", "0.7541859", "0.7447047", "0.7354889", "0.7352517", "0.7352426", "0.7349842", "0.7302296", "0.7300875", "0.7285287", "0.72808856", "0.7270087", "0.72376096", "0.72023314", "0.71506983", "0.7109465", "0.7094153", "0.7044623", "0.69746596", "0.696223", "0.6956142", "0.69551814", "0.6954013", "0.6948059", "0.6917609", "0.69065726", "0.69021153", "0.6900065", "0.6881011", "0.685619", "0.6851373", "0.684634", "0.68450636", "0.6834506", "0.6827465", "0.68257016", "0.6821629", "0.68150467", "0.679985", "0.67985547", "0.6797823", "0.67779166", "0.6777528", "0.6768034", "0.6746013", "0.6735839", "0.66891193", "0.6682723", "0.6677803", "0.6659426", "0.6658503", "0.66500235", "0.66392183", "0.6616532", "0.6615353", "0.65937525", "0.65937525", "0.65937525", "0.65937525", "0.6579574", "0.65749013", "0.65749013", "0.65694946", "0.6550048", "0.6546803", "0.6531413", "0.6530889", "0.6529645", "0.6487948", "0.647699", "0.6476637", "0.64738125", "0.6469782", "0.64651805", "0.6453093", "0.6452711", "0.64442676", "0.6441657", "0.6431102", "0.6417163", "0.6415745", "0.64089656", "0.6401553", "0.6398552", "0.6396398", "0.6395088", "0.6367939", "0.6345774", "0.6330868", "0.6318196", "0.6310447", "0.63062197", "0.63025045", "0.6293388", "0.62896717", "0.628295" ]
0.6517065
72
Get the name of the player
public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getPlayerName();", "public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\n\t}", "public String getPlayerName() {\n return props.getProperty(\"name\");\n }", "public String getName(){\r\n\t\treturn playerName;\r\n\t}", "public String getPlayerName() {\n return nameLabel.getText().substring(0, nameLabel.getText().indexOf('\\''));\n }", "public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}", "String getName() {\n return getStringStat(playerName);\n }", "public String getPlayerName() {\n\t\treturn name;\n\t}", "String getName(){\n\t\treturn playerName;\n\t}", "public String getName(Player p) {\n\t\treturn name;\n\t}", "public String getPlayerName() {\n return this.playerName;\n }", "public String getPlayerName(){\n\t\treturn playerName;\n\t}", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n\n return m_playerName;\n }", "public String getPlayerName() {\n return name; \n }", "@Override\n\tpublic String getPlayerName() {\n\t\treturn playerName;\n\t}", "public java.lang.String getPlayerName() {\n java.lang.Object ref = playerName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n playerName_ = s;\n return s;\n }\n }", "public java.lang.String getPlayerName() {\n java.lang.Object ref = playerName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n playerName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getPlayername(Player player) {\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n System.out.println(\"Merci de d'indiquer le nom du joueur \"+player.getColor().toString(false)+\" : \");\n String name = readInput.nextLine();\n return name;\n }", "public String getPlayerName() {\n\t\treturn playerName;\n\t}", "public String getPlayerName() {\n \treturn playername;\n }", "public String getName(){\n\t\treturn players.get(0).getName();\n\t}", "@Override\n public String getPlayerName()\n {\n if (currentPlayer == 0)\n {\n return playerOneName;\n }\n else\n {\n return playerTwoName;\n }\n }", "private String getPlayerName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String storedName = preferences.getString(\"playerName\",\"none\");\n return storedName;\n }", "private String getPlayerName() {\n Bundle inBundle = getIntent().getExtras();\n String name = inBundle.get(USER_NAME).toString();\n return name;\n }", "abstract public String getNameFor(Player player);", "java.lang.String getGameName();", "java.lang.String getGameName();", "public String myGetPlayerName(String name) { \n Player caddPlayer = getServer().getPlayerExact(name);\n String pName;\n if(caddPlayer == null) {\n caddPlayer = getServer().getPlayer(name);\n if(caddPlayer == null) {\n pName = name;\n } else {\n pName = caddPlayer.getName();\n }\n } else {\n pName = caddPlayer.getName();\n }\n return pName;\n }", "private String getPlayerName() {\n EditText name = (EditText) findViewById(R.id.name_edittext_view);\n return name.getText().toString();\n }", "String getPlayer();", "public static String getNameOne() {\n\tString name;\n\tname = playerOneName.getText();\n\treturn name;\n\n }", "public String getDisplayName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getDisplayName ).orElse ( name );\n\t}", "public String getLoggedPlayerName() {\r\n return ctrlDomain.getLoggedPlayerName();\r\n }", "public com.google.protobuf.ByteString\n getPlayerNameBytes() {\n java.lang.Object ref = playerName_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n playerName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "String getPlayerName() {\r\n EditText editText = (EditText) findViewById(R.id.name_edit_text_view);\r\n return editText.getText().toString();\r\n }", "private String getPlayerName(int i) {\n\t\tSystem.out.println(\"\\nEnter Player \"+i+\"'s Name:\");\n\t\treturn GetInput.getInstance().aString();\n\t}", "public com.google.protobuf.ByteString\n getPlayerNameBytes() {\n java.lang.Object ref = playerName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n playerName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getPlayerListName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getPlayerListName ).orElse ( name );\n\t}", "public String getPlayer() {\r\n return player;\r\n }", "String player1GetName(){\n return player1;\n }", "public String getFullPlayerName(Player otherPlayer) {\n return this.fullPlayerName;\n }", "String getNewPlayerName();", "public String getPlayerName(UUID id) {\n return playerRegistry.get(id);\n }", "public String getPlayerName(){\n return this.playerName;\n\n }", "private void getPlayertName() {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "String player2GetName(){\n return player2;\n }", "public String getPlayerTitle(Player player)\n \t{\n \t\tif (player == null)\n \t\t\treturn \"\";\n \n \t\tFPlayer me = FPlayers.i.get(player);\n \t\tif (me == null)\n \t\t\treturn \"\";\n \n \t\treturn me.getTitle().trim();\n \t}", "public String toString() {\n\t\treturn \"Player \" + playerNumber + \": \" + playerName;\n\t}", "@Override\r\n\tpublic void SavePlayerName() {\r\n\t\tPlayer player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerName.txt\";\r\n\t\tString playerName = player.getName();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerName);\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public MultiLineText getGameScreenFullPlayerName() {\n if (this.gameScreenFullPlayerName == null) {\n String[] strTemp = { this.fullPlayerName };\n this.gameScreenFullPlayerName = new MultiLineText(strTemp, 10, 10, Color.black, 15.0f, \"Lucida Blackletter\", ImageLibRef.TEXT_PRIORITY, MultiLineText.LEFT_ALIGNMENT);\n }\n\n return this.gameScreenFullPlayerName;\n }", "public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }", "private String getPlayerName() {\n\t\tString[] options = {\"OK\"};\n\t\tJPanel namePanel = new JPanel(new GridLayout(0, 1));\n\t\tJLabel lbl = new JLabel(\"Next player, what is your name?\");\n\t\tJTextField txt = new JTextField(10);\n\t\tnamePanel.add(lbl);\n\t\tnamePanel.add(txt);\n\t\t\n\t\t// show dialog box\n\t\tJOptionPane.showOptionDialog(frame, namePanel, \"Player name\",\n\t\t\t\tJOptionPane.NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options , options[0]);\n\t\tString playerName = txt.getText();\n\t\twhile(playerName.length() < 1){\n\t\t\tlbl.setText(\"Name must be at least one character long.\");\n\t\t\tJOptionPane.showOptionDialog(frame, namePanel, \"Player name\",\n\t\t\t\t\tJOptionPane.NO_OPTION, JOptionPane.WARNING_MESSAGE, null, options , options[0]);\n\t\t\tplayerName = txt.getText();\n\t\t}\n\t\treturn playerName;\n\t}", "public String getPlayerOneUserName() {\n if (gameStatus == null) return \"\";\n if (gameStatus.getPlayerOneUserName() == null) return \"\";\n return gameStatus.getPlayerOneUserName();\n }", "public void setPlayerName(String name) {\n \tplayername = name;\n }", "public String getNewPlayerName() {\n return newPlayerName;\n }", "String randomPlayer1GetName(){\n return randomPlayer1;\n }", "public String getPlayer() {\n return p;\n }", "public String getCurrentPlayer() {\n return currentPlayer;\n }", "public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}", "public String getName() {\n return (String) getObject(\"username\");\n }", "public String getCurrentNickname() {\n return currentPlayer.getNickName();\n }", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();" ]
[ "0.8814854", "0.87470186", "0.8683399", "0.8681049", "0.86218417", "0.85760057", "0.852983", "0.8465091", "0.84400487", "0.83729506", "0.83617824", "0.8327413", "0.83138686", "0.83138686", "0.83031374", "0.8293755", "0.8276346", "0.8247097", "0.8210698", "0.8195645", "0.81947416", "0.8171329", "0.81674206", "0.8144827", "0.80933195", "0.807379", "0.8045743", "0.80117404", "0.80117404", "0.80063426", "0.79290974", "0.77519876", "0.7707273", "0.76730233", "0.76724136", "0.7626737", "0.75779897", "0.7570883", "0.75412315", "0.75255847", "0.74957407", "0.7492516", "0.7466585", "0.74426854", "0.7379251", "0.735512", "0.7290819", "0.7271468", "0.7268527", "0.72107196", "0.7189061", "0.71286136", "0.71245456", "0.7109338", "0.7105877", "0.70958936", "0.7079481", "0.70735514", "0.7071017", "0.7046983", "0.70385563", "0.6955122", "0.69435227", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153", "0.69394153" ]
0.0
-1
Create a hash code of the player based on the players name
@Override public int hashCode() { return name.hashCode(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int getHash(String name) {\n int x = 0;\n int sum = 0;\n while (x < name.length()) {\n sum += name.charAt(x);\n x++;\n }\n int result = sum % size;\n return result;\n }", "public static long hashName(String name) {\n\t\t\tlong res = 123;\n\t\t\tfor (int i = 0; i < name.length(); ++i) {\n\t\t\t\tres = (res << 8) | (res >>> 56);\n\t\t\t\tres += name.charAt(i);\n\t\t\t\tif ((res & 1) == 0) {\n\t\t\t\t\tres ^= 0x00000000feabfeabL; // Some kind of feedback\n\t\t\t\t}\n\t\t\t}\n\t\t\tres |= 0x8000000000000000L; // Make sure the hash is negative (to distinguish it from database id's)\n\t\t\treturn res;\n\t\t}", "public int hashcode(){\r\n\t\t\r\n\t\treturn last_Name.hashcode();\r\n\t}", "public int hashCode() {\n return (name.ordinal() + 5) * 51;\n }", "@java.lang.Override\n public double getPlayerHash() {\n return playerHash_;\n }", "@Override\n public int getPlayerHashID() {\n return this.hashID;\n }", "public int hashCode() {\n return numberOfPlayers; // hashCode must not contain a field that changes regularly\n }", "@java.lang.Override\n public double getPlayerHash() {\n return playerHash_;\n }", "public int hashCode(){\n return name.hashCode();\n }", "int hash(String makeHash, int mod);", "public int hashCode() {\n return name.hashCode();\n }", "public int hash(String w){\n return (Math.abs(w.hashCode()) % hashTable.length);\n }", "public int hashCode() {\n int result = 6;\n result = 31 * result * name.hashCode();\n return result;\n }", "public static int hashfunction(final String firstName) {\n int key = 0;\n for (int i = 0; i < firstName.length(); i++) {\n key += firstName.charAt(i);\n }\n return key % 32;\n }", "public int hashCode() {\n return name.hashCode();\n }", "public String generatePlayerID() {\n List<Player> players = getAllOrdered();\n int idNum;\n \n if (players == null || players.isEmpty())\n idNum = 0;\n else {\n String idStr = players.get(players.size() - 1).getPlayerID();\n idNum = Integer.parseInt(idStr.substring(2, idStr.length()));\n }\n \n String playerID;\n int newIdNum = idNum + 1;\n if (newIdNum <= 9)\n playerID = \"P_000\" + newIdNum;\n else if (newIdNum <= 99) \n playerID = \"P_00\" + newIdNum;\n else if (newIdNum <= 999)\n playerID = \"P_0\" + newIdNum;\n else \n playerID = \"P_\" + newIdNum;\n \n return playerID;\n }", "@Override\n public int hashCode() {\n // Declare hash and assign value\n int hash = 7;\n // Generate hash integer\n hash = 31 * hash + (int) this.getCrossingTime();\n hash = 31 * hash + (this.getName() == null ? 0 : this.getName().hashCode());\n return hash;\n }", "@Override\n public int hashCode()\n {\n return new HashCodeBuilder(17, 31).\n append(_name).\n toHashCode();\n }", "@Override\n public int hashCode() {\n\n final int prime = 31;\n int result = 1;\n result = prime * result + name.hashCode();\n return result;\n }", "@Override\n public int hashCode() {\n // name's hashCode is multiplied by an arbitrary prime number (13)\n // in order to make sure there is a difference in the hashCode between\n // these two parameters:\n // name: a value: aa\n // name: aa value: a\n return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n }", "java.lang.String getPlayerId();", "public int hashCode()\n {\n return getName().hashCode();\n }", "public int getIdentityFromSummonerName(Match match)\n {\n int playerNum=-1;\n\n for(int i = 0; i<10; i++)\n {\n if(match.getParticipants().get(i).getSummonerName().equals(summonerName))\n playerNum=match.getParticipants().get(i).getParticipantID();\n\n }\n\n return playerNum;\n }", "public int hashCode(){\n int hashcode = name == null ? 0 : name.hashCode() / 2;\n return hashcode += ( value == null ? 0 : value.hashCode()/2 );\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn name.hashCode();\n\t}", "String getNewPlayerName();", "int findHash(String name, int level, int child) {\n if(level == 1 && child == 1)\n child = 5;\n int hash = 0;\n for(char c: name.toCharArray()) {\n if((int)c >= 65 && (int)c<= 90) {\n hash += (int)c - 64;\n }\n else if((int)c >= 97 && (int)c<= 122)\n hash += (int)c - 96;\n }\n hash += level + child;\n\n return hash%7;\n }", "@Override\n //zwraca niepowtarzalny numer identyfikujacy nasz obiekt\n public int hashCode() {\n return Objects.hash(name, engine, maxSpeed);\n }", "@Override\n public int hashCode() {\n\treturn getName().hashCode();\n }", "@Override\n public int hashCode() {\n int i;\n int result = 17;\n i = getIduser();\n result = 37*result + i;\n return result;\n }", "@Override\n public int hashCode() {\n return Integer.parseInt(this.getPawnOne().getPositionNr() + \"\" + this.getPawnTwo().getPositionNr());\n }", "@Override\r\n\tpublic int hashCode() {\r\n\t\tint hash = 1;\r\n hash = hash * 17 + (name == null ? 0 : name.hashCode());\r\n hash = hash * 13 + (duration);\r\n return hash;\r\n\t}", "@Override\n\tpublic int hash(String str) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tint temp = (int) str.charAt(i);\n\t\t\tresult += (temp * (Math.pow(37, i)));\n\t\t}\n\t\treturn result;\n\t}", "public int hashcode();", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result + ((name == null) ? 0 : name.hashCode());\n\t\treturn result;\n\t}", "private int hasher() {\n int i = 0;\n int hash = 0;\n while (i != length) {\n hash += hashableKey.charAt(i++);\n hash += hash << 10;\n hash ^= hash >> 6;\n }\n hash += hash << 3;\n hash ^= hash >> 11;\n hash += hash << 15;\n return getHash(hash);\n }", "static int generatePartitionHash(String accountName, String eventType, String correlationId)\n/* */ {\n/* 45 */ return Hashing.murmur3_32().newHasher().putString(accountName, Charsets.UTF_8).putString(eventType, Charsets.UTF_8).putString(correlationId, Charsets.UTF_8).hash().asInt();\n/* */ }", "private int hashFunc(String input) {\n\t\tBigInteger value = BigInteger.valueOf(0);\n\t\tBigInteger k2 = new BigInteger(\"27\");\n\t\tchar c = input.charAt(0);\n\t\tlong i1 = (int) c - 96;\n\t\tBigInteger k1 = new BigInteger(\"0\");\n\t\tk1 = k1.add(BigInteger.valueOf(i1));\n\t\tvalue = k1;\n\n\t\tfor (int i = 1; i < input.length(); i++) {\n\n\t\t\tchar c2 = input.charAt(i);\n\n\t\t\tvalue = value.multiply(k2);\n\n\t\t\tlong i2 = (int) c2 - 96;\n\t\t\tBigInteger k3 = new BigInteger(\"0\");\n\t\t\tk3 = k3.add(BigInteger.valueOf(i2));\n\n\t\t\tvalue = value.add(k3);\n\n\t\t}\n\t\tBigInteger size = new BigInteger(\"0\");\n\t\tsize = size.add(BigInteger.valueOf(this.size));\n\t\tvalue = value.mod(size);\n\n\t\treturn value.intValue();\n\t}", "public int hashCode() {\n final int HASH_MULTIPLIER = 29;\n int h = HASH_MULTIPLIER * FName.hashCode() + LName.hashCode();\n h = HASH_MULTIPLIER * h + ((Integer)ID).hashCode();\n return h;\n }", "public int hashCode() {\r\n final int prime = 31;\r\n int result = 1;\r\n result = prime * result + ((username == null) ? 0 : username.hashCode());\r\n return result;\r\n }", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 71 * hash + this.id;\n hash = 71 * hash + Objects.hashCode(this.name);\n hash = 71 * hash + Objects.hashCode(this.cash);\n hash = 71 * hash + Objects.hashCode(this.skills);\n hash = 71 * hash + Objects.hashCode(this.potions);\n return hash;\n }", "abstract public String getNameFor(Player player);", "long getUserCode(String username) {\n\n return (long) (Math.random() * 99999999999l);\n }", "@Override\r\n public int hashCode() {\r\n int hash = Objects.hashCode(name);\r\n return hash;\r\n }", "public static String createCommonName(List<String> hashes) {\n int[] nums = new int[SIZE_DBHASH];\n char[] valids = VALID_DBHASH_CHARS.toCharArray();\n StringBuilder sb = new StringBuilder();\n\n for (String hash : hashes) {\n char[] cur = hash.toCharArray();\n for (int i = 0; i < SIZE_DBHASH; i++)\n nums[i] += cur[i];\n }\n\n for (int num : nums)\n sb.append(valids[num % valids.length]);\n\n return sb.toString();\n }", "com.google.protobuf.ByteString\n getPlayerIdBytes();", "@Test\n\tpublic void test_hashCode1() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c2 = new TennisPlayer(5,\"David Ferrer\");\n\tassertTrue(c1.hashCode()==c2.hashCode());\n }", "@Override\n public int hashCode() {\n return Objects.hash(name);\n }", "@Override\n public int hashCode() {\n return getName().hashCode();\n }", "@Override\n public int hashCode() {\n return Objects.hash(username);\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn this.name.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn this.name.hashCode();\n\t}", "static public String hobNameGen(){\n int i = rand.nextInt(8);\n String hName = name[i];\n return hName;\n }", "@Override\n public final int hashCode() {\n return name != null ? name.hashCode() : 0;\n }", "@Override\r\n public int hashCode() {\n return this.name.hashCode();\r\n }", "public int hashCode()\n {\n return this.getName().hashCode();\n }", "private int getHash(String word){\n\t\tif (word == null){\n\t\t\treturn INVALID;\n\t\t}\n\n\t\tint hash = 52;\n\t\tif ((word.charAt(0) >= 'a') && (word.charAt(0) <= 'z')){\n\t\t\thash = word.charAt(0) - 'a';\n\t\t}\n\t\telse if ((word.charAt(0) >= 'A') && (word.charAt(0) <= 'Z')){\n\t\t\thash = word.charAt(0) - 'A' + 26;\n\t\t}\n\t\treturn hash;\n\t}", "@Override\n\tpublic long getHashCode(String key) {\n\t\tlong hash = 0;\n\t\tlong b = 378551;\n\t\tlong a = 63689;\n\t\tint tmp = 0;\n\t\tfor (int i = 0; i < key.length(); i++) {\n\t\t\ttmp = key.charAt(i);\n\t\t\thash = hash * a + tmp;\n\t\t\ta *= b;\n\t\t}\n\t\treturn hash;\n\t}", "@Override\r\n public int hashCode() {\r\n return this.name.hashCode();\r\n }", "int getPlayerId();", "int getPlayerId();", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1; \n\t\t\n\t\t/*\n\t\t * result = 31*1 + 0(if rank is null) else rank.hashcode which calls the String implementation of the hashcode method.\n\t\t * So for example we will say: 31*1+20=51\n\t\t */\n\t\tresult = prime * result + ((rank == null) ? 0 : rank.hashCode());\n\t\tresult = prime * result + ((suit == null) ? 0 : suit.hashCode());\n\t\treturn result;\n\t}", "public int hashCode() {\n\t\tint hash = 0;\n\t\tif (isGameOver()) {\n\t\t\treturn (1 + (winner() == Game.FIRST_PLAYER ? 1 : 2));\n\t\t}\n\t\thash = 4;\n\t\tfor (int i = 1; i < NUMBER_OF_MOVES; i++) {\n\t\t\thash *= 3;\n\t\t\tif (contains(moves1, i)) {\n\t\t\t\thash++;\n\t\t\t} else if (contains(moves2, i)) {\n\t\t\t\thash += 2;\n\t\t\t}\n\t\t}\n\t\treturn hash;\n\t}", "@Test\n\tpublic void test_hashCode2() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tTennisPlayer c3 = new TennisPlayer(99,\"David Ferrer\");\n\tassertTrue(c1.hashCode()!=c3.hashCode());\n }", "public static Object getIdentificationFor(String playerName) {\n try {\n return UUIDFetcher.getUUIDOf(playerName);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return playerName;\n }", "public int hash(String item);", "public int hashCode()\n { \n \tint result = 17;\n \t\n \tresult = 37 * result + score; \t\n \t\n \treturn result;\n }", "public int taskNameHash();", "@Override\n\tpublic int hashCode() {\n\t\t\n\t\treturn (int)id * name.hashCode() * email.hashCode();\n\t\t//int hash = new HashCodeBuilder(17,37).append(id).append(name); //can be added from Apache Commons Lang's HashCodeBuilder class\n\t}", "public int generateHashCode() {\n int code = getClass().hashCode();\n boolean temp_fromSource = isFromSource();\n code ^= temp_fromSource ? 1231 : 1237;\n IRId temp_name = getName();\n code ^= temp_name.hashCode();\n List<IRId> temp_params = getParams();\n code ^= temp_params.hashCode();\n List<IRStmt> temp_args = getArgs();\n code ^= temp_args.hashCode();\n List<IRFunDecl> temp_fds = getFds();\n code ^= temp_fds.hashCode();\n List<IRVarStmt> temp_vds = getVds();\n code ^= temp_vds.hashCode();\n List<IRStmt> temp_body = getBody();\n code ^= temp_body.hashCode();\n return code;\n }", "String getHash();", "String getHash();", "int getHash();", "@Override\n\tpublic int hashCode() {\n\t\treturn Objects.hashCode(this.name);\n\t}", "private int hash(String str, int h){\n int v=0;\n\n /* FILL IN HERE */\n v = Math.floorMod(MurmurHash.hash32(str, seeds[h]) >>> h, 1 << logNbOfBuckets);\n\n return v;\n }", "int toHashKey(String s)\n\t{\n\t\tint A = 1952786893;\n\t\tint B = 367257;\n\t\tint v = B;\n\t\tfor (int j = 0; j < s.length(); j++)\n\t\t{\n\t\t\tchar c = s.charAt(j);\n\t\t\tv = A * (v + (int) c + j) + B;\n\t\t}\n\n\t\tif (v < 0) v = -v;\n\t\treturn v;\n\t}", "public int hashCode(String s){\r\n int length = s.length();\r\n int h = 0;\r\n for(int i = 0; i < length; i++){\r\n h = h + ((int)s.indexOf(i))*(37^(length - 1));\r\n }\r\n return h;\r\n }", "long getPlayerId();", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 29 * hash + Objects.hashCode(this.id);\n hash = 29 * hash + Objects.hashCode(this.name);\n return hash;\n }", "public static RoomAuthName makeKey (int playerId)\n {\n return new RoomAuthName(\"\", playerId);\n }", "static int getKey(String raw) {\n\t\tint key = 0;\n\t\tfor (int i = 0; i < raw.length(); i++) {\n\t\t\tkey = key * HASH_VALUE + raw.charAt(i);\n\t\t}\n\t\tif (key < 0) {\n\t\t\tkey = -key;\n\t\t}\n\t\treturn key % HASH_SIZE;\n\t}", "@Override\n public int hashCode() {\n if (hash == 0)\n hash = MD5.getHash(owner.getLogin() + description).hashCode();\n return hash;\n }", "private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }", "public int hash2 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal = (37 * hashVal) + key.charAt(i);\n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0;\n }\n }", "private String toSHA_256(String passName){\n\t\ttry {\n\t\t\tMessageDigest md=MessageDigest.getInstance(\"SHA-256\");\n\t\t\tmd.update(passName.getBytes(\"UTF-8\"));\n\t\t\tBigInteger bgInt=new BigInteger(md.digest());\n\t\t\treturn bgInt.toString();\n\t\t\t\n\t\t\t\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "public int nextHashForEqual() {\n\t/* This actually needs to roll over the UInt32 limit. */\n\tmyCount = myCount + 1;\n\treturn myCount;\n/*\nudanax-top.st:16757:FakePacker methodsFor: 'shepherds'!\n{UInt32} nextHashForEqual\n\t\"Shepherds use a sequence number for their hash. Return the next one\n\t and increment. This should actually spread the hashes.\"\n\t\"This actually needs to roll over the UInt32 limit.\"\n\tmyCount _ myCount + 1.\n\t^ myCount!\n*/\n}", "private int hashType() {\n // Twelve possibilities\n int answer;\n if (isBomb()) {\n answer = 1;\n } else if (isShield()) {\n answer = 2;\n } else {\n answer = 3;\n }\n if (isFire() && !isKing()) {\n answer += 3 * 1;\n }\n if (!isFire() && isKing()) {\n answer += 3 * 2;\n }\n if (isFire() && isKing()) {\n answer += 3 * 3;\n }\n return answer - 1;\n }", "public int hash3 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ ){\n hashVal = (37 * hashVal) + key.charAt(i);}\n hashVal %= tableSize;\n if(hashVal<0)\n hashVal += tableSize; \n if(hashVal != 0)\n return hashVal;\n else\n return 0;\n }\n else\n {\n //System.out.println(\"Key is null\");\n return 0;\n }\n }", "com.google.protobuf.ByteString\n getGameNameBytes();", "com.google.protobuf.ByteString\n getGameNameBytes();", "private int hashOf(String key) {\n return key.length();\n }", "@Override\r\n\t public int hashCode()\r\n\t {\n\t final int PRIME = 31;\r\n\t int result = 1;\r\n\t result = (int) (PRIME * result + (getId()==null?\r\n\t \t\tgetName().hashCode()\r\n\t \t\t:getName().hashCode()+getId()));\r\n\t return result;\r\n\t }", "String getHashAlgorithm();", "UUID getActivePlayerId();", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "private String generateId(String input) {\n\t\treturn StringUtil.hashSHA256(input);\n\t}", "public static final int nextHashCodeEntropy() {\n\t\tint hash = 17;\n\t\tfor (int i = 0; i < 11; i++) {\n\t\t\thash = 37 * hash + new Object().hashCode();\n\t\t}\n\t\treturn hash = 37 * hash + new Object().hashCode();\n\t}", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}" ]
[ "0.66655654", "0.65533084", "0.6382355", "0.63593006", "0.6182447", "0.61742455", "0.6152369", "0.6126979", "0.6108051", "0.6042933", "0.60273373", "0.595924", "0.59558254", "0.5928853", "0.5928838", "0.59124315", "0.5892624", "0.5855993", "0.5840694", "0.5827194", "0.58192533", "0.58099884", "0.5794243", "0.5782337", "0.5777987", "0.5758485", "0.5754539", "0.5754538", "0.5753856", "0.5739628", "0.57151544", "0.5695195", "0.5691127", "0.56901246", "0.568138", "0.5680022", "0.5674231", "0.5667361", "0.56662136", "0.5659961", "0.56580496", "0.5624033", "0.5623082", "0.5606912", "0.56067073", "0.5604322", "0.5603571", "0.55930716", "0.55902296", "0.55881", "0.5585984", "0.5585984", "0.5580145", "0.55774415", "0.55676997", "0.5557464", "0.55573773", "0.5557368", "0.5556211", "0.5553562", "0.5553562", "0.5550838", "0.5547734", "0.55374104", "0.5515613", "0.55151653", "0.55018795", "0.54753083", "0.54703957", "0.5455548", "0.545477", "0.545477", "0.5454737", "0.5444411", "0.54431814", "0.54288423", "0.54248196", "0.5420794", "0.5412734", "0.5403949", "0.5391404", "0.5383089", "0.53812695", "0.5379918", "0.5376007", "0.53684044", "0.53670543", "0.53640664", "0.5357831", "0.5357831", "0.5357168", "0.5336881", "0.5324908", "0.53248304", "0.5318147", "0.5318147", "0.5311434", "0.5307197", "0.5306843", "0.530213" ]
0.5825516
20
Two players are equal if they have the same username
@Override public boolean equals(Object other) { if(this == other) return true; if(other instanceof Player) return this.hashCode() == other.hashCode(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean equals(Object object) {\n if (this == object) return true;\n if (!(object instanceof Player)) return false;\n Player player = (Player) object;\n return getId().equals(player.getId()) &&\n username.equals(player.username);\n }", "@Test\n\tpublic void test_equals2() {\n\tTennisPlayer c1 = new TennisPlayer(11,\"Joe Tsonga\");\n\tTennisPlayer c2 = new TennisPlayer(521,\"Joe Tsonga\");\n\tassertFalse(c1.equals(c2));\n }", "@Test\n\tpublic void test_equals1() {\n\tTennisPlayer c1 = new TennisPlayer(11,\"Joe Tsonga\");\n\tTennisPlayer c2 = new TennisPlayer(11,\"Joe Tsonga\");\n\tassertTrue(c1.equals(c2));\n }", "public boolean equals(User other) {\n return (username.equals(other.username));\n }", "private boolean isEqual(Roster r2)\n\t{\n\t\tIterator<Player> it1 = iterator();\n\t\twhile(it1.hasNext())\n\t\t{\n\t\t\tPlayer p = it1.next();\n\t\t\tif(!r2.has(p))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tIterator<Player> it2 = r2.iterator();\n\t\twhile(it2.hasNext())\n\t\t{\n\t\t\tPlayer p = it2.next();\n\t\t\tif(!has(p))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean duplicatedUsername(String username);", "@Test\n public void equalsTrueMySelf() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n assertTrue(player1.equals(player1));\n assertTrue(player1.hashCode() == player1.hashCode());\n }", "@Override\n public boolean equals(Object otherPlayer) {\n return otherPlayer != null && mName.contentEquals(((Player)otherPlayer).mName);\n }", "public int compare(Player a1, Player a2) {\r\n\t\t\t\treturn a1.getUserName().compareTo(a2.getUserName());\r\n\t\t\t}", "@Test\n public void equals2() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 1);\n SmartPlayer y = new SmartPlayer(0, 2);\n assertFalse(x.equals(y));\n }", "public boolean betterEquals(Object obj)\n\t{\n\t\tif (obj instanceof Player)\n\t\t{\n\t\t\tPlayer other = (Player) obj;\n\t\t\treturn this.name.equals(other.name) && this.pawn == other.pawn;\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n public boolean equals(Object o) {\r\n if (this == o) return true;\r\n if (o == null || getClass() != o.getClass()) return false;\r\n\r\n Player player = (Player) o;\r\n\r\n return name.equals(player.getName());\r\n }", "@Test\n public final void testPlayer2Win() {\n checkPlayerWin(player2);\n }", "@Test\n public void equals() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 0);\n SmartPlayer y = new SmartPlayer(0, 0);\n assertTrue(x.equals(y));\n }", "@Test\n public final void testPlayer1Win() {\n checkPlayerWin(player1);\n }", "private void assignPlayerNames() {\n\t\tSystem.out.print(\"What is the name of the first player? \");\n\t\tplayer1.setName(sc.nextLine());\n\n\t\t// Read the second player's name\n\t\tSystem.out.print(\"What is the name of the second player? \");\n\t\tplayer2.setName(sc.nextLine());\n\n\t\twhile (player2.getName().toLowerCase()\n\t\t\t\t.equals(player1.getName().toLowerCase())) {\n\t\t\tSystem.out.print(\"Both players cannot be named \"\n\t\t\t\t\t+ player2.getName() + \".\" + \" Enter a different name: \");\n\t\t\tplayer2.setName(sc.nextLine());\n\t\t}\n\t}", "public boolean equals (Object o){\n if (o == this) {\n return true;\n }\n if (!(o instanceof Player)) {\n return false;\n }\n Player other = (Player) o;\n return this.name == other.name;\n }", "public boolean equals(Player player){\n\t\treturn this.jid.equals(player.getJid());\n\t}", "@Test\n public void equalsFalseDifferentColor() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n Player player2 = new Player(PlayerColor.WHITE, \"\");\n assertFalse(player1.equals(player2));\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Member1)) {\r\n return false;\r\n }\r\n Member1 other = (Member1) object;\r\n if ((this.username == null && other.username != null) || (this.username != null && !this.username.equals(other.username))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public synchronized boolean login(String username) throws RemoteException {\n Player p = getPlayer(username);\n if (p != null) {\n // El jugador ya esta conectado, entonces no puede conectarse de nuevo\n if (p.isOnline())\n return false;\n // Jugador estaba desconectado\n p.setOnline(true);\n return true;\n }\n // Jugador no existe, entonces lo agregamos a la partida\n else addNewPlayer(username).setOnline(true);\n return true;\n }", "public PlayerMatches(String player1, String player2) {\n this.player1 = player1;\n this.player2 = player2;\n }", "@Test\n public void equalsFalseOtherObject() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n String player2 = \"abcd\";\n assertFalse(player1.equals(player2));\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Memberpass)) {\n return false;\n }\n Memberpass other = (Memberpass) object;\n if ((this.username == null && other.username != null) || (this.username != null && !this.username.equals(other.username))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object other) {\n if (!(other instanceof Player)) {\n return false;\n }\n\n return (playerColor().equals(((Player) other).playerColor()));\n }", "@Override\n public boolean equals(Object obj) {\n if (!(obj instanceof User)) {\n return false;\n }\n\n User other = (User) obj;\n return username.equals(other.username);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n if (obj == this) { \n return true; \n } \n // Check if obj is an instance of Position or not \n if (!(obj instanceof Player)) { \n return false; \n } \n // Type cast obj to \"Player\" so that we can compare the name & side attributes \n Player p = (Player) obj; \n return ( this.name == p.getName() && this.side == p.getSide() ); \n }", "@Test\n public void testGetOtherPlayer2Player() {\n Player p = new Player();\n Player p2 = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n pL.add(p2);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n\n Player l = j.getOtherPlayer(p);\n\n assertEquals(\"Le player ne devrai pas etre le même que celui mis dans la fonction\", p2, l);\n }", "private boolean compareChatUsers(ID id1, ID id2) {\n IChatID cid1 = (IChatID) id1.getAdapter(IChatID.class);\n IChatID cid2 = (IChatID) id2.getAdapter(IChatID.class);\n if (cid1 == null || cid2 == null)\n return false;\n return (cid1.getUsername().equals(cid2.getUsername()) && cid1.getHostname().equals(cid2.getHostname()));\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Player)) {\n return false;\n }\n Player other = (Player) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Player)) {\n return false;\n }\n Player other = (Player) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj == null) \n\t\t\treturn false;\n\t\t\n\t\tif (!(obj instanceof Player))\n\t\t\treturn false;\n\t\t\n\t\tPlayer other = (Player) obj;\n\t\t\n\t\treturn this.getName().equals(other.getName());\n\t}", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof User)) {\n return false;\n }\n User that = (User) other;\n if (this.getIduser() != that.getIduser()) {\n return false;\n }\n return true;\n }", "boolean hasSameAs();", "@Test\n public void equalsFalseDifferentPiece() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n player1.addPiece(new Piece(PlayerColor.BLACK, 1));\n\n Player player2 = new Player(PlayerColor.BLACK, \"\");\n player2.addPiece(new Piece(PlayerColor.BLACK, 2));\n\n assertFalse(player1.equals(player2));\n }", "public boolean usernameMatches(Username username) {\n return this.credential.usernameEquals(username);\n }", "public boolean isPlayer1() {\n\t\treturn currentPlayer.equals(player1);\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Account)) {\n return false;\n }\n Account other = (Account) object;\n if ((this.username == null && other.username != null) || (this.username != null && !this.username.equals(other.username))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof User)) {\r\n return false;\r\n }\r\n User other = (User) object;\r\n if ((this.username == null && other.username != null) || (this.username != null && !this.username.equals(other.username))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof User)) {\r\n return false;\r\n }\r\n User other = (User) object;\r\n if ((this.username == null && other.username != null) || (this.username != null && !this.username.equals(other.username))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean equals(Object obj) {\r\n if (obj == null) {\r\n return false;\r\n }\r\n if (this == obj) {\r\n return true;\r\n }\r\n if (getClass() != obj.getClass()) {\r\n return false;\r\n }\r\n Soggetti other = (Soggetti) obj;\r\n if (username == null) {\r\n if (other.getUsername() != null) {\r\n return false;\r\n }\r\n } else if (!username.equals(other.getUsername())) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Users)) {\r\n return false;\r\n }\r\n Users other = (Users) object;\r\n if ((this.username == null && other.username != null) || (this.username != null && !this.username.equals(other.username))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean winOfJuggernaut(){\n\tString [] names=getJoueurs();\n\tfor(int i=0; i<players.size(); i++){\n\t if(i!=juggernaut && players.get(names[i])) return false;\n\t}\n\treturn true;\n }", "public boolean usernameMatches(Account a) {\n return usernameMatches(a.getCredential());\n }", "public boolean areOnSameTeam(UUID s1, UUID s2) {\n\t\tTeam team = plugin.getTeamManager().getPlayerTeam(s1);\n\t\tTeam warpeeTeam = plugin.getTeamManager().getPlayerTeam(s2);\n\n\t\tif (team == null || warpeeTeam == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (team != warpeeTeam)\n\t\t\treturn false;\n\n\t\tif (team == warpeeTeam)\n\t\t\treturn true;\n\t\treturn false;\n\n\t}", "public void setNames(){\n System.out.println();\n System.out.println(\"Welcome! Please set your username!\");\n for(int i = 0; i < players.size(); i ++){\n Player player = players.get(i);\n player.rename(\"Dealer Jack\");\n for(int j = 0; j < i; j ++){\n while(player.getName().equals(players.get(j).getName())){\n System.out.println(\"Username taken! Please enter another name!\");\n player.setName(\"player\" + (i + 1));\n player.rename(\"Dealer Jack\");\n }\n }\n }\n }", "@Override\n\t\tpublic boolean equals(Object other) {\n\t\t\tif (other instanceof IChatServer) { // make sure that other object is an IUser\n\t\t\t\ttry {\n\t\t\t\t\t// Equality of IUsers is same as equality of UUID's.\n\t\t\t\t\treturn stub.getUser().getId().equals(((IChatServer) other).getUser().getId());\n\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\t// Deal with the exception without throwing a RemoteException.\n\t\t\t\t\tSystem.err.println(\"ProxyUser.equals(): error getting UUID: \" + e);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t// Fall through and return false\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "@Test\n public void testGetOtherPlayer1Player() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n\n Player l = j.getOtherPlayer(p);\n\n assertEquals(\"Le player devrai etre le même\", p, l);\n }", "private boolean isSamePass(byte[] saved) {\n\t\t// They must have the same length.\n\t\tif ( generatedHash.length != saved.length ) return false;\n\n\t\t// Get the index where the salt starts for this user.\n\t\tint saltStart = getSaltStartIndex();\n\t\tint saltEnd = saltStart + SALT_LENGTH;\n\n\t\tfor ( int i = 0 ; i < generatedHash.length; i++ ) {\n\t\t\t// Before the salt, indexes must match up\n\t\t\tif ( i < saltStart ) if ( generatedHash[i] != saved[i] ) return false;\n\t\t\telse if ( i < saltEnd ) continue; // ignore the salt\n\t\t\telse if ( saved[i] != saved[i] ) return false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Player player = (Player) o;\n return id == player.id &&\n color == player.color;\n }", "@Test\n\tpublic void testEquals() {\n\t\tPMUser user = new PMUser(\"Smith\", \"John\", \"[email protected]\");\n\t\tPark a = new Park(\"name\", \"address\", user);\n\t\tPark b = new Park(\"name\", \"address\", user);\n\t\tPark c = new Park(\"name\", \"different address\", user);\n\t\tassertEquals(a, a);\n\t\tassertEquals(a, b);\n\t\tassertEquals(b, a);\n\t\tassertFalse(a.equals(c));\n\t}", "public String getPlayerTwoUserName() {\n if (gameStatus == null) return \"\";\n if (gameStatus.getPlayerTwoUserName() == null) return \"\";\n return gameStatus.getPlayerTwoUserName();\n }", "private List<String> validatePlayer(String playerName, CommandSender sender) {\n\n\t\tList<Player> players = new ArrayList<Player>();\n\t\tList<String> match = new ArrayList<String>();\n\n\t\tplayers = this.getServer().matchPlayer(playerName);\n\t\tif (players.isEmpty()) {\n\t\t\t// Check for an offline player (exact match).\n\t\t\tfor (OfflinePlayer player : Bukkit.getOfflinePlayers()) {\n\t\t\t\tif (player.getName().equals(playerName)) {\n\t\t\t\t\tmatch.add(player.getUniqueId().toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\tif (Arrays.asList(this.getServer().getOfflinePlayers()).contains(Bukkit.getOfflinePlayer(playerName))) {\n\t\t\t\tmatch.add(Bukkit.getOfflinePlayer(playerName).getName()); //.getUniqueId().toString());\n\t\t\t\t//match.add(Bukkit.getOfflinePlayer(Bukkit.getPlayer(playerName).getUniqueId()).getName()); //.getUniqueId().toString());\n\t\t\t} else {\n\t\t\t\t// look for partial matches\n\t\t\t\tfor (OfflinePlayer offline : this.getServer().getOfflinePlayers()) {\n\t\t\t\t\tif (offline.getName().toLowerCase().startsWith(playerName.toLowerCase()))\n\t\t\t\t\t\tmatch.add(offline.getName()); //.getUniqueId().toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n\n\t\t} else {\n\t\t\tfor (Player player : players) {\n\t\t\t\tmatch.add(player.getUniqueId().toString());\n\t\t\t}\n\t\t}\n\n\t\tif (match.isEmpty()) {\n\t\t\tsender.sendMessage(ChatColor.RED + \"Player not found!\");\n\t\t\treturn null;\n\t\t} else if (match.size() > 1) {\n\t\t\tsender.sendMessage(ChatColor.RED + \"Too many matches found! (\" + match.toString() + \")\");\n\t\t\treturn null;\n\t\t}\n\n\t\treturn match;\n\n\t}", "public boolean checkDuplicates(String tempName)\n\t{\n\t\tif (!hasPermission(\"staff\")\n\t\t\t&& !Moban.hasMatch(\"multok\", tempName, connSocket.getInetAddress().getHostName()))\n\t\t\tfor (UserCon cs : conns)\n\t\t\t{\n\t\t\t\tif (cs.hasPermission(\"staff\"))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (cs.host1.equals(connSocket.getInetAddress().getHostName())\n\t\t\t\t\t&& !cs.ch.name.equalsIgnoreCase(tempName)\n\t\t\t\t\t&& !Moban.hasMatch(\"multok\", cs.ch.name, cs.host1)\n\t\t\t\t\t&& !cs.hasPermission(\"staff\"))\n\t\t\t\t{\n\t\t\t\t\tsendln(\"Another character is already logged in from the same connection you're using.\");\n\t\t\t\t\tsendln(\"If you were playing on a character but were disconnected or did not quit using\");\n\t\t\t\t\tsendln(\"the 'quit' command, please log back on to that character and 'quit' before\");\n\t\t\t\t\tsendln(\"logging on with a different character.\");\n\t\t\t\t\tsendln(\"\");\n\t\t\t\t\tsendln(\"Note that multiplaying (using multiple characters at the same time) is not\");\n\t\t\t\t\tsendln(\"permitted on Agape. If there is more than one person at your connection who\");\n\t\t\t\t\tsendln(\"would like the play the game, please speak with a staff member.\");\n\t\t\t\t\tcloseSocket();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\tfor (UserCon cs : conns)\n\t\t\tif (cs.ch.name.equalsIgnoreCase(tempName) && cs != this)\n\t\t\t{\n\t\t\t\tconns.remove(cs);\n\t\t\t\twriting = cs.writing;\n\t\t\t\tch = cs.ch;\n\t\t\t\tch.conn = this;\n\t\t\t\tcs.sendln(\"This character has been logged on from a different connection.\");\n\t\t\t\tcs.sendln(\"If this message appears after no action on your part, you may\");\n\t\t\t\tcs.sendln(\"wish to change your password to prevent hacking attempts.\");\n\t\t\t\tsysLog(\"connections\", \"New connection for \"+tempName+\": Booting old connection.\");\n\t\t\t\tcs.closeSocket();\n\t\t\t\tbreak;\n\t\t\t}\n\t\treturn false;\n\t}", "public boolean areOnSameTeam(Player p1, Player p2) {\n\t\treturn areOnSameTeam(p1.getUniqueId(), p2.getUniqueId());\n\n\t}", "public boolean userDuplicateCheck(String username){\n ArrayList<User> users = new ArrayList<>(db.getAllUsers());\n\n for(User user : users){\n if(user.getUsername().equals(username)){\n return false;\n }\n }\n return true;\n }", "public PlayerMatches(String player1) {\n this.player1 = player1;\n }", "public void setPlayer2Name(String name){\n player2 = name;\n }", "@Override\n public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n final User other = (User) obj;\n if (this.id != other.id) {\n return false;\n }\n if (!Objects.equals(this.name, other.name)) {\n return false;\n }\n /*\n if (!Objects.equals(this.cash, other.cash)) {\n return false;\n }\n if (!Objects.equals(this.skills, other.skills)) {\n return false;\n }\n if (!Objects.equals(this.potions, other.potions)) {\n return false;\n }*/\n \n if(!this.cash.getValue().equals(other.cash.getValue())){\n return false;\n }\n \n for (int i = 0; i < this.skills.size(); i++) {\n if(!this.skills.get(i).getValue().equals(other.skills.get(i).getValue())){\n return false;\n }\n\t}\n \n for (int i = 0; i < this.potions.size(); i++) {\n if(!this.potions.get(i).getValue().equals(other.potions.get(i).getValue())){\n return false;\n }\n\t}\n \n return true;\n }", "private void getPlayers() {\r\n\t\tSystem.out.println(\"How Many Players: \");\r\n\t\tpnum = getNumber(1, 3);\r\n\r\n\t\tfor(int i=0; i < pnum; i++){\r\n\t\t\tSystem.out.println(\"What is player \" + (i + 1) + \"'s name? \");\r\n\t\t\tString name = sc.next();\r\n\t\t\tboolean dupe = true;\r\n\t\t\twhile(dupe){\r\n\t\t\t\tint samecounter = 0;\r\n\t\t\t\tfor(Player p : players){\r\n\t\t\t\t\tif(name.equals(p.getName())){\r\n\t\t\t\t\t\tsamecounter += 1;\r\n\t\t\t\t\t\tSystem.out.println(\"Name is the same as another players. Please choose another name: \");\r\n\t\t\t\t\t\tname = sc.next();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(samecounter == 0){\r\n\t\t\t\t\tdupe = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tplayers.add(new Player(name));\r\n\r\n\t\t}\r\n\t}", "@Override\n public boolean equals(@Nullable final Object obj) {\n return obj instanceof Player && pseudo.equals(((Player) obj).pseudo);\n }", "public boolean versus(Player player1, Player player2, Player player3) {\n Card player1FaceCard = player1.getHand().removeCardFromTop();\n Card player2FaceCard = player2.getHand().removeCardFromTop();\n Card player3FaceCard = player3.getHand().removeCardFromTop();\n if (player1FaceCard == null || player2FaceCard == null || player3FaceCard == null)\n return false;\n // modifyPile(pile, player1FaceCard, player2FaceCard, player3FaceCard);\n return compareAllPlayers(player1FaceCard, player2FaceCard, player3FaceCard);\n }", "public boolean isWinner(ArrayList<Player> allPlayers,Player player){\n\t\tPlayer winner=player;\n\t\tfor (Player p : allPlayers) {\n\t\t\tif(p.getTimeStamp()>winner.getTimeStamp()){\n\t\t\t\twinner = p;\n\t\t\t}\n\t\t}\n\t\treturn winner.equals(player);\n\t}", "@Override\n\tpublic boolean checkUsername(String userName) {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tStatement userCheck = connectionService.getConnection().createStatement();\n\t\t\t//userCheck.executeQuery(\"SELECT name FROM players WHERE name='\" + userName + \"';\");\n\t\t\t\n\t\t\tResultSet rs = userCheck.executeQuery(\"SELECT username FROM players WHERE username='\" + userName + \"';\");\n\t\t\t\n\t\t\tif (rs.next()) {\n\t\t\t\t\n\t\t\t\t//if (!rs.getString(\"\")\n\t\t\t\t\t\n\t\t\t\t\t//connectionService.finalize();\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t//connectionService.finalize();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"Exception: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t\t\n\t\t}\n\t}", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n if (!(other instanceof LoggedInAccount)) {\n return false;\n }\n\n LoggedInAccount otherAccount = (LoggedInAccount) other;\n return (otherAccount.getUsername().fullUsername.toLowerCase()).equals(getUsername().fullUsername.toLowerCase());\n }", "private boolean isOneUserName(String username){\r\n\t\tfor(int i = 0; i < users.size(); i++){\r\n\t\t\tif(users.get(i).username.equalsIgnoreCase(username)){\r\n\t\t\t\tSystem.out.println(\"Sorry the Username is already taken\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void switchPlayer() {\r\n\t\tif (player == player1) {\r\n\t\t\tplayer = player2;\r\n\t\t} else {\r\n\t\t\tplayer = player1;\r\n\t\t}\r\n\t}", "private boolean duplicationCheck(String userName) {\n\t\tboolean ret = true;\n\t\tif(obs.isEmpty()) {\n\t\t\tret = true;\n\t\t}\n\t\telse {\n\t\t\tfor(int i=0; i<obs.size(); i++) {\n\t\t\t\tif(obs.get(i).getUserName().compareTo(userName) == 0) {\n\t\t\t\t\tret = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tret = true;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "@Test\r\n\tpublic void testDetermineMatchWinner2() {\n\t\tassertTrue(\"Error determining correct winner\", false);\r\n\t\t//Check that player records have been updated correctly\r\n\t\tassertTrue(\"Error updating player records\", false);\r\n\t}", "boolean hasPlayer(String player);", "private boolean checkUsername(String newUsername, Label label)\n {\n label.setText(\"\");\n\n if(newUsername.length() == 0){\n label.setText(\"Please choose a username \");\n return false;\n }\n for(Account account : getListOfAccounts()){\n if(newUsername.equals(account.getUsername())){\n label.setText(\"This field is already taken by another account. Please choose another username\");\n return false;\n }\n }\n return true;\n }", "@Test\n public void testEqualsIdentical() {\n int userID = 0;\n int[] pref = new int[11];\n int[] health = new int[9];\n int[] diet = new int[5];\n int[] meal = new int[3];\n UserProfile up2 = new UserProfile(userID, pref, health, diet, meal);\n assertEquals(up, up2);\n }", "public int checkPlayerInPlayers(String username) throws IOException{\r\n\t\tScanner userFinder = new Scanner(new BufferedReader(new FileReader(\"players.txt\")));\r\n\t\tint numberOfPlayers = userFinder.nextInt(); // read in number of players (first line in file);\r\n\t\tint playerId = -1; // should return -1 if numberOfPlayers is 0\r\n\t\tString playerName;\r\n\t\tboolean found = false;\r\n\t\tint iteration = 0;\r\n\t\t\r\n\t\twhile((iteration < numberOfPlayers) && (!found)) {\r\n\t\t\tplayerId = userFinder.nextInt();\r\n\t\t\tplayerName = userFinder.next();\r\n\t\t\tif(playerName.equals(username) == true) {\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\titeration++;\r\n\t\t\t\tplayerId = -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tuserFinder.close();\r\n\t\treturn playerId;\r\n\t}", "boolean hasSendPlayerName();", "private boolean compararNombreUsuario () {\n\t\tlistaUsuarios = UsuarioDAO.readTodos(this.mainApp.getConnection());\n\t\tString nombre = this.campoTextoNombreUsuario.getText();\n\t\tfor (Usuario nombres : listaUsuarios) {\n\t\t\tif (nombres.getUsuario().equals(nombre)) {\n\t\t\t\treturn false;\n\t\t\t}//FIN IF\n\t\t}//FIN FOR\n\t\treturn true;\n\t}", "public StandardPlayer matchPlayer(String username) {\n\t\tStandardPlayer player = null;\n\n\t\tString usernameLower = username.toLowerCase();\n\n\t\tfor (StandardPlayer onlinePlayer : getOnlinePlayers()) {\n\t\t\tif (onlinePlayer.getDisplayName(false).toLowerCase().startsWith(usernameLower) ||\n\t\t\t\t\tonlinePlayer.getName().toLowerCase().startsWith(usernameLower)) {\n\t\t\t\t// Return a player with a display name that directly matches the query\n\t\t\t\tif (onlinePlayer.getDisplayName(false).equalsIgnoreCase(usernameLower) ||\n\t\t\t\t\t\tonlinePlayer.getName().equalsIgnoreCase(usernameLower)) {\n\t\t\t\t\treturn onlinePlayer;\n\t\t\t\t}\n\n\t\t\t\t// Otherwise find the shortest length player name that the query is a prefix to\n\t\t\t\tif (player == null || onlinePlayer.getDisplayName(false).length() < player.getDisplayName(false).length()) {\n\t\t\t\t\tplayer = onlinePlayer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (player == null) {\n\t\t\tplayer = getStandardPlayer(username);\n\t\t\tif (!player.hasPlayedBefore()) {\n\t\t\t\tplayer = null;\n\t\t\t}\n\t\t}\n\n\t\treturn player;\n\t}", "public void checkUserName(String userName, String playerType) throws Exception{\r\n\t\t\r\n\t\tboolean check = false;\r\n\t\tSystem.out.println(\"Checking Username\");\r\n\t\tFile file = new File(filePath);\r\n\t\tif(file.exists()) {\r\n\t\t\tScanner in = new Scanner(file);\r\n\t\t\t//if a user with the same name is found, then choose different name\r\n\t\t\twhile(in.hasNextLine()) {\r\n\t\t\t\tif(userName.equals(in.nextLine())){\r\n\t\t\t\t\t\r\n\t\t\t\t\tcheck = true;\r\n\t\t\t\t\tSystem.out.println(\"Username found\");\r\n\t\t\t\t\tsetuName(userName);\r\n\t\t\t\t\tif(Main.playerNum == 2)\r\n\t\t\t\t\t\tMain.resultLabel2.setText(userName);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tMain.resultLabel1.setText(userName);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\tsetNameSame(check, userName, playerType) ;\r\n\t}", "@Test\n public void testSameUser() {\n LocalUserManager ua = new LocalUserManager();\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"[email protected]\", \"George\", \"Burdell\", \"MANAGER\");\n ua.createUser(\"gburdell2\", \"ramblin\", \"[email protected]\", \"G\", \"B\", \"USER\");\n } catch (Exception e) {\n Assert.assertEquals(1, ua.getUsers().size());\n return;\n }\n Assert.fail();\n }", "@Override\r\n\tpublic boolean equals(Object anObject) {\r\n\t\tboolean result = false;\r\n\t\ttry {\r\n\t\t\tUserDTO anUserDTO = (UserDTO) anObject;\r\n\t\t\tresult = anUserDTO.getUsername().equals(this.getUsername());\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "private boolean inSameSuit() {\n for (int i = 0; i < cards.length-2; i++) {\n if (cards[i].charAt(1) != cards[i + 1].charAt(1)) {\n return false;\n }\n }\n \n return true;\n }", "@Test\n public void same_player_name() {\n //Arrange scenario\n //same player name\n Player other = new Player(\"Name\");\n final TemplateEngineTester testHelper = new TemplateEngineTester();\n //Add a player to a new empty lobby\n when(request.queryParams(\"id\")).thenReturn(\"Name\");\n Player player = new Player(request.queryParams(\"id\"));\n // To analyze what the Route created in the View-Model map you need\n // to be able to extract the argument to the TemplateEngine.render method.\n // Mock up the 'render' method by supplying a Mockito 'Answer' object\n // that captures the ModelAndView data passed to the template engine\n when(templateEngine.render(any(ModelAndView.class))).thenAnswer(testHelper.makeAnswer());\n\n // Invoke the test\n CuT.handle(request, response);\n\n //Check if names are equal\n assertEquals(player,other);\n }", "private static void testPlayer() {\r\n\t\t\tnew AccessChecker(Player.class).pM(\"getName\").pM(\"getMark\").pM(\"toString\").checkAll();\r\n\t\t\tPlayer p = new Player(\"Test\", 'X');\r\n\t\t\tcheckEq(p.getName(), \"Test\", \"Player.getName\");\r\n\t\t\tcheckEq(p.getMark(), 'X', \"Player.getMark\");\r\n\t\t\tcheckEqStr(p, \"Test(X)\", \"Player.toString\");\t\t\r\n\t\t}", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Users)) {\r\n return false;\r\n }\r\n Users other = (Users) object;\r\n if ((this.usersname == null && other.usersname != null) || (this.usersname != null && !this.usersname.equals(other.usersname))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public static boolean areIdentical(OfflinePlayer player, OfflinePlayer compareTo) {\n return getIdentificationForAsString(player).equals(getIdentificationForAsString(compareTo));\n }", "public boolean isSameAccount(BankAccount account1, BankAccount account2){\n return account1.accountName == account2.accountName;\n }", "public boolean playerExists(String username) {\n return getPlayer(username) != null;\n }", "private boolean isPlayerNameFreeToUse(String clientName){\n\t\tfor (Player p : getPlayerMap().values()) {\n\t\t\tif(p.getName().equals(clientName)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public void setPlayer1Name(String name){\n player1 = name;\n }", "@Test\n public void equals_DifferentUserId_Test() {\n Assert.assertFalse(bq1.equals(bq2));\n }", "@Override\n\tpublic boolean equals(Object u)\n\t{\n\t\tif(this.getPassword() == null || ((User) u).getPassword() == null)\n\t\t{\n\t\t\t// a user does not have a password so just compare the usernames\n\t\t\treturn this.getUsername().equals(((User) u).getUsername());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// both users have passwords so compare by username and password\n\t\t\treturn this.getUsername().equals(((User) u).getUsername()) && this.getPassword().equals(((User) u).getPassword());\n\t\t}\n\t}", "public Player_ex1(String playerName){\n this.name = playerName;\n winner = false;\n }", "private String readWhoPlaysFirst () {\n String name, player1Name, player2Name;\n name = \"\";\n player1Name = player1.name();\n player2Name = player2.name();\n while (!(name.equals(player1Name.toLowerCase()) ||\n name.equals(player2Name.toLowerCase()) )) {\n System.out.print(\n \"Who plays first? (\" + player1Name +\n \" or \" + player2Name + \"): \");\n System.out.flush();\n name = in.next();\n name = name.toLowerCase();\n in.nextLine();\n }\n if (name.equals(player1Name.toLowerCase()))\n return player1Name;\n else\n return player2Name;\n }", "@Override\n\tpublic int compareTo(Player other) {\n\t\tif (lastName.equals(other.getLastName())) {\n\t\t\tif (firstName.equals(other.getFirstName()))\n\t\t\t\treturn 0;\n\t\t\telse {\n\t\t\t\treturn firstName.compareTo(other.getFirstName());\n\t\t\t}\n\t\t} else\n\t\t\treturn lastName.compareTo(other.getLastName());\n\t}", "private static boolean comparePlayerPosition(RSTile tile) {\n RSTile player_position = Player07.getPosition();\n if (tile == null || player_position == null) {\n return false;\n }\n return tile.equals(player_position);\n }", "public String getPlayerName(){\n return player1Score > player2Score ? player1Name : player2Name;\n }", "public boolean isWinner(String username) {\n Player p = getPlayer(username);\n // Winner!\n return p != null && p.getScore() >= MyConstants.POINTS_TO_WIN;\n }", "@Test\r\n\tpublic void testDetermineMatchWinner1() {\n\t\tassertTrue(\"Error determining correct winner\", false);\r\n\t\t//Check that player records have been updated correctly\r\n\t\tassertTrue(\"Error updating player records\", false);\r\n\t}", "public boolean isEqual(Object objectname1, Object objectname2, Class<?> voClass) {\n\t\treturn false;\n\t}", "default boolean isOpponent(Player player, UUID playerToCheckId) {\n return !player.getId().equals(playerToCheckId);\n }", "int otherPlayer(int player) {\n switch (player) {\n case 0: return 1;\n case 1: return 0;\n default: return 0;\n }\n }" ]
[ "0.68311167", "0.6804733", "0.6699288", "0.65890926", "0.6557292", "0.6501373", "0.64886665", "0.64153445", "0.6399236", "0.6384528", "0.63821477", "0.6360892", "0.6360412", "0.63545394", "0.6310675", "0.630431", "0.6290351", "0.6270375", "0.6204732", "0.6196866", "0.6177596", "0.616701", "0.6129946", "0.6091571", "0.60869694", "0.60637164", "0.605594", "0.6052836", "0.6049978", "0.604652", "0.604652", "0.60443056", "0.60120803", "0.6005212", "0.5998081", "0.5984971", "0.5956504", "0.59528226", "0.59506243", "0.59506243", "0.594909", "0.5946551", "0.59133786", "0.5904268", "0.5900859", "0.5883096", "0.58539915", "0.58330023", "0.5801611", "0.57951957", "0.5791884", "0.5789911", "0.57854146", "0.57768947", "0.57754326", "0.576786", "0.5766701", "0.5744989", "0.5739973", "0.57376945", "0.57367873", "0.573422", "0.5714771", "0.5711545", "0.5709991", "0.5705654", "0.5697823", "0.56878895", "0.56852037", "0.5677737", "0.567394", "0.567302", "0.5671597", "0.56667787", "0.5661572", "0.56598455", "0.5656272", "0.5648385", "0.56480247", "0.56417537", "0.5619705", "0.5610261", "0.56102026", "0.56054556", "0.5603664", "0.559496", "0.5581923", "0.55817634", "0.5575689", "0.5575624", "0.55674", "0.55665725", "0.55648506", "0.5549165", "0.5546025", "0.55381", "0.5535365", "0.5529394", "0.55155367", "0.5509295" ]
0.6493667
6
Add the given badge to the players list of badges. If the player has an easy badge and the hard badge is added, then the easy badge is removed first.
public void addBadge(Badge badge) { if(badge == Badge.HARD_AI_DEFEATED) { badges.remove(Badge.EASY_AI_DEFEATED); if(!badges.contains(Badge.HARD_AI_DEFEATED)) badges.add(Badge.HARD_AI_DEFEATED); } if(badge == Badge.EASY_AI_DEFEATED && !badges.contains(Badge.HARD_AI_DEFEATED)) if(!badges.contains(Badge.EASY_AI_DEFEATED)) badges.add(badge); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addBadge(int num)\n\t{\n\t\tif(num >= 0 && num < m_badges.length)\n\t\t{\n\t\t\tm_badges[num] = 1;\n\t\t\tServerMessage message = new ServerMessage(ClientPacket.BADGES_PACKET);\n\t\t\tmessage.addInt(1);\n\t\t\tmessage.addInt(num);\n\t\t\tgetSession().Send(message);\n\t\t}\n\t}", "public abstract BossBar addPlayer(UUID player);", "public void addAwardKillerNotDead() {\n\t\tfor (int i = 0; i < killers.size(); i++) {\n\t\t\tif (killerHasNotDeath(killers.get(i).getName())) {\n\t\t\t\tint awards = killers.get(i).getAwardMatchWithoutDeath();\n\t\t\t\tkillers.get(i).setAwardMatchWithoutDeath(awards + 1);\n\t\t\t}\n\n\t\t}\n\t}", "public boolean addPlayerItem(PlayerItem playerItem);", "public void addPlayer(HeroClass newJob){job.add(newJob);}", "@Override\n public ResponseEntity<Badge> createBadge(@ApiParam(value = \"\" ,required=true ) @RequestBody BadgeNoId badge,\n @ApiParam(value = \"\" ,required=true ) @RequestHeader(value=\"apiKey\", required=true) String apiKey) {\n ApplicationEntity app = applicationRepository.findByApplicationName(apiKey);\n if (app == null) {\n return ResponseEntity.notFound().build();\n }\n BadgeEntity newBadgeEntity = toBadgeEntityNoId(badge);\n newBadgeEntity.setApplication(app);\n // Control if the badge already exist for this application\n if (badgeRepository.findByBadgeNameAndApplicationApplicationName(newBadgeEntity.getBadgeName(), apiKey) != null) {\n return ResponseEntity.status(409).build();\n }\n badgeRepository.save(newBadgeEntity);\n\n // Get the badge and build the response content of this badge from his new link with id\n URI location = ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\")\n .buildAndExpand(newBadgeEntity.getBadgeId()).toUri();\n return ResponseEntity.created(location).build();\n }", "public void addDamageHate(final L2Character attacker, final int damage, int aggro)\n\t{\n\t\tif (attacker == null /* || aggroList == null */)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Get the AggroInfo of the attacker L2Character from the aggroList of the L2Attackable\n\t\tAggroInfoHolder ai = getAggroListRP().get(attacker);\n\t\t\n\t\tif (ai == null)\n\t\t{\n\t\t\tai = new AggroInfoHolder(attacker);\n\t\t\tai.init();\n\t\t\tgetAggroListRP().put(attacker, ai);\n\t\t}\n\t\t\n\t\t// If aggro is negative, its comming from SEE_SPELL, buffs use constant 150\n\t\tif (aggro < 0)\n\t\t{\n\t\t\tai.decHate(aggro * 150 / (getLevel() + 7));\n\t\t\taggro = -aggro;\n\t\t}\n\t\t// if damage == 0 -> this is case of adding only to aggro list, dont apply formula on it\n\t\telse if (damage == 0)\n\t\t{\n\t\t\tai.incHate(aggro);\n\t\t\t// else its damage that must be added using constant 100\n\t\t}\n\t\telse\n\t\t{\n\t\t\tai.incHate(aggro * 100 / (getLevel() + 7));\n\t\t}\n\t\t\n\t\t// Add new damage and aggro (=damage) to the AggroInfo object\n\t\tai.incDmg(damage);\n\t\t\n\t\t// Set the intention to the L2Attackable to AI_INTENTION_ACTIVE\n\t\tif (getAI() != null && aggro > 0 && getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE)\n\t\t{\n\t\t\tgetAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);\n\t\t}\n\t\t\n\t\tai = null;\n\t\t// Notify the L2Attackable AI with EVT_ATTACKED\n\t\tif (damage > 0)\n\t\t{\n\t\t\tif (getAI() != null)\n\t\t\t{\n\t\t\t\tgetAI().notifyEvent(CtrlEvent.EVT_ATTACKED, attacker);\n\t\t\t}\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (attacker instanceof L2PcInstance || attacker instanceof L2Summon)\n\t\t\t\t{\n\t\t\t\t\tL2PcInstance player = attacker instanceof L2PcInstance ? (L2PcInstance) attacker : ((L2Summon) attacker).getOwner();\n\t\t\t\t\t\n\t\t\t\t\tfor (final Quest quest : getTemplate().getEventQuests(Quest.QuestEventType.ON_ATTACK))\n\t\t\t\t\t{\n\t\t\t\t\t\tquest.notifyAttack(this, player, damage, attacker instanceof L2Summon);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tplayer = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (final Exception e)\n\t\t\t{\n\t\t\t\tLOGGER.error(\"\", e);\n\t\t\t}\n\t\t}\n\t}", "public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif (gameObj[1].size() == 0)\n\t\t{\n\t\t\tgameObj[1].add(new PlayerShip());\n\t\t\tSystem.out.println(\"PlayerShip added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t}\n\t\t\n\t}", "public Builder setBadgeBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000100;\n badge_ = value;\n onChanged();\n return this;\n }", "public Builder setBadge(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000100;\n badge_ = value;\n onChanged();\n return this;\n }", "public void addWeapon(Pair<Byte,Short> weapon){\n //Total number of weapons player can carry is 5 (inc. default weapon)\n //If player has <3 weapons, simply add weapon.\n //Otherwise, first remove oldest weapon in inventory then add at that\n //position.\n //oldest weapon tracked by linked list of weapon entries.\n if(this.weapons.size() < 3) {\n this.weapons.add(weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n }else{\n //Checks for duplicates, if duplicate weapons\n //found, new weapons ammo is just added to the current\n //weapon already in inventory\n for(Pair<Byte,Short> w : this.weapons){\n if(Objects.equals(w.getKey(), weapon.getKey())){\n if(weaponEntryTracker.size() == 1){\n weaponEntryTracker = new LinkedList<>();\n }\n else{\n for(int tracker : weaponEntryTracker){\n if(tracker == this.weapons.indexOf(w)){\n weaponEntryTracker.remove((Integer) tracker);\n }\n }\n }\n Pair<Byte,Short> newWeapon = new Pair<>(weapon.getKey(), (short) (w.getValue()+weapon.getValue()));\n if(this.currentWeapon == w){\n this.setCurrentWeapon(newWeapon);\n }\n this.weapons.set(this.weapons.indexOf(w),newWeapon);\n weaponEntryTracker.add((byte) this.weapons.indexOf(newWeapon));\n return;\n }\n }\n //check for any no weapon entries - indicates\n //player dropped weapon.\n for(Pair<Byte,Short> w : this.weapons){\n if(w.getKey() == NO_WEAPON_ID){\n this.weapons.set(this.weapons.indexOf(w),weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n return;\n }\n }\n //If no null entries are found, remove oldest weapon\n int oldestWeapon = this.weaponEntryTracker.poll();\n byte oldestWeaponKey = this.weapons.get(oldestWeapon).getKey();\n this.weapons.set(oldestWeapon, weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n if(oldestWeaponKey == currentWeapon.getKey()){\n setCurrentWeapon(weapon);\n }\n\n }\n }", "public void addGold(int g){\n this.gold += g;\n }", "public void addChosenGod(ReducedGod god){\n chosenGods.add(god);\n selectedCount++;\n if(selectedCount == playersCount){\n notifyUiInteraction();\n }\n }", "public void createNewPlayer()\n\t{\n\t\t// Set up all badges.\n\t\tm_badges = new byte[42];\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tm_badges[i] = 0;\n\t\tm_isMuted = false;\n\t}", "public void updateClientBadges()\n\t{\n\t\tString data = \"\";\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tdata += m_badges[i];\n\t\tServerMessage message = new ServerMessage(ClientPacket.BADGES_PACKET);\n\t\tmessage.addInt(0);\n\t\tmessage.addString(data);\n\t\tgetSession().Send(message);\n\t}", "public void addPenaltiTeamB(View view) {\n penaltiTeamB = penaltiTeamB + 1;\n displayPenaltiTeamB(penaltiTeamB);\n }", "public boolean hasBadge(int badge)\n\t{\n\t\treturn m_badges[badge] == 1;\n\t}", "public void addGuess(Player player, String guess) {\n\t\t// dont to add guesses when win or lose occurs\n\t\tif (checkWinner(player) || checkLoser(player)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// add guess if number of current guesses is less than max guesses\n\t\tif (player != null && player.getTotalGuesses() < MAX_GUESSES) {\n\t\t\tplayer.addGuess(guess);\n\t\t\tguesses.add(guess);\n\t\t}\n\t\t\n\t\t// if guess equals secret code then player wins\n\t\tif (checkGuessEqual(guess)) {\n\t\t\tsetPlayerWon(true);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// if the 4th present guess is incorrect, player loses\n\t\tif (player.getTotalGuesses() >= MAX_GUESSES && checkGuessEqual(guess) == false) {\n\t\t\tsetPlayerLost(true);\n\t\t\treturn;\n\t\t}\n\t}", "java.lang.String getBadge();", "@Override\n public void addToGame(GameLevel g) {\n if (g != null) {\n g.addSprite(this);\n g.getBallCounter().increase(1);\n }\n }", "public void addNewPlayer(Player p) {\n\t\t// if the player don't exists in the highscore list the player is added\n\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\tif(highscore.get(p.getName()) == null) {\n\t\t\t\thighscore.put(p.getName(), 0);\n\t\t\t}\n\t\t}\n\t\tthis.playerList.add(p); \n\t}", "@Override\n public ResponseEntity<Object> editBadge(@ApiParam(value = \"badge with his new content\" ,required=true ) @RequestBody Badge badge,\n @ApiParam(value = \"\" ,required=true ) @RequestHeader(value=\"apiKey\", required=true) String apiKey) {\n if (toBadgeEntity(badge) == null) {\n return ResponseEntity.notFound().build();\n }\n\n ApplicationEntity app = applicationRepository.findByApplicationName(apiKey);\n if (app == null) {\n return ResponseEntity.notFound().build();\n }\n\n // edit badge and send no content as response\n BadgeEntity badgeEntity = toBadgeEntity(badge);\n badgeEntity.setApplication(app);\n badgeRepository.save(badgeEntity);\n return ResponseEntity.accepted().build();\n }", "@Override\r\n\tpublic void add(Army garrison) {\r\n\t\tgarrison.addArtillery(1);\r\n\t}", "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "private void addPointsToPlayer(Player player, int marbleNum) {\n Long score = player.getScore();\n score += marbleNum;\n\n // add the score for the marble 7 places before\n Long value = (Long) placement.get(getMarbel7());\n score += value;\n\n player.setScore(score);\n }", "public void addPlayer(Player player){\n players.add(player);\n }", "public void setBadges(byte[] badges)\n\t{\n\t\tm_badges = badges;\n\t}", "@Override\n\tpublic void addGoal(Goal g) {\n\t\t\n\t}", "public void addGold(int goldToAdd)\n\t{\n\t\tgold += goldToAdd;\n\t}", "public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif(shipSpawned)\n\t\t{\n\t\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t\t\treturn;\n\t\t}\n\t\tgameObj.add(new PlayerShip(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Player ship added\");\n\t\tshipSpawned = true;\n\t\tnotifyObservers();\n\t}", "public com.google.protobuf.ByteString\n getBadgeBytes() {\n java.lang.Object ref = badge_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n badge_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void addAI(ArrayList<Player> list,String U,String F,String G) {\r\n\t\tboolean flag = true;\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\twhile (aa.hasNext()) {\r\n\t\t\tPlayer in = aa.next();\r\n\t\t\tif(in.getUserName().equals(U)){\r\n\t\t\t\tSystem.out.println(\"The player already exists.\");\r\n\t\t\t\tflag =false;\r\n\t\t\t\treturn;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif(flag)\r\n\t\t\tlist.add(new NimAIPlayer(U,F,G,0,0,\"AI\"));\r\n\t\tSystem.out.println(\"\");\r\n\t}", "public void addPotion() {\n setPotion(getPotion() + 1);\n }", "@Override\n public void addDamage(Player shooter, int damage) {\n if(!this.equals(shooter) && damage > 0) {\n int num=0;\n boolean isRage = false;\n Kill lastKill = null;\n List<PlayerColor> marksToBeRemoved = marks.stream().filter(m -> m == shooter.getColor()).collect(Collectors.toList());\n damage += marksToBeRemoved.size();\n marks.removeAll(marksToBeRemoved);\n\n if (this.damage.size() < 11) { //11\n for (int i = 0; i < damage; i++)\n this.damage.add(shooter.getColor());\n num = this.damage.size();\n if (num > 10) { //10\n this.deaths++;\n this.isDead = true;\n if (num > 11) {\n isRage = true;\n shooter.addThisTurnMarks(this, 1); //the shooter receive a mark in case of rage\n }\n if (game != null)\n game.addThisTurnKill(shooter, this, isRage);\n\n } else if (num > 5)\n this.adrenaline = AdrenalineLevel.SHOOTLEVEL;\n else if (num > 2)\n this.adrenaline = AdrenalineLevel.GRABLEVEL;\n } else if (this.damage.size() == 11 && damage > 0) { //11\n lastKill = game.getLastKill(this);\n lastKill.setRage(true);\n shooter.addThisTurnMarks(this, 1); //the shooter receive a mark in case of rage\n if(game != null)\n game.notifyRage(lastKill);\n }\n if (game != null)\n game.notifyDamage(this, shooter, damage, marksToBeRemoved.size());\n }\n }", "@Override\n public void addPlayer(Player player) {\n\n if(steadyPlayers.size()>0){\n PlayersMeetNotification.firePropertyChange(new PropertyChangeEvent(this, \"More than one Player in this Panel\",steadyPlayers,player));\n }\n steadyPlayers.add(player);\n\n }", "public void add(Good good) {\n cargo.add(good);\n numOfGoods++;\n }", "public void addToGame(GameLevel g) {\r\n for (Enemy e : enemies) {\r\n e.addToGame(g);\r\n }\r\n }", "public com.google.protobuf.ByteString\n getBadgeBytes() {\n java.lang.Object ref = badge_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n badge_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void addHealthLevel(int points)\n {\n healthLevel = healthLevel + points;\n showHealthLevel();\n if (healthLevel < 0) \n {\n Greenfoot.playSound(\"game-over.wav\");\n Greenfoot.stop();\n }\n }", "public void addPlayer(Player player) {\n playerList.add(player);\n }", "public synchronized void addPlayer(PlayerHandler player) {\n\n if (activePlayers < numMaxPlayers) {\n\n players[activePlayers] = player;\n System.out.println(player.getName() + \" added to game as player \" + (activePlayers + 1));\n activePlayers++;\n return;\n }\n\n System.out.println(\"This room (\" + this.toString() + \") is full\");\n }", "boolean hasBadge();", "void addGarage(Garage garage);", "public void addItemTrackBagging(Item item, boolean bool) {\n\t\tthis.purchaseList.setItemTrackBagging(item, bool);\n\t}", "public void addOneForTeamB(View v) {\n scoreTeamB = scoreTeamB + 1;\n displayForTeamB(scoreTeamB);\n }", "public void addOneForTeamB(View v) {\n scoreTeamB = scoreTeamB + 1;\n displayForTeamB(scoreTeamB);\n }", "public void addHerbalismExp(int exp)\n\t{\n\t\tm_oldLevel = getHerbalismLevel();\n\t\tm_skillHerbExp = m_skillHerbExp + exp;\n\t\tif(getHerbalismLevel() > m_oldLevel && getHerbalismLevel() <= 100)\n\t\t{\n\n\t\t}\n\t}", "private void addPlayerSheild() {\n this.playerShield += 1;\n }", "void addPlay(BowlingPlayVO play) throws IllegalPlayException;", "com.google.protobuf.ByteString\n getBadgeBytes();", "public void addUser(ArrayList<Player> list,String U,String F,String G) {\r\n\t\tboolean flag = true;\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\twhile (aa.hasNext()) {\r\n\t\t\tPlayer in = aa.next();\r\n\t\t\tif(in.getUserName().equals(U)){\r\n\t\t\t\tSystem.out.println(\"The player already exists.\");\r\n\t\t\t\tflag =false;\r\n\t\t\t\treturn;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\tif(flag)\r\n\t\t\tlist.add(new NimPlayer(U,F,G,0,0,\"Human\"));\r\n\t\tSystem.out.println(\"\");\r\n\t}", "public void giveWeapon(Weapon weapon) throws RuntimeException {\n if (weaponList.size() > 2)\n throw new RuntimeException(\"This player can't receive any more weapons\");\n weaponList.add(weapon);\n }", "public void drawHearts(Graphics g){\n \n if(player.getScore()>= 10000*heartScore ){\n hearts.add(new Heart());\n heartScore++;\n } \n \n for(int i=0; i<hearts.size(); i++){\n Heart currentHeart = hearts.get(i);\n boolean test = currentHeart.test(player.getX(), player.getY(), player.getW(), player.getH(),-5); \n //If touched add a life, if player has 3 lives, do nothing\n if(test){\n if(player.getLives()<3){\n player.addLife();\n }\n hearts.remove(currentHeart);\n \n } \n \n g.drawImage(currentHeart.getImage(), currentHeart.getX(), currentHeart.getY(), this); \n \n } \n \n }", "private void addCardsToCommunalPile() {\n for (int i = 0; i < playersInGame.size(); i++) {\n Player playerToPopCard = playersInGame.get(i);\n communalPile.add(playerToPopCard.popCard());\n }\n }", "public void addItem(Item item) {\n if (winner(item)) {\n listItems.add(item);\n }\n }", "public void addKillForPlayer(Player player) {\n\t\tincrementProperty(player, StatsProperty.KILLS);\n\t}", "void addPlayer(Player newPlayer);", "public void addMoneytoPurse(Player player, double winnings) {\n player.addMoneyToPurse(winnings);\n }", "public abstract void addGold(int gold);", "public Player(String name) {\n this.name = name;\n this.badges = new LinkedList<>();\n }", "private void updateBadge() {\n badgeDrawable.setNumber((inbox == null) ? 0 : inbox.getCountUnread());\n }", "@Override\n\tpublic void add(Game game) {\n\t\t\n\t}", "protected abstract void addBonusToShip(Ship ship);", "public void addKill(ArenaPlayer player) {\n \t\tTeam t = getTeam(player);\n \t\tt.addKill(player);\n \t}", "public void addBomb(Bomb b){\r\n this.bombs.add(b);\r\n }", "public void addBreedingExp(int exp)\n\t{\n\t\tm_oldLevel = getBreedingLevel();\n\t\tm_skillBreedExp = m_skillBreedExp + exp;\n\t\tif(getBreedingLevel() > m_oldLevel)\n\t\t{\n\t\t\tServerMessage skillLevels = new ServerMessage(ClientPacket.SKILL_LVL_UP);\n\t\t\tskillLevels.addInt(getTrainingLevel());\n\t\t\tskillLevels.addInt(getBreedingLevel());\n\t\t\tskillLevels.addInt(getFishingLevel());\n\t\t\tskillLevels.addInt(getCoordinatingLevel());\n\t\t\tgetSession().Send(skillLevels);\n\t\t}\n\t}", "public void addBossKilled(final NPC npc) {\r\n\t\tif(!originalBosses.containsKey(npc.getName()))\r\n\t\t\toriginalBosses.put(npc.getName(), 1);\r\n\t\telse\r\n\t\t\toriginalBosses.put(npc.getName(), originalBosses.get(npc.getName()) + 1);\r\n\t\tif(originalBosses.get(npc.getName()) == C_O_R_Data.getKillsNeeded(npc.getName()))\r\n\t\t\tplayer.packets().sendMessage(\"You've unlocked the <col=ff0000>\"+npc.getName()+\"</col> barrier at the Cavern of Remembrance.\");\r\n\t}", "public boolean addGuppy(final Guppy guppy) {\n if (guppy == null) {\n return false;\n }\n guppiesInPool.add(guppy);\n return true;\n }", "public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }", "public void addFishingExp(int exp)\n\t{\n\t\tm_oldLevel = getFishingLevel();\n\t\tm_skillFishExp = m_skillFishExp + exp;\n\t\tif(getFishingLevel() > m_oldLevel)\n\t\t{\n\t\t\tServerMessage skillLevels = new ServerMessage(ClientPacket.SKILL_LVL_UP);\n\t\t\tskillLevels.addInt(getTrainingLevel());\n\t\t\tskillLevels.addInt(getBreedingLevel());\n\t\t\tskillLevels.addInt(getFishingLevel());\n\t\t\tskillLevels.addInt(getCoordinatingLevel());\n\t\t\tgetSession().Send(skillLevels);\n\t\t}\n\t}", "public void agregarGarage(Garage garage) {\n\t\tthis.garages.add(garage);\n\t}", "public void addBuddy(IAwarenessUser user) {\n\t\tgetBuddies().add(user);\n\t\tthis.createBuddyIcon(user);\n\t}", "public void drawFire(Graphics g){\n \n if(player.getScore()>= initScore+1000){\n fireRecord.add(new Fire());\n initScore+=1000;\n } \n \n for(int i=0; i<fireRecord.size(); i++){\n Fire current = fireRecord.get(i);\n boolean test = current.test(player.getX(), player.getY(), player.getW(), player.getH(),-5); \n if(!delay){\n if(test){\n player.loseLife();\n delay = true; //If player loses a life, become invulnerable for a short period of time\n }\n }\n \n if (moveCount%5000 == 0){ /// Delay after taking dmg\n delay = false;\n } \n \n if(moveCount%speedAdj==0){ //Adjust Speed\n current.addX();\n current.addY();\n }\n g.drawImage(current.getImage(), current.getX(), current.getY(), this); \n } \n }", "public static void handleBakePie(Player player) {\n\t\t\n\t}", "public boolean takePotionReward(){\n if(!isGameOver() || character.getHp() <= 0 )return false;\n if( potRewardGiven )return false;\n boolean isAdded = character.addPotion( reward.getPot() );\n potRewardGiven=true;\n return isAdded;\n }", "public void placeAlienBullet() {\r\n\t\tif (alien != null) {\r\n\t\t\t// If the alien is large fires a bullet in a random direction\r\n\t\t\tif (alien.getSize() == 1 && ship != null) {\r\n\r\n\t\t\t\t// Create the alien bullet\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\r\n\t\t\t\t// give the alien bullet a random direction and the bullet speed velocity,\r\n\t\t\t\t// then add as participant\r\n\t\t\t\tdouble r = (2 * Math.PI) * RANDOM.nextDouble();\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, r);\r\n\t\t\t\taddParticipant(ab);\r\n\r\n\t\t\t\t// Sets the alien bullet to expire when it reaches the bullet duration time\r\n\t\t\t\t// limit\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\r\n\t\t\t// If the alien is small fires a bullet aimed directly at the ship\r\n\t\t\tif (alien.getSize() == 0 && ship != null) {\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\t\t\t\tab.setSpeed(BULLET_SPEED);\r\n\r\n\t\t\t\t// Aims the alien bullet directly at the ship\r\n\t\t\t\tdouble A = ship.getY() - alien.getY();\r\n\t\t\t\tdouble B = ship.getX() - alien.getX();\r\n\t\t\t\tdouble angle = Math.atan2(A, B);\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, angle);\r\n\r\n\t\t\t\t// Add the alien bullet as a participant and then set it to expire when it\r\n\t\t\t\t// reaches the bullet duration time limit\r\n\t\t\t\taddParticipant(ab);\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void addPlayer(Player p) {\n if (gameState != GameState.AWAITING_PLAYERS) {\n throw new GameStateInvalidException(\"Cannot add players once game is underway...\");\n }\n\n // ok, just add...\n if (!players.contains(p)) {\n players.add(p);\n }\n }", "private void updateBadge(Context context) {\n\n //remove the previous badge view\n if (badgeView != null)\n removeView(badgeView);\n\n if (bubbleToggleItem.getBadgeText() == null)\n return;\n\n //create badge\n badgeView = new TextView(context);\n LayoutParams lpBadge = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n lpBadge.addRule(RelativeLayout.ALIGN_TOP, iconView.getId());\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n lpBadge.addRule(RelativeLayout.ALIGN_END, iconView.getId());\n } else\n lpBadge.addRule(RelativeLayout.ALIGN_RIGHT, iconView.getId());\n badgeView.setLayoutParams(lpBadge);\n badgeView.setSingleLine(true);\n badgeView.setTextColor(bubbleToggleItem.getBadgeTextColor());\n badgeView.setText(bubbleToggleItem.getBadgeText());\n badgeView.setTextSize(TypedValue.COMPLEX_UNIT_PX, bubbleToggleItem.getBadgeTextSize());\n badgeView.setGravity(Gravity.CENTER);\n Drawable drawable = ContextCompat.getDrawable(context, R.drawable.badge_background_white);\n ViewUtils.updateDrawableColor(drawable, bubbleToggleItem.getBadgeBackgroundColor());\n badgeView.setBackground(drawable);\n int badgePadding = (int) context.getResources().getDimension(R.dimen.default_nav_item_badge_padding);\n //update the margin of the text view\n badgeView.setPadding(badgePadding, 0, badgePadding, 0);\n //measure the content width\n badgeView.measure(0, 0);\n if (badgeView.getMeasuredWidth() < badgeView.getMeasuredHeight())\n badgeView.setWidth(badgeView.getMeasuredHeight());\n\n addView(badgeView);\n }", "public void addPlayer(Player player) {\n this.add(player);\n this.players.add(player);\n }", "public void addDeathForPlayer(Player player) {\n\t\tincrementProperty(player, StatsProperty.DEATHS);\n\t}", "public boolean addGame(Game g)\n {\n \n list.add(g);\n \n return true;\n }", "public void addPile(OrePile newPile) \n {\n // Ensure the ore types match - eg: mustn't add Nickel to an Iron shed!\n if (newPile.getOre().getOreType() != m_oreType)\n throw new IllegalArgumentException(\"OreType of the OrePile must be Ore.ORETYPE_IRON\");\n\n m_orePileQueue.enqueue(newPile);\t// Should we make a copy of newPile? Your choice...\n }", "public void addHealth(int amt) {\n currentHealth = currentHealth + amt;\n }", "public void addBid(GameMessage bidMsg) {\r\n Queue<GameMessage> msgList = msgMapping.get(bidMsg.getGameId());\r\n if (msgList == null) {\r\n msgList = new LinkedList<>();\r\n msgMapping.put(bidMsg.getGameId(), msgList);\r\n }\r\n msgList.add(bidMsg);\r\n bidCount ++;\r\n }", "public void addTwoForTeamB(View v) {\n scoreTeamB = scoreTeamB + 2;\n displayForTeamB(scoreTeamB);\n }", "public void add(Lugar g){\n lugares.add(g);\n }", "public void add(Weapon weapon) {\n\t\tif (weaponList.size() < 2) {\n\t\t\tweaponList.add(weapon);\n\t\t}\n\t}", "public void generateBadges(String badges)\n\t{\n\t\tm_badges = new byte[42];\n\t\tif(badges == null || badges.equals(\"\"))\n\t\t\tfor(int i = 0; i < 42; i++)\n\t\t\t\tm_badges[i] = 0;\n\t\telse\n\t\t\tfor(int i = 0; i < 42; i++)\n\t\t\t\tif(badges.charAt(i) == '1')\n\t\t\t\t\tm_badges[i] = 1;\n\t\t\t\telse\n\t\t\t\t\tm_badges[i] = 0;\n\t}", "public void addGame(Game gameToAdd)\n\t{\n\t\tgames.add(gameToAdd);\n\t}", "public void addPokemon(Pokemon pokemon) {\r\n\t\tif (caughtPokemon.containsKey(pokemon.getName())) {\r\n\t\t\tcaughtPokemon.put(pokemon.getName(), caughtPokemon.get(pokemon.getName()) + 1);\r\n\t\t} else {\r\n\t\t\tcaughtPokemon.put(pokemon.getName(), 1);\r\n\t\t}\r\n\r\n\t\tif (!(ownedPokemon.contains(pokemon))) {\r\n\r\n\t\t\townedPokemon.add(pokemon);\r\n\t\t}\r\n\t}", "public Player addGoalTally(Player player,int goals) throws Exception {\r\n player.setGoal(player.getGoal()+goals);\r\n Player.dao.modify(player);\r\n return player;\r\n }", "public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }", "public void addKickVote()\n\t{\n\t\tthis.numberOfKickVotes++;\n\t}", "public void addPlayer(String playerID) {\r\n\t\tplayerCount++;\r\n\t\tString name = guild.getMemberById(playerID).getEffectiveName();\r\n\t\t// Set up each player uniquely\r\n\t\tif (p2 == null) {\r\n\t\t\tp2 = new Player(1,playerID,GlobalVars.pieces.get(\"blue\"));\r\n\t\t\tp2.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[1][0]);\r\n\t\t\tp2.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[1][1]);\r\n\t\t\tplayers.add(p2);\r\n\t\t\tp1.setNextPlayer(p2);\r\n\t\t\tp2.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the BLUE adventurer\").queue();\r\n\t\t} else if (p3 == null) {\r\n\t\t\tp3 = new Player(2,playerID,GlobalVars.pieces.get(\"yellow\"));\r\n\t\t\tp3.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[2][0]);\r\n\t\t\tp3.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[2][1]);\r\n\t\t\tplayers.add(p3);\r\n\t\t\tp2.setNextPlayer(p3);\r\n\t\t\tp3.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the YELLOW adventurer\").queue();\r\n\t\t} else if (p4 == null) {\r\n\t\t\tp4 = new Player(3,playerID,GlobalVars.pieces.get(\"green\"));\r\n\t\t\tp4.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[3][0]);\r\n\t\t\tp4.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[3][1]);\r\n\t\t\tplayers.add(p4);\r\n\t\t\tp3.setNextPlayer(p4);\r\n\t\t\tp4.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the GREEN adventurer\").queue();\r\n\t\t}\r\n\t}", "public java.lang.String getBadge() {\n java.lang.Object ref = badge_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n badge_ = s;\n }\n return s;\n }\n }", "public void givePlayerLevelBonus() {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\t\tp.addScore(5 * (currentLevel-1));\n\t\t\t}\n\t\t}\n\t\tserver.updateHighscoreList();\n\t\tserver.addTextToLoggingWindow(\"Server gives all players level bonus\");\n\t}", "public void tag(Player taggedplayer, Player taggerplayer) {\n \t\tIterator<PearlTag> i = tags.iterator();\n \t\twhile (i.hasNext()) {\n \t\t\tPearlTag tag = i.next();\n \t\t\tif (tag.getTaggedPlayer() == taggedplayer) {\n \t\t\t\ti.remove();\n \t\t\t\ttagEvent(tag, PearlTagEvent.Type.SWITCHED, taggerplayer);\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t\n \t\t// then, make the tag and generate a new tag event\n \t\tlong expires = getNowTick() + expiresticks;\n \t\tPearlTag tag = new PearlTag(taggedplayer, taggerplayer, expires);\n \t\ttags.add(tag);\n \t\ttagEvent(tag, PearlTagEvent.Type.NEW);\n \t\t\n\t\t// schedule the expire task\n\t\tscheduleExpireTask();\n \t}", "public void addNPS()\n\t{\t\n\t\t\tgameObj.add(new NonPlayerShip(getHeight(), getWidth()));\n\t\t\ttotalNPS ++;\n\t\t\tSystem.out.println(\"Non-Player ship added\");\n\t\t\tnotifyObservers();\n\t}", "public void addShip(Ship ship){\n\n ship.setGamePlayers(this);\n myships.add(ship);\n }", "@Override\n\tpublic Game add(Game g) {\n\t\treturn null;\n\t}" ]
[ "0.6560861", "0.57320756", "0.55005264", "0.53681326", "0.5267373", "0.5253709", "0.52518606", "0.52326065", "0.5218513", "0.5176614", "0.51678795", "0.51488173", "0.5141309", "0.51215655", "0.51211995", "0.50854015", "0.5083869", "0.5076593", "0.5055483", "0.5050263", "0.5046827", "0.5039398", "0.5030094", "0.50253516", "0.5021323", "0.5018576", "0.50085056", "0.50038356", "0.5001008", "0.49999455", "0.4980609", "0.49739704", "0.4965767", "0.4965472", "0.49638873", "0.49373788", "0.49366242", "0.4936357", "0.49319205", "0.4919574", "0.49162143", "0.49025694", "0.48954028", "0.48893204", "0.48831436", "0.48831436", "0.48754656", "0.4874905", "0.4863991", "0.485984", "0.48508766", "0.48489597", "0.48476714", "0.48455867", "0.4837142", "0.48306435", "0.48291633", "0.4825465", "0.48187447", "0.48028603", "0.47982007", "0.47573197", "0.47513157", "0.47442713", "0.4739704", "0.4733026", "0.47228023", "0.47159624", "0.47148615", "0.4711433", "0.47059327", "0.4705516", "0.47008464", "0.46908218", "0.46876076", "0.46863422", "0.46838441", "0.46817014", "0.46791178", "0.46755093", "0.46731603", "0.46727747", "0.46621004", "0.46616313", "0.46585888", "0.46550098", "0.46544704", "0.46533498", "0.46503285", "0.46482143", "0.46476927", "0.46455225", "0.46405843", "0.4631929", "0.4630891", "0.4627992", "0.46266076", "0.4625797", "0.46235624", "0.462084" ]
0.82285285
0
If the correct answer is chosen, increases user score by 1
@Override public void onClick(View v) { if (one.isChecked()){ scoreCounter += 1 ; } buttonSubmit (); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void calculateScore() {\n EditText editText1 = (EditText) findViewById(R.id.edit_text1);\n String answer1 = editText1.getText().toString().toLowerCase().trim();\n if (answer1.equals( getResources().getText(R.string.answer1))) {\n score += 3;\n } else {\n //show false\n }\n\n RadioGroup radioGroup2 = (RadioGroup) findViewById(R.id.radio_group2);\n int checkedRadioButtonId2 = radioGroup2.getCheckedRadioButtonId();\n if (checkedRadioButtonId2 == R.id.rb21) {\n score += 1;\n } else {\n //show false\n }\n\n CheckBox checkBox3b = (CheckBox) findViewById(R.id.cb32);\n CheckBox checkBox3d = (CheckBox) findViewById(R.id.cb34);\n if (checkBox3b.isChecked() && checkBox3d.isChecked()) {\n score += 2;\n } else {\n //show false\n }\n\n RadioGroup radioGroup4 = (RadioGroup) findViewById(R.id.radio_group4);\n int checkedRadioButtonId4 = radioGroup4.getCheckedRadioButtonId();\n if (checkedRadioButtonId4 == R.id.rb41) {\n score += 1;\n } else {\n //show false\n }\n }", "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public void checkAnswer(int answer) {\n int correctAns = Integer.MIN_VALUE;\n \n switch (currentOperator) {\n case PLUS: correctAns = leftNumPanel.num + rightNumPanel.num; break;\n case MINUS: correctAns = leftNumPanel.num - rightNumPanel.num; break;\n case TIMES: correctAns = leftNumPanel.num * rightNumPanel.num; break;\n case DIVIDE: correctAns = leftNumPanel.num / rightNumPanel.num;\n }\n \n boolean gotItRight = (answer == correctAns);\n feedbackPanel.showFeedback(gotItRight);\n if (gotItRight) {\n setNewNumbers();\n score++;\n \n switch (currentOperator) {\n case PLUS: correctCount[0]++; break;\n case MINUS: correctCount[1]++; break;\n case TIMES: correctCount[2]++; break;\n case DIVIDE: correctCount[3]++; break;\n }\n \n if (inGame) {\n clockPanel.giveBonusTime();\n }\n \n } else {\n // got it wrong\n if (inGame) {\n clockPanel.takeOffTime();\n }\n }\n }", "private void checkAnswer()\r\n\t{\r\n\t\t//Submission to the model and getting 'true' if correct and 'false' otherwise\r\n\t\tboolean response = quizModel.isCorrect(group.getSelection().getActionCommand());\r\n\t\t\r\n\t\t//Updating score label based on result\r\n\t\tif (response == true)\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Correct answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Incorrect answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t}", "double scoreAnswer(Question question, Answer answer);", "public static void incrementScore() {\n\t\tscore++;\n\t}", "public void checkScore(View view) {\n //Question Nr. 1 radio button\n RadioButton true1AnswerOne = (RadioButton) findViewById(R.id.q1a1);\n Boolean is1OneTrue = true1AnswerOne.isChecked();\n if (is1OneTrue) {\n\n }\n\n RadioButton true1AnswerTwo = (RadioButton) findViewById(R.id.q1a2);\n Boolean is1TwoTrue = true1AnswerTwo.isChecked();\n if (is1TwoTrue) {\n\n }\n\n RadioButton true1AnswerThree = (RadioButton) findViewById(R.id.q1a3);\n Boolean is1ThreeTrue = true1AnswerThree.isChecked();\n if (is1ThreeTrue) {\n score = score + 2;\n }\n\n RadioButton true1AnswerFour = (RadioButton) findViewById(R.id.q1a4);\n Boolean is1FourTrue = true1AnswerFour.isChecked();\n if (is1FourTrue) {\n score++;\n }\n\n //Question Nr. 2 radio button\n RadioButton true2AnswerOne = (RadioButton) findViewById(R.id.q2a1);\n Boolean is2OneTrue = true2AnswerOne.isChecked();\n if (is2OneTrue) {\n\n }\n\n RadioButton true2AnswerTwo = (RadioButton) findViewById(R.id.q2a2);\n Boolean is2TwoTrue = true2AnswerTwo.isChecked();\n if (is2TwoTrue) {\n\n }\n\n RadioButton true2AnswerThree = (RadioButton) findViewById(R.id.q2a3);\n Boolean is2ThreeTrue = true2AnswerThree.isChecked();\n if (is2ThreeTrue) {\n score++;\n }\n\n RadioButton true2AnswerFour = (RadioButton) findViewById(R.id.q2a4);\n Boolean is2FourTrue = true2AnswerFour.isChecked();\n if (is2FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 3 radio button\n RadioButton true3AnswerOne = (RadioButton) findViewById(R.id.q3a1);\n Boolean is3OneTrue = true3AnswerOne.isChecked();\n if (is3OneTrue) {\n\n }\n\n RadioButton true3AnswerTwo = (RadioButton) findViewById(R.id.q3a2);\n Boolean is3TwoTrue = true3AnswerTwo.isChecked();\n if (is3TwoTrue) {\n\n }\n\n RadioButton true3AnswerThree = (RadioButton) findViewById(R.id.q3a3);\n Boolean is3ThreeTrue = true3AnswerThree.isChecked();\n if (is3ThreeTrue) {\n score++;\n }\n\n RadioButton true3AnswerFour = (RadioButton) findViewById(R.id.q3a4);\n Boolean is3FourTrue = true3AnswerFour.isChecked();\n if (is3FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 4 radio button\n RadioButton true4AnswerOne = (RadioButton) findViewById(R.id.q4a1);\n Boolean is4OneTrue = true4AnswerOne.isChecked();\n if (is4OneTrue) {\n\n }\n\n RadioButton true4AnswerTwo = (RadioButton) findViewById(R.id.q4a2);\n Boolean is4TwoTrue = true4AnswerTwo.isChecked();\n if (is4TwoTrue) {\n\n }\n\n RadioButton true4AnswerThree = (RadioButton) findViewById(R.id.q4a3);\n Boolean is4ThreeTrue = true4AnswerThree.isChecked();\n if (is4ThreeTrue) {\n score++;\n }\n\n RadioButton true4AnswerFour = (RadioButton) findViewById(R.id.q4a4);\n Boolean is4FourTrue = true4AnswerFour.isChecked();\n if (is4FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 5 radio button\n RadioButton true5AnswerOne = (RadioButton) findViewById(R.id.q5a1);\n Boolean is5OneTrue = true5AnswerOne.isChecked();\n if (is5OneTrue) {\n\n }\n\n RadioButton true5AnswerTwo = (RadioButton) findViewById(R.id.q5a2);\n Boolean is5TwoTrue = true5AnswerTwo.isChecked();\n if (is5TwoTrue) {\n score = score + 2;\n }\n\n RadioButton true5AnswerThree = (RadioButton) findViewById(R.id.q5a3);\n Boolean is5ThreeTrue = true5AnswerThree.isChecked();\n if (is5ThreeTrue) {\n score++;\n }\n\n RadioButton true5AnswerFour = (RadioButton) findViewById(R.id.q5a4);\n Boolean is5FourTrue = true5AnswerFour.isChecked();\n if (is5FourTrue) {\n\n }\n\n //Question Nr. 6 radio button\n RadioButton true6AnswerOne = (RadioButton) findViewById(R.id.q6a1);\n Boolean is6OneTrue = true6AnswerOne.isChecked();\n if (is6OneTrue) {\n score = score + 2;\n }\n\n RadioButton true6AnswerTwo = (RadioButton) findViewById(R.id.q6a2);\n Boolean is6TwoTrue = true6AnswerTwo.isChecked();\n if (is6TwoTrue) {\n score++;\n }\n\n RadioButton true6AnswerThree = (RadioButton) findViewById(R.id.q6a3);\n Boolean is6ThreeTrue = true6AnswerThree.isChecked();\n if (is6ThreeTrue) {\n\n }\n\n RadioButton true6AnswerFour = (RadioButton) findViewById(R.id.q6a4);\n Boolean is6FourTrue = true6AnswerFour.isChecked();\n if (is6FourTrue) {\n\n }\n\n //Question Nr. 7 check box\n CheckBox trueAnswerSeven1 = (CheckBox) findViewById(R.id.trueq7a1);\n Boolean isSeven1True = trueAnswerSeven1.isChecked();\n CheckBox trueAnswerSeven2 = (CheckBox) findViewById(R.id.trueq7a2);\n Boolean isSeven2True = trueAnswerSeven2.isChecked();\n CheckBox trueAnswerSeven3 = (CheckBox) findViewById(R.id.trueq7a3);\n Boolean isSeven3True = trueAnswerSeven3.isChecked();\n CheckBox trueAnswerSeven4 = (CheckBox) findViewById(R.id.trueq7a4);\n Boolean isSeven4True = trueAnswerSeven4.isChecked();\n if (isSeven1True) {\n score++;\n }\n\n if (isSeven2True) {\n score++;\n }\n\n if (isSeven3True) {\n score++;\n }\n\n if (isSeven4True) {\n score++;\n }\n\n //Question Nr. 8 edit text\n EditText trueAnswerEight = (EditText) findViewById(R.id.q8a1);\n String isEightTrue = trueAnswerEight.getText().toString();\n if (isEightTrue.equals(\"Love You\")) {\n score++;\n }\n\n //Text of the message after the Check your score button is clicked.\n if (score < 6) {\n Toast.makeText(this, \"You scored \" + score + \" points out of 17. One of you might be caught in so called \\\"Passion trap\\\" (search for it in the internet). You both need to work on your relationships to improve the balance.\", Toast.LENGTH_LONG).show();\n } else if (score < 12) {\n Toast.makeText(this, \"Good! You scored \" + score + \" points out of 17! Your relationship probably needs a bit of work to take it from good to great. Search for \\\"Relationship balance or Passion trap in the internet.\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(this, \"Congratulations! You scored \" + score + \" points out of 17! You seem to have a good and balanced relationship with your partner.\", Toast.LENGTH_LONG).show();\n }\n score = 0;\n }", "protected void checkScore () {\n if (mCurrentIndex == questions.length-1) {\n NumberFormat pct = NumberFormat.getPercentInstance();\n double result = (double) correct/questions.length;\n Toast res = new Toast(getApplicationContext());\n res.makeText(QuizActivity.this, \"Your score: \" + pct.format(result), Toast.LENGTH_LONG).show();\n correct = 0; // resets the score when you go back to first question.\n }\n }", "public void onClick(View view){\n RadioButton answer = (RadioButton) view;\n if (answer.getText() == manswer) {\n mScore = mScore + 1;\n Toast.makeText(Quiz.this, \"Correct\", Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(Quiz.this, \"InCorrect\", Toast.LENGTH_LONG).show();\n }\n updateScore(mScore);\n updateQuestion();\n\n }", "public void updateQ4scoreAndGoToNext(View view){\r\n EditText q1Correct;\r\n q1Correct = (EditText) findViewById(R.id.q1Answer);\r\n String inputText = q1Correct.getText().toString();\r\n String rightAnswer = \"TextView\";\r\n\r\n if (inputText.equals(rightAnswer)) {\r\n q1Score = q1Score + 1;\r\n Toast toast = Toast.makeText(this, \"Great Job! 1 point added.\", Toast.LENGTH_SHORT);\r\n toast.show();\r\n } else {\r\n q1Score = 0;\r\n Toast toast = Toast.makeText(this, \"Better luck next time, 0 points added.\", Toast.LENGTH_SHORT);\r\n toast.show();\r\n }\r\n\r\n Intent i = new Intent(this, Question2Activity.class);\r\n startActivity(i);\r\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "public void addOneToScore() {\r\n score++;\r\n }", "public void checkAnswerOne() {\n RadioGroup ans1 = findViewById(R.id.radio_gr_q1);\n int radioButtonId = ans1.getCheckedRadioButtonId();\n\n if (radioButtonId == R.id.a2_q1) {\n points++;\n }\n }", "private void rightAnswerButtonOnClick()\r\n {\r\n //if the button clicked has the correct answer, then do the following;\r\n\r\n yesMPlayer.start();\r\n updateQuestion();\r\n\r\n Toast.makeText(getApplicationContext(), \"CORRECT!\", Toast.LENGTH_SHORT).show();\r\n\r\n score += 100;\r\n scoreEditText.setText(score + \"\");\r\n\r\n streak += 1;\r\n streakEditText.setText(streak + \"\");\r\n\r\n questionPos += 1;\r\n questionNoTV.setText(\"Question \" + noOfQuestion + \" of 10\");\r\n\r\n if (score == 1000) {\r\n newPlayer.insertPlayerStatsToDatabase(player, year, score + \"\", streak + \"\");\r\n //Toast.makeText(getApplicationContext(), \"OVERRRRRR\\t\" + score, Toast.LENGTH_SHORT).show();\r\n }\r\n }", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "public void addScore()\n {\n score += 1;\n }", "private void validateQuestion(){\n int checkedRadioButtonId = Question.getCheckedRadioButtonId();\n\n // If the correct question has been chosen, update the score & display a toast message\n if (checkedRadioButtonId == R.id.radio4_question1) {\n score = score + 2;\n }\n }", "private void calculateScoreForRadioButtons(boolean question2_option3, boolean question6_option2,\n boolean question7_option1) {\n\n\n // if user picks option 3 in question 2, add 1 to score.\n if (question2_option3) {\n score += 1;\n }\n\n\n\n // if user picks option 1 in question 6, add 1 to score.\n if (question6_option2) {\n score += 1;\n }\n\n\n // if user picks option 1 in question 7, add 1 to score.\n if (question7_option1) {\n score += 1;\n }\n\n // calculate the total value of score\n }", "protected int checkIfCorrect(String answer, String correctAns)\r\n {\r\n if (correctAns.equals(answer))\r\n {\r\n System.out.println(\"Awsome job!\");\r\n return score++;\r\n }\r\n else \r\n { \r\n System.out.println(\"opps\"); \r\n return score;\r\n }\r\n \r\n }", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public void calcScore(int score) {\r\n\t\tif (initFinish)\r\n\t\t\tthis.score += score * this.multy;\r\n\t\t// TODO delete\r\n//\t\tSystem.out.println(\"score: \" + this.score + \"multy: \" + this.multy);\r\n\t}", "public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "void scoreQuestion(int questionNumber){\r\n switch(questionNumber){\r\n case 1:\r\n RadioButton radioButtonQ1 = (RadioButton) findViewById(R.id.soccer_question_1_correct_answer);\r\n if (radioButtonQ1.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 2:\r\n CheckBox checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_wrong_answer_1);\r\n if(checkBoxQ2.isChecked()){\r\n return;\r\n }\r\n checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_wrong_answer_2);\r\n if(checkBoxQ2.isChecked()){\r\n return;\r\n }\r\n checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_correct_answer_1);\r\n if(checkBoxQ2.isChecked()){\r\n playerScore += 5;\r\n }\r\n checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_correct_answer_2);\r\n if(checkBoxQ2.isChecked()){\r\n playerScore += 5;\r\n }\r\n break;\r\n case 3:\r\n RadioButton radioButtonQ3 = (RadioButton) findViewById(R.id.soccer_question_3_correct_answer);\r\n if (radioButtonQ3.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 4:\r\n RadioButton radioButtonQ4 = (RadioButton) findViewById(R.id.basketball_question_1_correct_answer);\r\n if (radioButtonQ4.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 5:\r\n RadioButton radioButtonQ5 = (RadioButton) findViewById(R.id.basketball_question_2_correct_answer);\r\n if (radioButtonQ5.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 6:\r\n EditText editTextQ6 = (EditText) findViewById(R.id.basketball_question_3);\r\n String answerQ6 = getString(R.string.basketball_question_3_correct_answer);\r\n if(answerQ6.equalsIgnoreCase(editTextQ6.getText().toString())){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 7:\r\n RadioButton radioButtonQ7 = (RadioButton) findViewById(R.id.volleyball_question_1_correct_answer);\r\n if (radioButtonQ7.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 8:\r\n RadioButton radioButtonQ8 = (RadioButton) findViewById(R.id.volleyball_question_2_correct_answer);\r\n if (radioButtonQ8.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 9:\r\n RadioButton radioButtonQ9 = (RadioButton) findViewById(R.id.tenis_question_1_correct_answer);\r\n if (radioButtonQ9.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 10:\r\n EditText editTextQ10 = (EditText) findViewById(R.id.boxe_question_1);\r\n String answerQ10 = getString(R.string.boxe_question_1_correct_answer);\r\n if(answerQ10.equalsIgnoreCase(editTextQ10.getText().toString())){\r\n playerScore += 10;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }", "private int computeScore() {\n int score = 0;\n for (int i = 0; i < MainActivity.DEFAULT_SIZE; i++) {\n TextView answerView = (TextView) findViewById(MainActivity.NAME_VIEWS[i]);\n String answer = answerView.getText().toString();\n String solution = getQuizCountries().get(i).getName();\n if (answer.equals(solution)) {\n score++;\n }\n }\n return score;\n }", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "public void correctAnswer(View view) {\n\n // Update correct count\n deck.getCard(deckPos).setNumCorrect(deck.getCard(deckPos).getNumCorrect() + 1);\n\n // Update points\n float p = Float.valueOf(deck.getCard(deckPos).getRating()) * 10;\n quiz.setPoints((int) (quiz.getPoints() + p));\n points.setText(String.valueOf(quiz.getPoints()));\n\n // Set to question and update counter\n isQuestion = true;\n deckPos ++;\n\n // If not last card - Update card\n if(!(deckPos == deck.deckLength)) {\n displayCard(deck.getCard(deckPos), isQuestion);\n } else {\n finishQuiz();\n }\n\n // Set quiz counts\n quiz.setCorrectCount(quiz.getCorrectCount() + 1);\n }", "public void rightScored()\n\t{\n\t\tscoreR++;\n\t}", "public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }", "public void onClick(View view) {\n Button answer = (Button) view;\n // jika jawaban benar, score bertambah\n if (answer.getText() == mAnswer){\n mScore = mScore + 1;\n Toast.makeText(MainActivity.this, \"Benar!\", Toast.LENGTH_SHORT).show();\n }else\n Toast.makeText(MainActivity.this, \"Salah!\", Toast.LENGTH_SHORT).show();\n\n updateScore(mScore);\n updateQuestion();\n }", "private void determineButtonPress(boolean answer){\n boolean expectedAnswer = currentQuestion.isAnswer();\n String result;\n if (answer == expectedAnswer){\n result=\"Correct\";\n score++;\n txtScore.setText(\"Score: \" + score);\n } else {\n result=\"False\";\n }\n //call this function to display the result to the player\n answerResultAlert(result);\n\n }", "private void checkAnswer(int i) {\n\tswitch(i){\r\n\tcase 1:\r\n\t\t Button answer=(Button)findViewById(R.id.radio0);\r\n\t\t Log.d(\"yourans\", currentQ.getANSWER()+\" \"+answer.getText());\r\n\t\t if(currentQ.getANSWER().contentEquals(answer.getText()))\r\n\t\t \t {\r\n\t\t \t scoreSci++;\r\n\t\t \t String d=String.valueOf(scoreSci);\r\n\t\t\t \tEditor editor=mGameSettings.edit();\r\n\t\t\t \teditor.putString(GAME_PREFERENCES_SCORE_SCI,d);\r\n\t\t\t \teditor.commit();\r\n\t\t\t\t\tLog.d(DEBUG_TAG, \"Score is : \"\r\n\t\t\t + mGameSettings.getString(GAME_PREFERENCES_SCORE_SCI, \"Not set\"));\r\n\t\t \t Toast.makeText(getApplicationContext(),\"correct\",Toast.LENGTH_SHORT).show();\r\n\t\t\t }\r\n\t\t \t else{\r\n\t\t \t\tString d=\"The correct answer is\\n\"+currentQ.getANSWER();\r\n\t\t \t\tEditor editor2=mGameSettings.edit();\r\n\t\t\t \teditor2.putString(GAME_CURRENT_ANS_SCI,d);\r\n\t\t\t \teditor2.commit();\r\n\t\t\t \tQuizActivitySci.this.showDialog(GET_WRONG);\r\n\t\t \t }\r\n\t Log.d(\"score\", \"Your score\"+scoreSci);\r\n\t\tbreak;\r\n\tcase 2:\r\n\t\t Button answer1=(Button)findViewById(R.id.radio1);\r\n\t \t Log.d(\"yourans\", currentQ.getANSWER()+\" \"+answer1.getText()); \t\r\n\t if(currentQ.getANSWER().contentEquals(answer1.getText()))\r\n\t \t {\r\n\t \t scoreSci++;\r\n\t \t String d=String.valueOf(scoreSci);\r\n\t \tEditor editor=mGameSettings.edit();\r\n\t \teditor.putString(GAME_PREFERENCES_SCORE_SCI,d);\r\n\t \teditor.commit();\r\n\t\t\t Log.d(\"score\", \"Your score\"+scoreSci);\r\n\t\t\t Log.d(DEBUG_TAG, \"Score is : \"\r\n\t + mGameSettings.getString(GAME_PREFERENCES_SCORE_SCI, \"Not set\"));\r\n\t\t\t Toast.makeText(getApplicationContext(),\"correct\",Toast.LENGTH_SHORT).show();\r\n\t\t }else{\r\n\t\t\t String d=\"The correct answer is\\n\"+currentQ.getANSWER();\r\n\t\t \t\tEditor editor2=mGameSettings.edit();\r\n\t\t\t \teditor2.putString(GAME_CURRENT_ANS_SCI,d);\r\n\t\t\t \teditor2.commit();\r\n\t\t\t \tQuizActivitySci.this.showDialog(GET_WRONG);\r\n\t \t }\r\n\t Log.d(\"score\", \"Your score\"+scoreSci);\r\n\t\tbreak;\r\n\tcase 3:\r\n\t\tButton answer11=(Button)findViewById(R.id.radio2);\r\n\t \t Log.d(\"yourans\", currentQ.getANSWER()+\" \"+answer11.getText()); \r\n\t \t if(currentQ.getANSWER().contentEquals(answer11.getText()))\r\n\t \t {\r\n\t \t scoreSci++;\r\n\t \tString d=String.valueOf(scoreSci);\r\n\t \tEditor editor=mGameSettings.edit();\r\n\t \teditor.putString(GAME_PREFERENCES_SCORE_SCI,d);\r\n\t \teditor.commit();\r\n\t\t\t Log.d(\"score\", \"Your score\"+scoreSci);\r\n\t\t\t Log.d(DEBUG_TAG, \"Score is : \"\r\n\t + mGameSettings.getString(GAME_PREFERENCES_SCORE_SCI, \"Not set\"));\r\n\t\t\t Toast.makeText(getApplicationContext(),\"correct\",Toast.LENGTH_SHORT).show();\r\n\t\t }else{\r\n\t\t\t String d=\"The correct answer is\\n\"+currentQ.getANSWER();\r\n\t\t \t\tEditor editor2=mGameSettings.edit();\r\n\t\t\t \teditor2.putString(GAME_CURRENT_ANS_SCI,d);\r\n\t\t\t \teditor2.commit();\r\n\t\t\t \tQuizActivitySci.this.showDialog(GET_WRONG);\r\n\t \t\t}\r\n\t \tLog.d(\"score\", \"Your score\"+scoreSci);\r\n\t\tbreak;\r\n\tcase 4:\r\n\t\tButton answer111=(Button)findViewById(R.id.radio3);\r\n\t \t Log.d(\"yourans\", currentQ.getANSWER()+\" \"+answer111.getText()); \t\r\n\t \t if(currentQ.getANSWER().contentEquals(answer111.getText()))\r\n\t \t {\r\n\t \t scoreSci++;\r\n\t \tString d=String.valueOf(scoreSci);\r\n\t \tEditor editor=mGameSettings.edit();\r\n\t \teditor.putString(GAME_PREFERENCES_SCORE_SCI,d);\r\n\t \teditor.commit();\r\n\t\t\t Log.d(\"score\", \"Your score\"+scoreSci);\r\n\t\t\t Log.d(DEBUG_TAG, \"Score is : \"\r\n\t + mGameSettings.getString(GAME_PREFERENCES_SCORE_SCI, \"Not set\"));\r\n\t\t\t Toast.makeText(getApplicationContext(),\"correct\",Toast.LENGTH_SHORT).show();\r\n\t\t }else{\r\n\t\t\t String d=\"The correct answer is\\n\"+currentQ.getANSWER();\r\n\t\t \t\tEditor editor2=mGameSettings.edit();\r\n\t\t\t \teditor2.putString(GAME_CURRENT_ANS_SCI,d);\r\n\t\t\t \teditor2.commit();\r\n\t\t\t \tQuizActivitySci.this.showDialog(GET_WRONG);\r\n\t \t\t }\r\n\t \tLog.d(\"score\", \"Your score\"+scoreSci);\r\n\t\tbreak;\r\n\t\t\r\n}\r\n\t\r\n}", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "@Override\n public void actionPerformed(ActionEvent ae)\n {\n total++;\n String display = \"\";\n if(jt.getText().trim().equals(qs.getAnswer().trim()))\n {\n score++;\n display += \"Score : \"+score+ \" / \" +total;\n //myDialog.setTitle(\"ok \"+score+\" / \"+total);\n }else{\n display += \"Score : \"+score+ \" / \" +total;\n display += \" prev answer : \"+qs.getAnswer().trim();\n }\n scoreBoard.setText(display);\n addDataTolist();\n\n }", "public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }", "@FXML\n\tprivate void answerQuestion() {\n\t\tint correctAnsID = 0;\n\t\ttry {\n\t\t\tswitch (((RadioButton) answerGroup.getSelectedToggle()).getId()) {\n\t\t\tcase \"ans1Check\":\n\t\t\t\tcorrectAnsID = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"ans2Check\":\n\t\t\t\tcorrectAnsID = 2;\n\t\t\t\tbreak;\n\t\t\tcase \"ans3Check\":\n\t\t\t\tcorrectAnsID = 3;\n\t\t\t\tbreak;\n\t\t\tcase \"ans4Check\":\n\t\t\t\tcorrectAnsID = 4;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\terrorLabel.setVisible(true);\n\t\t}\n\n\t\t// nothing is selected\n\t\tif (correctAnsID == 0) { \n\t\t\terrorLabel.setVisible(true);\n\t\t\t// correct answer\n\t\t} else if (question.getCorrect_ans() == correctAnsID) {\n\t\t\tcontrol.setScore(control.getScore() + question.getScore());\n\t\t\thandleAlertAndWindow(AlertType.INFORMATION, \"Congrats! :D\",\n\t\t\t\t\t\"You received \" + question.getScore() + \" points\");\n\t\t\t// wrong answer\n\t\t} else {\n\t\t\tcontrol.setScore(control.getScore() + question.getPenalty());\n\n\t\t\thandleAlertAndWindow(AlertType.ERROR, \"Uh oh! :(\",\n\t\t\t\t\t\"You lost \" + question.getPenalty() + \" points\");\n\t\t}\n\n\t\t// reset the eaten question\n\t\tViewLogic.playGameController.getControl().setQuestionEaten(null);\n\t}", "public static void calculateScore(){\n boolean gameOver = false;\n int score = 3000;\n int levelCompleted = 8;\n int bonus = 200;\n\n System.out.println(\"Running method calculateScore: \");\n\n if(score < 4000){\n int finalScore = score + (levelCompleted*bonus);\n System.out.println(\"Your final score = \" + finalScore);\n }else{\n System.out.println(\"The game is still on\");\n }\n\n System.out.println(\"Exit method calculateScore--\\n\");\n }", "public static void main(String[] args){\n Scanner keyboard = new Scanner(System.in);\n //declare variables for the answer, user's guess, and number fo guesses\n int answer;\n int guess;\n int numOfGuess = 0;\n \n boolean done = false;\n answer = (int)(100*Math.random())+1;\n \n //print an introduction that tells the user how to play this game\n System.out.println(\"Hello user! I will generate a number between 1-100 inclusive and you will try to guess it! I will tell you if your answer is too low or too high after each incorrect guess!\");\n do \n {\n System.out.print(\"Please enter your guess:\");\n guess = keyboard.nextInt();\n if (guess > answer){\n System.out.println(\"Too high!\");\n }\n else if( guess < answer){\n System.out.println(\"Too low!\");\n }\n else{\n done = true;\n }\n numOfGuess += 1;\n } while (done == false);\n \n System.out.println(\"Congratulations! You're score is \" + numOfGuess);\n if (numOfGuess >= 20){\n System.out.println(\"Rating: You are terrible at this game!\");\n }\n else if (numOfGuess >= 10 && numOfGuess <=19){\n System.out.println(\"Rating: You need more practice!\");\n }\n else if (numOfGuess >= 5 && numOfGuess <= 9){\n System.out.println(\"Rating: Not too bad, But can you get it in fewer than 5 guesses?\");\n }\n else if (numOfGuess >= 2 && numOfGuess <= 4){\n System.out.println(\"Rating: AWESOME. You win a trip to Hawaii!\");\n }\n else{\n System.out.println(\"Rating: That was pure LUCK and you know it!\");\n }\n \n }", "public void setScore(int score) { this.score = score; }", "public void finishQuiz(View view){\n if(((RadioButton) findViewById(R.id.radio_new_york_city)).isChecked()) {\n score++;\n }\n\n //Anser for question 2\n if(((RadioButton) findViewById(R.id.radio_food_cart)).isChecked()) score++;\n\n //Anser for question 3\n if(((CheckBox) findViewById(R.id.check_chicken)).isChecked()\n && ((CheckBox) findViewById(R.id.check_gyro)).isChecked()\n && !((CheckBox) findViewById(R.id.check_pork)).isChecked()) score++;\n\n //Anser for question 4\n String answer4 = ((EditText) findViewById(R.id.edit_bread)).getText().toString().toLowerCase();\n if(answer4.equals(\"pita\")) score++;\n\n //Anser for question 5\n if(((CheckBox) findViewById(R.id.check_red)).isChecked()\n && ((CheckBox) findViewById(R.id.check_yellow)).isChecked()\n && !((CheckBox) findViewById(R.id.check_white)).isChecked()) score++;\n\n\n //Anser for question 6\n if(((RadioButton) findViewById(R.id.radio_large)).isChecked()) score++;\n\n //Display the Toast\n Context context = getApplicationContext();\n\n CharSequence text;\n if(score == 6) {\n text = \"Congrats! Your Score was \" + score + \" out of 6!\";\n } else {\n text = \"You only have \" + score + \" out of 6! Try again!\";\n }\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n //Resest score to 0\n\n score = 0;\n }", "public void updateScore(){\n scoreChange++;\n if(scoreChange % 2 == 0){\n if(score_val < 999999999)\n score_val += 1;\n if(score_val > 999999999)\n score_val = 999999999;\n score.setText(\"Score:\" + String.format(\"%09d\", score_val));\n if(scoreChange == 10000)\n scoreChange = 0;\n }\n }", "public void incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\n }", "@Override\r\n\tpublic void checkAnswer() {\n\t\t\r\n\t}", "private double getScore() {\n double score = 0;\n score += getRBAnswers(R.id.radiogroup1, R.id.radiobutton_answer12);\n score += getRBAnswers(R.id.radiogroup2, R.id.radiobutton_answer21);\n score += getRBAnswers(R.id.radiogroup3, R.id.radiobutton_answer33);\n score += getRBAnswers(R.id.radiogroup4, R.id.radiobutton_answer41);\n score += getCBAnswers();\n score += getTextAns();\n score = Math.round(score / .0006);\n score = score / 100;\n return score;\n }", "public synchronized void setScore(Integer score) {\n this.score += score;\n }", "public void addScore(int score) {\n currentScore += score;\n }", "public void updateScore(int score){ bot.updateScore(score); }", "public void addToScore(int score)\n {\n this.score += score;\n }", "public void increaseScore(int p) {\n score += p;\n //Minden novelesnel megnezzuk, hogy elertuk-e a gyozelem szukseges pandaszamot.\n if(score >= 25 && game.getSelectedMode() == Game.GameMode.FinitPanda){\n //Ha elertuk, szolunk a jateknak hogy vege.\n game.SaveHighScore(score);\n game.gameOver();\n }\n }", "public void addQuiz(int score) {\n\t\tif (score < 0 || score > 100) {\n\t\t\tscore = 0;\n\t\t}\n\t\telse {\n\t\t\ttotalScore = totalScore + score;\n\t\t\tquizCount++;\n\t\t}\n\t\t}", "private void calculateScoreForCheckBoxes(boolean question3_option1, boolean question3_option3,\n boolean question3_option4, boolean question4_option1,\n boolean question4_option2, boolean question4_option4,\n boolean question8_option1, boolean question8_option3) {\n // if user picks option 1 in question 3, add 1 to score.\n if (question3_option1) {\n score += 1;\n }\n\n // if user picks option 3 in question 3, add 1 to score.\n if (question3_option3) {\n score += 1;\n }\n\n // if user picks option 4 in question 3, add 1 to score.\n if (question3_option4) {\n score += 1;\n }\n\n // if user picks option 1 in question 4, add 1 to score.\n if (question4_option1) {\n score += 1;\n }\n\n // if user picks option 2 in question 4, add 1 to score.\n if (question4_option2) {\n score += 1;\n }\n\n // if user picks option 4 in question 4, add 1 to score.\n if (question4_option4) {\n score += 1;\n }\n // if user picks option 2 in question 4, add 1 to score.\n if (question8_option1) {\n score += 1;\n }\n // if user picks option 2 in question 4, add 1 to score.\n if (question8_option3) {\n score += 1;\n }\n\n }", "public void countPoints() {\n points = 0;\n checkAnswerOne();\n checkAnswerTwo();\n checkAnswerThree();\n checkAnswerFour();\n checkAnswerFive();\n checkAnswerSix();\n checkAnswerSeven();\n checkAnswerEight();\n checkAnswerNine();\n checkAnswerTen();\n }", "public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}", "public void submitQuiz(View view) {\n\n if(parentKiller()) {\n question1 = 1;\n } else{\n question1 = 0;\n }\n\n if(jokerKills()) {\n question2 = 1;\n } else {\n question2 = 0;\n }\n\n if (batCity()) {\n question3 = 1;\n } else {\n question3 = 0;\n }\n\n if (checkboxQuestion()) {\n question4 = 1;\n } else {\n question4 = 0;\n }\n\n if (nameEntry()) {\n question5 = 1;\n } else {\n question5 = 0;\n }\n\n correctPoints = question1 + question2 + question3 + question4 + question5;\n\n Toast toastScore = Toast.makeText(getApplicationContext(), \"You scored \" + correctPoints + \" points!\", Toast.LENGTH_SHORT);\n toastScore.show();\n }", "public void addScore(int score);", "private void validateQuiz() {\n int score = 0;\n String answer1 = answerOne.getText().toString();\n int answer2 = answerTwo.getCheckedRadioButtonId();\n boolean answer3 = answerThreeOptionA.isChecked() && answerThreeOptionD.isChecked() && !answerThreeOptionB.isChecked() && !answerThreeOptionC.isChecked();\n String answer4 = answerFour.getText().toString();\n int answer5 = answerFive.getCheckedRadioButtonId();\n boolean answer6 = answerSixOptionA.isChecked() && answerSixOptionB.isChecked() && answerSixOptionD.isChecked() && !answerSixOptionC.isChecked();\n if (answer1.equalsIgnoreCase(getString(R.string.answerOne))) {\n score++;\n }\n if (answer2 == answerTwoOptionA.getId()) {\n score++;\n }\n if (answer3) {\n score++;\n }\n if (answer4.equalsIgnoreCase(getString(R.string.answerFour))) {\n score++;\n }\n if (answer5 == answerFiveOptionD.getId()) {\n score++;\n }\n if (answer6) {\n score++;\n }\n String result = getString(R.string.result, score, questionList.size());\n Toast.makeText(this, result, Toast.LENGTH_SHORT).show();\n }", "public void incrementRightAnswers(){\n right ++;\n }", "public void setScore(int score) {this.score = score;}", "void awardPoints(){\n if (currentPoints <= 100 - POINTSGIVEN) {\n currentPoints += POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "void calculateScore(){\r\n playerScore = 0;\r\n for(int i = 1; i<=10; i++) {\r\n scoreQuestion(i);\r\n }\r\n }", "private int calculateScore(boolean answerOne, boolean answerTwo, boolean answerThree, boolean answerFour, boolean answerFiveA, boolean answerFiveB, boolean answerFiveC, boolean answerFiveD, boolean answerSix, boolean answerSeven, boolean answerEight, boolean answerNine, String answerTen) {\n int score = 0;\n\n if (answerOne) {\n score += 10;\n Log.v(\"MainActivity\", \"1\");\n }\n\n if (answerTwo) {\n score += 10;\n Log.v(\"MainActivity\", \"2\");\n }\n\n if (answerThree) {\n score += 10;\n Log.v(\"MainActivity\", \"3\");\n }\n\n if (answerFour) {\n score += 10;\n Log.v(\"MainActivity\", \"4\");\n }\n\n if (answerFiveA && !answerFiveB && !answerFiveC && answerFiveD) {\n score += 10;\n Log.v(\"MainActivity\", \"5\");\n }\n\n if (answerSix) {\n score += 10;\n Log.v(\"MainActivity\", \"6\");\n }\n\n if (answerSeven) {\n score += 10;\n Log.v(\"MainActivity\", \"7\");\n }\n\n if (answerEight) {\n score += 10;\n Log.v(\"MainActivity\", \"8\");\n }\n\n if (answerNine) {\n score += 10;\n Log.v(\"MainActivity\", \"9\");\n }\n\n if (answerTen.equals(\"Norbert\")) {\n score += 10;\n Log.v(\"MainActivity\", \"10\");\n }\n\n return score;\n }", "@Override\n public void onClick(View view) {\n\n //Getting the answer to question 4 radio button 1\n boolean isRadioButton1Q4 = radioButton1Q4.isChecked();\n\n //Calculate Question 4 score\n int resultQ4 = calculateResultQ4(isRadioButton1Q4);\n\n //Calculate the quiz score\n int result = resultQ1 + resultQ2 + resultQ3 + resultQ4;\n\n //Display the quiz result in the Toast message\n Toast.makeText(Question4Activity.this, \"Congrats! Your score is \" + result + \". Thank you for taking the quiz!\", Toast.LENGTH_LONG).show();\n }", "public void q6Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q6option1);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ6) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ6 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "public void addScore(int n){\n\t\tscore += n;\n\t}", "int score();", "int score();", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "public void awardPoints(int points)\n {\n score += points ;\n }", "private int scoreCounter(int result) {\n result +=1;\n return result;\n }", "public int questionOne() {\n RadioButton answerOne = findViewById ( R.id.q1_a1 );\n\n if (answerOne.isChecked ()) {\n score = 1;\n } else score = 0;\n return score;\n }", "@Override\n\tpublic void inputScore() {\n\n\t}", "public void updateScoreCard(){\n scoreCard.setText(correct+\"/\"+total);\n }", "public void Enter() {\n\t\tEndTimer();\n\t\tif (Question >= 10) {\n\n\t\t\tSystem.out.println(\"This is Game\" + Score);\n\t\t\tIntent TheScore = new Intent(this, Score.class).putExtra(\"Score\",\n\t\t\t\t\tInteger.toString(Score));\n\t\t\tEndTimer();\n\t\t\tstartActivity(TheScore);\n\t\t\tfinish();\n\t\t} else {\n\n\t\t\tEditText editText22 = (EditText) findViewById(R.id.editText1);\n\t\t\tInteger Guess = 0;\n\t\t\ttry {\n\t\t\t\tGuess = Integer.parseInt(editText22.getText().toString());\n\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t}\n\n\t\t\tTextView CorrectOrNot = (TextView) findViewById(R.id.textView1);\n\t\t\t/*\n\t\t\t * If the Hints is on it will allow the user to try each question 4\n\t\t\t * times. Below checks if the Hints is on or off.\n\t\t\t */\n\t\t\tif (Prefs.getHints(this)) {\n\t\t\t\tif (Answer == Guess) {\n\t\t\t\t\tCorrectOrNot.setTextColor(Color.GREEN);\n\t\t\t\t\tCorrectOrNot.setText(\"Correct\");\n\t\t\t\t\tCorrect++;\n\t\t\t\t\t/*\n\t\t\t\t\t * The score is worked out by 100 divided by 10 take away\n\t\t\t\t\t * from how much time was left.\n\t\t\t\t\t */\n\t\t\t\t\tScore = Score + 100 / (10 - TimeLeft);\n\t\t\t\t\tQuestion++;\n\t\t\t\t\treset();\n\t\t\t\t\t/*\n\t\t\t\t\t * Should the user enter the wrong answer it will allow them\n\t\t\t\t\t * to retry as well as tell them if the answer they entered\n\t\t\t\t\t * is greater or less then the actual answer.\n\t\t\t\t\t */\n\t\t\t\t} else if (Tries < 4) {\n\t\t\t\t\tif (Guess > Answer) {\n\t\t\t\t\t\tCorrectOrNot.setTextColor(Color.MAGENTA);\n\t\t\t\t\t\tCorrectOrNot.setText(\"Greater\");\n\t\t\t\t\t\tTries = Tries + 1;\n\t\t\t\t\t\tEndTimer();\n\t\t\t\t\t\tStartTimer();\n\n\t\t\t\t\t}\n\t\t\t\t\tif (Guess < Answer) {\n\t\t\t\t\t\tCorrectOrNot.setTextColor(Color.MAGENTA);\n\t\t\t\t\t\tCorrectOrNot.setText(\"less\");\n\t\t\t\t\t\tTries = Tries + 1;\n\t\t\t\t\t\tEndTimer();\n\t\t\t\t\t\tStartTimer();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t * Once the 4 tries is over, it will check if the last answer is\n\t\t\t\t * correct or not and act accordingly\n\t\t\t\t */\n\t\t\t\tif (Tries >= 4) {\n\t\t\t\t\tif (Answer == Guess) {\n\t\t\t\t\t\tCorrectOrNot.setTextColor(Color.GREEN);\n\t\t\t\t\t\tCorrectOrNot.setText(\"Correct\");\n\t\t\t\t\t\tCorrect++;\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * The score is worked out by 100 divided by 10 take\n\t\t\t\t\t\t * away from how much time was left.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tScore = Score + 100 / (10 - TimeLeft);\n\t\t\t\t\t\tQuestion++;\n\t\t\t\t\t\treset();\n\t\t\t\t\t} else if (Answer != Guess) {\n\t\t\t\t\t\tQuestion++;\n\t\t\t\t\t\tCorrectOrNot.setTextColor(Color.RED);\n\t\t\t\t\t\tCorrectOrNot.setText(\"Incorrect\");\n\t\t\t\t\t\tTries = 0;\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tif (Answer == Guess) {\n\t\t\t\t\tCorrectOrNot.setTextColor(Color.GREEN);\n\t\t\t\t\tCorrectOrNot.setText(\"Correct\");\n\t\t\t\t\tCorrect++;\n\t\t\t\t\t/*\n\t\t\t\t\t * The score is worked out by 100 divided by 10 take away\n\t\t\t\t\t * from how much time was left.\n\t\t\t\t\t */\n\t\t\t\t\tScore = Score + 100 / (10 - TimeLeft);\n\t\t\t\t\tSystem.out.println(Score);\n\t\t\t\t\tQuestion++;\n\t\t\t\t\tSystem.out.println(\"Correct \" + Correct);\n\t\t\t\t\treset();\n\t\t\t\t} else {\n\t\t\t\t\tQuestion++;\n\t\t\t\t\tCorrectOrNot.setTextColor(Color.RED);\n\t\t\t\t\tCorrectOrNot.setText(\"Incorrect\");\n\t\t\t\t\treset();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "private String submitAnswersScore(int calculatedScore) {\n String totalMessagePerfect = \"Great Job! You finished with a score of \" + calculatedScore + \" out of 6!\";\n totalMessagePerfect += \"\\nYou really know your Bears history!\";\n totalMessagePerfect += \"\\nThanks for taking my quiz!\";\n\n String totalMessageAlmost = \"Great Try! You finished with a score of \" +calculatedScore + \" out of 6.\";\n totalMessageAlmost += \"\\nThanks for taking my quiz!\";\n\n if (calculatedScore == 6) {\n return totalMessagePerfect;\n }\n else {\n return totalMessageAlmost;\n }\n }", "private void scoreCounter(int playerName, int category, int score) {\n\t\t// firstly it will update the category score.\n\t\tdisplay.updateScorecard(category, playerName, score);\n\t\t// if the category is lower than upper score it means that player chose\n\t\t// one to six, and we calculate than the upper score.\n\t\tif (category < UPPER_SCORE) {\n\t\t\tupperScore[playerName] += score;\n\t\t\tdisplay.updateScorecard(UPPER_SCORE, playerName,\n\t\t\t\t\tupperScore[playerName]);\n\t\t\t// if the category is more than upper score it means that player\n\t\t\t// chose and we calculate than the lower score.\n\t\t} else if (category > UPPER_SCORE) {\n\t\t\tlowerScore[playerName] += score;\n\t\t\tdisplay.updateScorecard(LOWER_SCORE, playerName,\n\t\t\t\t\tlowerScore[playerName]);\n\t\t}\n\t\t// here we calculate total score by summing upper and lower scores.\n\t\ttotalScore[playerName] = upperScore[playerName]\n\t\t\t\t+ lowerScore[playerName];\n\t\t// if upper score is more than 63 it means player got the bonus.\n\t\tif (upperScore[playerName] >= 63) {\n\t\t\tdisplay.updateScorecard(UPPER_BONUS, playerName, 63);\n\t\t\t// we plus that bonus to total score.\n\t\t\ttotalScore[playerName] += 63;\n\t\t} else {\n\t\t\t// if upper score is lower than 63 it means player didn't get bonus,\n\t\t\t// and it means that bonus=0.\n\t\t\tdisplay.updateScorecard(UPPER_BONUS, playerName, 0);\n\t\t}\n\t\t// and finally we display total score.\n\t\tdisplay.updateScorecard(TOTAL, playerName, totalScore[playerName]);\n\t}", "@Override\r\n\tpublic boolean updateScore(int score) {\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\r\n\t\t\tString sql = \"update member set score=score+\"+score+\" where id='\"+LoginServiceImpl.getCurrentUser().getID()+\"'\";\r\n\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\t\r\n\t\t\tif(ps.executeUpdate()==0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}else\r\n\t\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "private void checkAnswer(boolean userPressedTrue) {\n boolean answerIsTrue = questions[mCurrentIndex].isAnswerTrue();\n int messageResId = 0;\n if (answerIsTrue == userPressedTrue) {\n messageResId = R.string.correct_toast;\n correct++;\n } else {\n messageResId = R.string.incorrect_toast;\n }\n Toast.makeText(QuizActivity.this, messageResId, Toast.LENGTH_SHORT).show();\n }", "public void setBonusScore() {\r\n count = count+50;\r\n }", "public int updateRating(int ra, int rb, double score) {\n double expected = expectedScore(ra, rb);\n double k = 32;\n return (int) (ra + k*(score-expected));\n }", "private void updateScore(int point){\n sScore.setText(\"\" + mScore + \"/\" + mQuizLibrary.getLength());\n\n }", "private void bankUserScore() {\n if (game.isPlayer_turn()) {\n game.addPlayerScore(round_score);\n player_tot_view.setText(String.valueOf(game.getPlayer_total()));\n }\n else {\n game.addBankScore(round_score);\n bank_tot_view.setText(String.valueOf(game.getBank_total()));\n }\n if (game.isGameWon()) {\n gameWonDialog();\n } else {\n game.changeTurn();\n round_score = 0;\n round_score_view.setText(String.valueOf(round_score));\n String label;\n if (game.isPlayer_turn()) {\n game.incrementRound();\n label = \"Round \" + game.getRound() + \" - Player's Turn\";\n }\n else {\n label = \"Round \" + game.getRound() + \" - Banker's Turn\";\n }\n round_label.setText(label);\n if (!game.isPlayer_turn())\n doBankTurn();\n }\n }", "public void correctButtonIsPushed() {\n if (actualAnswer == displayedAnswer) {\n correctAnswers++;\n correctAnswer = true;\n penalty.setTextColor(Color.GREEN);\n penalty.setText(\"Answer correct!\");\n penalty.postDelayed(new Runnable() {\n public void run() {\n penalty.setText(\"\");\n }\n }, 500);\n }else {\n correctAnswer = false;\n secs+=3;\n penalty.setTextColor(Color.RED);\n penalty.setText(\"A 3 second penalty has been applied\");\n penalty.postDelayed(new Runnable() {\n public void run() {\n penalty.setText(\"\");\n }\n }, 500);\n }\n theirAnswer = true;\n afterButtonPushed();\n }", "public static void hitCorrect()\n\t{\n\t\tplayersCards.add(deck.deal());\n\t\tcurrentValue();\n\t\tuserCardImg[playersCards.size()-1].setIcon(new ImageIcon(Gameplay.class.getResource(getCard(playersCards.get(playersCards.size()-1)))));\n\t\tresume();\n\t\tif(calculateHand(playersCards)>21 || playersCards.size()==4 || calculateHand(playersCards)==0)\n\t\t{\n\t\t\troundEnd();\n\t\t}\n\t\t\n\t}", "public void addReview(double score){\n totalReviews++;\n totalScore += score;\n }", "public void updateScores(double attempt) {\r\n \tif(previousScore == 0){\r\n \t\tpreviousScore = currentScore;\r\n \t}else{\r\n \t\tbeforePreviousScore = previousScore;\r\n \t\tpreviousScore = currentScore;\r\n \t}\r\n this.currentScore = 100*(attempt \r\n\t\t\t\t- (benchmark - (maximumMark - benchmark)/NUMBEROFLEVEL))\r\n\t\t\t\t/(((maximumMark - benchmark)/NUMBEROFLEVEL)*2);\r\n }", "public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}", "public void addQuiz(double score){\n quizzes.add(score);\n quizTotal += score;\n}", "public void score(){\r\n\t\tint playerLocation = player.getLocationX();\r\n\t\tint obstacleX = obstacle.getLocationX();\r\n\t\tint obstacleY = obstacle.getLocationY();\r\n\r\n\r\n\t\tstr =\"\" + countCoins;\r\n\r\n\t\t//if you hit a coin, the number of points goes up by one.\r\n\t\tif(obstacleY == 280 && obstacleX==300 && playerLocation == 250){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\t\tif(obstacleY== 450 && obstacleX==300 && playerLocation ==450){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\r\n\t\t//if you hit the green monster, you lose one point.\r\n\t\tif((obstacleX-50) == 250 && (obstacleY-240) == 250 && playerLocation ==250){\r\n\t\t\tcountCoins--;\r\n\t\t}\r\n\r\n\t\t//if you hit the blue monster, you lose 3 points.\r\n\t\tif((obstacleX+180) == 480 && (obstacleY+180) == 250 && playerLocation ==450){\r\n\t\t\tcountCoins-=3;\r\n\t\t}\r\n\t}", "public static void AdditonGameMethod() {\n\t\t\t\t\n\t\t\t\tint hardness = 5;\n\t\t\t\tint hardnessStep = 2;\n\t\t\t\tint score = 0;\n\t\t\t\t\n\t\t\t\t// Set up my for loop to go through the number of rounds\n\t\t\t\tint numberOfRounds = 3;\n\t\t\t\tfor(int roundNumber = 1; \n\t\t\t\troundNumber <= numberOfRounds; \n\t\t\t\troundNumber = roundNumber + 1){\n\t\t\t\t\t//System.out.println(\"Inside the for loop. Round: \" + roundNumber);\n\t\t\t\t\tSystem.out.print(\"Round \" + roundNumber + \" of \" + numberOfRounds + \". \");\n\t\t\t\t\tboolean isAnswerCorrect = getAndCheckStudentAnswer(hardness);\n\t\t\t\t\tif(isAnswerCorrect){\n\t\t\t\t\t\tSystem.out.print(\"Your score was \" + score + \" and is now \");\n\t\t\t\t\t\tscore = score + hardness;\n\t\t\t\t\t\tSystem.out.print(score + \". \");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(roundNumber<numberOfRounds){\n\t\t\t\t\t\t\tSystem.out.print(\"Your hardness was \" + hardness + \" and is now \");\n\t\t\t\t\t\t\thardness = hardness * hardnessStep;\n\t\t\t\t\t\t\tSystem.out.println(hardness + \".\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"Your score is \" + score + \". \");\n\t\t\t\t\t\tif(roundNumber<numberOfRounds){\n\t\t\t\t\t\t\tSystem.out.print(\"Your hardness was \" + hardness + \" and is now \");\n\t\t\t\t\t\t\tif(hardness>5){\n\t\t\t\t\t\t\t\thardness = hardness / hardnessStep;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSystem.out.println(hardness + \".\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\nThe game is complete. \");\n\t\t\t\tSystem.out.println(\"Your final score was \" + score );\n\t\t\t}", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public void increaseScore(final int score) {\n setChanged();\n notifyObservers(new Pair<>(\"increaseScore\", score));\n }", "@Override\n\tpublic void checkScore() {\n\t\t\n\t}", "public void incrementScore(int val) {\n score += val;\n }", "protected boolean guessAnswer(String answer) {\n if (answer.equals(correctAnswer)) {\n currentScore++;\n nextQuestion();\n return true;\n } else {\n nextQuestion();\n return false;\n }\n }", "public void displayCorrect(){\n textPane1.setText(\"\");\r\n generatePlayerName();\r\n textPane1.setText(\"GOOD JOB! That was the correct answer.\\n\"\r\n + atBatPlayer + \" got a hit!\\n\" +\r\n \"Press Next Question, or hit ENTER, to continue.\");\r\n SWINGButton.setText(\"Next Question\");\r\n formattedTextField1.setText(\"\");\r\n formattedTextField1.setText(\"Score: \" + score);\r\n }", "void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }", "public static void takeTest(Question [] questions) {\n int score = 0;\n Scanner keyboardInput = new Scanner(System.in);\n for(int i = 0; i < questions.length; i++){\n System.out.println(questions[i].prompt);\n String answer = keyboardInput.nextLine();\n if(answer.equals(questions[i].answer)) {\n score++;\n }\n\n }\n System.out.println(\"Voce conseguiu \" + score + \"/\" + questions.length + \"pontos\");\n\n }", "public void storeScore(Integer score) {\n SharedPreferences startscore = this.getSharedPreferences(\"qScore\", Context.MODE_PRIVATE);\n int firstscore = startscore.getInt(\"qScore\", 0);\n\n //Henter antall besvareler\n SharedPreferences answers = this.getSharedPreferences(\"qAnswer\", Context.MODE_PRIVATE);\n int answerAmount = answers.getInt(\"qAnswer\", 0);\n\n //Lagrer tidligere score + nye score samt antall besvarelser som kan hentes på alle activities med riktig key (qScore eller qAnswer)\n SharedPreferences prefs = this.getSharedPreferences(\"qScore\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putInt(\"qScore\", (firstscore + score));\n editor.commit();\n\n SharedPreferences prefsX = this.getSharedPreferences(\"qAnswer\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editorX = prefsX.edit();\n editorX.putInt(\"qAnswer\",(answerAmount + 1));\n editorX.commit();\n }", "public void checkAnswer(){\n int selectedRadioButtonId = radioTermGroup.getCheckedRadioButtonId();\n\n // find the radiobutton by returned id\n RadioButton radioSelected = findViewById(selectedRadioButtonId);\n\n String term = radioSelected.getText().toString();\n String definition = tvDefinition.getText().toString();\n\n if (Objects.equals(termsAndDefinitionsHashMap.get(term), definition)) {\n correctAnswers += 1;\n Toast.makeText(ActivityQuiz.this, \"Correct\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(ActivityQuiz.this, \"Incorrect\", Toast.LENGTH_SHORT).show();\n }\n\n tvCorrectAnswer.setText(String.format(\"%s\", correctAnswers));\n }", "public void submitAnswers(View view) {\n\n //Initializing the correct answers in RadioGroups\n questionOneAnswerThree = findViewById(R.id.questionOneAnswerThreeButton);\n questionTwoAnswerFour = findViewById(R.id.questionTwoAnswerFourButton);\n questionThreeAnswerOne = findViewById(R.id.questionThreeAnswerOneButton);\n questionFourAnswerTwo = findViewById(R.id.questionFourAnswerTwoButton);\n questionFiveAnswerFour = findViewById(R.id.questionFiveAnswerFourButton);\n questionSixAnswerTwo = findViewById(R.id.questionSixAnswerTwoButton);\n questionSevenAnswerOne = findViewById(R.id.questionSevenAnswerOneButton);\n\n //Calculating score questions 1-7\n if (questionOneAnswerThree.isChecked()) {\n score++;\n }\n\n if (questionTwoAnswerFour.isChecked()) {\n score++;\n }\n\n if (questionThreeAnswerOne.isChecked()) {\n score++;\n }\n\n if (questionFourAnswerTwo.isChecked()) {\n score++;\n }\n\n if (questionFiveAnswerFour.isChecked()) {\n score++;\n }\n\n if (questionSixAnswerTwo.isChecked()) {\n score++;\n }\n\n if (questionSevenAnswerOne.isChecked()) {\n score++;\n }\n\n // +1 for correct answer\n if (questionEightAnswer.getText().toString().equals(\"1999\")) {\n score++;\n }\n\n //Calculating score if 3 correct answers are checked and 1 incorrect answer is unchecked\n if (questionNineAnswerOne.isChecked() && questionNineAnswerTwo.isChecked() && !questionNineAnswerThree.isChecked() && questionNineAnswerFour.isChecked()) {\n score++;\n }\n\n if (!questionTenAnswerOne.isChecked() && questionTenAnswerTwo.isChecked() && questionTenAnswerThree.isChecked() && questionTenAnswerFour.isChecked()) {\n score++;\n }\n\n //Toast message with score\n Toast.makeText(this, \"Your score: \" + score + \" out of 10 correct!\", Toast.LENGTH_LONG).show();\n\n score = 0;\n }", "private void updateScore() {\n\t\tscoreString.updateString(Integer.toString(score));\n\t}" ]
[ "0.7284714", "0.72777146", "0.72539705", "0.7198921", "0.71490437", "0.71380305", "0.71251166", "0.7073961", "0.7036927", "0.69820195", "0.6952062", "0.69280976", "0.6886216", "0.6876438", "0.68711084", "0.6866169", "0.6864513", "0.6861973", "0.6839728", "0.6812846", "0.6773477", "0.67723906", "0.6770333", "0.67465943", "0.67315876", "0.6730741", "0.672615", "0.6715646", "0.6702431", "0.67017233", "0.66870093", "0.66849643", "0.66758704", "0.6674215", "0.666176", "0.6647642", "0.66473126", "0.66374665", "0.663024", "0.6613774", "0.6607697", "0.6604325", "0.66035706", "0.65969884", "0.6592433", "0.65700936", "0.6569181", "0.6565249", "0.6564017", "0.6563265", "0.655431", "0.65460485", "0.6536962", "0.65351135", "0.6532446", "0.6532108", "0.6530644", "0.65293455", "0.6523696", "0.65165573", "0.65135044", "0.6496123", "0.6487716", "0.64757603", "0.6471858", "0.6471858", "0.64575493", "0.6454554", "0.64452386", "0.6444511", "0.64362615", "0.64334947", "0.6427864", "0.64124894", "0.6411632", "0.6404969", "0.6383993", "0.6380079", "0.63760746", "0.6371332", "0.6368428", "0.6363869", "0.635777", "0.63564014", "0.63543487", "0.63529927", "0.63489676", "0.63466793", "0.6345418", "0.6343468", "0.63434136", "0.63401204", "0.63327485", "0.632927", "0.6326104", "0.63252294", "0.63245577", "0.63224876", "0.63134396", "0.631162", "0.6309859" ]
0.0
-1
calls the next question once the submit button is pressed
private void buttonSubmit (){ Intent nextActivity = new Intent(Question_One.this, Question_two.class); // Transfers the user's current score to the next intent(question) nextActivity.putExtra(EXTRA_TEXT,scoreCounter); startActivity(nextActivity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void callNextQuestion() {\n questionProgress++;\n\n if (questionProgress <= 10) {\n\n if (Utils.isKitkat()) {\n ContinuousSlide slide = new ContinuousSlide(Gravity.RIGHT);\n TransitionManager.beginDelayedTransition(llBody, slide);\n }\n\n btNext.setVisibility(View.GONE);\n currentQuestion = getQuestionById(questionProgress);\n ivScene.setVisibility(View.GONE);\n tvQuestion.setVisibility(View.GONE);\n\n if (tvResult != null) {\n flSceneFrame.removeView(tvResult);\n }\n ivScene.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {\n @Override\n public void onGlobalLayout() {\n ivScene.getViewTreeObserver().removeOnGlobalLayoutListener(this);\n resizeSceneArea();\n for (int i = 0; i < 4; i++) {\n positionAnswer(answerButtonList.get(i), currentQuestion.getAnswers().get(i));\n waitAnimations();\n }\n }\n });\n } else {\n questionProgress = 10;\n Intent intent = new Intent(this, ResultActivity_.class);\n startActivity(intent);\n }\n }", "public void goOnToNextQuestion(){\n\t\tbtnConfirmOrNext.setText(\"Next Question\");\n\t\tenableAllButtons();// need to be able to click to proceed\n\t\tquizAccuracy.setText(\": \"+spellList.getLvlAccuracy()+\"%\");\n\t\t// if user got answer correct move on immediately, else let user look at the correct answer first\n\t\tif(correctFlag){\n\t\t\t// set it to false initially for the next question\n\t\t\tcorrectFlag = false;\n\t\t\tbtnConfirmOrNext.doClick();\n\t\t}\n\n\t}", "public static void clickNextBtn() {\t\n\t\ttry {\n\t\t\tdriver.findElement(By.id(\"nextquest\")).click();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Next button in Q&A submit doesnt work\");\n\t\t}\n\t}", "public void showNextQuestion() {\n currentQuiz++;\n gui.setUp();\n if (currentQuiz <= VocabularyQuizList.MAX_NUMBER_QUIZ) {\n showQuestion(currentQuiz);\n } else {\n result();\n }\n gui.getFrame().setVisible(true);\n }", "public void nextQuestion(View view){\n\n\n Question = findViewById(R.id.question1);\n // If the current question has been answered, validate & move on to the next question\n if (checkAnswered()){\n // Check for right or wrong answer\n validateQuestion();\n\n // Move on to the new question\n Intent intent = new Intent(getApplicationContext(),Questions2of5Activity.class);\n if (intent.resolveActivity(getPackageManager()) != null) {\n intent.putExtra(\"passedScore\",score);\n intent.putExtra(\"firstName\",firstName);\n intent.putExtra(\"lastName\",lastName);\n startActivity(intent);\n\n // Destroy activity to prevent user from going back\n finish();\n }\n }\n\n // If the question has not been answered, provide a toast message\n else {\n displayToast(\"You need to answer the question before moving on to the next\");\n }\n }", "private void btnNext_click(ActionEvent e) {\n\t\tString stuAnswer = \"\";\r\n\t\tif (rdoItemA.isSelected()) {\r\n\t\t\tstuAnswer = \"A\";\r\n\t\t}\r\n\t\tif (rdoItemB.isSelected()) {\r\n\t\t\tstuAnswer = \"B\";\r\n\t\t}\r\n\t\tif (rdoItemC != null) {\r\n\t\t\tif (rdoItemC.isSelected()) {\r\n\t\t\t\tstuAnswer = \"C\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (rdoItemD != null) {\r\n\t\t\tif (rdoItemD.isSelected()) {\r\n\t\t\t\tstuAnswer = \"D\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!stuAnswer.isEmpty()) {\r\n\t\t\tExamItem bean = eiList.get(questionNO - 1);\r\n\r\n\t\t\tif (bean.getStuAnswer() == null || !bean.getStuAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\tbean.setStuAnswer(stuAnswer);\r\n\t\t\t\tif (bean.getStdAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\t\tbean.setMarkResult(1l);\r\n\t\t\t\t\tbean.setGainScore(bean.getStdScore());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbean.setMarkResult(0l);\r\n\t\t\t\t\tbean.setGainScore(0l);\r\n\t\t\t\t}\r\n\t\t\t\texamItemService.update(bean);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (questionNO == questionNum) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"这是最后一题。\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tquestionNO++;\r\n\t\tinitData();\r\n\t}", "public void nextButton(View view) {\n Button submit = (Button) findViewById(R.id.start_and_submit_button);\n RadioGroup radioButtons = (RadioGroup) findViewById(R.id.radio_group);\n LinearLayout checkGroup = (LinearLayout) findViewById(R.id.check_group);\n EditText inputText = (EditText) findViewById(R.id.input_text);\n getUserAnswer();\n\n if (currentQueNum < maxNumOfQues) {\n currentQueNum += 1;\n optionsSelect();\n\n //this set question no 4 to checkbox view UI reply as required\n if (currentQueNum == 4) {\n radioButtons.setVisibility(View.GONE);\n checkGroup.setVisibility(View.VISIBLE);\n inputText.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView questionsPane = (TextView) findViewById(R.id.questions_pane);\n questionsPane.setText(que[currentQueNum - 1]);\n }\n\n //this below block of code will set question number 7 and 10 to textView UI reply\n else if (currentQueNum == 7 || currentQueNum == 10) {\n radioButtons.setVisibility(View.GONE);\n inputText.setVisibility(View.VISIBLE);\n checkGroup.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView quesDisp = (TextView) findViewById(R.id.questions_pane);\n quesDisp.setText(que[currentQueNum - 1]);\n }\n\n // this below block of code will set the view with appropriate UI for answers\n else {\n radioButtons.setVisibility(View.VISIBLE);\n inputText.setVisibility(View.GONE);\n checkGroup.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView questionsPane = (TextView) findViewById(R.id.questions_pane);\n questionsPane.setText(que[currentQueNum - 1]);\n }\n }\n\n //notify the user that he/she have reach the end of test he should submit?\n else {\n Toast endOfQuiz = makeText(getApplicationContext(), \"YOU HAVE REACH THE END OF TEST, SUBMIT?\", Toast.LENGTH_SHORT);\n endOfQuiz.show();\n submit.setEnabled(true);\n }\n if (currentQueNum != maxNumOfQues) {\n inputText.setText(\"\");//clear the text field for subsequent use\n radioButtons.clearCheck();//this clear the check state of radioButtons since same object will be re used in next question\n }\n }", "public void nextQuestion() {\n if (currentq<questionbank.size()-1)\n {\n currentq++;\n }\n else\n {\n currentq=0;\n finished=true;\n\n Intent i = new Intent(MainActivity.this, ScorecardActivity.class);\n //Intent(coming from, where to go)\n i.putExtra(EXTRAMESSAGE1, Integer.toString(score));\n startActivity(i);\n\n }\n question.setText(questionbank.get(currentq).getQuestionText());\n\n\n }", "private void displayNextQuestion() {\n\n if (quizIterator.hasNext()){\n question = quizIterator.next();\n qTextView.setText(question.getQuestion());\n setBtnUsability(true);\n }\n else\n {\n setBtnUsability(false);\n qTextView.setText(\"Great job! You're a stack star!\");\n }\n\n }", "public void nextBtnClicked(View v) {\r\n//\t\tshowMsg(\"Next Button clicked: \"+ v);\r\n\t\tresetSelection();\r\n\t\tnextQuestion(1);\r\n\t\tshowQuesAndAnswers();\r\n\t}", "protected GuiTestObject nextsubmit() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"nextsubmit\"));\n\t}", "public void actionPerformed(ActionEvent e)\n {\n //sets correct or wrong notes to invisible\n response.setVisible(false); \n response2.setVisible(false); \n if(correct) //if answer inputed was correct - set in enter button\n {\n if(x <= 1) //keeps track of which problem user is on\n {\n x++;\n tf.setText(questions[x]); //next question\n }\n else\n {\n //if all problems are solved class segways to next part of game\n game.setVisible(true); \n end.setVisible(true); \n }\n }\n \n correct = false; \n }", "public void nextQuestion(View view) {\n\n int points = calculatePoints();\n //Retrieve the variable \"total_points\" from the previous activity\n Bundle extras = getIntent().getExtras();\n if (extras != null) {\n points = points + extras.getInt(\"total_points\");\n }\n\n boolean validatedAnswer = validateAnswer();\n\n if (validatedAnswer == true) {\n\n Intent startNextQuestion = new Intent(this, ScoreActivity.class);\n startNextQuestion.putExtra(\"total_points\", points);\n startActivity(startNextQuestion);\n }\n }", "public void nextQuestion(View view) {\n Button button = (Button) findViewById(R.id.question_button_previous);\n if (!button.isEnabled()){\n button.setEnabled(true);\n }\n saveProgress();\n sequence++;\n updateView();\n }", "private void nextQuestion() {\n mCurrentIndex = (mCurrentIndex + 1) % questions.length;\n int question = questions[mCurrentIndex].getTextResId();\n mText.setText(question);\n }", "private void nextQuestion() {\n\n // increment current question index\n currentQuestionIndex++;\n\n // if the current question index is smaller than the size of the quiz list\n if (currentQuestionIndex < quizList.size()) {\n\n // clear the possible answers\n possibleAnswers.clear();\n\n // grab the definition of current question, assign the correct answer variable\n // and add it to the list of possible answers.\n definition = quizList.get(currentQuestionIndex)[0];\n correctAnswer = quizMap.get(definition);\n possibleAnswers.add(correctAnswer);\n\n // while there's less than 4 possible answers, get a random answer\n // and if it hasn't already been added, add it to the list.\n while (possibleAnswers.size() < 4) {\n String answer = quizList.get(new Random().nextInt(quizList.size() - 1))[1];\n if (!possibleAnswers.contains(answer)) {\n possibleAnswers.add(answer);\n }\n }\n\n // shuffle possible answers so they display in a random order\n Collections.shuffle(possibleAnswers);\n } else {\n // if the question index is out of bounds, set quiz as finished\n quizFinished = true;\n }\n }", "private void buttonNext (){\n Intent nextActivity = new Intent(Question_One.this, Question_two.class);\n nextActivity.putExtra(EXTRA_TEXT,scoreCounter);\n startActivity(nextActivity);\n }", "private void getNextQuestionHandler() {\n //Log.i(TAG, \"getNextQuestionHandler\");\n p.setVisibility(View.VISIBLE);\n questionText.setText(\"Loading...\");\n readableCheck.setChecked(false);\n readableCheck.setEnabled(false);\n submitBtn.setEnabled(false);\n skipBtn.setEnabled(false);\n img01.setImageResource(R.drawable.new_rating_smile_grey);\n img02.setImageResource(R.drawable.new_rating_nutral_grey);\n img03.setImageResource(R.drawable.new_rating_angry_grey);\n imgb01 = false;\n imgb02 = false;\n imgb03 = false;\n rateValue = 0;\n\n controller.getNextQuestion();\n }", "public void actionPerformed(ActionEvent e) \r\n\t{\r\n\t\t//Checks which button is pressed and calls the relevant method\r\n\t\tif (e.getSource() == nextQuestionButton)\r\n\t\t{\r\n\t\t\tfetchNewQuestion();\r\n\t\t}\r\n\t\telse if (e.getSource() == submitAnswerButton)\r\n\t\t{\r\n\t\t\tcheckAnswer();\r\n\t\t}\r\n\t}", "@FXML\n private void _submitAnswer(ActionEvent _event) {\n Game currentGame = GameFactory.getCurrentGameInstance();\n currentGame.processAnswer(_answerInput.getText());\n Map<String, Object> data = currentGame.createMap();\n updateView(data);\n this._answerInput.setText(\"\");\n if (!currentGame.gameOver) {\n this._submitBtn.setDisable(true);\n this._nxtQuestion.setDisable(false);\n } else {\n this._submitBtn.setDisable(true);\n this._nxtQuestion.setDisable(true);\n }\n }", "public static void checkAndClickNextButton() {\r\n\t\tcheckNoSuchElementExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t}", "public void startOrSubmitButton(View view) {\n Button nextButton = (Button) findViewById(R.id.next_button);\n nextButton.setEnabled(false);\n String solutions[] = getResources().getStringArray(R.array.solutions);\n Button startAndSubmitButton = (Button) findViewById(R.id.start_and_submit_button);\n RadioGroup radioButton = (RadioGroup) findViewById(R.id.radio_group);\n LinearLayout checkGroup = (LinearLayout) findViewById(R.id.check_group);\n EditText inputText = (EditText) findViewById(R.id.input_text);\n\n if (currentQueNum != 0) {\n getUserAnswer();//get the user's answer or response as the instance of submit\n startAndSubmitButton.setEnabled(true);\n for (int i = 0; i < currentQueNum; ++i) {\n if (userAnswer[i].equalsIgnoreCase(solutions[i]))\n score += 1;\n if (userAnswer[i].equalsIgnoreCase(\"skipped\"))\n noOfSkippedQues += 1;\n if (currentQueNum != maxNumOfQues)\n oops = \"\\nYou didn't reach the end of test\";\n }\n disableCheckBox();\n disableInputText();\n disableRadioButtons();\n disableStartOrSubmitButton();\n disableNextButton();\n // give toast of the overall performance\n Toast displayResult = Toast.makeText(getApplicationContext(), userName.toUpperCase() + \" you have score \" + String.valueOf(score) + \"\\nout of \" + String.valueOf(maxNumOfQues) + \" questions attempted.\", Toast.LENGTH_LONG);\n displayResult.show();\n\n //using another activity to display the quiz result and summary\n Intent intent = new Intent(MainActivity.this, QuizSummaryActivity.class);\n intent.putExtra(\"score\", String.valueOf(score));\n intent.putExtra(\"userName\", userName);\n intent.putExtra(\"oops\", oops);\n intent.putExtra(\"noOfSkippedQues\", String.valueOf(noOfSkippedQues));\n intent.putExtra(\"currentQueNum\", String.valueOf(currentQueNum));\n\n startActivity(intent);\n } else {\n currentQueNum += 1;\n radioButton.setVisibility(View.VISIBLE);\n inputText.setVisibility(View.GONE);\n checkGroup.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView questionsPane = (TextView) findViewById(R.id.questions_pane);\n questionsPane.setText(que[currentQueNum - 1]);\n optionsSelect();\n startAndSubmitButton.setText(R.string.submit_button);\n nextButton.setEnabled(true);\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==btnConfirmOrNext){\n\t\t\tif(btnConfirmOrNext.getText().equals(\"Confirm\")){\n\t\t\t\ttakeInUserInput();\n\t\t\t\tdisableAllButtons(); // festival speaking\n\t\t\t} else if (btnConfirmOrNext.getText().equals(\"Next Question\")||btnConfirmOrNext.getText().equals(\"Done\")){\n\t\t\t\tdisableAllButtons(); // festival speaking\n\t\t\t\t// ask question when it is supposed to\n\t\t\t\tif(spellList.status == QuizState.Asking){\n\t\t\t\t\tbtnConfirmOrNext.setText(\"Confirm\");\n\t\t\t\t\tquestionAsker=spellList.getQuestionAsker();\n\t\t\t\t\tquestionAsker.execute();\n\t\t\t\t}\n\t\t\t}\n\t\t} else if(e.getSource()==btnStop){\n\t\t\t// quiz only stoppable after a question is done asking (i.e. Answering state) or when is question is done answered\n\t\t\tif(spellList.status==QuizState.Answering||btnConfirmOrNext.getText().equals(\"Next Question\")){\n\t\t\t\t// record stats even though stopped\n\t\t\t\tspellList.recordStatisticsFromLevel();\n\t\t\t\t// go back to main panel\n\t\t\t\tmainFrame.changeCardPanel(\"Main\");\n\t\t\t}\n\t\t} else if(e.getSource()==btnListenAgain){\n\t\t\t// this button only works when the voice generator is not generating any voice and when a question is not being asked\n\t\t\tif((!(spellList.status==QuizState.Asking)||(btnConfirmOrNext.getText().equals(\"Next Question\")))&&respellGen.isDone()){\n\t\t\t\t// respell word\n\t\t\t\trespellGen = new VoiceGenerator(theVoice,theVoiceStretch,theVoicePitch,theVoiceRange);\n\t\t\t\trespellGen.setTextForSwingWorker(\"\", spellList.getCurrentWord());\n\t\t\t\trespellGen.execute();\n\t\t\t\t// rerequest focus on user input\n\t\t\t\tuserInput.requestFocus();\n\t\t\t}\n\t\t}\n\t}", "public void takeAction() {\n mRelativeLayout.setVisibility(View.INVISIBLE);\n currentQuestion = questionList.get(questionID);\n textView = findViewById(R.id.questionText);\n buttonA = findViewById(R.id.radioA);\n buttonB = findViewById(R.id.radioB);\n buttonC = findViewById(R.id.radioC);\n button = findViewById(R.id.button);\n setQuestionView();\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n RadioGroup radioGroup = findViewById(R.id.radioGroup);\n\n if (radioGroup.getCheckedRadioButtonId() == -1) {\n return;\n }\n\n RadioButton answer = findViewById(radioGroup.getCheckedRadioButtonId());\n\n radioGroup.clearCheck();\n\n if (currentQuestion.getAnswer().equals(answer.getText())) {\n score++;\n }\n\n // checks if all questions have been answered and opens the result page\n if (questionID < questionList.size()) {\n currentQuestion = questionList.get(questionID);\n setQuestionView();\n } else {\n Intent intent = new Intent(QuizActivity.this, ResultActivity.class);\n Bundle bundle = new Bundle();\n ResultHolder answers = new ResultHolder(questionList);\n bundle.putSerializable(\"answers\", answers);\n bundle.putInt(\"score\", score);\n intent.putExtras(bundle);\n startActivity(intent);\n finish();\n }\n }\n });\n\n }", "public void submitClick(View v){\n if (Integer.parseInt(v.getTag().toString())==0) {\n //Calculating score\n Integer selectedAnswer = -1;\n\n //try-catch for when an answer is not selected.\n try {\n selectedAnswer = Integer.parseInt(userSelection.getTag().toString());\n answerSelected = true;\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"Please select an answer!\", Toast.LENGTH_SHORT).show();\n }\n\n //Proceed only if an answer has been selected\n if (answerSelected) {\n System.out.println(\"Selected answer is \" + selectedAnswer);\n selectedAnswer = Integer.parseInt(userSelection.getTag().toString());\n\n //Check selected answer against correct answer defined in strings.xml\n if (selectedAnswer == Integer.parseInt(questions[currentQuestion - 1][5])) {\n System.out.println(\"Correct Answer!\");\n userSelection.setBackgroundColor(getResources().getColor(R.color.correct_answer_btn));\n score = score + 1;\n } else {\n System.out.println(\"Incorrect answer! Try again.\");\n userSelection.setBackgroundColor(getResources().getColor(R.color.incorrect_answer_btn));\n answerButtons[Integer.parseInt(questions[currentQuestion - 1][5]) - 1].setBackgroundColor(getResources().getColor(R.color.correct_answer_btn));\n }\n\n //Make buttons unclickable once answer is submitted\n ans1.setClickable(false);\n ans2.setClickable(false);\n ans3.setClickable(false);\n\n //Change button text and tag\n submit.setText(\"NEXT\");\n submit.setTag(1);\n }\n }\n\n //When NEXT is clicked\n else{\n //Clear previous selection\n userSelection = null;\n answerSelected=false;\n\n System.out.println(\"Next question appears now...\");\n currentQuestion = currentQuestion + 1;\n\n //Only 5 questions will be displayed.\n if(currentQuestion<6){\n submit.setText(\"SUBMIT\");\n submit.setTag(0);\n setQuestion();\n\n //Make buttons clickable\n ans1.setClickable(true);\n ans2.setClickable(true);\n ans3.setClickable(true);\n }\n\n else{\n submit.setTag(3);\n\n //End activity and send results to MainActivity.\n System.out.println(\"ScoreActivity starts now.\");\n System.out.println(\"Score is \" + score);\n\n Intent intent = new Intent(QuizActivity.this, MainActivity.class);\n intent.putExtra(\"score\", score);\n setResult(RESULT_FIRST_USER, intent);\n\n finish();\n }\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == submit) {\n int score = answerCheck();\n try {\n Submit submitButton = new Submit(userid, user.getText(), totalScore.getText(), score);\n setVisible(false);\n } catch (SQLException ex) {\n Logger.getLogger(Play.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "private void goToSelectedQuestion(int questionindex){\n radioGroup.setEnabled(true);\n saveAnswer();\n mQuestionIndex = questionindex;\n unSelectRadioButtons();\n updateQuestion();\n\n loadRadioButtonSelection();\n\n\n }", "void acceptQueAnswersClicked();", "public void question() {\n\t\tlead.answer(this);\n\t}", "public void setNextQuestion(Question question) {\n curQuestion = question;\n p.setVisibility(View.GONE);\n questionText.setText(question.getText());\n questionText.scrollTo(0, 0);\n\n readableCheck.setEnabled(true);\n readableCheck.setChecked(true);\n skipBtn.setEnabled(true);\n }", "public void submit (View view) {\n score = 0;\n optionOne = findViewById(R.id.option_one);\n int idOne = optionOne.getCheckedRadioButtonId();\n //to check if the radio group was not checked so as to alert the user\n if (idOne == -1) {\n TextView targetView = findViewById(R.id.question_one);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_one_err, Toast.LENGTH_SHORT).show();\n return;\n }\n // And if it is checked, score is updated\n if (idOne == R.id.option_one_d) {\n score += 1;\n }\n\n optionTwo = findViewById(R.id.option_two);\n int idTwo = optionTwo.getCheckedRadioButtonId();\n if (idTwo == -1) {\n TextView targetView = findViewById(R.id.question_two);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_two_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (idTwo == R.id.option_two_b) {\n score += 1;\n }\n\n optionThree = findViewById(R.id.option_three);\n int idThree = optionThree.getCheckedRadioButtonId();\n if (idThree == -1) {\n TextView targetView = findViewById(R.id.question_three);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_three_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (idThree == R.id.option_three_c) {\n score += 1;\n }\n\n questionFourAns = findViewById(R.id.question_four_ans);\n //To check if the edit text field is empty so as to alert the user\n if (TextUtils.isEmpty(questionFourAns.getText().toString().trim())) {\n TextView targetView = findViewById(R.id.question_four);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_four_err, Toast.LENGTH_SHORT).show();\n return;\n }\n //Else, score is updated\n if (questionFourAns.getText().toString().equalsIgnoreCase(getString(R.string.question_four_correct_ans))) {\n score += 1;\n }\n\n questionFiveAns = findViewById(R.id.question_five_ans);\n if (TextUtils.isEmpty(questionFiveAns.getText().toString().trim())) {\n TextView targetView = findViewById(R.id.question_five);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_five_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (questionFiveAns.getText().toString().equalsIgnoreCase(getString(R.string.question_five_correct_ans))) {\n score += 1;\n }\n\n optionSixA = findViewById(R.id.option_six_a);\n optionSixB = findViewById(R.id.option_six_b);\n optionSixC = findViewById(R.id.option_six_c);\n optionSixD = findViewById(R.id.option_six_d);\n optionSixE = findViewById(R.id.option_six_e);\n boolean sixA = optionSixA.isChecked();\n boolean sixB = optionSixB.isChecked();\n boolean sixC = optionSixC.isChecked();\n boolean sixD = optionSixD.isChecked();\n boolean sixE = optionSixE.isChecked();\n //To check if none of the checkboxes is checked so as to alert the user\n if (!sixA && !sixB && !sixC && !sixD && !sixE) {\n TextView targetView = findViewById(R.id.question_six);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_six_err, Toast.LENGTH_SHORT).show();\n return;\n }\n // Else update score\n if (!sixA && sixB && !sixC && sixD && !sixE) {\n score += 1;\n }\n\n optionSevenA = findViewById(R.id.option_seven_a);\n optionSevenB = findViewById(R.id.option_seven_b);\n optionSevenC = findViewById(R.id.option_seven_c);\n optionSevenD = findViewById(R.id.option_seven_d);\n optionSevenE = findViewById(R.id.option_seven_e);\n boolean sevenA = optionSevenA.isChecked();\n boolean sevenB = optionSevenB.isChecked();\n boolean sevenC = optionSevenC.isChecked();\n boolean sevenD = optionSevenD.isChecked();\n boolean sevenE = optionSevenE.isChecked();\n if (!sevenA && !sevenB && !sevenC && !sevenD && !sevenE) {\n TextView targetView = findViewById(R.id.question_seven);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_seven_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (!sevenA && sevenB && !sevenC && !sevenD && sevenE) {\n score += 1;\n }\n\n optionEightA = findViewById(R.id.option_eight_a);\n optionEightB = findViewById(R.id.option_eight_b);\n optionEightC = findViewById(R.id.option_eight_c);\n optionEightD = findViewById(R.id.option_eight_d);\n optionEightE = findViewById(R.id.option_eight_e);\n boolean eightA = optionEightA.isChecked();\n boolean eightB = optionEightB.isChecked();\n boolean eightC = optionEightC.isChecked();\n boolean eightD = optionEightD.isChecked();\n boolean eightE = optionEightE.isChecked();\n if (!eightA && !eightB && !eightC && !eightD && !eightE) {\n TextView targetView = findViewById(R.id.question_eight);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_eight_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (!eightA && !eightB && !eightC && eightD && !eightE) {\n score += 1;\n }\n\n optionNineA = findViewById(R.id.option_nine_a);\n optionNineB = findViewById(R.id.option_nine_b);\n optionNineC = findViewById(R.id.option_nine_c);\n optionNineD = findViewById(R.id.option_nine_d);\n optionNineE = findViewById(R.id.option_nine_e);\n boolean nineA = optionNineA.isChecked();\n boolean nineB = optionNineB.isChecked();\n boolean nineC = optionNineC.isChecked();\n boolean nineD = optionNineD.isChecked();\n boolean nineE = optionNineE.isChecked();\n if (!nineA && !nineB && !nineE && !nineC && !nineD) {\n TextView targetView = findViewById(R.id.question_nine);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_nine_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (nineA && nineB && nineE && !nineC && !nineD) {\n score += 1;\n }\n\n optionTenA = findViewById(R.id.option_ten_a);\n optionTenB = findViewById(R.id.option_ten_b);\n optionTenC = findViewById(R.id.option_ten_c);\n optionTenD = findViewById(R.id.option_ten_d);\n optionTenE = findViewById(R.id.option_ten_e);\n boolean tenA = optionTenA.isChecked();\n boolean tenB = optionTenB.isChecked();\n boolean tenC = optionTenC.isChecked();\n boolean tenD = optionTenD.isChecked();\n boolean tenE = optionTenE.isChecked();\n if (!tenA && !tenB && !tenC && !tenD && !tenE) {\n TextView targetView = findViewById(R.id.question_ten);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_ten_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (tenA && !tenB && !tenC && !tenD && !tenE) {\n score += 1;\n }\n\n // Displays a toast for the score\n Toast.makeText(MainActivity.this, getString(R.string.result, score), Toast.LENGTH_LONG).show();\n // Displays a toast message based on the user's performance\n if (score > 7) {\n Toast.makeText(MainActivity.this, getString(R.string.fabulous), Toast.LENGTH_SHORT).show();\n } else if (score >= 5 && score <= 7) {\n Toast.makeText(MainActivity.this, getString(R.string.good_job), Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(MainActivity.this, getString(R.string.try_again), Toast.LENGTH_SHORT).show();\n }\n\n // Sets the switch view visible and ensures it's off\n mySwitch = findViewById(R.id.switch1);\n mySwitch.setChecked(false);\n mySwitch.setVisibility(View.VISIBLE);\n mySwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\n /** This method allows the user to receive a mail of the result if the switch is on\n * It also ensures that the name and email fields are filled and then sends an intent\n * to a mail app with a summary of the result\n */\n @Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {\n // When the switch is on\n if (isChecked) {\n name = findViewById(R.id.name_editText);\n String nameOfUser = name.getText().toString();\n email = findViewById(R.id.email_editText);\n String[] address = {email.getText().toString()};\n String msg = returnMessage();\n //To check if the name edit text field is empty so as to alert the user\n if (TextUtils.isEmpty(name.getText().toString().trim())) {\n TextView targetView = name;\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(MainActivity.this, R.string.name_err, Toast.LENGTH_SHORT).show();\n mySwitch.setChecked(false);\n return;\n }\n //To check if the email edit text field is empty so as to alert the user\n if (TextUtils.isEmpty(email.getText().toString().trim())) {\n TextView targetView = name;\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(MainActivity.this, R.string.email_err, Toast.LENGTH_SHORT).show();\n mySwitch.setChecked(false);\n return;\n }\n // Sends an intent to a mail app with the necessary details\n Intent intent = new Intent(Intent.ACTION_SENDTO);\n intent.setData(Uri.parse(\"mailto:\"));\n intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.result_email_subject, nameOfUser));\n intent.putExtra(Intent.EXTRA_EMAIL, address);\n intent.putExtra(Intent.EXTRA_TEXT, msg);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }\n }\n });\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\t\tif (q1.isAnswerCorrect(getattempt.getText())){ //if its correct\n\t\t\t\t\t\tforq1 = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse forq1 = 0; //if it is incorrect\n\t\t\t\t\tattempt = getattempt.getText();\n\t\t\t\t\t\n\t\t\t\t\tquestionarea.setText(q2.question);//changes everything for the 2nd question after entering the first question\n\t\t\t\t\tgetattempt.setText(\"Enter your answer here\");\n\t\t\t\t\t//enter.remove(et);\n\t\t\t\t\tenter.addActionListener(ft);\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n progress = progress + 1;\n progressBar.setProgress(progress);\n\n //Check if radio button is checked. If is checked then we have to compare the answer:\n RadioButton answer = (RadioButton) findViewById(radioGroup.getCheckedRadioButtonId());\n //if current question equals to identified answer\n if (currentQuest1.getANSWER().equals(answer.getText())) {\n //then upgrade the score/points by 100\n score = score + 100;\n }\n\n //if is not checked then:\n radioGroup.clearCheck();\n //we can't go to the next question\n nextButtonQuest1.setEnabled(false);\n\n if (questionIncrease < 11) {\n //Quiz have only 10 questions. When all questions are answered then the quiz terminate\n if (questionIncrease == 10) {\n //setting the text inside the \"Next\" button to \"End Quiz\". The quiz ended !\n nextButtonQuest1.setText(\"End Quiz\");\n }\n\n //Get the number of questionIncrease (it show where are we inside the quiz) for entry of the created List and load it to currentQuest1\n currentQuest1 = questList1.get(list.get(questionIncrease));\n\n //Method who updates the View of Quiz Structure\n setQuizStructureView();\n\n //The quiz have been finished, so the timer must be ended\n /* } else {\n timer.onFinish();\n timer.cancel();\n }*/\n }\n }", "public void q2Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q2option3);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ2) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ2 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "private void updateQuestion() {\n\n if (attempts < 10) { //To ensure only 10 questions are shown.\n Question.setText(quizQuestions.getQuestion(questionNumber));\n Answer1.setText(quizQuestions.getChoice1(questionNumber));\n Answer2.setText(quizQuestions.getChoice2(questionNumber));\n Answer3.setText(quizQuestions.getChoice3(questionNumber));\n Answer4.setText(quizQuestions.getChoice4(questionNumber));\n QuestionNo.setText(quizQuestions.getQuestionNo(questionNumber));\n }\n\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n// String s = quizQuestions.getHint(questionNumber - 1);\n showFlashcardDialog(QuizActivity.this, quizQuestions.getHint(questionNumber - 1), true);\n\n }\n });\n\n //Checks with QuizQuestions class to see if answer was correct\n correctAnswer = quizQuestions.getCorrectAnswer(questionNumber);\n\n //Finishes the quiz once 10 questions have been answered\n if (attempts == 10) {\n finish();\n updateScore(mScore);\n Intent results = new Intent(getApplicationContext(), QuizComplete.class); //Starts QuizComplete activity\n results.putExtra(TRANSFER_SCORE, mScore); //Transfers score to show at QuizComplete activity\n startActivity(results);\n\n } else {\n questionNumber++;\n }\n\n if (mScore > highScore) {\n updateHighScore(mScore);\n }\n }", "public static Result next() {\r\n\t\t// get current node\r\n\t\tMap<String, String> requestData = Form.form().bindFromRequest().data();\r\n\t\tString idCurrentNode = requestData.get(RequestParams.CURRENT_NODE);\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tString employeeName = CMSSession.getEmployeeName();\r\n\r\n\t\tDecision nextDecision = CMSGuidedFormFill.makeDecision(formName,\r\n\t\t\t\temployeeName, idCurrentNode, requestData);\r\n\r\n\t\treturn ok(backdrop.render(nextDecision));\r\n\t}", "void goToNext(boolean isCorrect);", "public void q1Submit(View view) {\n\n EditText editText = (EditText) findViewById(R.id.q1enterEditText);\n String q1answer = editText.getText().toString().trim();\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if ((q1answer.toLowerCase().equals(getString(R.string.q1AnswerCheck1))) || (q1answer.toLowerCase().equals(getString(R.string.q1AnswerCheck2)))) {\n if (isNotAnsweredQ1) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct1), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ1 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "public static void checkAndClickNextButtonTriviaMode() {\r\n\t\tcheckNoSuchElementExceptionByID(\"btnnext\", \"\\\"Next\\\" button in trivia mode\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"btnnext\", \"\\\"Next\\\" button in trivia mode\");\r\n\t}", "public void result() {\n JLabel header = new JLabel(\"Finish!!\");\n header.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 28));\n gui.getConstraints().gridx = 0;\n gui.getConstraints().gridy = 0;\n gui.getConstraints().insets = new Insets(10,10,50,10);\n gui.getPanel().add(header, gui.getConstraints());\n\n String outcomeText = String.format(\"You answer correctly %d / %d.\",\n totalCorrect, VocabularyQuizList.MAX_NUMBER_QUIZ);\n JTextArea outcome = new JTextArea(outcomeText);\n outcome.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n outcome.setEditable(false);\n gui.getConstraints().gridy = 1;\n gui.getConstraints().insets = new Insets(10,10,30,10);\n gui.getPanel().add(outcome, gui.getConstraints());\n\n JButton b = new JButton(\"home\");\n gui.getGuiAssist().homeListener(b);\n gui.getConstraints().gridy = 2;\n gui.getConstraints().insets = new Insets(10,200,10,200);\n gui.getPanel().add(b, gui.getConstraints());\n\n b = new JButton(\"start again\");\n startQuestionListener(b);\n gui.getConstraints().gridy = 3;\n gui.getPanel().add(b, gui.getConstraints());\n }", "public void q3Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q3option1);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ3) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ3 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "public void q5Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q5option3);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ5) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ5 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "protected void handleNext(ActionEvent event) {\n\t}", "public void submitClicked(View view) {\n\n // Change the buttons color to default once the user has answered\n answer1Button.setBackgroundColor(Color.parseColor(\"#BDBDBD\"));\n answer1Button.setTextColor(Color.parseColor(\"#000000\"));\n answer2Button.setBackgroundColor(Color.parseColor(\"#BDBDBD\"));\n answer2Button.setTextColor(Color.parseColor(\"#000000\"));\n answer3Button.setBackgroundColor(Color.parseColor(\"#BDBDBD\"));\n answer3Button.setTextColor(Color.parseColor(\"#000000\"));\n answer4Button.setBackgroundColor(Color.parseColor(\"#BDBDBD\"));\n answer4Button.setTextColor(Color.parseColor(\"#000000\"));\n\n // Check if the quiz is completed.\n if (!quizComplete) {\n\n /** If quiz not completed. check the answer button that was clicked and\n * check it with answerlist array and increment the total correct answer variable by 1\n */\n /*\n if (((answer1Clicked) && (correctAnswersList[currentQuestionNumber] == \"answer1\")) ||\n ((answer2Clicked) && (correctAnswersList[currentQuestionNumber] == \"answer2\")) ||\n ((answer3Clicked) && (correctAnswersList[currentQuestionNumber] == \"answer3\")) ||\n ((answer4Clicked) && (correctAnswersList[currentQuestionNumber] == \"answer4\"))\n ) {\n totalCorrectAnswers++;\n score = totalCorrectAnswers * 10;\n } else if (!answer1Clicked && !answer2Clicked && !answer3Clicked && !answer4Clicked) {\n totalNotAttemptedAnswers++;\n }\n*/\n\n if ((answer1Clicked) && (correctAnswersList[currentQuestionNumber] == \"answer1\")) {\n totalCorrectAnswers++;\n }else if ((answer2Clicked) && (correctAnswersList[currentQuestionNumber] == \"answer2\")) {\n totalCorrectAnswers++;\n }else if ((answer3Clicked) && (correctAnswersList[currentQuestionNumber] == \"answer3\")) {\n totalCorrectAnswers++;\n }else if ((answer4Clicked) && (correctAnswersList[currentQuestionNumber] == \"answer4\")) {\n totalCorrectAnswers++;\n }\n\n if (!answer1Clicked && !answer2Clicked && !answer3Clicked && !answer4Clicked) {\n totalNotAttemptedAnswers++;\n }\n\n score = totalCorrectAnswers * 10;\n\n // Increment the current question number if the current question number is not more then total questions\n if (currentQuestionNumber < (questions.length)) {\n // Increment question Number\n currentQuestionNumber++;\n\n }\n\n\n answer1Clicked = false;\n answer2Clicked = false;\n answer3Clicked = false;\n answer4Clicked = false;\n\n // Show the next Question\n\n showQuestion();\n\n\n } else {\n // Disbale the Submit button once the quiz is finished\n Button submitButton = findViewById(R.id.submit_button);\n submitButton.setEnabled(false);\n currentQuestionNumber = 0;\n }\n\n }", "public void clickNextButton() {\n if (editSummaryFragment.isActive()) {\n //we're showing the custom edit summary window, so close it and\n //apply the provided summary.\n editSummaryFragment.hide();\n editPreviewFragment.setCustomSummary(editSummaryFragment.getSummary());\n } else if (editPreviewFragment.isActive()) {\n //we're showing the Preview window, which means that the next step is to save it!\n if (abusefilterEditResult != null) {\n //if the user was already shown an AbuseFilter warning, and they're ignoring it:\n funnel.logAbuseFilterWarningIgnore(abusefilterEditResult.getCode());\n }\n getEditTokenThenSave(false);\n funnel.logSaveAttempt();\n } else {\n //we must be showing the editing window, so show the Preview.\n hideSoftKeyboard(this);\n editPreviewFragment.showPreview(title, sectionText.getText().toString());\n funnel.logPreview();\n }\n }", "public void updateQ4scoreAndGoToNext(View view){\r\n EditText q1Correct;\r\n q1Correct = (EditText) findViewById(R.id.q1Answer);\r\n String inputText = q1Correct.getText().toString();\r\n String rightAnswer = \"TextView\";\r\n\r\n if (inputText.equals(rightAnswer)) {\r\n q1Score = q1Score + 1;\r\n Toast toast = Toast.makeText(this, \"Great Job! 1 point added.\", Toast.LENGTH_SHORT);\r\n toast.show();\r\n } else {\r\n q1Score = 0;\r\n Toast toast = Toast.makeText(this, \"Better luck next time, 0 points added.\", Toast.LENGTH_SHORT);\r\n toast.show();\r\n }\r\n\r\n Intent i = new Intent(this, Question2Activity.class);\r\n startActivity(i);\r\n }", "public void q6Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q6option1);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ6) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ6 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "public void goToNextPage() {\n nextPageButton.click();\n }", "public void onNextQuestionButton(View view) {\n CheckBox answerBtnA = (CheckBox) findViewById(R.id.checkbox_button_1);\n CheckBox answerBtnB = (CheckBox) findViewById(R.id.checkbox_button_2);\n CheckBox answerBtnC = (CheckBox) findViewById(R.id.checkbox_button_3);\n CheckBox answerBtnD = (CheckBox) findViewById(R.id.checkbox_button_4);\n\n checkedA = answerBtnA.isChecked();\n checkedB = answerBtnB.isChecked();\n checkedC = answerBtnC.isChecked();\n checkedD = answerBtnD.isChecked();\n\n /**\n * Check whether the User inserted the right number of answers (always 2) and\n * request them, if they had not been given\n */\n if (checkedA & checkedB | checkedA & checkedC | checkedA & checkedD | checkedB & checkedC |\n checkedB & checkedD | checkedC & checkedD){\n calculateMethod();\n } else if(checkedA | checkedB | checkedC | checkedD){\n Toast.makeText(this,R.string.noAnswer2,Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this,R.string.noAnswer,Toast.LENGTH_SHORT).show();\n }\n }", "public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}", "public String getNextQuestion() {\r\n\t\t// Condition for getting the exact question, starting from the first question in\r\n\t\t// the list. This will happen until the method reaches the end of the list with\r\n\t\t// questions.\r\n\t\tif (counter < questions.size()) {\r\n\t\t\tnextQuestion = questions.get(counter).getQuestion();\r\n\t\t\t// Incrementing the counter with one, so next time the method is called it will\r\n\t\t\t// get the following question from the list.\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\t// When the end of the list is reached the next question will take this value.\r\n\t\telse {\r\n\t\t\tnextQuestion = \"You completed the test!\";\r\n\t\t}\r\n\t\treturn nextQuestion;\r\n\r\n\t}", "@Click(R.id.bt_answer1)\n void clickAnswer1() {\n selectedAnswer = questionList.get(questionProgress - 1).getAnswers().get(0);\n showResult();\n }", "public void submitResponse(KeyEvent keyEvent) {\n if(response.getText().compareToIgnoreCase(\"exit\")==0){\n System.exit(0);\n }\n if(numQuestions >= currentQuestion){\n if(keyEvent.getCode() == KeyCode.ENTER){\n try{\n if(Integer.parseInt(response.getText()) == gen.getAnswer()){\n numRight++;\n }\n updateProgress();\n }catch(Exception e){\n updateProgress();\n }\n currentQuestion++;\n if(currentQuestion > numQuestions){\n DecimalFormat df = new DecimalFormat(\"##.##\");\n Question.setText(\"PROBLEMS FINISHED\\n\"\n + \"Percent Correct: \"\n + df.format((100.0*numRight)/((double)numQuestions))\n + \"%\");\n incorrect.setText(\"Type Exit to Close\");\n incorrect.setVisible(true);\n }else{\n setQuestion();\n }\n response.setText(\"\");\n }\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tquestionTxt = (EditText)findViewById(R.id.question);\n\t\t\t finish();\n\t\t\t}", "public void q7Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q7option4);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ7) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct1), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ7 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }", "private void btnSubmit_click(ActionEvent e) {\n\t\tString stuAnswer = \"\";\r\n\t\tif (rdoItemA.isSelected()) {\r\n\t\t\tstuAnswer = \"A\";\r\n\t\t}\r\n\t\tif (rdoItemB.isSelected()) {\r\n\t\t\tstuAnswer = \"B\";\r\n\t\t}\r\n\t\tif (rdoItemC != null) {\r\n\t\t\tif (rdoItemC.isSelected()) {\r\n\t\t\t\tstuAnswer = \"C\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (rdoItemD != null) {\r\n\t\t\tif (rdoItemD.isSelected()) {\r\n\t\t\t\tstuAnswer = \"D\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!stuAnswer.isEmpty()) {\r\n\t\t\tExamItem bean = eiList.get(questionNO - 1);\r\n\r\n\t\t\tif (bean.getStuAnswer() == null || !bean.getStuAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\tbean.setStuAnswer(stuAnswer);\r\n\t\t\t\tif (bean.getStdAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\t\tbean.setMarkResult(1l);\r\n\t\t\t\t\tbean.setGainScore(bean.getStdScore());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbean.setMarkResult(0l);\r\n\t\t\t\t\tbean.setGainScore(0l);\r\n\t\t\t\t}\r\n\t\t\t\texamItemService.update(bean);\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong result = examItemService.countNull(pk.longValue());\r\n\t\tString message = \"\";\r\n\t\tif ((questionNum - result) > 0) {\r\n\t\t\tmessage = \"还有\" + (questionNum - result) + \"道题未写,确认交卷?\";\r\n\t\t} else {\r\n\t\t\tmessage = \"确认交卷?\";\r\n\t\t}\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"系统提示\", JOptionPane.YES_NO_OPTION);\r\n\t\tif (option == JOptionPane.YES_OPTION) {\r\n\t\t\tLong trueItem = examItemService.countTrue(pk.longValue());\r\n\t\t\tLong totalScore = eiList.get(0).getStdScore() * trueItem;\r\n\t\t\tExam exam = examService.load(pk.longValue());\r\n\t\t\texam.setTotalScore(totalScore);\r\n\t\t\texamService.update(exam);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"考试结束,\" + totalScore + \"分\");\r\n\t\t\tif (listFrm != null) {\r\n\t\t\t\tlistFrm.setVisible(true);\r\n\t\t\t\tthis.dispose();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public boolean moveToNextQuestion() {\n\n this.setGameState(GameState.AWAITING_ANSWER);\n if ((currentQuestionIndex + 1) < this.quiz.getQuestions().size()) {\n currentQuestionIndex++;\n return true;\n } else {\n logger.debug(\"no more questions... ending quiz.\");\n this.setGameState(GameState.COMPLETE);\n return false;\n }\n }", "@OnClick\n public void onNext() {\n KeyboardUtils.dismissSoftKeyboard(getView());\n this.nextButton.setState(AirButton.State.Loading);\n RegistrationAnalytics.trackClickEvent(RegistrationAnalytics.NEXT_BUTTON, \"phone\", getNavigationTrackingTag());\n AccountCreationRequest.forValidatingPhone(this.airPhone.formattedPhone()).withListener((Observer) this.phoneNumberExistValidationRequestListener).execute(this.requestManager);\n }", "public static void insertQuestion(int i) { \n\t\ttry {\n\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"myform1\\\"]/div/div/div/input\")).sendKeys(QandA.getQuestion(i));\n\t\t}\n\t\tcatch(NullPointerException e) {\n\t\t\tSystem.out.println(e.getMessage()+ \" ERROR IN INSERT QUESTION\");\n\t\t}\n\t\tMethods.clickNextBtn();\n\t}", "private void takeQuiz(String filename) {\n String filepath = \"./src/multiplechoice/\" + filename + \".txt\";\n MCQuestionSet questionSet = new MCQuestionSet(filepath);\n int questionCount = questionSet.getSize();\n currentQuestion = questionSet.peekNext();\n correct = 0;\n //create question text\n BorderPane questionPane = new BorderPane();\n Button btnQuestion = createBigButton(\"TEMP TESTING\", 36, 25);\n questionPane.setCenter(btnQuestion);\n BorderPane.setMargin(btnQuestion, new Insets(20, 20, 20, 20));\n VBox choicePane = new VBox();\n //correct answer tracker\n VBox resultPane = new VBox();\n resultPane.setAlignment(Pos.CENTER);\n Label lblCorrect = new Label();\n lblCorrect.setFont(Font.font(TEXT_SIZE));\n resultPane.getChildren().add(lblCorrect);\n //next button trigger\n Button btnNext = createButton(\"Next\", TEXT_SIZE, 10);\n Button btnFinish = createButton(\"Finish\", TEXT_SIZE, 10);\n btnNext.setOnAction(e -> {\n currentQuestion = questionSet.getNext();\n if (currentQuestion == null) {\n btnFinish.fire();\n } else {\n choices = currentQuestion.getChoices();\n btnQuestion.setText(currentQuestion.getQuestion());\n choicePane.getChildren().clear();\n for (int i = 0; i < choices.length; i++) {\n Button btnChoice = createBigButton(choices[i], 24, 25);\n btnChoice.setOnAction(e2 -> {\n if (currentQuestion.isCorrect(btnChoice.getText())) {\n correct++;\n }\n lblCorrect.setText(correct + \" correct answers!\");\n btnNext.fire();\n });\n choicePane.getChildren().add(btnChoice);\n VBox.setMargin(btnChoice, new Insets(5, 50, 5, 50));\n }\n }\n });\n //submit final answer trigger and menu return button\n btnFinish.setOnAction(e -> {\n String message = \"Quiz Complete!\\n Score: \" + correct + \"/\";\n message = message + questionCount + \"\\n Click to continue.\";\n Button btnFinishMessage = createBigButton(message, 54, 100);\n btnFinishMessage.setOnAction(e2 -> {\n returnHome();\n });\n quizScores.add(filename, correct, questionCount);\n try (PrintWriter pw = new PrintWriter(new FileWriter(SCORES_OUTPUT))) {\n pw.print(quizScores);\n } catch (IOException ex) {\n System.out.println(\"FAILED TO SAVE SCORES\");\n }\n parentPane.getChildren().clear();\n parentPane.setCenter(btnFinishMessage);\n });\n //finalize\n parentPane.getChildren().clear();\n parentPane.setTop(questionPane);\n parentPane.setCenter(choicePane);\n parentPane.setBottom(resultPane);\n btnNext.fire();\n }", "@FXML\n\tprivate void answerQuestion() {\n\t\tint correctAnsID = 0;\n\t\ttry {\n\t\t\tswitch (((RadioButton) answerGroup.getSelectedToggle()).getId()) {\n\t\t\tcase \"ans1Check\":\n\t\t\t\tcorrectAnsID = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"ans2Check\":\n\t\t\t\tcorrectAnsID = 2;\n\t\t\t\tbreak;\n\t\t\tcase \"ans3Check\":\n\t\t\t\tcorrectAnsID = 3;\n\t\t\t\tbreak;\n\t\t\tcase \"ans4Check\":\n\t\t\t\tcorrectAnsID = 4;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\terrorLabel.setVisible(true);\n\t\t}\n\n\t\t// nothing is selected\n\t\tif (correctAnsID == 0) { \n\t\t\terrorLabel.setVisible(true);\n\t\t\t// correct answer\n\t\t} else if (question.getCorrect_ans() == correctAnsID) {\n\t\t\tcontrol.setScore(control.getScore() + question.getScore());\n\t\t\thandleAlertAndWindow(AlertType.INFORMATION, \"Congrats! :D\",\n\t\t\t\t\t\"You received \" + question.getScore() + \" points\");\n\t\t\t// wrong answer\n\t\t} else {\n\t\t\tcontrol.setScore(control.getScore() + question.getPenalty());\n\n\t\t\thandleAlertAndWindow(AlertType.ERROR, \"Uh oh! :(\",\n\t\t\t\t\t\"You lost \" + question.getPenalty() + \" points\");\n\t\t}\n\n\t\t// reset the eaten question\n\t\tViewLogic.playGameController.getControl().setQuestionEaten(null);\n\t}", "@Override\n\tpublic void QuestionDone() {\n\t\t\n\t}", "private void submitBtnActionPerformed(java.awt.event.ActionEvent evt) {\n correctQuiz();\n JOptionPane.showMessageDialog(null, \"You scored \" + score + \"/5\");\n f.saveScores(name, score);\n new Menu().setVisible(true);\n this.setVisible(false);\n this.dispose();\n }", "public void submitAndShowResult(final View view) {\n final Intent intent = new Intent(this, SurveyResultPage.class);\n\n // add input to firebase base one the type\n if (surveyInput.getVisibility() == View.INVISIBLE) {\n final int itemPosition = mAdapter.getItemPosition();\n List<String> keyList = mAdapter.getmChoiceIds();\n\n if (mAdapter.itemPosition == -1) {\n Toast.makeText(this, \"Please make choice\", Toast.LENGTH_SHORT).show();\n } else {\n // count vote and update to database\n mChoiceReference.child(keyList.get(itemPosition)).runTransaction(new Transaction.Handler() {\n @Override\n public Transaction.Result doTransaction(MutableData mutableData) {\n Choice choice = mutableData.getValue(Choice.class);\n if (choice == null) {\n return Transaction.success(mutableData);\n }\n choice.count += 1;\n mutableData.setValue(choice);\n return Transaction.success(mutableData);\n }\n\n @Override\n public void onComplete(DatabaseError databaseError, boolean committed,\n DataSnapshot currentData) {\n }\n });\n intent.putExtra(VotingPage.EXTRA_POST_KEY, mPostKey);\n startActivity(intent);\n finish();\n }\n\n } else {\n String getSurveyInput = surveyInput.getEditText().getText().toString();\n if (getSurveyInput.isEmpty()){\n Toast.makeText(this, \"Please input text\", Toast.LENGTH_SHORT).show();\n } else {\n SurveyInput mSurveyInput = new SurveyInput(getSurveyInput);\n mSurveyQuestionReference.child(\"surveyInputMap\").push().setValue(mSurveyInput);\n intent.putExtra(VotingPage.EXTRA_POST_KEY, mPostKey);\n startActivity(intent);\n finish();\n }\n }\n\n }", "public void toggleSubmitButton(){\n switch (mSubmitButton.getText().toString()){\n case \"Submit\":\n mSubmitButton.setText(\"Next\");\n mSubmitButton.setOnClickListener(view -> recreate());\n break;\n case \"Next\":\n mSubmitButton.setText(\"Submit\");\n mSubmitButton.setOnClickListener(view -> mGameController.checkGuess());\n break;\n }\n }", "public static void loadNextQuestion(Question question, ArrayList<Question> questionsList, copyRightGUI gui){\n // Run throught the questionsList, find the next question and load it\n for (int k = 0; k < questionsList.size(); k++) {\n\n if (question.getNextQuestion().equals(questionsList.get(k).getQuestion())) {\n // push question onto questionStack\n questionStack.push(question);\n\n // revalidate gui\n gui.revalidate();\n\n // load question\n loadQuestion(questionsList, gui, k);\n\n // revalidate gui, again\n gui.revalidate();\n break;\n }\n }\n }", "public void nextClick(View view) {\n i=i+1;\n if(i<questions.size()){\n tvQuestion.setText(questions.get(i));\n trash.setText(emptyString);\n chest.setText(emptyString);\n tvQuestion.setVisibility(View.VISIBLE);\n nxtButton.setClickable(false);\n nxtButton.setBackground(getResources().getDrawable(R.drawable.info_hub_button_grayed));\n chest.setBackground(getResources().getDrawable(R.drawable.chest));\n trash.setBackground(getResources().getDrawable(R.drawable.trash));\n }\n else{\n final Dialog alertDialog = new Dialog(MythFactGame.this,android.R.style.Theme_DeviceDefault_Dialog_NoActionBar);\n alertDialog.setContentView(R.layout.game_over_dialog);\n alertDialog.setCancelable(false);\n\n // Setting Dialog Title\n alertDialog.setTitle(\"Game Over!!\");\n Button ok=(Button)alertDialog.findViewById(R.id.gameOverDialogButtonOK);\n ok.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n MythFactGame.this.finish();\n }\n });\n\n addGameScoreToMainScore();\n // Showing Alert Message\n alertDialog.show();\n }\n }", "@OnClick\n public void onClickNext() {\n alipayPhoneLogging();\n String phoneNumber = this.airPhone.phoneInputText();\n String countryCode = this.phoneNumberInput.getCountryCode();\n getAlipayActivity().setPhoneNumber(phoneNumber);\n CreatePaymentInstrumentRequest.forAlipay(new Builder().alipayLoginId(getAlipayActivity().getAlipayId()).mobilePhoneNumber(phoneNumber).mobilePhoneCountry(countryCode).build()).withListener((Observer) this.requestListener).execute(this.requestManager);\n this.nextButton.setState(AirButton.State.Loading);\n }", "public void ClickNext() {\r\n\t\tnext.click();\r\n\t\t\tLog(\"Clicked the \\\"Next\\\" button on the Birthdays page\");\r\n\t}", "private void fetchNewQuestion()\r\n\t{\r\n\t\t//Gets question and answers from model\r\n\t\tString[] question = quizModel.getNewQuestion();\r\n\t\t\r\n\t\t//Allocates answers to a new ArrayList then shuffles them randomly\r\n\t\tArrayList<String> answers = new ArrayList<String>();\r\n\t\tanswers.add(question[1]);\r\n\t\tanswers.add(question[2]);\r\n\t\tanswers.add(question[3]);\r\n\t\tanswers.add(question[4]);\r\n\t\tCollections.shuffle(answers);\r\n\t\t\r\n\t\t//Allocates north label to the question\r\n\t\tnorthLabel.setText(\"<html><div style='text-align: center;'>\" + question[0] + \"</div></html>\");\r\n\t\t\r\n\t\t//Allocates each radio button to a possible answer. Based on strings, so randomly generated questions...\r\n\t\t//...which by chance repeat a correct answer in two slots, either will award the user a point.\r\n\t\toption1.setText(answers.get(0));\r\n\t\toption2.setText(answers.get(1));\r\n\t\toption3.setText(answers.get(2));\r\n\t\toption4.setText(answers.get(3));\r\n\t\toption1.setActionCommand(answers.get(0));\r\n\t\toption2.setActionCommand(answers.get(1));\r\n\t\toption3.setActionCommand(answers.get(2));\r\n\t\toption4.setActionCommand(answers.get(3));\r\n\t\toption1.setSelected(true);\r\n\t\t\r\n\t\t//Update score\r\n\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"</div></html>\");\r\n\t}", "public void nextButtonClicked()\r\n {\n manager = sond.getManager();\r\n String insertSearchDelete = sond.getInsertSearchDelete();\r\n AnimatorThread animThread = model.getThread();\r\n\r\n // falls der Thread pausiert ist, wird er beim betätigen des\r\n // next-Buttons aufgeweckt\r\n if (button.getPlay() && animThread != null && animThread.isAlive())\r\n {\r\n if (!animThread.getWait())\r\n {\r\n animThread.interrupt();\r\n }\r\n else\r\n {\r\n animThread.wake();\r\n }\r\n }\r\n // Redo muss vor den weiteren if Anweisungen stehen, damit erst alle\r\n // Redo ausgeführt werden, bevor neue Aktionen dem manager hinzugefuegt\r\n // werden\r\n else if (manager.canRedo())\r\n {\r\n manager.redo();\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"insert\"))\r\n {\r\n sond.nextInsertPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"search\"))\r\n {\r\n sond.nextSearchPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"delete\"))\r\n {\r\n sond.nextSearchPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n }", "private void checkFinish() {\n if (qid < numberOfQuestions) {\n if (bolRandom) {\n currentQ = quesList.get(qid);\n }else if (Chapter1) {\n currentQ = Chapter1List.get(qid);\n }else if (Chapter2) {\n currentQ = Chapter2List.get(qid);\n }else if (Chapter3) {\n currentQ = Chapter3List.get(qid);\n }else if (Chapter4){\n currentQ = Chapter4List.get(qid);\n }else if (Chapter5){\n currentQ = Chapter5List.get(qid);\n }else if (Chapter6){\n currentQ = Chapter6List.get(qid);\n }else if (Chapter7){\n currentQ = Chapter7List.get(qid);\n }else if (Chapter8){\n currentQ = Chapter8List.get(qid);\n }else if (Chapter9){\n currentQ = Chapter9List.get(qid);\n }else if (Chapter10){\n currentQ = Chapter10List.get(qid);\n }else if (Chapter11){\n currentQ = Chapter11List.get(qid);\n }\n setQuestionView();\n } else {\n Intent intent = new Intent(MainActivity.this, GradeActivity.class);\n Bundle b = new Bundle();\n b.putInt(\"score\", score); //Your score\n intent.putExtras(b); //Put your score to your next Intent\n startActivity(intent);\n finish();\n }\n\n }", "@Override\n public void run() {\n nextButtonAction(); // invoking next button //\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t\tinput_from_user.requestFocusInWindow(); //gets focus back on the field\n\t\t\t\t}\n\t\t\t}", "public void finishQuiz(View view) {\n // Call method to evaluate the questions.\n evaluateQuestions();\n }", "private void btnLast_click(ActionEvent e) {\n\t\tString stuAnswer = \"\";\r\n\t\tif (rdoItemA.isSelected()) {\r\n\t\t\tstuAnswer = \"A\";\r\n\t\t}\r\n\t\tif (rdoItemB.isSelected()) {\r\n\t\t\tstuAnswer = \"B\";\r\n\t\t}\r\n\t\tif (rdoItemC != null) {\r\n\t\t\tif (rdoItemC.isSelected()) {\r\n\t\t\t\tstuAnswer = \"C\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (rdoItemD != null) {\r\n\t\t\tif (rdoItemD.isSelected()) {\r\n\t\t\t\tstuAnswer = \"D\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!stuAnswer.isEmpty()) {\r\n\t\t\tExamItem bean = eiList.get(questionNO - 1);\r\n\t\t\tif (bean.getStuAnswer() == null || !bean.getStuAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\tbean.setStuAnswer(stuAnswer);\r\n\t\t\t\tif (bean.getStdAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\t\tbean.setMarkResult(1l);\r\n\t\t\t\t\tbean.setGainScore(bean.getStdScore());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbean.setMarkResult(0l);\r\n\t\t\t\t\tbean.setGainScore(0l);\r\n\t\t\t\t}\r\n\t\t\t\texamItemService.update(bean);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (questionNO == 1) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"这是第一题。\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tquestionNO--;\r\n\t\tinitData();\r\n\t}", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t \t checkAnswer(1);\r\n\t\t\t \r\n\t\t\t\t \tcurrentQ=quesListSci.get(qidSci);\r\n\t\t\t\t \tif(qidSci==46){\r\n\t\t\t\t \t QuizActivitySci.this.showDialog(RUN_OUT);\r\n\t\t\t\t \t \r\n\t\t\t\t }\r\n\t\t\t\t\t if(qMon%2==0 & qMon%3==0){\r\n\t\t\t\t\t\t QuizActivitySci.this\r\n\t\t\t\t\t\t .showDialog(SCORE_DIALOG);\r\n\t\t\t\t\t\t qlvl++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t }else{\r\n\t\t\t\t\t\t setQuestionView();\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t\t\t \r\n\t\t\t\t\t \r\n\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n public void onClick(View view) {\n\n if(mQuestions.getType(QuestionNum) == \"radiobutton\") {\n if (mQuestions.getCoorectAnswers(QuestionNum).equals(mAnswer)) {\n\n mScore++;\n displayToastCorrectAnswer(); // wyswietlenie Toastu\n } else {\n displayToastWrongAnswer();\n\n }\n\n Handler handler = new Handler(); // zmiana widoku po pytaniu\n handler.postDelayed(new Runnable() {\n @Override\n public void run() { // opoznienie wyswietlenia\n updateQuestions();\n\n }\n }, 1000);\n\n }\n\n SystemClock.sleep(1000); // opoznienie dzialania nastepnych metod\n\n if(QuestionNum == mQuestions.getLength() -1){ // sprawdzenie czy to jest ostatnie pytanie\n\n Intent intent_result = new Intent(MainActivity.this, ResultActivity.class);\n intent_result.putExtra(\"totalQuestions\",mQuestions.getLength());\n intent_result.putExtra(\"finalScore\", mScore);\n\n startActivity(intent_result); // ta metoda uruchamia nam aktywnosc wyswietlajaca wynik\n\n QuestionNum = 0;\n mQuizNum = 0;\n mScore = 0;\n }else {\n QuestionNum++;\n mQuizNum++;\n }\n updateQuestions();\n\n }", "private void updateQuestion()\r\n {\r\n if(noOfQuestion == 10) //last question.\r\n {\r\n //Toast.makeText(getApplicationContext(), \"Questions Limit Reached!!\", Toast.LENGTH_SHORT).show();\r\n\r\n questionsTV.setVisibility(View.GONE);\r\n questionNoTV.setVisibility(View.GONE);\r\n answer1Btn.setVisibility(View.GONE);\r\n answer2Btn.setVisibility(View.GONE);\r\n answer3Btn.setVisibility(View.GONE);\r\n viewLBBtn.setVisibility(View.VISIBLE);\r\n congratsImgView.setVisibility(View.VISIBLE);\r\n starImgView.setVisibility(View.VISIBLE);\r\n\r\n if(backgroundMusicPlayer.isPlaying()) {\r\n backgroundMusicPlayer.stop();\r\n }\r\n congratsMPlayer.start();\r\n clapSoundPlayer.start();\r\n }\r\n else\r\n {\r\n noOfQuestion++; //increment the number of question.\r\n resetButtonsPosition(answer1Btn, answer2Btn, answer3Btn, 0);\r\n\r\n //update the view with next question and answers.\r\n questionsTV.setText(questionsAndAnswersLibrary.getQuestion(questionNo));\r\n answer1Btn.setText(questionsAndAnswersLibrary.getAnswerChoice1(questionNo));\r\n answer2Btn.setText(questionsAndAnswersLibrary.getAnswerChoice2(questionNo));\r\n answer3Btn.setText(questionsAndAnswersLibrary.getAnswerChoice3(questionNo));\r\n\r\n correctAnswer = questionsAndAnswersLibrary.getCorrectAnswer(questionNo);\r\n questionNo++;\r\n\r\n moveButtons(answer1Btn);\r\n moveButtons(answer2Btn);\r\n moveButtons(answer3Btn);\r\n }\r\n }", "public void actionPerformed(ActionEvent e){\n\n if(e.getSource()==enter){\n\n done = true;\ncorrect=0;\nfor(int x=0; x<16;x++){//if conditions that contain the right answer\n degree = valarray [x].getText();\n\n if(degree.compareTo(answers[x]) ==0){\n correct++;\n }\n }\n if(done==true)\n repaint();\n\n }\n\n\n\nif(e.getSource() == back){//if back button is pressed\n //System.out.println(\"hi\");\n cardslayout.first(c);//if back button is pressed\n //go to FirstPanel\n}\n}", "private void updateQuestion() {\r\n\r\n //The code below resets the option\r\n mOption1.setVisibility(View.VISIBLE);\r\n mOption2.setVisibility(View.VISIBLE);\r\n mOption3.setVisibility(View.VISIBLE);\r\n mNext.setVisibility(View.INVISIBLE);\r\n\r\n int questionSize = 12;\r\n\r\n if (mQuestionNumber < questionSize) {\r\n\r\n mQuestionView.setText((questionsDB.getQuestion(mQuestionNumber)));\r\n mOption1.setText(questionsDB.getChoice1(mQuestionNumber));\r\n mOption2.setText(questionsDB.getChoice2(mQuestionNumber));\r\n mOption3.setText(questionsDB.getChoice3(mQuestionNumber));\r\n\r\n mAnswer = questionsDB.getCorrectAnswer(mQuestionNumber);\r\n mQuestionNumber++;\r\n timeLeftInMillis = COUNTDOWN_IN_MILLIS;\r\n startCountDown();\r\n\r\n\r\n } else {\r\n displayScore();\r\n }\r\n\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tboolean yes = true;\n\t\t\t\t// update the question text\n\t\t\t\tupdateQuestion(yes);\n\t\t\t}", "public void onClick(View view) {\n quesCounter++;\n if (quesCounter < 4) {\n //returning a feedback saying \"correct answer\" if the user has chosen the correct answer and\n //\"incorrect answer\" otherwise\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n //incrementing quesNumber to move to the next question\n quesNumber++;\n questionTextView.setText(question[quesNumber].getQuesStatement());\n } else {\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n\n //Checking to see if the rightQuesCounter worked or not\n Log.d(TAG, \"You have got \" + rightQuesCounter + \" questions right!\");\n\n //Having an intent to move to the Result screen while passing the rightQuesCounter to get the result\n Intent intent = new Intent(TopicQuiz.this, Result.class);\n intent.putExtra(\"rightQuesCounter\", rightQuesCounter);\n intent.putExtra(\"language\",topic);\n\n\n startActivity(intent);\n }\n }", "public static void clickNextBtnGame() {\t\n\t\tdriver.findElement(By.id(\"btnnext\")).click();\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tboolean yes = false;\n\t\t\t\t// update the question text\n\t\t\t\tupdateQuestion(yes);\n\t\t\t}", "public void buttonHintNext(View view) {\n //using finish to activity\n finish();\n\n //create a new object to start new activity\n Intent intent = new Intent(this, Hint.class);\n //pass object to startActivity\n startActivity(intent);\n }", "public void submitQuiz(View view) {\n\n if(parentKiller()) {\n question1 = 1;\n } else{\n question1 = 0;\n }\n\n if(jokerKills()) {\n question2 = 1;\n } else {\n question2 = 0;\n }\n\n if (batCity()) {\n question3 = 1;\n } else {\n question3 = 0;\n }\n\n if (checkboxQuestion()) {\n question4 = 1;\n } else {\n question4 = 0;\n }\n\n if (nameEntry()) {\n question5 = 1;\n } else {\n question5 = 0;\n }\n\n correctPoints = question1 + question2 + question3 + question4 + question5;\n\n Toast toastScore = Toast.makeText(getApplicationContext(), \"You scored \" + correctPoints + \" points!\", Toast.LENGTH_SHORT);\n toastScore.show();\n }", "private void finishQuiz() {\n\n // Cancel timer\n if(timer != null) {\n timer.cancel();\n }\n\n // Update text.\n infContainer.setText(\"FINISHED\");\n\n // Update card correct values\n for (int i = 0; i < deck.deckLength; i++) {\n deck.getCard(i).updateCard(this);\n }\n\n // Save quiz\n QuizDataSource quizDB = new QuizDataSource(this);\n quizDB.open();\n quizDB.storeQuiz(quiz);\n quizDB.close();\n\n // Show results\n Intent intent = new Intent(this, ViewQuizResults.class);\n intent.putExtra(\"subject\", quiz.getSubject());\n startActivity(intent);\n }", "public void checkAnswer(View view) {\n\n mButton = (Button) view;\n\n if (mButton.getText().toString().equals(questionsInList.get(0).getRightAnswer())) {\n //Toast.makeText(this, \"Correct answer\", Toast.LENGTH_SHORT).show();\n questionNumberIncrement();\n checkIfLastQuestion();\n\n mHandler.postDelayed(r, 1200);\n\n try {\n questionsInList.removeFirst();\n }catch (IllegalArgumentException e){\n e.printStackTrace();\n }\n\n countSessionPoints();\n setCurrentQuestion();\n iterator = (ListIterator) questionsInList.iterator();\n\n } else {\n Toast.makeText(this, \"Wrong answer\", Toast.LENGTH_SHORT).show();\n wrongAnswer();\n\n }\n\n\n }", "public void submitAnswers(View view) {\n\n // Question one\n // Get String given in the first EditText field and turn it into lower case\n EditText firstAnswerField = (EditText) findViewById(R.id.answer_one);\n Editable firstAnswerEditable = firstAnswerField.getText();\n String firstAnswer = firstAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the first EditText field is correct and if it is, add one\n // point\n if (firstAnswer.contains(\"baltic\")) {\n points++;\n }\n\n // Question two\n // Get String given in the second EditText field and turn it into lower case\n EditText secondAnswerField = (EditText) findViewById(R.id.answer_two);\n Editable secondAnswerEditable = secondAnswerField.getText();\n String secondAnswer = secondAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the second EditText field is correct and if it is, add one\n // point\n if (secondAnswer.contains(\"basketball\")) {\n points++;\n }\n\n // Question three\n // Check if the correct answer is given\n RadioButton thirdQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_3_radio_button_3);\n boolean isThirdQuestionCorrectAnswer = thirdQuestionCorrectAnswer.isChecked();\n // If the correct answer is given, add one point\n if (isThirdQuestionCorrectAnswer) {\n points++;\n }\n\n // Question four\n // Check if the correct answer is given\n RadioButton fourthQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_4_radio_button_2);\n boolean isFourthQuestionCorrectAnswer = fourthQuestionCorrectAnswer.isChecked();\n\n // If the correct answer is given, add one point\n if (isFourthQuestionCorrectAnswer) {\n points++;\n }\n\n // Question five\n // Find check boxes\n CheckBox fifthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_5_check_box_1);\n\n CheckBox fifthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_5_check_box_2);\n\n CheckBox fifthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_5_check_box_3);\n\n CheckBox fifthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_5_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n\n if (fifthQuestionCheckBoxThree.isChecked() && fifthQuestionCheckBoxFour.isChecked()\n && !fifthQuestionCheckBoxOne.isChecked() && !fifthQuestionCheckBoxTwo.isChecked()){\n points++;\n }\n\n // Question six\n // Find check boxes\n CheckBox sixthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_6_check_box_1);\n\n CheckBox sixthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_6_check_box_2);\n\n CheckBox sixthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_6_check_box_3);\n\n CheckBox sixthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_6_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n if (sixthQuestionCheckBoxOne.isChecked() && sixthQuestionCheckBoxTwo.isChecked()\n && sixthQuestionCheckBoxFour.isChecked() && !sixthQuestionCheckBoxThree.isChecked()){\n points++;\n }\n\n // If the user answers all questions correctly, show toast message with congratulations\n if (points == 6){\n Toast.makeText(this, \"Congratulations! You have earned 6 points.\" +\n \"\\n\" + \"It is the maximum number of points in this quiz.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // If the user does not answer all questions correctly, show users's points, total points\n // possible and advise to check answers\n else {\n Toast.makeText(this, \"Your points: \" + points + \"\\n\" + \"Total points possible: 6\" +\n \"\\n\" + \"Check your answers or spelling again.\", Toast.LENGTH_SHORT).show();\n }\n\n // Reset points to 0\n points = 0;\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsetVisible(false);\r\n\t\t\t\tnew Questions();\r\n\t\t\t}", "public void populateWithQuestionInfo(String question, String answer1, String answer2,String answer3,String answer4, int nextQuestionOrFinish){\n\t //populate the question label\n\t\t \tTextView questionLabel = (TextView) findViewById (R.id.question); \n\t questionLabel.setText(question);\t\n\t \n\t //populate answer1\n\t Button buttonAnswer1 = (Button) findViewById (R.id.answer1button);\n\t buttonAnswer1.setText(answer1);\n\t \n\t //populate answer2\n\t Button buttonAnswer2 = (Button) findViewById (R.id.answer2button);\n\t buttonAnswer2.setText(answer2);\n\t \n\t //populate answer3\n\t Button buttonAnswer3 = (Button) findViewById (R.id.answer3button);\n\t buttonAnswer3.setText(answer3);\n\t \n\t //populate answer4\n\t Button buttonAnswer4 = (Button) findViewById (R.id.answer4button);\n\t buttonAnswer4.setText(answer4);\n\t \n\t Button buttonNextQuestion = (Button) findViewById (R.id.nextquestion);\n\t if (nextQuestionOrFinish == 0){\n\t \tbuttonNextQuestion.setText(\"Next\");\n\t }\n\t else {\n\t \tbuttonNextQuestion.setText(\"Finish\");\n\t }\n\t \n\t numberOfQuestionsDisplayedCounter++;\n\n\t }", "@Override\n public void submitAnswer(PlayerAnswer playerAnswer) {\n\n\n }", "@Override\n public void onClick(View view) {\n quesCounter++;\n if (quesCounter < 4) {\n //returning a feedback saying \"correct answer\" if the user has chosen the correct answer and\n //\"incorrect answer\" otherwise\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n } else {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n question[quesNumber].setWrong(true);\n }\n\n //incrementing quesNumber to move to the next question\n quesNumber++;\n questionTextView.setText(question[quesNumber].getQuesStatement());\n\n } else {\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n } else {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n }\n //Checking to see if the rightQuesCounter worked or not\n Log.d(TAG, \"You have got \" + rightQuesCounter + \" out of 10\");\n\n //Having an intent to move to the Result screen while passing the rightQuesCounter to get the result\n Intent intent = new Intent(TopicQuiz.this, Result.class);\n intent.putExtra(\"rightQuesCounter\", rightQuesCounter);\n\n startActivity(intent);\n }\n\n }", "public void onNextButtonPressed(View v) {\n ParticipantDetailsDataAdapter.ViewHolder partViewHolder;\n CrtPollForm3Data form3Data = new CrtPollForm3Data();\n if (mListener != null) {\n for (int i = 0 ; i < mRecyclerView.getAdapter().getItemCount();i++)\n {\n RecyclerView.ViewHolder viewHolder = mRecyclerView.findViewHolderForAdapterPosition(i);\n if (viewHolder != null && viewHolder instanceof ParticipantDetailsDataAdapter.ViewHolder){\n partViewHolder = (ParticipantDetailsDataAdapter.ViewHolder) viewHolder;\n }\n }\n mListener.onFragmentInteractionForm3(form3Data);\n }\n }", "public static void pressSubmit(){\n DriverManager.driver.findElement(Constans.SUBMIT_BUTTON_LOCATOR).click();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t}\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}", "public static void next() {\n\t\tsendMessage(NEXT_COMMAND);\n\t}", "public void submitAnswers(View view) {\n\n //Initializing the correct answers in RadioGroups\n questionOneAnswerThree = findViewById(R.id.questionOneAnswerThreeButton);\n questionTwoAnswerFour = findViewById(R.id.questionTwoAnswerFourButton);\n questionThreeAnswerOne = findViewById(R.id.questionThreeAnswerOneButton);\n questionFourAnswerTwo = findViewById(R.id.questionFourAnswerTwoButton);\n questionFiveAnswerFour = findViewById(R.id.questionFiveAnswerFourButton);\n questionSixAnswerTwo = findViewById(R.id.questionSixAnswerTwoButton);\n questionSevenAnswerOne = findViewById(R.id.questionSevenAnswerOneButton);\n\n //Calculating score questions 1-7\n if (questionOneAnswerThree.isChecked()) {\n score++;\n }\n\n if (questionTwoAnswerFour.isChecked()) {\n score++;\n }\n\n if (questionThreeAnswerOne.isChecked()) {\n score++;\n }\n\n if (questionFourAnswerTwo.isChecked()) {\n score++;\n }\n\n if (questionFiveAnswerFour.isChecked()) {\n score++;\n }\n\n if (questionSixAnswerTwo.isChecked()) {\n score++;\n }\n\n if (questionSevenAnswerOne.isChecked()) {\n score++;\n }\n\n // +1 for correct answer\n if (questionEightAnswer.getText().toString().equals(\"1999\")) {\n score++;\n }\n\n //Calculating score if 3 correct answers are checked and 1 incorrect answer is unchecked\n if (questionNineAnswerOne.isChecked() && questionNineAnswerTwo.isChecked() && !questionNineAnswerThree.isChecked() && questionNineAnswerFour.isChecked()) {\n score++;\n }\n\n if (!questionTenAnswerOne.isChecked() && questionTenAnswerTwo.isChecked() && questionTenAnswerThree.isChecked() && questionTenAnswerFour.isChecked()) {\n score++;\n }\n\n //Toast message with score\n Toast.makeText(this, \"Your score: \" + score + \" out of 10 correct!\", Toast.LENGTH_LONG).show();\n\n score = 0;\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcheckAnswer(2);\r\n\t\t\t\t\t currentQ=quesListSci.get(qidSci);\r\n\t\t\t\t\t if(qidSci==46){\r\n\t\t\t\t \t QuizActivitySci.this.showDialog(RUN_OUT);\r\n\t\t\t\t \t \r\n\t\t\t\t }\r\n\t\t\t\t\t if(qMon%2==0 & qMon%3==0){\r\n\t\t\t\t\t\t QuizActivitySci.this\r\n\t\t\t\t\t\t .showDialog(SCORE_DIALOG);\r\n\t\t\t\t\t\t qlvl++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t }else{\r\n\t\t\t\t\t\t setQuestionView();\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t\t\t \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}" ]
[ "0.7816375", "0.7741057", "0.7575858", "0.75220984", "0.7468572", "0.74495775", "0.73276705", "0.72127753", "0.70204145", "0.70030665", "0.69944954", "0.6954323", "0.6934181", "0.6920891", "0.69201756", "0.6912169", "0.6852289", "0.67732894", "0.6760771", "0.6744626", "0.6731522", "0.6712906", "0.6662643", "0.66428447", "0.66000193", "0.65604556", "0.6499256", "0.6491568", "0.64880663", "0.64583015", "0.64563763", "0.645437", "0.6450165", "0.6414599", "0.63592637", "0.63553685", "0.6354379", "0.6354223", "0.63475597", "0.63358176", "0.6321548", "0.6319475", "0.6314334", "0.6308638", "0.6300782", "0.62893015", "0.62886363", "0.6287009", "0.62857455", "0.62812024", "0.6261834", "0.6255483", "0.6252678", "0.62456906", "0.62356424", "0.62253726", "0.62146497", "0.6198124", "0.619736", "0.6197112", "0.6194655", "0.61913025", "0.617657", "0.61726797", "0.6167586", "0.615264", "0.61477834", "0.61439186", "0.6137939", "0.6124742", "0.6106919", "0.6105205", "0.6102323", "0.6102076", "0.6083142", "0.6076092", "0.60708076", "0.6057754", "0.6052251", "0.60519975", "0.6023045", "0.60218394", "0.6017907", "0.60093766", "0.60045725", "0.6003263", "0.5990847", "0.59899926", "0.5986394", "0.598294", "0.59811276", "0.59753233", "0.5974505", "0.5967635", "0.59548205", "0.5954125", "0.5933014", "0.5924293", "0.5909659", "0.5894435" ]
0.6972153
11
calls the next question once the next button is pressed button is pressed
private void buttonNext (){ Intent nextActivity = new Intent(Question_One.this, Question_two.class); nextActivity.putExtra(EXTRA_TEXT,scoreCounter); startActivity(nextActivity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void callNextQuestion() {\n questionProgress++;\n\n if (questionProgress <= 10) {\n\n if (Utils.isKitkat()) {\n ContinuousSlide slide = new ContinuousSlide(Gravity.RIGHT);\n TransitionManager.beginDelayedTransition(llBody, slide);\n }\n\n btNext.setVisibility(View.GONE);\n currentQuestion = getQuestionById(questionProgress);\n ivScene.setVisibility(View.GONE);\n tvQuestion.setVisibility(View.GONE);\n\n if (tvResult != null) {\n flSceneFrame.removeView(tvResult);\n }\n ivScene.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {\n @Override\n public void onGlobalLayout() {\n ivScene.getViewTreeObserver().removeOnGlobalLayoutListener(this);\n resizeSceneArea();\n for (int i = 0; i < 4; i++) {\n positionAnswer(answerButtonList.get(i), currentQuestion.getAnswers().get(i));\n waitAnimations();\n }\n }\n });\n } else {\n questionProgress = 10;\n Intent intent = new Intent(this, ResultActivity_.class);\n startActivity(intent);\n }\n }", "public void goOnToNextQuestion(){\n\t\tbtnConfirmOrNext.setText(\"Next Question\");\n\t\tenableAllButtons();// need to be able to click to proceed\n\t\tquizAccuracy.setText(\": \"+spellList.getLvlAccuracy()+\"%\");\n\t\t// if user got answer correct move on immediately, else let user look at the correct answer first\n\t\tif(correctFlag){\n\t\t\t// set it to false initially for the next question\n\t\t\tcorrectFlag = false;\n\t\t\tbtnConfirmOrNext.doClick();\n\t\t}\n\n\t}", "public void nextBtnClicked(View v) {\r\n//\t\tshowMsg(\"Next Button clicked: \"+ v);\r\n\t\tresetSelection();\r\n\t\tnextQuestion(1);\r\n\t\tshowQuesAndAnswers();\r\n\t}", "private void btnNext_click(ActionEvent e) {\n\t\tString stuAnswer = \"\";\r\n\t\tif (rdoItemA.isSelected()) {\r\n\t\t\tstuAnswer = \"A\";\r\n\t\t}\r\n\t\tif (rdoItemB.isSelected()) {\r\n\t\t\tstuAnswer = \"B\";\r\n\t\t}\r\n\t\tif (rdoItemC != null) {\r\n\t\t\tif (rdoItemC.isSelected()) {\r\n\t\t\t\tstuAnswer = \"C\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (rdoItemD != null) {\r\n\t\t\tif (rdoItemD.isSelected()) {\r\n\t\t\t\tstuAnswer = \"D\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!stuAnswer.isEmpty()) {\r\n\t\t\tExamItem bean = eiList.get(questionNO - 1);\r\n\r\n\t\t\tif (bean.getStuAnswer() == null || !bean.getStuAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\tbean.setStuAnswer(stuAnswer);\r\n\t\t\t\tif (bean.getStdAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\t\tbean.setMarkResult(1l);\r\n\t\t\t\t\tbean.setGainScore(bean.getStdScore());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbean.setMarkResult(0l);\r\n\t\t\t\t\tbean.setGainScore(0l);\r\n\t\t\t\t}\r\n\t\t\t\texamItemService.update(bean);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (questionNO == questionNum) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"这是最后一题。\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tquestionNO++;\r\n\t\tinitData();\r\n\t}", "private void nextQuestion() {\n mCurrentIndex = (mCurrentIndex + 1) % questions.length;\n int question = questions[mCurrentIndex].getTextResId();\n mText.setText(question);\n }", "public void nextQuestion(View view) {\n Button button = (Button) findViewById(R.id.question_button_previous);\n if (!button.isEnabled()){\n button.setEnabled(true);\n }\n saveProgress();\n sequence++;\n updateView();\n }", "public void showNextQuestion() {\n currentQuiz++;\n gui.setUp();\n if (currentQuiz <= VocabularyQuizList.MAX_NUMBER_QUIZ) {\n showQuestion(currentQuiz);\n } else {\n result();\n }\n gui.getFrame().setVisible(true);\n }", "public void nextButton(View view) {\n Button submit = (Button) findViewById(R.id.start_and_submit_button);\n RadioGroup radioButtons = (RadioGroup) findViewById(R.id.radio_group);\n LinearLayout checkGroup = (LinearLayout) findViewById(R.id.check_group);\n EditText inputText = (EditText) findViewById(R.id.input_text);\n getUserAnswer();\n\n if (currentQueNum < maxNumOfQues) {\n currentQueNum += 1;\n optionsSelect();\n\n //this set question no 4 to checkbox view UI reply as required\n if (currentQueNum == 4) {\n radioButtons.setVisibility(View.GONE);\n checkGroup.setVisibility(View.VISIBLE);\n inputText.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView questionsPane = (TextView) findViewById(R.id.questions_pane);\n questionsPane.setText(que[currentQueNum - 1]);\n }\n\n //this below block of code will set question number 7 and 10 to textView UI reply\n else if (currentQueNum == 7 || currentQueNum == 10) {\n radioButtons.setVisibility(View.GONE);\n inputText.setVisibility(View.VISIBLE);\n checkGroup.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView quesDisp = (TextView) findViewById(R.id.questions_pane);\n quesDisp.setText(que[currentQueNum - 1]);\n }\n\n // this below block of code will set the view with appropriate UI for answers\n else {\n radioButtons.setVisibility(View.VISIBLE);\n inputText.setVisibility(View.GONE);\n checkGroup.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView questionsPane = (TextView) findViewById(R.id.questions_pane);\n questionsPane.setText(que[currentQueNum - 1]);\n }\n }\n\n //notify the user that he/she have reach the end of test he should submit?\n else {\n Toast endOfQuiz = makeText(getApplicationContext(), \"YOU HAVE REACH THE END OF TEST, SUBMIT?\", Toast.LENGTH_SHORT);\n endOfQuiz.show();\n submit.setEnabled(true);\n }\n if (currentQueNum != maxNumOfQues) {\n inputText.setText(\"\");//clear the text field for subsequent use\n radioButtons.clearCheck();//this clear the check state of radioButtons since same object will be re used in next question\n }\n }", "public void nextQuestion(View view){\n\n\n Question = findViewById(R.id.question1);\n // If the current question has been answered, validate & move on to the next question\n if (checkAnswered()){\n // Check for right or wrong answer\n validateQuestion();\n\n // Move on to the new question\n Intent intent = new Intent(getApplicationContext(),Questions2of5Activity.class);\n if (intent.resolveActivity(getPackageManager()) != null) {\n intent.putExtra(\"passedScore\",score);\n intent.putExtra(\"firstName\",firstName);\n intent.putExtra(\"lastName\",lastName);\n startActivity(intent);\n\n // Destroy activity to prevent user from going back\n finish();\n }\n }\n\n // If the question has not been answered, provide a toast message\n else {\n displayToast(\"You need to answer the question before moving on to the next\");\n }\n }", "public void nextQuestion() {\n if (currentq<questionbank.size()-1)\n {\n currentq++;\n }\n else\n {\n currentq=0;\n finished=true;\n\n Intent i = new Intent(MainActivity.this, ScorecardActivity.class);\n //Intent(coming from, where to go)\n i.putExtra(EXTRAMESSAGE1, Integer.toString(score));\n startActivity(i);\n\n }\n question.setText(questionbank.get(currentq).getQuestionText());\n\n\n }", "private void displayNextQuestion() {\n\n if (quizIterator.hasNext()){\n question = quizIterator.next();\n qTextView.setText(question.getQuestion());\n setBtnUsability(true);\n }\n else\n {\n setBtnUsability(false);\n qTextView.setText(\"Great job! You're a stack star!\");\n }\n\n }", "public static void clickNextBtn() {\t\n\t\ttry {\n\t\t\tdriver.findElement(By.id(\"nextquest\")).click();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Next button in Q&A submit doesnt work\");\n\t\t}\n\t}", "public void nextButtonClicked()\r\n {\n manager = sond.getManager();\r\n String insertSearchDelete = sond.getInsertSearchDelete();\r\n AnimatorThread animThread = model.getThread();\r\n\r\n // falls der Thread pausiert ist, wird er beim betätigen des\r\n // next-Buttons aufgeweckt\r\n if (button.getPlay() && animThread != null && animThread.isAlive())\r\n {\r\n if (!animThread.getWait())\r\n {\r\n animThread.interrupt();\r\n }\r\n else\r\n {\r\n animThread.wake();\r\n }\r\n }\r\n // Redo muss vor den weiteren if Anweisungen stehen, damit erst alle\r\n // Redo ausgeführt werden, bevor neue Aktionen dem manager hinzugefuegt\r\n // werden\r\n else if (manager.canRedo())\r\n {\r\n manager.redo();\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"insert\"))\r\n {\r\n sond.nextInsertPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"search\"))\r\n {\r\n sond.nextSearchPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"delete\"))\r\n {\r\n sond.nextSearchPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n }", "private void getNextQuestionHandler() {\n //Log.i(TAG, \"getNextQuestionHandler\");\n p.setVisibility(View.VISIBLE);\n questionText.setText(\"Loading...\");\n readableCheck.setChecked(false);\n readableCheck.setEnabled(false);\n submitBtn.setEnabled(false);\n skipBtn.setEnabled(false);\n img01.setImageResource(R.drawable.new_rating_smile_grey);\n img02.setImageResource(R.drawable.new_rating_nutral_grey);\n img03.setImageResource(R.drawable.new_rating_angry_grey);\n imgb01 = false;\n imgb02 = false;\n imgb03 = false;\n rateValue = 0;\n\n controller.getNextQuestion();\n }", "public void setNextQuestion(Question question) {\n curQuestion = question;\n p.setVisibility(View.GONE);\n questionText.setText(question.getText());\n questionText.scrollTo(0, 0);\n\n readableCheck.setEnabled(true);\n readableCheck.setChecked(true);\n skipBtn.setEnabled(true);\n }", "public void nextQuestion(View view) {\n\n int points = calculatePoints();\n //Retrieve the variable \"total_points\" from the previous activity\n Bundle extras = getIntent().getExtras();\n if (extras != null) {\n points = points + extras.getInt(\"total_points\");\n }\n\n boolean validatedAnswer = validateAnswer();\n\n if (validatedAnswer == true) {\n\n Intent startNextQuestion = new Intent(this, ScoreActivity.class);\n startNextQuestion.putExtra(\"total_points\", points);\n startActivity(startNextQuestion);\n }\n }", "@Override\n public void onNextPressed() {\n }", "public static void checkAndClickNextButton() {\r\n\t\tcheckNoSuchElementExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t}", "private void nextQuestion() {\n\n // increment current question index\n currentQuestionIndex++;\n\n // if the current question index is smaller than the size of the quiz list\n if (currentQuestionIndex < quizList.size()) {\n\n // clear the possible answers\n possibleAnswers.clear();\n\n // grab the definition of current question, assign the correct answer variable\n // and add it to the list of possible answers.\n definition = quizList.get(currentQuestionIndex)[0];\n correctAnswer = quizMap.get(definition);\n possibleAnswers.add(correctAnswer);\n\n // while there's less than 4 possible answers, get a random answer\n // and if it hasn't already been added, add it to the list.\n while (possibleAnswers.size() < 4) {\n String answer = quizList.get(new Random().nextInt(quizList.size() - 1))[1];\n if (!possibleAnswers.contains(answer)) {\n possibleAnswers.add(answer);\n }\n }\n\n // shuffle possible answers so they display in a random order\n Collections.shuffle(possibleAnswers);\n } else {\n // if the question index is out of bounds, set quiz as finished\n quizFinished = true;\n }\n }", "public static void checkAndClickNextButtonTriviaMode() {\r\n\t\tcheckNoSuchElementExceptionByID(\"btnnext\", \"\\\"Next\\\" button in trivia mode\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"btnnext\", \"\\\"Next\\\" button in trivia mode\");\r\n\t}", "protected void handleNext(ActionEvent event) {\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==btnConfirmOrNext){\n\t\t\tif(btnConfirmOrNext.getText().equals(\"Confirm\")){\n\t\t\t\ttakeInUserInput();\n\t\t\t\tdisableAllButtons(); // festival speaking\n\t\t\t} else if (btnConfirmOrNext.getText().equals(\"Next Question\")||btnConfirmOrNext.getText().equals(\"Done\")){\n\t\t\t\tdisableAllButtons(); // festival speaking\n\t\t\t\t// ask question when it is supposed to\n\t\t\t\tif(spellList.status == QuizState.Asking){\n\t\t\t\t\tbtnConfirmOrNext.setText(\"Confirm\");\n\t\t\t\t\tquestionAsker=spellList.getQuestionAsker();\n\t\t\t\t\tquestionAsker.execute();\n\t\t\t\t}\n\t\t\t}\n\t\t} else if(e.getSource()==btnStop){\n\t\t\t// quiz only stoppable after a question is done asking (i.e. Answering state) or when is question is done answered\n\t\t\tif(spellList.status==QuizState.Answering||btnConfirmOrNext.getText().equals(\"Next Question\")){\n\t\t\t\t// record stats even though stopped\n\t\t\t\tspellList.recordStatisticsFromLevel();\n\t\t\t\t// go back to main panel\n\t\t\t\tmainFrame.changeCardPanel(\"Main\");\n\t\t\t}\n\t\t} else if(e.getSource()==btnListenAgain){\n\t\t\t// this button only works when the voice generator is not generating any voice and when a question is not being asked\n\t\t\tif((!(spellList.status==QuizState.Asking)||(btnConfirmOrNext.getText().equals(\"Next Question\")))&&respellGen.isDone()){\n\t\t\t\t// respell word\n\t\t\t\trespellGen = new VoiceGenerator(theVoice,theVoiceStretch,theVoicePitch,theVoiceRange);\n\t\t\t\trespellGen.setTextForSwingWorker(\"\", spellList.getCurrentWord());\n\t\t\t\trespellGen.execute();\n\t\t\t\t// rerequest focus on user input\n\t\t\t\tuserInput.requestFocus();\n\t\t\t}\n\t\t}\n\t}", "void goToNext(boolean isCorrect);", "public void nextClick(View view) {\n i=i+1;\n if(i<questions.size()){\n tvQuestion.setText(questions.get(i));\n trash.setText(emptyString);\n chest.setText(emptyString);\n tvQuestion.setVisibility(View.VISIBLE);\n nxtButton.setClickable(false);\n nxtButton.setBackground(getResources().getDrawable(R.drawable.info_hub_button_grayed));\n chest.setBackground(getResources().getDrawable(R.drawable.chest));\n trash.setBackground(getResources().getDrawable(R.drawable.trash));\n }\n else{\n final Dialog alertDialog = new Dialog(MythFactGame.this,android.R.style.Theme_DeviceDefault_Dialog_NoActionBar);\n alertDialog.setContentView(R.layout.game_over_dialog);\n alertDialog.setCancelable(false);\n\n // Setting Dialog Title\n alertDialog.setTitle(\"Game Over!!\");\n Button ok=(Button)alertDialog.findViewById(R.id.gameOverDialogButtonOK);\n ok.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n MythFactGame.this.finish();\n }\n });\n\n addGameScoreToMainScore();\n // Showing Alert Message\n alertDialog.show();\n }\n }", "public abstract boolean nextOrFinishPressed();", "public void goToNextPage() {\n nextPageButton.click();\n }", "public void takeAction() {\n mRelativeLayout.setVisibility(View.INVISIBLE);\n currentQuestion = questionList.get(questionID);\n textView = findViewById(R.id.questionText);\n buttonA = findViewById(R.id.radioA);\n buttonB = findViewById(R.id.radioB);\n buttonC = findViewById(R.id.radioC);\n button = findViewById(R.id.button);\n setQuestionView();\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n RadioGroup radioGroup = findViewById(R.id.radioGroup);\n\n if (radioGroup.getCheckedRadioButtonId() == -1) {\n return;\n }\n\n RadioButton answer = findViewById(radioGroup.getCheckedRadioButtonId());\n\n radioGroup.clearCheck();\n\n if (currentQuestion.getAnswer().equals(answer.getText())) {\n score++;\n }\n\n // checks if all questions have been answered and opens the result page\n if (questionID < questionList.size()) {\n currentQuestion = questionList.get(questionID);\n setQuestionView();\n } else {\n Intent intent = new Intent(QuizActivity.this, ResultActivity.class);\n Bundle bundle = new Bundle();\n ResultHolder answers = new ResultHolder(questionList);\n bundle.putSerializable(\"answers\", answers);\n bundle.putInt(\"score\", score);\n intent.putExtras(bundle);\n startActivity(intent);\n finish();\n }\n }\n });\n\n }", "@Override\n public void onClick(View v) {\n progress = progress + 1;\n progressBar.setProgress(progress);\n\n //Check if radio button is checked. If is checked then we have to compare the answer:\n RadioButton answer = (RadioButton) findViewById(radioGroup.getCheckedRadioButtonId());\n //if current question equals to identified answer\n if (currentQuest1.getANSWER().equals(answer.getText())) {\n //then upgrade the score/points by 100\n score = score + 100;\n }\n\n //if is not checked then:\n radioGroup.clearCheck();\n //we can't go to the next question\n nextButtonQuest1.setEnabled(false);\n\n if (questionIncrease < 11) {\n //Quiz have only 10 questions. When all questions are answered then the quiz terminate\n if (questionIncrease == 10) {\n //setting the text inside the \"Next\" button to \"End Quiz\". The quiz ended !\n nextButtonQuest1.setText(\"End Quiz\");\n }\n\n //Get the number of questionIncrease (it show where are we inside the quiz) for entry of the created List and load it to currentQuest1\n currentQuest1 = questList1.get(list.get(questionIncrease));\n\n //Method who updates the View of Quiz Structure\n setQuizStructureView();\n\n //The quiz have been finished, so the timer must be ended\n /* } else {\n timer.onFinish();\n timer.cancel();\n }*/\n }\n }", "@Override\n public void run() {\n nextButtonAction(); // invoking next button //\n }", "public void clickNextButton() {\n if (editSummaryFragment.isActive()) {\n //we're showing the custom edit summary window, so close it and\n //apply the provided summary.\n editSummaryFragment.hide();\n editPreviewFragment.setCustomSummary(editSummaryFragment.getSummary());\n } else if (editPreviewFragment.isActive()) {\n //we're showing the Preview window, which means that the next step is to save it!\n if (abusefilterEditResult != null) {\n //if the user was already shown an AbuseFilter warning, and they're ignoring it:\n funnel.logAbuseFilterWarningIgnore(abusefilterEditResult.getCode());\n }\n getEditTokenThenSave(false);\n funnel.logSaveAttempt();\n } else {\n //we must be showing the editing window, so show the Preview.\n hideSoftKeyboard(this);\n editPreviewFragment.showPreview(title, sectionText.getText().toString());\n funnel.logPreview();\n }\n }", "void OnNextButtonClicked(String buttonClicked,StoriesClass currentStor);", "public void actionPerformed(ActionEvent e)\n {\n //sets correct or wrong notes to invisible\n response.setVisible(false); \n response2.setVisible(false); \n if(correct) //if answer inputed was correct - set in enter button\n {\n if(x <= 1) //keeps track of which problem user is on\n {\n x++;\n tf.setText(questions[x]); //next question\n }\n else\n {\n //if all problems are solved class segways to next part of game\n game.setVisible(true); \n end.setVisible(true); \n }\n }\n \n correct = false; \n }", "public void onNextQuestionButton(View view) {\n CheckBox answerBtnA = (CheckBox) findViewById(R.id.checkbox_button_1);\n CheckBox answerBtnB = (CheckBox) findViewById(R.id.checkbox_button_2);\n CheckBox answerBtnC = (CheckBox) findViewById(R.id.checkbox_button_3);\n CheckBox answerBtnD = (CheckBox) findViewById(R.id.checkbox_button_4);\n\n checkedA = answerBtnA.isChecked();\n checkedB = answerBtnB.isChecked();\n checkedC = answerBtnC.isChecked();\n checkedD = answerBtnD.isChecked();\n\n /**\n * Check whether the User inserted the right number of answers (always 2) and\n * request them, if they had not been given\n */\n if (checkedA & checkedB | checkedA & checkedC | checkedA & checkedD | checkedB & checkedC |\n checkedB & checkedD | checkedC & checkedD){\n calculateMethod();\n } else if(checkedA | checkedB | checkedC | checkedD){\n Toast.makeText(this,R.string.noAnswer2,Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this,R.string.noAnswer,Toast.LENGTH_SHORT).show();\n }\n }", "public void startOrSubmitButton(View view) {\n Button nextButton = (Button) findViewById(R.id.next_button);\n nextButton.setEnabled(false);\n String solutions[] = getResources().getStringArray(R.array.solutions);\n Button startAndSubmitButton = (Button) findViewById(R.id.start_and_submit_button);\n RadioGroup radioButton = (RadioGroup) findViewById(R.id.radio_group);\n LinearLayout checkGroup = (LinearLayout) findViewById(R.id.check_group);\n EditText inputText = (EditText) findViewById(R.id.input_text);\n\n if (currentQueNum != 0) {\n getUserAnswer();//get the user's answer or response as the instance of submit\n startAndSubmitButton.setEnabled(true);\n for (int i = 0; i < currentQueNum; ++i) {\n if (userAnswer[i].equalsIgnoreCase(solutions[i]))\n score += 1;\n if (userAnswer[i].equalsIgnoreCase(\"skipped\"))\n noOfSkippedQues += 1;\n if (currentQueNum != maxNumOfQues)\n oops = \"\\nYou didn't reach the end of test\";\n }\n disableCheckBox();\n disableInputText();\n disableRadioButtons();\n disableStartOrSubmitButton();\n disableNextButton();\n // give toast of the overall performance\n Toast displayResult = Toast.makeText(getApplicationContext(), userName.toUpperCase() + \" you have score \" + String.valueOf(score) + \"\\nout of \" + String.valueOf(maxNumOfQues) + \" questions attempted.\", Toast.LENGTH_LONG);\n displayResult.show();\n\n //using another activity to display the quiz result and summary\n Intent intent = new Intent(MainActivity.this, QuizSummaryActivity.class);\n intent.putExtra(\"score\", String.valueOf(score));\n intent.putExtra(\"userName\", userName);\n intent.putExtra(\"oops\", oops);\n intent.putExtra(\"noOfSkippedQues\", String.valueOf(noOfSkippedQues));\n intent.putExtra(\"currentQueNum\", String.valueOf(currentQueNum));\n\n startActivity(intent);\n } else {\n currentQueNum += 1;\n radioButton.setVisibility(View.VISIBLE);\n inputText.setVisibility(View.GONE);\n checkGroup.setVisibility(View.GONE);\n String que[] = getResources().getStringArray(R.array.questions);\n TextView questionsPane = (TextView) findViewById(R.id.questions_pane);\n questionsPane.setText(que[currentQueNum - 1]);\n optionsSelect();\n startAndSubmitButton.setText(R.string.submit_button);\n nextButton.setEnabled(true);\n }\n }", "public void populateWithQuestionInfo(String question, String answer1, String answer2,String answer3,String answer4, int nextQuestionOrFinish){\n\t //populate the question label\n\t\t \tTextView questionLabel = (TextView) findViewById (R.id.question); \n\t questionLabel.setText(question);\t\n\t \n\t //populate answer1\n\t Button buttonAnswer1 = (Button) findViewById (R.id.answer1button);\n\t buttonAnswer1.setText(answer1);\n\t \n\t //populate answer2\n\t Button buttonAnswer2 = (Button) findViewById (R.id.answer2button);\n\t buttonAnswer2.setText(answer2);\n\t \n\t //populate answer3\n\t Button buttonAnswer3 = (Button) findViewById (R.id.answer3button);\n\t buttonAnswer3.setText(answer3);\n\t \n\t //populate answer4\n\t Button buttonAnswer4 = (Button) findViewById (R.id.answer4button);\n\t buttonAnswer4.setText(answer4);\n\t \n\t Button buttonNextQuestion = (Button) findViewById (R.id.nextquestion);\n\t if (nextQuestionOrFinish == 0){\n\t \tbuttonNextQuestion.setText(\"Next\");\n\t }\n\t else {\n\t \tbuttonNextQuestion.setText(\"Finish\");\n\t }\n\t \n\t numberOfQuestionsDisplayedCounter++;\n\n\t }", "public void buttonHintNext(View view) {\n //using finish to activity\n finish();\n\n //create a new object to start new activity\n Intent intent = new Intent(this, Hint.class);\n //pass object to startActivity\n startActivity(intent);\n }", "public void onClick(View view) {\n\t\t\t\tmButton1.setBackgroundDrawable(mButtonDrawable1);\n\t\t\t\tmButton2.setBackgroundDrawable(mButtonDrawable2);\n\t\t\t\tmButton3.setBackgroundDrawable(mButtonDrawable3);\n\n\t\t\t\tString rightResult = getString(mRightResult.get(mRandomIndex));\n\t\t\t\tLog.d(TAG, \"next button onClick start, mRandomIndex =\" + mRandomIndex + \"; rightResult is \" + rightResult + \",mFinalResult is \" + mFinalResult + \"; mRightResultCount =\" + mRightResultCount);\n\t\t\t\tif (mFinalResult == null) {\n\t\t\t\t\tmTimer.stop();\n\t\t\t\t\tshowErrorDialog();\n\t\t\t\t\treturn;\n\t\t\t\t} else if (mFinalResult != null && mFinalResult.equals(rightResult)) {\n\t\t\t\t\tmFinalResult = null;\n\t\t\t\t\tmRightResultCount++;\n\t\t\t\t} else {\n\t\t\t\t\tmFinalResult = null;\n\t\t\t\t}\n\t\t\t\trefreshScreen();\n\t\t\t\tLog.d(TAG, \"next button onClick end, mRandomIndex =\" + mRandomIndex + \"; rightResult is \" + rightResult + \",mFinalResult is \" + mFinalResult + \"; mRightResultCount =\" + mRightResultCount);\n\t\t\t}", "public static void clickNextBtnGame() {\t\n\t\tdriver.findElement(By.id(\"btnnext\")).click();\n\t}", "void acceptQueAnswersClicked();", "public static void next() {\n\t\tsendMessage(NEXT_COMMAND);\n\t}", "private void updateQuestion()\r\n {\r\n if(noOfQuestion == 10) //last question.\r\n {\r\n //Toast.makeText(getApplicationContext(), \"Questions Limit Reached!!\", Toast.LENGTH_SHORT).show();\r\n\r\n questionsTV.setVisibility(View.GONE);\r\n questionNoTV.setVisibility(View.GONE);\r\n answer1Btn.setVisibility(View.GONE);\r\n answer2Btn.setVisibility(View.GONE);\r\n answer3Btn.setVisibility(View.GONE);\r\n viewLBBtn.setVisibility(View.VISIBLE);\r\n congratsImgView.setVisibility(View.VISIBLE);\r\n starImgView.setVisibility(View.VISIBLE);\r\n\r\n if(backgroundMusicPlayer.isPlaying()) {\r\n backgroundMusicPlayer.stop();\r\n }\r\n congratsMPlayer.start();\r\n clapSoundPlayer.start();\r\n }\r\n else\r\n {\r\n noOfQuestion++; //increment the number of question.\r\n resetButtonsPosition(answer1Btn, answer2Btn, answer3Btn, 0);\r\n\r\n //update the view with next question and answers.\r\n questionsTV.setText(questionsAndAnswersLibrary.getQuestion(questionNo));\r\n answer1Btn.setText(questionsAndAnswersLibrary.getAnswerChoice1(questionNo));\r\n answer2Btn.setText(questionsAndAnswersLibrary.getAnswerChoice2(questionNo));\r\n answer3Btn.setText(questionsAndAnswersLibrary.getAnswerChoice3(questionNo));\r\n\r\n correctAnswer = questionsAndAnswersLibrary.getCorrectAnswer(questionNo);\r\n questionNo++;\r\n\r\n moveButtons(answer1Btn);\r\n moveButtons(answer2Btn);\r\n moveButtons(answer3Btn);\r\n }\r\n }", "private void buttonSubmit (){\n Intent nextActivity = new Intent(Question_One.this, Question_two.class);\n\n // Transfers the user's current score to the next intent(question)\n nextActivity.putExtra(EXTRA_TEXT,scoreCounter);\n startActivity(nextActivity);\n }", "private void navigateQuestion(boolean previous) {\n currentQuestionIndex = previous ? currentQuestionIndex - 1 : currentQuestionIndex + 1;\n if (currentQuestionIndex == 10 || currentQuestionIndex < 0) {\n currentQuestionIndex = 0;\n }\n question = questions[currentQuestionIndex];\n textView.setText(question.getStringResourceId());\n\n Log.d(TAG, \"Displaying question \" + String.valueOf(currentQuestionIndex));\n }", "public void question() {\n\t\tlead.answer(this);\n\t}", "@Click(R.id.bt_answer1)\n void clickAnswer1() {\n selectedAnswer = questionList.get(questionProgress - 1).getAnswers().get(0);\n showResult();\n }", "public void onNextPress() {\n try {\n timer(ctx,true,ConstantTestIDs.EAR_PHONE_ID,null);\n MainActivity activity = (MainActivity) getActivity();\n if (Constants.isSkipButton) {\n try{\n testController.unRegisterEarJack();\n\n }\n catch (Exception e){\n e.printStackTrace();\n }\n isTestPerformed=true;\n mImgViewEarPhone.setImageDrawable(getResources().getDrawable(R.drawable.ic_earphone_green_svg_168),false,getActivity());\n utils.showToast(ctx, getResources().getString(R.string.txtManualFail));\n\n }\n boolean semi=true;\n nextPress(activity,semi);\n\n } catch (Exception e) {\n logException(e, \"EarJackManualFragment_onNextPress()\");\n }\n\n }", "private void setUpQuestions(){\n if (index == questions.size()){ //if no more questions, jumps to the endGame\n endGame();\n }else {\n currentQuestion = questions.get(index);\n\n lblQuestion.setText(currentQuestion.getQuestion());\n imgPicture.setImageResource(currentQuestion.getPicture());\n btnRight.setText(currentQuestion.getOption1());\n btnLeft.setText(currentQuestion.getOption2());\n index++;\n }\n }", "public static void loadNextQuestion(Question question, ArrayList<Question> questionsList, copyRightGUI gui){\n // Run throught the questionsList, find the next question and load it\n for (int k = 0; k < questionsList.size(); k++) {\n\n if (question.getNextQuestion().equals(questionsList.get(k).getQuestion())) {\n // push question onto questionStack\n questionStack.push(question);\n\n // revalidate gui\n gui.revalidate();\n\n // load question\n loadQuestion(questionsList, gui, k);\n\n // revalidate gui, again\n gui.revalidate();\n break;\n }\n }\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tgoNext();\r\n\t\t\t\t}", "@OnClick\n public void onNext() {\n KeyboardUtils.dismissSoftKeyboard(getView());\n this.nextButton.setState(AirButton.State.Loading);\n RegistrationAnalytics.trackClickEvent(RegistrationAnalytics.NEXT_BUTTON, \"phone\", getNavigationTrackingTag());\n AccountCreationRequest.forValidatingPhone(this.airPhone.formattedPhone()).withListener((Observer) this.phoneNumberExistValidationRequestListener).execute(this.requestManager);\n }", "private void nextButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nextButtonActionPerformed\n if(napakalakiModel.getCurrentPlayer() == null){\n this.nextButton.setEnabled(false);\n this.combatButton.setEnabled(false);\n this.playerView1.enableAfterNextButton();\n napakalakiModel.nextTurn();\n this.combatResultLabel.setText(\"\");\n // Llamo al setNapakalaki para que surjan efecto los cambios\n setNapakalaki(napakalakiModel); \n }\n else{\n // Si ha cumplido el mal rollo puede continuar\n if( napakalakiModel.getCurrentPlayer().validState() ){\n this.nextButton.setEnabled(false);\n this.combatButton.setEnabled(false);\n this.playerView1.enableAfterNextButton();\n napakalakiModel.nextTurn();\n this.combatResultLabel.setText(\"\");\n // Llamo al setNapakalaki para que surjan efecto los cambios\n setNapakalaki(napakalakiModel);\n }\n else{\n this.combatResultLabel.setText(\"No cumples las condiciones para pasar de turno.\");\n }\n } \n }", "public void next(){\n\t\tboundIndex = (boundIndex+1)%buttonBounds.length;\n\t\tupdateButtonBounds();\n\t}", "public void onNextButtonPressed(View v) {\n ParticipantDetailsDataAdapter.ViewHolder partViewHolder;\n CrtPollForm3Data form3Data = new CrtPollForm3Data();\n if (mListener != null) {\n for (int i = 0 ; i < mRecyclerView.getAdapter().getItemCount();i++)\n {\n RecyclerView.ViewHolder viewHolder = mRecyclerView.findViewHolderForAdapterPosition(i);\n if (viewHolder != null && viewHolder instanceof ParticipantDetailsDataAdapter.ViewHolder){\n partViewHolder = (ParticipantDetailsDataAdapter.ViewHolder) viewHolder;\n }\n }\n mListener.onFragmentInteractionForm3(form3Data);\n }\n }", "@FXML\n private void nextButtonAction() {\n int totalSong = listItems.size();\n if(isRepeatOne){\n songFile = currentSong;\n }\n else if(isRepeatAll){\n currentSongIndex = (currentSongIndex+1)%totalSong;\n songList.getSelectionModel().clearSelection();\n songList.getSelectionModel().select(currentSongIndex);\n songList.scrollTo(currentSongIndex);\n selectedSong();\n }\n else {\n Random random = new Random();\n int next = random.nextInt(totalSong);\n songList.getSelectionModel().clearSelection();\n songList.getSelectionModel().select(next);\n songList.scrollTo(next);\n selectedSong();\n }\n playButtonAction();\n }", "public void nextQuestion(View view) {\n\n Integer num1, num2;\n num1=generateRandomNumber(100);\n num2=generateRandomNumber(100);\n\n //set random number in textview\n TextView tv;\n tv=findViewById(R.id.question);\n tv.setText(Integer.toString(num1)+ \"X\" + Integer.toString(num2));\n\n }", "@OnClick\n public void onClickNext() {\n alipayPhoneLogging();\n String phoneNumber = this.airPhone.phoneInputText();\n String countryCode = this.phoneNumberInput.getCountryCode();\n getAlipayActivity().setPhoneNumber(phoneNumber);\n CreatePaymentInstrumentRequest.forAlipay(new Builder().alipayLoginId(getAlipayActivity().getAlipayId()).mobilePhoneNumber(phoneNumber).mobilePhoneCountry(countryCode).build()).withListener((Observer) this.requestListener).execute(this.requestManager);\n this.nextButton.setState(AirButton.State.Loading);\n }", "private void takeQuiz(String filename) {\n String filepath = \"./src/multiplechoice/\" + filename + \".txt\";\n MCQuestionSet questionSet = new MCQuestionSet(filepath);\n int questionCount = questionSet.getSize();\n currentQuestion = questionSet.peekNext();\n correct = 0;\n //create question text\n BorderPane questionPane = new BorderPane();\n Button btnQuestion = createBigButton(\"TEMP TESTING\", 36, 25);\n questionPane.setCenter(btnQuestion);\n BorderPane.setMargin(btnQuestion, new Insets(20, 20, 20, 20));\n VBox choicePane = new VBox();\n //correct answer tracker\n VBox resultPane = new VBox();\n resultPane.setAlignment(Pos.CENTER);\n Label lblCorrect = new Label();\n lblCorrect.setFont(Font.font(TEXT_SIZE));\n resultPane.getChildren().add(lblCorrect);\n //next button trigger\n Button btnNext = createButton(\"Next\", TEXT_SIZE, 10);\n Button btnFinish = createButton(\"Finish\", TEXT_SIZE, 10);\n btnNext.setOnAction(e -> {\n currentQuestion = questionSet.getNext();\n if (currentQuestion == null) {\n btnFinish.fire();\n } else {\n choices = currentQuestion.getChoices();\n btnQuestion.setText(currentQuestion.getQuestion());\n choicePane.getChildren().clear();\n for (int i = 0; i < choices.length; i++) {\n Button btnChoice = createBigButton(choices[i], 24, 25);\n btnChoice.setOnAction(e2 -> {\n if (currentQuestion.isCorrect(btnChoice.getText())) {\n correct++;\n }\n lblCorrect.setText(correct + \" correct answers!\");\n btnNext.fire();\n });\n choicePane.getChildren().add(btnChoice);\n VBox.setMargin(btnChoice, new Insets(5, 50, 5, 50));\n }\n }\n });\n //submit final answer trigger and menu return button\n btnFinish.setOnAction(e -> {\n String message = \"Quiz Complete!\\n Score: \" + correct + \"/\";\n message = message + questionCount + \"\\n Click to continue.\";\n Button btnFinishMessage = createBigButton(message, 54, 100);\n btnFinishMessage.setOnAction(e2 -> {\n returnHome();\n });\n quizScores.add(filename, correct, questionCount);\n try (PrintWriter pw = new PrintWriter(new FileWriter(SCORES_OUTPUT))) {\n pw.print(quizScores);\n } catch (IOException ex) {\n System.out.println(\"FAILED TO SAVE SCORES\");\n }\n parentPane.getChildren().clear();\n parentPane.setCenter(btnFinishMessage);\n });\n //finalize\n parentPane.getChildren().clear();\n parentPane.setTop(questionPane);\n parentPane.setCenter(choicePane);\n parentPane.setBottom(resultPane);\n btnNext.fire();\n }", "public void onClick(View v) {\n if (iNext == count) {\n iNext = count-1;\n }\n if (pCheck) {\n iNext--;\n }\n if (iNext > 0) {\n iNext--;\n dataSource = data.get(iNext);\n ExammodeAdapter adapter = new ExammodeAdapter(context, dataSource,iNext,device,frag,resData);\n list.setAdapter(adapter);\n next.setEnabled(true);\n next.setText(\"Next\");\n nCheck =true;\n pCheck = false;\n\n }\n if (iNext == 0){\n priv.setEnabled(false);\n iNext = 0;\n nCheck =false;\n\n }\n\n\n }", "@Override\n public void onCheckedChanged(RadioGroup radioGroup, int i) {\n if (i == R.id.radio1 || i == R.id.radio2 || i == R.id.radio3 || i == R.id.radio4)\n // then the \"Next button\" activated to direct us, to the next question\n nextButtonQuest1.setEnabled(true);\n }", "private void updateQuestion() {\n\n if (attempts < 10) { //To ensure only 10 questions are shown.\n Question.setText(quizQuestions.getQuestion(questionNumber));\n Answer1.setText(quizQuestions.getChoice1(questionNumber));\n Answer2.setText(quizQuestions.getChoice2(questionNumber));\n Answer3.setText(quizQuestions.getChoice3(questionNumber));\n Answer4.setText(quizQuestions.getChoice4(questionNumber));\n QuestionNo.setText(quizQuestions.getQuestionNo(questionNumber));\n }\n\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n// String s = quizQuestions.getHint(questionNumber - 1);\n showFlashcardDialog(QuizActivity.this, quizQuestions.getHint(questionNumber - 1), true);\n\n }\n });\n\n //Checks with QuizQuestions class to see if answer was correct\n correctAnswer = quizQuestions.getCorrectAnswer(questionNumber);\n\n //Finishes the quiz once 10 questions have been answered\n if (attempts == 10) {\n finish();\n updateScore(mScore);\n Intent results = new Intent(getApplicationContext(), QuizComplete.class); //Starts QuizComplete activity\n results.putExtra(TRANSFER_SCORE, mScore); //Transfers score to show at QuizComplete activity\n startActivity(results);\n\n } else {\n questionNumber++;\n }\n\n if (mScore > highScore) {\n updateHighScore(mScore);\n }\n }", "public void Next(View view)\n {\n increaseNum();\n }", "@Override\n public void onClick(View view) {\n quesCounter++;\n if (quesCounter < 4) {\n //returning a feedback saying \"correct answer\" if the user has chosen the correct answer and\n //\"incorrect answer\" otherwise\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n } else {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n question[quesNumber].setWrong(true);\n }\n\n //incrementing quesNumber to move to the next question\n quesNumber++;\n questionTextView.setText(question[quesNumber].getQuesStatement());\n\n } else {\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n } else {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n }\n //Checking to see if the rightQuesCounter worked or not\n Log.d(TAG, \"You have got \" + rightQuesCounter + \" out of 10\");\n\n //Having an intent to move to the Result screen while passing the rightQuesCounter to get the result\n Intent intent = new Intent(TopicQuiz.this, Result.class);\n intent.putExtra(\"rightQuesCounter\", rightQuesCounter);\n\n startActivity(intent);\n }\n\n }", "public void addNext()\r\n\t{\r\n\t\tnext = new JButton(\"Next\");\r\n\t\tnext.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tif (state.getTurn() == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tstate.setPlayerTwoTurn();\r\n\t\t\t\t}\r\n\t\t\t\telse if (state.getTurn() == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tstate.setPlayerOneTurn();\r\n\t\t\t\t}\r\n\t\t\t\tremoveNext();\r\n\t\t\t\t\r\n\t\t\t\tstate.setWaiting(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\tadd(next);\r\n\t\t\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "private void updateQuestion() {\r\n\r\n //The code below resets the option\r\n mOption1.setVisibility(View.VISIBLE);\r\n mOption2.setVisibility(View.VISIBLE);\r\n mOption3.setVisibility(View.VISIBLE);\r\n mNext.setVisibility(View.INVISIBLE);\r\n\r\n int questionSize = 12;\r\n\r\n if (mQuestionNumber < questionSize) {\r\n\r\n mQuestionView.setText((questionsDB.getQuestion(mQuestionNumber)));\r\n mOption1.setText(questionsDB.getChoice1(mQuestionNumber));\r\n mOption2.setText(questionsDB.getChoice2(mQuestionNumber));\r\n mOption3.setText(questionsDB.getChoice3(mQuestionNumber));\r\n\r\n mAnswer = questionsDB.getCorrectAnswer(mQuestionNumber);\r\n mQuestionNumber++;\r\n timeLeftInMillis = COUNTDOWN_IN_MILLIS;\r\n startCountDown();\r\n\r\n\r\n } else {\r\n displayScore();\r\n }\r\n\r\n }", "private void goToSelectedQuestion(int questionindex){\n radioGroup.setEnabled(true);\n saveAnswer();\n mQuestionIndex = questionindex;\n unSelectRadioButtons();\n updateQuestion();\n\n loadRadioButtonSelection();\n\n\n }", "public void updateQ4scoreAndGoToNext(View view){\r\n EditText q1Correct;\r\n q1Correct = (EditText) findViewById(R.id.q1Answer);\r\n String inputText = q1Correct.getText().toString();\r\n String rightAnswer = \"TextView\";\r\n\r\n if (inputText.equals(rightAnswer)) {\r\n q1Score = q1Score + 1;\r\n Toast toast = Toast.makeText(this, \"Great Job! 1 point added.\", Toast.LENGTH_SHORT);\r\n toast.show();\r\n } else {\r\n q1Score = 0;\r\n Toast toast = Toast.makeText(this, \"Better luck next time, 0 points added.\", Toast.LENGTH_SHORT);\r\n toast.show();\r\n }\r\n\r\n Intent i = new Intent(this, Question2Activity.class);\r\n startActivity(i);\r\n }", "@Override\n public void onClick(View view) {\n\n if(mQuestions.getType(QuestionNum) == \"radiobutton\") {\n if (mQuestions.getCoorectAnswers(QuestionNum).equals(mAnswer)) {\n\n mScore++;\n displayToastCorrectAnswer(); // wyswietlenie Toastu\n } else {\n displayToastWrongAnswer();\n\n }\n\n Handler handler = new Handler(); // zmiana widoku po pytaniu\n handler.postDelayed(new Runnable() {\n @Override\n public void run() { // opoznienie wyswietlenia\n updateQuestions();\n\n }\n }, 1000);\n\n }\n\n SystemClock.sleep(1000); // opoznienie dzialania nastepnych metod\n\n if(QuestionNum == mQuestions.getLength() -1){ // sprawdzenie czy to jest ostatnie pytanie\n\n Intent intent_result = new Intent(MainActivity.this, ResultActivity.class);\n intent_result.putExtra(\"totalQuestions\",mQuestions.getLength());\n intent_result.putExtra(\"finalScore\", mScore);\n\n startActivity(intent_result); // ta metoda uruchamia nam aktywnosc wyswietlajaca wynik\n\n QuestionNum = 0;\n mQuizNum = 0;\n mScore = 0;\n }else {\n QuestionNum++;\n mQuizNum++;\n }\n updateQuestions();\n\n }", "@Test\r\n public void startNextOptionTest()\r\n {\r\n presenter.onClickNext();\r\n\r\n Assert.assertEquals(stub.getNextCounter(), 1);\r\n }", "public String getNextQuestion() {\r\n\t\t// Condition for getting the exact question, starting from the first question in\r\n\t\t// the list. This will happen until the method reaches the end of the list with\r\n\t\t// questions.\r\n\t\tif (counter < questions.size()) {\r\n\t\t\tnextQuestion = questions.get(counter).getQuestion();\r\n\t\t\t// Incrementing the counter with one, so next time the method is called it will\r\n\t\t\t// get the following question from the list.\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\t// When the end of the list is reached the next question will take this value.\r\n\t\telse {\r\n\t\t\tnextQuestion = \"You completed the test!\";\r\n\t\t}\r\n\t\treturn nextQuestion;\r\n\r\n\t}", "public void onClick(View view) {\n quesCounter++;\n if (quesCounter < 4) {\n //returning a feedback saying \"correct answer\" if the user has chosen the correct answer and\n //\"incorrect answer\" otherwise\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n //incrementing quesNumber to move to the next question\n quesNumber++;\n questionTextView.setText(question[quesNumber].getQuesStatement());\n } else {\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n\n //Checking to see if the rightQuesCounter worked or not\n Log.d(TAG, \"You have got \" + rightQuesCounter + \" questions right!\");\n\n //Having an intent to move to the Result screen while passing the rightQuesCounter to get the result\n Intent intent = new Intent(TopicQuiz.this, Result.class);\n intent.putExtra(\"rightQuesCounter\", rightQuesCounter);\n intent.putExtra(\"language\",topic);\n\n\n startActivity(intent);\n }\n }", "public void ClickNext() {\r\n\t\tnext.click();\r\n\t\t\tLog(\"Clicked the \\\"Next\\\" button on the Birthdays page\");\r\n\t}", "public abstract void goNext();", "@FXML\r\n private void handleNextButtonAction(ActionEvent event) throws IOException {\n p.switcher(event, \"MusicList.fxml\");\r\n \r\n }", "void onClickNextTurn();", "public boolean moveToNextQuestion() {\n\n this.setGameState(GameState.AWAITING_ANSWER);\n if ((currentQuestionIndex + 1) < this.quiz.getQuestions().size()) {\n currentQuestionIndex++;\n return true;\n } else {\n logger.debug(\"no more questions... ending quiz.\");\n this.setGameState(GameState.COMPLETE);\n return false;\n }\n }", "private void tapAnswer()\r\n {\r\n Intent viewAnswer = new Intent(AnswerActivity.this, QuestionActivity.class);\r\n Bundle bundle = new Bundle();\r\n \r\n // Although this is wasteful, it's necessary so that\r\n // the user can move back and forwards in the list of\r\n // Flash Cards that they are viewing\r\n bundle.putIntArray(QuestionActivity.FLASH_CARD_ARRAY, intArray);\r\n bundle.putInt(QuestionActivity.CURRENT_QUESTION, currentQuestion);\r\n bundle.putInt(QuestionActivity.CURRENT_INDEX, currentIndex);\r\n viewAnswer.putExtras(bundle);\r\n \r\n startActivity(viewAnswer);\r\n overridePendingTransition(R.anim.fade, R.anim.hold);\r\n \r\n // I am calling finish on this activity because I don't want\r\n // to accumulate a whole bunch of these QuesitonActivity\r\n // objects on the back stack. If the user wants to go\r\n // back to the question, I'll just instantiate a new \r\n // QuestionActivity object instead. This means that\r\n // the back button will be not be used to go back to\r\n // the previous QuestionActivity, the user will have \r\n // to use the navigation buttons that will be provided\r\n // for them to navigate to the previous question instead\r\n finish(); \r\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t \t checkAnswer(1);\r\n\t\t\t \r\n\t\t\t\t \tcurrentQ=quesListSci.get(qidSci);\r\n\t\t\t\t \tif(qidSci==46){\r\n\t\t\t\t \t QuizActivitySci.this.showDialog(RUN_OUT);\r\n\t\t\t\t \t \r\n\t\t\t\t }\r\n\t\t\t\t\t if(qMon%2==0 & qMon%3==0){\r\n\t\t\t\t\t\t QuizActivitySci.this\r\n\t\t\t\t\t\t .showDialog(SCORE_DIALOG);\r\n\t\t\t\t\t\t qlvl++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t }else{\r\n\t\t\t\t\t\t setQuestionView();\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t\t\t \r\n\t\t\t\t\t \r\n\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tcard.next(bootpanel);\n\t\t\tSystem.out.println(\"next\");\n\t\t}", "private void newQuestion(int number) {\n bakeImageView.setImageResource(list.get(number - 1).getImage());\n\n //decide which button to place the correct answer\n int correct_answer = r.nextInt(4) + 1;\n\n int firstButton = number - 1;\n int secondButton;\n int thirdButton;\n int fourthButton;\n\n switch (correct_answer) {\n case 1:\n answer1Button.setText(list.get(firstButton).getName());\n\n do {\n secondButton = r.nextInt(list.size());\n } while (secondButton == firstButton);\n do {\n thirdButton = r.nextInt(list.size());\n } while (thirdButton == firstButton || thirdButton == secondButton);\n do {\n fourthButton = r.nextInt(list.size());\n } while (fourthButton == firstButton || fourthButton == secondButton || fourthButton == thirdButton);\n\n answer2Button.setText(list.get(secondButton).getName());\n answer3Button.setText(list.get(thirdButton).getName());\n answer4Button.setText(list.get(fourthButton).getName());\n\n break;\n\n case 2:\n answer2Button.setText(list.get(firstButton).getName());\n\n do {\n secondButton = r.nextInt(list.size());\n } while (secondButton == firstButton);\n do {\n thirdButton = r.nextInt(list.size());\n } while (thirdButton == firstButton || thirdButton == secondButton);\n do {\n fourthButton = r.nextInt(list.size());\n } while (fourthButton == firstButton || fourthButton == secondButton || fourthButton == thirdButton);\n\n answer1Button.setText(list.get(secondButton).getName());\n answer3Button.setText(list.get(thirdButton).getName());\n answer4Button.setText(list.get(fourthButton).getName());\n\n break;\n\n case 3:\n answer3Button.setText(list.get(firstButton).getName());\n\n do {\n secondButton = r.nextInt(list.size());\n } while (secondButton == firstButton);\n do {\n thirdButton = r.nextInt(list.size());\n } while (thirdButton == firstButton || thirdButton == secondButton);\n do {\n fourthButton = r.nextInt(list.size());\n } while (fourthButton == firstButton || fourthButton == secondButton || fourthButton == thirdButton);\n\n answer2Button.setText(list.get(secondButton).getName());\n answer1Button.setText(list.get(thirdButton).getName());\n answer4Button.setText(list.get(fourthButton).getName());\n\n\n break;\n\n case 4:\n answer4Button.setText(list.get(firstButton).getName());\n\n do {\n secondButton = r.nextInt(list.size());\n } while (secondButton == firstButton);\n do {\n thirdButton = r.nextInt(list.size());\n } while (thirdButton == firstButton || thirdButton == secondButton);\n do {\n fourthButton = r.nextInt(list.size());\n } while (fourthButton == firstButton || fourthButton == secondButton || fourthButton == thirdButton);\n\n answer2Button.setText(list.get(secondButton).getName());\n answer3Button.setText(list.get(thirdButton).getName());\n answer1Button.setText(list.get(fourthButton).getName());\n\n break;\n }\n }", "public interface OnNextButtonClicked {\n // TODO: Update argument type and name\n void OnNextButtonClicked(String buttonClicked,StoriesClass currentStor);\n }", "public void toNext(View view) {\n Intent intent = new Intent(this, BonusSpinner.class);\n intent.putExtra(\"player\", player);\n startActivity(intent);\n finish();\n }", "public void submitClick(View v){\n if (Integer.parseInt(v.getTag().toString())==0) {\n //Calculating score\n Integer selectedAnswer = -1;\n\n //try-catch for when an answer is not selected.\n try {\n selectedAnswer = Integer.parseInt(userSelection.getTag().toString());\n answerSelected = true;\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"Please select an answer!\", Toast.LENGTH_SHORT).show();\n }\n\n //Proceed only if an answer has been selected\n if (answerSelected) {\n System.out.println(\"Selected answer is \" + selectedAnswer);\n selectedAnswer = Integer.parseInt(userSelection.getTag().toString());\n\n //Check selected answer against correct answer defined in strings.xml\n if (selectedAnswer == Integer.parseInt(questions[currentQuestion - 1][5])) {\n System.out.println(\"Correct Answer!\");\n userSelection.setBackgroundColor(getResources().getColor(R.color.correct_answer_btn));\n score = score + 1;\n } else {\n System.out.println(\"Incorrect answer! Try again.\");\n userSelection.setBackgroundColor(getResources().getColor(R.color.incorrect_answer_btn));\n answerButtons[Integer.parseInt(questions[currentQuestion - 1][5]) - 1].setBackgroundColor(getResources().getColor(R.color.correct_answer_btn));\n }\n\n //Make buttons unclickable once answer is submitted\n ans1.setClickable(false);\n ans2.setClickable(false);\n ans3.setClickable(false);\n\n //Change button text and tag\n submit.setText(\"NEXT\");\n submit.setTag(1);\n }\n }\n\n //When NEXT is clicked\n else{\n //Clear previous selection\n userSelection = null;\n answerSelected=false;\n\n System.out.println(\"Next question appears now...\");\n currentQuestion = currentQuestion + 1;\n\n //Only 5 questions will be displayed.\n if(currentQuestion<6){\n submit.setText(\"SUBMIT\");\n submit.setTag(0);\n setQuestion();\n\n //Make buttons clickable\n ans1.setClickable(true);\n ans2.setClickable(true);\n ans3.setClickable(true);\n }\n\n else{\n submit.setTag(3);\n\n //End activity and send results to MainActivity.\n System.out.println(\"ScoreActivity starts now.\");\n System.out.println(\"Score is \" + score);\n\n Intent intent = new Intent(QuizActivity.this, MainActivity.class);\n intent.putExtra(\"score\", score);\n setResult(RESULT_FIRST_USER, intent);\n\n finish();\n }\n }\n }", "public void checkAnswer(View view) {\n\n mButton = (Button) view;\n\n if (mButton.getText().toString().equals(questionsInList.get(0).getRightAnswer())) {\n //Toast.makeText(this, \"Correct answer\", Toast.LENGTH_SHORT).show();\n questionNumberIncrement();\n checkIfLastQuestion();\n\n mHandler.postDelayed(r, 1200);\n\n try {\n questionsInList.removeFirst();\n }catch (IllegalArgumentException e){\n e.printStackTrace();\n }\n\n countSessionPoints();\n setCurrentQuestion();\n iterator = (ListIterator) questionsInList.iterator();\n\n } else {\n Toast.makeText(this, \"Wrong answer\", Toast.LENGTH_SHORT).show();\n wrongAnswer();\n\n }\n\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = PROPER;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) \r\n\t{\r\n\t\t//Checks which button is pressed and calls the relevant method\r\n\t\tif (e.getSource() == nextQuestionButton)\r\n\t\t{\r\n\t\t\tfetchNewQuestion();\r\n\t\t}\r\n\t\telse if (e.getSource() == submitAnswerButton)\r\n\t\t{\r\n\t\t\tcheckAnswer();\r\n\t\t}\r\n\t}", "public void onClick(View v) {\n\t switch (v.getId()) {\n\t \t \n\t case R.id.answer1button:\n\t \tif (rightButton1 == true){\n\t \t\tincreaseScore();\n\t \t\tIntent a1 = new Intent(this, correctanswer.class);\t\t//right answer, call the correct answer activity\n\t \t\tstartActivity(a1);\n\t \t\t\n\t \t}\n\t \telse{\n\t \t\tdecreaseScore();\n\t \t\tIntent a2 = new Intent(this, wronganswer.class);\t\t//wrong answer, call the correct answer activity\n\t\t\t startActivity(a2);\n\t \t}\n\t break;\n\t \n\t \n\t \n\t case R.id.answer2button:\n\t \tif (rightButton2 == true){\n\t \t\tincreaseScore();\n\t \t\tIntent b1 = new Intent(this, correctanswer.class);\t\t//right answer, call the correct answer activity\n\t \t\tstartActivity(b1);\n\t \t}\n\t \telse{\n\t \t\tdecreaseScore();\n\t \t\tIntent b2 = new Intent(this, wronganswer.class);\t\t//wrong answer, call the correct answer activity\n\t\t\t startActivity(b2);\n\t \t}\n\t break;\n\t \n\n\t case R.id.answer3button:\n\t \tif (rightButton3 == true){\n\t \t\tincreaseScore();\n\t \t\tIntent c1 = new Intent(this, correctanswer.class);\t\t//right answer, call the correct answer activity\n\t \t\tstartActivity(c1);\n\t \t}\n\t \telse{\n\t \t\tdecreaseScore();\n\t \t\tIntent c2 = new Intent(this, wronganswer.class);\t\t//wrong answer, call the correct answer activity\n\t\t\t startActivity(c2);\n\t \t}\n\t break;\n\t \n\t case R.id.answer4button:\n\t \tif (rightButton4 == true){\n\t \t\tincreaseScore();\n\t \t\tIntent d1 = new Intent(this, correctanswer.class);\t\t//right answer, call the correct answer activity\n\t \t\tstartActivity(d1);\n\t \t}\n\t \telse{\n\t \t\tdecreaseScore();\n\t \t\tIntent d2 = new Intent(this, wronganswer.class);\t\t//wrong answer, call the correct answer activity\n\t\t\t startActivity(d2);\n\t \t}\n\t break;\n\t \n\t case R.id.nextquestion:\n\t\t \n\t \t\tif (nextOrFinishValue == 1){\n\t \t\t\tIntent e = new Intent(this, finalscore.class );\t\t//if 10 questions have been displayed, call final score activity\n\t\t \t\tstartActivity(e);\n\t \t\t\t\n\t \t\t\t\n\t \t\t}\n\t \t\tif (nextOrFinishValue == 0){\t\t\t\t\t\t\t//If 10 questions have not been displayed yet, display the next question\n\t \t\tgatherInfoBeforePopulating ();\n\t \t displayScore();\n\t \t\tpopulateWithQuestionInfo(displayedQuestionFromDatabase, displayedAnswer1FromDatabase, displayedAnswer2FromDatabase, displayedAnswer3FromDatabase, displayedAnswer4FromDatabase, nextOrFinishValue);\n\t \t\t}\n\t \t\tbreak; \n\n\t }\n\t }", "public void setQuestion(){\n String welcomeTextString = \"Welcome \" + getIntent().getStringExtra(\"name\") + \"!\";\n welcomeText.setText(welcomeTextString);\n\n //Setting Question title, description, and answers\n questionTitle.setText(questions[currentQuestion-1][0]);\n questionDescription.setText(questions[currentQuestion-1][1]);\n ans1.setText(questions[currentQuestion-1][2]);\n ans2.setText(questions[currentQuestion-1][3]);\n ans3.setText(questions[currentQuestion-1][4]);\n\n //Save correct answer\n correctAnswer = questions[currentQuestion-1][5];\n\n //Set progress bar and progress text\n progressBar.setProgress(currentQuestion);\n progressText.setText(currentQuestion.toString() + \"/5\");\n\n //Clear selection of buttons if any are already selected\n ans1.setBackgroundColor(getResources().getColor(R.color.ans_btn));\n ans2.setBackgroundColor(getResources().getColor(R.color.ans_btn));\n ans3.setBackgroundColor(getResources().getColor(R.color.ans_btn));\n }", "public void onNextPress() {\n try {\n MainActivity activity = (MainActivity) getActivity();\n// activity.onChangeText(R.string.textSkip,false);\n if (Constants.isSkipButton) {\n mImgViewMicPlay.setImageDrawable(getResources().getDrawable(R.drawable.ic_mic_blue_svg_128),false,getActivity());\n mImgViewMicRecord.setImageDrawable(getResources().getDrawable(R.drawable.ic_speaker_red_svg_128),false,getActivity());\n testController.onServiceResponse(false,\"Mic\", ConstantTestIDs.MIC_ID);\n testController.onServiceResponse(false,\"Speaker\", ConstantTestIDs.SPEAKER_ID);\n utils.showToast(ctx, getResources().getString(R.string.txtManualFail));\n // utils.compare_UpdatePreferenceInt(ctx, JsonTags.MMR_33.name(), AsyncConstant.TEST_FAILED);\n\n // updateResultToServer();\n }\n boolean semi=false;\n nextPress(activity,semi);\n// MainActivity mainActivity = (MainActivity)getActivity();\n//// if (Constants.isDoAllClicked && mainActivity.index != mainActivity.automatedTestListModels.size()) {\n//\n// replaceFragment(R.id.container, ManualTestsOperation.launchScreens(mainActivity.automatedTestListModels.get(mainActivity.index).getTest_id(), mainActivity.automatedTestListModels.get(mainActivity.automatedTestListModels.size() - 1).getTest_id()),null, false);\n// mainActivity.index++;\n//\n// }\n// if (Constants.isDoAllClicked && activity.manualIndex != Manual2SemiAutomaticTestsFragment.testListModelList.size()){\n// replaceFragment(R.id.container, ManualTestsOperation.launchScreens(Manual2SemiAutomaticTestsFragment.testListModelList.get(activity.manualIndex).getTest_id(), Manual2SemiAutomaticTestsFragment.testListModelList.get(Manual2SemiAutomaticTestsFragment.testListModelList.size() - 1).getTest_id()),null, false);\n// activity.manualIndex++;\n//\n// }\n// else {\n//// clearAllStack();\n//// replaceFragment(R.id.container, ManualTestsOperation.launchScreens(-1,mainActivity.automatedTestListModels.get(mainActivity.automatedTestListModels.size()-1).getTest_id()), FragmentTag.GPS_FRAGMENT.name(), true);\n// popFragment(R.id.container);\n// }\n } catch (Exception e) {\n logException(e, \"MicManualFragment_onNextPress()\");\n }\n\n\n }", "public void previousQuestion(View view) {\n if (sequence > 1) {\n saveProgress();\n sequence--;\n if (sequence <=1){\n Button button = (Button) findViewById(R.id.question_button_previous);\n button.setEnabled(false);\n }\n updateView();\n }\n }", "private void previousQuestion()\r\n {\r\n Intent question = new Intent(AnswerActivity.this, QuestionActivity.class);\r\n Bundle bundle = new Bundle();\r\n bundle.putIntArray(QuestionActivity.FLASH_CARD_ARRAY, intArray);\r\n bundle.putInt(QuestionActivity.NUMBER_OF_FLASH_CARDS, numberOfFlashCards);\n bundle.putBoolean(PREVIOUS_QUESTION, true); \r\n bundle.putInt(QuestionActivity.CURRENT_INDEX, currentIndex);\r\n question.putExtras(bundle);\r\n startActivity(question);\r\n overridePendingTransition(R.anim.fade, R.anim.hold);\n finish();\r\n }", "public void setNext(Prompt next) {\n\t\t\tthis.next = next;\n\t\t}", "private void setQuestionView()\n\t{\n txtQNumber.setText(qid + 1 + \"/\" + numberOfQuestions);\n\t\ttxtQuestion.setText(currentQ.getQUESTION());\n\t\ttxtReference.setText(currentQ.getREFERENCE());\n\t\trda.setText(currentQ.getOPTA());\n\t\trdb.setText(currentQ.getOPTB());\n\t\trdc.setText(currentQ.getOPTC());\n\t\trdd.setText(currentQ.getOPTD());\n\t\tqid++;\n\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcheckAnswer(2);\r\n\t\t\t\t\t currentQ=quesListSci.get(qidSci);\r\n\t\t\t\t\t if(qidSci==46){\r\n\t\t\t\t \t QuizActivitySci.this.showDialog(RUN_OUT);\r\n\t\t\t\t \t \r\n\t\t\t\t }\r\n\t\t\t\t\t if(qMon%2==0 & qMon%3==0){\r\n\t\t\t\t\t\t QuizActivitySci.this\r\n\t\t\t\t\t\t .showDialog(SCORE_DIALOG);\r\n\t\t\t\t\t\t qlvl++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t }else{\r\n\t\t\t\t\t\t setQuestionView();\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t\t\t \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public void showQuestion() {\n\n // Variable to store the total questions in out question Array\n int totalQuestions = questions.length;\n\n // Variables to refer to textview in XML to show total number of questions\n TextView questionTotalTextView = findViewById(R.id.question_number_text_view);\n\n // Variables to refer to textview in XML to show question\n TextView questionTextView = findViewById(R.id.question_text_view);\n\n //Variable to refer to textview in XML to show score\n TextView scoreTextView = findViewById(R.id.score_text_view);\n\n // Initialize buttons to refer to answer button in XML\n answer1Button = (Button) findViewById(R.id.answer1_button);\n answer2Button = (Button) findViewById(R.id.answer2_button);\n answer3Button = (Button) findViewById(R.id.answer3_button);\n answer4Button = (Button) findViewById(R.id.answer4_button);\n\n // Condtion to check if the current question number on screen is less then total number of questions\n if (currentQuestionNumber < (totalQuestions)) {\n\n // Set the current question number and total number of questions on screen\n questionTotalTextView.setText(String.valueOf(currentQuestionNumber + 1) + \"/\" + String.valueOf(totalQuestions));\n\n // Set the current question on question textview in XML\n questionTextView.setText(questions[currentQuestionNumber]);\n\n // Set the score in score textview in XML\n\n scoreTextView.setText(String.valueOf(\"Score:\" + score));\n\n // Set the answers for the current question to answer buttons in XML\n answer1Button.setText(answers[currentQuestionNumber][0]);\n answer2Button.setText(answers[currentQuestionNumber][1]);\n answer3Button.setText(answers[currentQuestionNumber][2]);\n answer4Button.setText(answers[currentQuestionNumber][3]);\n\n\n } else {\n // If the last uestion has been answered i.e current question is equal to total questions then mark the quiz complete\n quizComplete = true;\n }\n\n // Check if the quiz is completed and show the summary to the user\n if (quizComplete) {\n\n totalIncorrectAnswers = totalQuestions - (totalCorrectAnswers + totalNotAttemptedAnswers);\n callAlertDialog(totalQuestions);\n\n }\n\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tcheckAnswer(4);\r\n\t\t\t\t\t \tcurrentQ=quesListSci.get(qidSci);\r\n\t\t\t\t\t \tif(qidSci==46){\r\n\t\t\t\t\t \t QuizActivitySci.this.showDialog(RUN_OUT);\r\n\t\t\t\t\t \t \r\n\t\t\t\t\t }\r\n\t\t\t\t\t \t if(qMon%2==0 & qMon%3==0){\r\n\t\t\t\t\t\t\t QuizActivitySci.this\r\n\t\t\t\t\t\t\t .showDialog(SCORE_DIALOG);\r\n\t\t\t\t\t\t\t qlvl++;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t setQuestionView();\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "private void showNextButton(){\n\t\tif(nextButton != null){\n\t\t\thideSubmitBtn();\n\t\t\tmainWindow.addLayer(nextButton, BUTTON_LAYER, submitBtnX, submitBtnY);\n\t\t}\n\t}", "public void nextTurn(){\n\t\tthis.setCurrentElement(this.getCurrentElement().getNext());\n\t}", "private void nexttest(){\n\t\tif (TestListPanel.ktea2yn = true){\n\t\tnextframe = new Ktea2frame();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\t/*else if (wiscyn = true){\n\t\tnextframe = new Wiscframe();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\telse if (basc2yn = true){\n\t\tnextframe = new Basc2frame();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\n\t\t}*/\n\t\t\n\t}", "public void chooseAnswer(View view)\n {\n\n if(view.getTag().toString().equals(Integer.toString(pos_of_correct)))\n {\n //Log.i(\"Result\",\"Correct Answer\");\n correct++;\n noOfQues++;\n correct();\n }\n else\n {\n //Log.i(\"Result\",\"Incorrect Answer\");\n //resluttextview.setText(\"Incorrect!\");\n incorrect();\n noOfQues++;\n }\n pointtextView.setText(Integer.toString(correct)+\"/\"+Integer.toString(noOfQues));\n if(tag==4)\n generateAdditionQuestion();\n if(tag==5)\n generateSubtractionQuestion();\n if(tag==6)\n generateMultiplicationQuestion();\n if(tag==7)\n generateDivisionQuestion();\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = OK;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}" ]
[ "0.851339", "0.8400371", "0.7896412", "0.78598315", "0.7823482", "0.78119195", "0.780347", "0.77432257", "0.7729947", "0.7723699", "0.7642957", "0.7506878", "0.73958933", "0.7330619", "0.73274183", "0.7283069", "0.72323716", "0.7181393", "0.7149658", "0.70905715", "0.6995132", "0.69723403", "0.6964671", "0.69623685", "0.69311816", "0.69123435", "0.6908701", "0.68942547", "0.68428963", "0.68177724", "0.6807773", "0.677729", "0.6764486", "0.6739297", "0.6727143", "0.67256653", "0.6717979", "0.6703167", "0.6694792", "0.669365", "0.6691055", "0.6676355", "0.66762507", "0.66665494", "0.6664987", "0.6649641", "0.6647042", "0.66297996", "0.6617854", "0.66155916", "0.66046774", "0.6597085", "0.6576447", "0.6574437", "0.65659577", "0.65636", "0.6561858", "0.6521939", "0.6520666", "0.65155894", "0.6512048", "0.65028", "0.6498493", "0.64976037", "0.6489776", "0.64873606", "0.64838094", "0.6478762", "0.6462504", "0.64528215", "0.6444476", "0.6434214", "0.64296377", "0.6414864", "0.63992375", "0.6393556", "0.6393345", "0.63885796", "0.6380462", "0.6380254", "0.63777786", "0.63689613", "0.6363363", "0.6362601", "0.63612914", "0.63479924", "0.6337274", "0.63322556", "0.6317966", "0.630705", "0.62995654", "0.6296868", "0.6296368", "0.6283048", "0.62819195", "0.62768304", "0.6273046", "0.6265198", "0.625307", "0.62513393" ]
0.7493296
12
repeated double file = 1;
java.util.List<java.lang.Double> getFileList();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getFile(int index);", "void mo80454a(File file, long j);", "public float[] accumulateSimpleSilentPeriodFiles(ArrayList<File> files){\r\n\t\t\tfloat[] values = new float[10];\r\n\t\t\tfloat[] returnValue = new float[10];\r\n\t\t\t\r\n\t\t for(File file:files){\t\t\t\t\t\r\n\t\t BufferedReader reader;\r\n\t\t try{\r\n\t\t reader = new BufferedReader(new FileReader(file));\r\n\t\t String line = reader.readLine(); \r\n\t\t while(line != null){\t\r\n\t\t \tif(!line.substring(0,1).equals(\"#\")){\r\n\t\t \t\tString[] values2 = line.split(\" \");\r\n\t\t \t\tSystem.out.println(file.getAbsolutePath());\r\n\t\t \t\tfor(int i = 1; i < values2.length; i++) {\r\n\t\t \t\t\tSystem.out.println(\"+ \" + values2[i]);\r\n\t\t \t\t\tvalues[i-1] += Float.valueOf(values2[i]);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t \tline = reader.readLine();\r\n\t\t }\r\n\t\t \r\n\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t System.err.println(\"FileNotFoundException: \" + e.getMessage());\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t System.err.println(\"Caught IOException: \" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t }\r\n\r\n\t\t for(int j = 0; j < values.length; j++) if(values[j] != 0) returnValue[j] = (float)values[j]/files.size();\r\n\t\t \r\n\t\t return returnValue;\r\n\t\t}", "private void doubleFunction(File file, ProbingHashTable doubleProb) throws FileNotFoundException{\n\t\tScanner numbers = new Scanner(file);\n\t\tint intervalCount = 0;\n\t\tdoubleProb = new DoubleProbingHashTable<Integer>(tableSize, R);\n\t\tprintTable(\"Double\");\n\t\twhile(numbers.hasNextInt() && intervalCount < inputs){\n\t\t\tdoubleProb.insert(numbers.nextInt());\n\t\t\tif(++intervalCount % interval == 0)\n\t\t\t\tdoubleProb.print(intervalCount);\n\t\t}\n\t\tnumbers.close();\n\t}", "public static void main(String[] args) {\n FilesParser filesParser = new FilesParser();\r\n ArrayList<Double> time = filesParser.get_timeList();\r\n Map<Double, ArrayList<Double>> expFile = new HashMap<>();\r\n ArrayList<Map<Double, ArrayList<Double>>> theorFiles = new ArrayList<>();\r\n\r\n try {\r\n expFile = filesParser.trimStringsAndGetData(0,\r\n filesParser.getDirectories()[0],\r\n filesParser.get_expFiles()[2]);\r\n List<String> fileList = filesParser.get_theorFileList();\r\n for (int i = 0; i < fileList.size(); i++) {\r\n theorFiles.add(filesParser.trimStringsAndGetData(1,\r\n filesParser.getDirectories()[1],\r\n filesParser.get_theorFileList().get(i)));\r\n }\r\n //System.out.println(expFile.get(0.00050));\r\n //System.out.println(expFile.get(-0.25));\r\n //System.out.println(expFile);\r\n //System.out.println(theorFiles.get(0.00050));\r\n //System.out.println(theorFiles);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n /*for (int i = 0; i < theorFiles.size(); i++) {\r\n Map<Double, ArrayList<Double>> theorFile = theorFiles.get(i);\r\n for (int ik = 0; ik < time.size(); ik++) {\r\n ArrayList<Double> theorFileLine = theorFile.get(time.get(ik));\r\n if (theorFileLine != null) {\r\n for (int j = 0; j < theorFileLine.size(); j++) {\r\n double theord = theorFileLine.get(j);\r\n for (int k = 0; k < expFile.size(); k++) {\r\n ArrayList<Double> expFileLine = expFile.get(time.get(ik));\r\n if (expFileLine != null) {\r\n for (int l = 0; l < expFileLine.size(); l++) {\r\n double expd = expFileLine.get(l);\r\n\r\n double div = expd / theord;\r\n if (div == 1) System.out.println(i);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }*/\r\n\r\n }", "public double cardinalDXSingleSpeedsDuplicatesFile(String fileName) {\n // this method returns the cardinality of the duplicated DXSingleSpeed coils data\n\n double value;\n // store the recorded DXSingleSpeeds in a string array\n ArrayList<String> recordedDXSingleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXSingleSpeed> dxSingleSpeedIterator = dxSingleSpeeds.iterator(); dxSingleSpeedIterator\n .hasNext();) {\n recordedDXSingleSpeedsStrings.add(dxSingleSpeedIterator.next()\n .toMoRecordString());\n }\n\n // remove any duplicates in the array;\n ArrayList<String> rmDuplicatesRecordedDXSingleSpeedsStrings = new ArrayList<String>();\n rmDuplicatesRecordedDXSingleSpeedsStrings = removeDuplicates(recordedDXSingleSpeedsStrings);\n\n // System.out.println\n // (\"size of the dxSingleSpeeds after removing the duplicates \" +\n // rmDuplicatesRecordedDXSingleSpeedsStrings.size());\n value = rmDuplicatesRecordedDXSingleSpeedsStrings.size()\n - dxSingleSpeeds.size();\n\n return value;\n }", "public synchronized long nextFs(){\n\t\treturn fs++;\n\t}", "public double cardinalDXDoubleSpeedsDuplicatesFile(String fileName) {\n // this method returns the cardinality of the duplicated DXDoubleSpeed coils data\n\n double value;\n // store the recorded DXDoubleSpeeds in a string array\n ArrayList<String> recordedDXDoubleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXDoubleSpeed> dxDoubleSpeedIterator = dxDoubleSpeeds.iterator(); dxDoubleSpeedIterator\n .hasNext();) {\n recordedDXDoubleSpeedsStrings.add(dxDoubleSpeedIterator.next()\n .toMoRecordString());\n }\n\n // remove any duplicates in the array;\n ArrayList<String> rmDuplicatesRecordedDXDoubleSpeedsStrings = new ArrayList<String>();\n rmDuplicatesRecordedDXDoubleSpeedsStrings = removeDuplicates(recordedDXDoubleSpeedsStrings);\n\n // System.out.println\n // (\"size of the dxDoubleSpeeds after removing the duplicates \" +\n // rmDuplicatesRecordedDXDoubleSpeedsStrings.size());\n value = rmDuplicatesRecordedDXDoubleSpeedsStrings.size()\n - dxDoubleSpeeds.size();\n\n return value;\n }", "public float[] accumulateDetailFiles(ArrayList<File> files){\r\n\t\tfloat[] values = new float[100];\r\n\t\tint counter = 0;\r\n\r\n\t for(File file:files){\t\t\r\n\t \tSystem.out.println(file.getName());\r\n\t \tcounter = 0;\r\n\t BufferedReader reader;\r\n\t try{\r\n\t reader = new BufferedReader(new FileReader(file));\r\n\t String line = reader.readLine(); \r\n\t while(line != null){\t\r\n\t \tif(!line.substring(0,1).equals(\"#\")){\r\n\t \t\tString[] values2 = line.split(\" \");\r\n\t \t\tvalues[counter] += Float.valueOf(values2[values2.length-1]);\r\n\t\t \tcounter++;\r\n\t \t}\r\n\t \tline = reader.readLine();\r\n\t }\r\n\t \r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t System.err.println(\"FileNotFoundException: \" + e.getMessage());\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t System.err.println(\"Caught IOException: \" + e.getMessage());\r\n\t\t\t}\r\n\t }\r\n\r\n\t float[] returnValues = new float[counter];\r\n\t \r\n\t for(int j = 0; j < returnValues.length; j++) \treturnValues[j] = ((float)values[j]/files.size());\r\n\t\r\n\t \r\n \treturn returnValues;\r\n\t}", "public void incFileCount(){\n\t\tthis.num_files++;\n\t}", "public void cool()throws IOException{\n int q= 2;\n ArrayList<Scanner> f = new ArrayList();\n String input = j.showInputDialog(\"Choose a file to use:\");\n f.add(new Scanner(new File(input+\".ppm\")));\n //\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"jkndanwladlanfseuihrvniurhceimucauqrcal3iuirlheunrliuvznmlriunh.ppm\")));\n out.println(f.get(0).next());out.println(f.get(0).next()); out.println(f.get(0).next());int uh=Integer.parseInt(f.get(0).next()); out.println(uh);\n while(f.get(0).hasNext()){\n for(int rgb=0;rgb<3;rgb++){\n if(f.get(0).hasNext()){\n String ass=f.get(0).next();\n\n int azz= Integer.parseInt(ass);\n if(azz<(uh/2)){\n out.println(\"\"+0);\n }else{\n out.println(\"\"+uh);\n }\n }\n }\n }\n out.close(); //\n \n f.set(0,(new Scanner(new File(input+\".ppm\"))));f.add(new Scanner(new File(\"jkndanwladlanfseuihrvniurhceimucauqrcal3iuirlheunrliuvznmlriunh.ppm\")));\n input = j.showInputDialog(\"Choose a name for the new file:\");\n out = new PrintWriter(new BufferedWriter(new FileWriter(input+\".ppm\")));\n out.println(\"P3\");\n int height[]= new int[q]; int width[]= new int[q];\n int largest=0;\n for(int a=0;a<q;a++){\n f.get(a).next();\n height[a]=Integer.parseInt(f.get(a).next());\n width[a]=Integer.parseInt(f.get(a).next());\n //f.get(a).next();\n }\n for(int a=0;a<q;a++){\n if(height[largest]*width[largest]<height[a]*width[a]){\n largest=a;\n }\n }\n out.println(height[largest]);out.println(width[largest]);\n int ass=0;\n int azz=0;\n\n for(int x=0;x<width[largest];x++){\n for(int y=0;y<height[largest];y++){\n for(int c=0;c<3;c++){\n for(int a=0;a<q;a++){\n if(f.get(a).hasNext()){\n if(x<width[a]&&y<height[a]){\n ass=ass+Integer.parseInt(f.get(a).next());\n azz++;\n }\n }\n }\n ass=ass/azz;\n out.print(ass+\" \");\n ass=0;\n azz=0;\n }\n }\n }\n\n for(int a =0;a<q;a++){\n f.get(a).close();\n }\n out.close();\n System.exit(0);\n }", "public Interface(String filename) throws FileNotFoundException \n {\n //read file for first time to find size of array\n File f = new File(filename);\n Scanner b = new Scanner(f);\n\n while(b.hasNextLine())\n {\n b.nextLine();\n arraySize++;\n }\n //create properly sized array\n array= new double[arraySize];\n //open and close the file, scanner class does not support rewinding\n b.close();\n b = new Scanner(f);\n //read input \n for(int i = 0; i < arraySize; i++)\n { \n array[i] = b.nextDouble();\n }\n //create a stats object of the proper size\n a = new Stats(arraySize);\n a.loadNums(array); //pass entire array to loadNums to allow Stats object a to have a pointer to the array\n }", "public float[] accumulateSimpleMixFiles(ArrayList<File> files){\r\n\t\t\tfloat[] returnValue = new float[10];\r\n\t\t\tfloat[] values = new float[10];\r\n\t\t\t\r\n\t\t for(File file:files){\t\t\t\t\t\r\n\t\t BufferedReader reader;\r\n\t\t try{\r\n\t\t reader = new BufferedReader(new FileReader(file));\r\n\t\t String line = reader.readLine(); \r\n\t\t while(line != null){\t\r\n\t\t \tif(line.substring(0,5).equals(\"Total\")){\r\n\t\t \t\tString[] values2 = line.split(\" \");\r\n\t\t \t\t\r\n\t\t \t\tfor(int i = 2; i < values2.length; i++) values[i-2] += Float.valueOf(values2[i]);\r\n\t\t \t}\r\n\t\t \tline = reader.readLine();\r\n\t\t }\r\n\t\t \r\n\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t System.err.println(\"FileNotFoundException: \" + e.getMessage());\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t System.err.println(\"Caught IOException: \" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t }\r\n\r\n\t\t for(int j = 0; j < values.length; j++) returnValue[j] = (float)values[j]/files.size();\t\r\n\t\t \r\n\t\t return returnValue;\r\n\t\t}", "private double createCumulativeResults(){\n File f = new File(this.cumulativeResultsFileName); \n Scanner sc; \n if(!f.exists()){\n return 0;\n }else{\n try{\n double s = 0; \n int n = 0; \n sc = new Scanner(new File(this.cumulativeResultsFileName));\n while(sc.hasNext()){\n String inputLine = sc.nextLine(); System.out.println(inputLine);\n String temp = inputLine.split(\",\")[1] ;\n s = s + Double.parseDouble(temp);\n n++;\n }\n return s/(double)n;\n }catch(Exception e){\n e.printStackTrace();\n return 0; \n }\n }\n }", "public double getNumFiles(){\n\t\treturn (this.num_files);\n\t}", "private void writeTest1File1() throws IOException{\n fillFile(1, true);\n }", "void startFile() {\n writeToFile(defaultScore);\n for (int i = 0; i < 5; i++) {\n writeToFile(readFromFile() + defaultScore);\n }\n }", "public abstract long NewFileNumber();", "public static List<double[]> readAlpha(File f)\n/* */ throws Exception\n/* */ {\n/* 89 */ throw new Error(\"Unresolved compilation problem: \\n\");\n/* */ }", "public static void main(String[] args) throws IOException {\n FileWriter fw = new FileWriter(new File(\"src/output_files/threesumA.txt\"));\n StringBuilder sb = new StringBuilder();\n // the rest input files\n String[] inputFiles = {\"src/input_files/8ints.txt\", \"src/input_files/1Kints.txt\", \"src/input_files/2Kints.txt\",\n \"src/input_files/2Kints.txt\", \"src/input_files/4Kints.txt\", \"src/input_files/8Kints.txt\",\n \"src/input_files/16Kints.txt\", \"src/input_files/32Kints.txt\"};\n int i = 8;\n for (String file : inputFiles) {\n In in = new In(file);\n int[] a = in.readAllInts();\n long startTime = System.nanoTime();\n int result = count(a);\n long elapsedTime = System.nanoTime() - startTime;\n sb.append(String.format(\"%d %d\\n\", i, elapsedTime));\n System.out.println(result);\n if (i == 8) {\n i = 1000;\n } else {\n i *= 2;\n }\n }\n fw.write(sb.toString());\n fw.close();\n }", "public void mo210a(File file) {\n }", "void setFile(String i) {\n file = i;\n }", "public void addSample(int note, String fileName) {\n\t\taddSample(note, fileName, -1, -1, 1.0);\n\t}", "public void average()throws IOException{\n String input = j.showInputDialog(\"Choose how many images you'll be using:\");\n int q= Integer.parseInt(input);\n ArrayList<Scanner> f = new ArrayList();\n for(int a=0;a<q;a++){\n input = j.showInputDialog(\"Choose a file (\"+(a+1)+\"/\"+q+ \") to use:\");\n f.add(new Scanner(new File(input+\".ppm\")));\n }\n input = j.showInputDialog(\"Choose a name for the new file:\");\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(input+\".ppm\")));\n out.println(\"P3\");\n int height[]= new int[q]; int width[]= new int[q];\n int largest=0;\n for(int a=0;a<q;a++){\n f.get(a).next();\n height[a]=Integer.parseInt(f.get(a).next());\n width[a]=Integer.parseInt(f.get(a).next());\n //f.get(a).next();\n }\n for(int a=0;a<q;a++){\n if(height[largest]*width[largest]<height[a]*width[a]){\n largest=a;\n }\n }\n out.println(height[largest]);out.println(width[largest]);\n int ass=0;\n int azz=0;\n\n for(int x=0;x<width[largest];x++){\n for(int y=0;y<height[largest];y++){\n for(int c=0;c<3;c++){\n for(int a=0;a<q;a++){\n if(f.get(a).hasNext()){\n if(x<width[a]&&y<height[a]){\n ass=ass+Integer.parseInt(f.get(a).next());\n azz++;\n }\n }\n }\n ass=ass/azz;\n out.print(ass+\" \");\n ass=0;\n azz=0;\n }\n }\n }\n\n for(int a =0;a<q;a++){\n f.get(a).close();\n }\n out.close();\n System.exit(0);\n }", "public List<Double> processFile() throws AggregateFileInitializationException {\n \t\t \n \t\tint maxTime = 0;\n \t\tHashMap<String, List<Double>> data = new HashMap<String,List<Double>>();\n \t\ttry {\n \t String record; \n \t String header;\n \t int recCount = 0;\n \t List<String> headerElements = new ArrayList<String>();\n \t FileInputStream fis = new FileInputStream(scenarioData); \n \t BufferedReader d = new BufferedReader(new InputStreamReader(fis));\n \t \n \t //\n \t // Read the file header\n \t //\n \t if ( (header=d.readLine()) != null ) { \n \t \t\n \t\t StringTokenizer st = new StringTokenizer(header );\n \t\t \n \t\t while (st.hasMoreTokens()) {\n \t\t \t String val = st.nextToken(\",\");\n \t\t \t headerElements.add(val.trim());\n \t\t }\n \t } // read the header\n \t /////////////////////\n \t \n \t // set up the empty lists\n \t int numColumns = headerElements.size();\n \t for (int i = 0; i < numColumns; i ++) {\n \t \tString key = headerElements.get(i);\n \t \t if(validate(key)) {\n \t \t\tdata.put(key, new ArrayList<Double>());\n \t\t }\n \t \t\n \t }\n \t \n \t // Here we check the type of the data file\n \t // by checking the header elements\n \t \n \t \n \t \n \t //////////////////////\n // Read the data\n //\n while ( (record=d.readLine()) != null ) { \n recCount++; \n \n StringTokenizer st = new StringTokenizer(record );\n int tcount = 0;\n \t\t\t\twhile (st.hasMoreTokens()) {\n \t\t\t\t\tString val = st.nextToken(\",\");\n \t\t\t\t\tString key = headerElements.get(tcount);\n \t\t\t\t\tif(validate(key)) {\n \t\t\t\t\t\tidSet.add(key);\n \t\t\t\t\t\tList<Double> dataList = data.get(key);\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tDouble dVal = new Double(val.trim());\n \t\t\t\t\t\t\tdataList.add(dVal);\n \t\t\t\t\t\t\tif (dataList.size() >= maxTime) maxTime = dataList.size();\n \t\t\t\t\t\t\tdata.put(key,dataList);\n \t\t\t\t\t\t} catch(NumberFormatException nfe) {\n \t\t\t\t\t\t\tdata.remove(key);\n \t\t\t\t\t\t\tidSet.remove(key);\n \t\t\t\t\t\t\tActivator.logInformation(\"Not a valid number (\"+val+\") ... Removing key \"+key, null);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\t\t\t\n \t\t\t\t\ttcount ++;\n \t\t\t\t}\n \t\t\t} // while file has data\n } catch (IOException e) { \n // catch io errors from FileInputStream or readLine()\n \t Activator.logError(\" IOException error!\", e);\n \t throw new AggregateFileInitializationException(e);\n }\n \n List<Double> aggregate = new ArrayList<Double>();\n for (int i = 0; i < maxTime; i ++) {\n \t aggregate.add(i, new Double(0.0));\n }\n // loop over all location ids\n Iterator<String> iter = idSet.iterator();\n while((iter!=null)&&(iter.hasNext())) {\n \t String key = iter.next();\n \t List<Double> dataList = data.get(key);\n \t for (int i = 0; i < maxTime; i ++) {\n \t\t double val = aggregate.get(i).doubleValue();\n \t\t val += dataList.get(i).doubleValue();\n \t aggregate.set(i,new Double(val));\n }\n }\n \n return aggregate;\n \t }", "String doubleRead();", "public void dxDoubleSpeedsDuplicates(String fileName) throws IOException {\n // This method prints all the duplicated DXDoubleSpeeds in the output\n // file.\n\n // concatenate the recorded DXDoubleSpeeds in a string\n ArrayList<String> recordedDXDoubleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXDoubleSpeed> dxDoubleSpeedIterator = dxDoubleSpeeds.iterator(); dxDoubleSpeedIterator\n .hasNext();) {\n recordedDXDoubleSpeedsStrings.add(dxDoubleSpeedIterator.next()\n .toMoRecordString());\n }\n\n ArrayList<String> duplicates = new ArrayList<String>();\n duplicates = saveDuplicates(recordedDXDoubleSpeedsStrings);\n\n // define the header of the output file\n String fileHeader = \"There are \"\n + String.format(\"%s\", duplicates.size()) + \" duplicate(s) \"\n + \"in the input file. The duplicate(s) is(are) :\" + \"\\n\" + \"\\n\";\n\n String recordedDuplicatesStrings = \"\";\n\n // concatenate the recorded DXDoubleSpeed in a string\n for (Iterator<String> it = duplicates.iterator(); it.hasNext();) {\n recordedDuplicatesStrings += it.next() + \"\\n\";\n }\n\n // print the header + DXDoubleSpeed + footer in the output file\n OutputStreamWriter fw = new FileWriter(fileName);\n fw.write(fileHeader + recordedDuplicatesStrings);\n fw.close();\n }", "private static boolean a(java.io.File r8, defpackage.edw r9) {\n /*\n r0 = 0\n r2 = 0\n long r4 = r8.length() // Catch:{ all -> 0x003c }\n r6 = 0\n int r1 = (r4 > r6 ? 1 : (r4 == r6 ? 0 : -1))\n if (r1 <= 0) goto L_0x0033\n r6 = 2147483647(0x7fffffff, double:1.060997895E-314)\n int r1 = (r4 > r6 ? 1 : (r4 == r6 ? 0 : -1))\n if (r1 >= 0) goto L_0x0033\n int r3 = (int) r4 // Catch:{ all -> 0x003c }\n byte[] r4 = new byte[r3] // Catch:{ all -> 0x003c }\n java.io.FileInputStream r1 = new java.io.FileInputStream // Catch:{ all -> 0x003c }\n r1.<init>(r8) // Catch:{ all -> 0x003c }\n L_0x001b:\n if (r0 >= r3) goto L_0x0025\n int r2 = r3 - r0\n int r2 = r1.read(r4, r0, r2) // Catch:{ all -> 0x0044 }\n int r0 = r0 + r2\n goto L_0x001b\n L_0x0025:\n r0 = 0\n defpackage.dmf.a(r9, r4, r0, r3) // Catch:{ all -> 0x0044 }\n L_0x0029:\n boolean r0 = r8.delete() // Catch:{ all -> 0x0044 }\n if (r1 == 0) goto L_0x0032\n r1.close()\n L_0x0032:\n return r0\n L_0x0033:\n r0 = 1\n java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0) // Catch:{ all -> 0x003c }\n r9.a = r0 // Catch:{ all -> 0x003c }\n r1 = r2\n goto L_0x0029\n L_0x003c:\n r0 = move-exception\n r1 = r2\n L_0x003e:\n if (r1 == 0) goto L_0x0043\n r1.close()\n L_0x0043:\n throw r0\n L_0x0044:\n r0 = move-exception\n goto L_0x003e\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.chn.a(java.io.File, edw):boolean\");\n }", "private static void getFile(String path){\n File file = new File(path); \r\n // get the folder list \r\n File[] array = file.listFiles();\r\n // flag = array.length;\r\n \r\n for(int i=0;i<array.length;i++){ \r\n if(array[i].isFile()){ \r\n // only take file name \r\n //System.out.println(\"^^^^^\" + array[i].getName()); \r\n // take file path and name \r\n //System.out.println(\"#####\" + array[i]); \r\n // take file path and name \r\n System.out.println(\"*****\" + array[i].getPath()); \r\n\t\t\tcalculate_Ave(array[i].getPath());\r\n } \r\n }\r\n}", "public void dxSingleSpeedsDuplicates(String fileName) throws IOException {\n // This method prints all the duplicated DXSingleSpeeds in the output\n // file.\n\n // concatenate the recorded DXSingleSpeeds in a string\n ArrayList<String> recordedDXSingleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXSingleSpeed> dxSingleSpeedIterator = dxSingleSpeeds.iterator(); dxSingleSpeedIterator\n .hasNext();) {\n recordedDXSingleSpeedsStrings.add(dxSingleSpeedIterator.next()\n .toMoRecordString());\n }\n\n ArrayList<String> duplicates = new ArrayList<String>();\n duplicates = saveDuplicates(recordedDXSingleSpeedsStrings);\n\n // define the header of the output file\n String fileHeader = \"There are \"\n + String.format(\"%s\", duplicates.size()) + \" duplicate(s) \"\n + \"in the input file. The duplicate(s) is(are) :\" + \"\\n\" + \"\\n\";\n\n String recordedDuplicatesStrings = \"\";\n\n // concatenate the recorded DXSingleSpeed in a string\n for (Iterator<String> it = duplicates.iterator(); it.hasNext();) {\n recordedDuplicatesStrings += it.next() + \"\\n\";\n }\n\n // print the header + DXSingleSpeed + footer in the output file\n OutputStreamWriter fw = new FileWriter(fileName);\n fw.write(fileHeader + recordedDuplicatesStrings);\n fw.close();\n }", "public synchronized static void write(double[] xxx,String fileName){\n\t\ttry{\n\t\t \tFileOutputStream fos = new FileOutputStream(fileName);\n\t\t \tDataOutputStream dos = new DataOutputStream(fos);\n\t\t\t\n\t\t\tfor(double x:xxx)\n\t\t\t\tdos.writeDouble(x);\n\t\t\tdos.close();\n\t\t\tfos.close();\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private static void generateForSingleFile() throws IOException {\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(singlePatternPath+ filename));\n\t\t\n\t\tIterator iter = countOne.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tMap.Entry entry = (Entry) iter.next();\n\t\t\tInteger value = (Integer) entry.getValue();\n\t\t\tSequencePair key = (SequencePair) entry.getKey();//System.out.println(\"current\" + \"[\" + key.firstSeq +\":\"+key.secondSeq +\"]\" + \" ; \"+ value);\n\t\t\tout.write(\"[\" + key.firstSeq + \":\" + key.secondSeq + \"]\" +\":\" +value + \"\\n\");\n\t\t}\n\t\tif(out!=null)\n\t\t\tout.close();\n\t\t\n\t\t\n\t\tBufferedWriter out1 = new BufferedWriter(new FileWriter(newSinglePatternPath+filename));\n\t\titer = countTwo.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tMap.Entry entry = (Entry) iter.next();\n\t\t\tInteger value = (Integer) entry.getValue();\n\t\t\tSequencePair key = (SequencePair) entry.getKey();//System.out.println(\"current\" + \"[\" + key.firstSeq +\":\"+key.secondSeq +\"]\" + \" ; \"+ value);\n\t\t\tout1.write(\"[\" + key.firstSeq + \":\" + key.secondSeq + \"]\" +\":\" +value + \"\\n\");\n\t\t}\n\t\t \n\t\tif(out1!=null)\n\t\t\tout1.close();\n\t}", "public File getFileValue();", "public static void main(String[] args) throws FileNotFoundException\n {\n Scanner sc = new Scanner(new File(\"JudgeData/sakshi.dat\"));\n while (sc.hasNext())\n {\n double base = sc.nextDouble();\n double pow = sc.nextDouble();\n\n System.out.printf(\"%.3f\\n\", Math.pow(base, pow));\n }\n }", "void readFiles(Boolean smart) \n\t//throws IOException// more here for safety\n\t{\n\t\tint i;\n\t\tfor (i = 0; i<165; ++i)\n\t\tfor (int j = 0; j<11; ++j)\n\t\t{\t//if(smart)memoryFile.readInt(board(i,j));\n\t\t\t//else \n\t\t\t\tboard[i][j] = 0;\n\t\t}\n\t\t//try memoryFileStream.close(); catch (IOException e);\n\t}", "double readDouble();", "public static void main(String[] args) // FileNotFoundException caught by this application\n {\n\n Scanner console = new Scanner(System.in);\n System.out.print(\"Input file: \");\n String inputFileName = console.next();\n System.out.print(\"Output file: \");\n String outputFileName = console.next();\n\n Scanner in = null;\n PrintWriter out =null;\n\n File inputFile = new File(inputFileName);\n try\n {\n in = new Scanner(inputFile);\n out = new PrintWriter(outputFileName);\n\n double total = 0;\n\n while (in.hasNextDouble())\n {\n double value = in.nextDouble();\n int x = in.nextInt();\n out.printf(\"%15.2f\\n\", value);\n total = total + value;\n }\n\n out.printf(\"Total: %8.2f\\n\", total);\n\n\n } catch (FileNotFoundException exception)\n {\n System.out.println(\"FileNotFoundException caught.\" + exception);\n exception.printStackTrace();\n }\n catch (InputMismatchException exception)\n {\n System.out.println(\"InputMismatchexception caught.\" + exception);\n }\n finally\n {\n\n in.close();\n out.close();\n }\n\n }", "void citire(FileReader f);", "int getFileCount();", "public Files(){\n this.fileNameArray.add(\"bridge_1.txt\");\n this.fileNameArray.add(\"bridge_2.txt\");\n this.fileNameArray.add(\"bridge_3.txt\");\n this.fileNameArray.add(\"bridge_4.txt\");\n this.fileNameArray.add(\"bridge_5.txt\");\n this.fileNameArray.add(\"bridge_6.txt\");\n this.fileNameArray.add(\"bridge_7.txt\");\n this.fileNameArray.add(\"bridge_8.txt\");\n this.fileNameArray.add(\"bridge_9.txt\");\n this.fileNameArray.add(\"ladder_1.txt\");\n this.fileNameArray.add(\"ladder_2.txt\");\n this.fileNameArray.add(\"ladder_3.txt\");\n this.fileNameArray.add(\"ladder_4.txt\");\n this.fileNameArray.add(\"ladder_5.txt\");\n this.fileNameArray.add(\"ladder_6.txt\");\n this.fileNameArray.add(\"ladder_7.txt\");\n this.fileNameArray.add(\"ladder_8.txt\");\n this.fileNameArray.add(\"ladder_9.txt\");\n }", "public static void main(String[] args) {\n\n\t\tBufferedReader br=null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(args[0]));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"The specified file \" + args[0] + \"was not found\");\n\t\t\te1.printStackTrace();\n\t\t}\n String line = \"\";\n //HashMap<String, Integer> wordmap = new HashMap<String, Integer>();\n\t\tInteger totalCount = 0;\n try {\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t totalCount++;\n\t\t\t}\n br.close();\n br = new BufferedReader(new FileReader(args[0]));\n Double multiplier = Math.log (1/totalCount.doubleValue());\n FileWriter fstream = new FileWriter(\"juice_inter_\" + args[1], true);\n\t\t\tBufferedWriter output = new BufferedWriter(fstream);\n while ((line = br.readLine()) != null) {\n\t\t\t String[] values = line.split(\":\")[1].split(\",\");\n\t\t\t String fileName = values[0];\n\t\t\t String tf_string = values[1];\n\t\t\t Double tf = Double.parseDouble(tf_string);\n\t\t\t Double result = tf * multiplier;\n\t\t\t output.write( line.split(\":\")[0]+ \" , \" + fileName + \" : \" + result + \"\\n\");\n\t\t\t \n\t\t\t}\n output.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void addFile(int numberLines);", "@Override\n public void addSingleFile(FileInfo file) {\n }", "public TwoSum(int size, File file) throws FileNotFoundException{\n this.size = size;\n ht = new Node[size];\n \n //create and populate array from file\n Scanner sc = new Scanner(file);\n long x,i=0;\n while(sc.hasNext()){\n x=sc.nextLong();\n insert(x);\n System.out.println(i+\" \"+x);\n i++;\n }\n \n findTwoSum();\n }", "public final void mo14831s() {\n Iterator it = ((ArrayList) mo14817d()).iterator();\n while (it.hasNext()) {\n File file = (File) it.next();\n if (file.listFiles() != null) {\n m6739b(file);\n long c = m6740c(file, false);\n if (((long) this.f6567b.mo14797a()) != c) {\n try {\n new File(new File(file, String.valueOf(c)), \"stale.tmp\").createNewFile();\n } catch (IOException unused) {\n f6563c.mo14884b(6, \"Could not write staleness marker.\", new Object[0]);\n }\n }\n for (File b : file.listFiles()) {\n m6739b(b);\n }\n }\n }\n }", "private static void tokenFiles() throws IOException\r\n\t{\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br1 = new BufferedReader(fr);\r\n\t\t\r\n\t\tDouble[] salaries = new Double[10];//array for salary\r\n\t\tInteger[] id = new Integer[10];//array for id\r\n\t\tInteger[] age = new Integer[10];//array for age\r\n\t\tString[] fName = new String[10];//array for first name\r\n\t\tString[] lName = new String[10];//array for last name\r\n\t\tString[] status = new String[10];//array for status\r\n\t\tDouble[] raises = new Double[10];//array for the raised salary\r\n\t\tString s1;//string for readLine of files\r\n\t\tint i = 0;//index for loop of arrays\r\n\t\t\r\n\t\tSystem.out.println(\"\\nWith a 2% raise\\n\");\r\n\t\t//while loop to convert to proper type\r\n\t\twhile ((s1 = br1.readLine())!=null && i<10)\r\n\t\t{\r\n\t\t\tStringTokenizer st = new StringTokenizer(s1);//create new obj tokenizer\r\n\t\t\tfName[i] = st.nextToken();\r\n\t\t\tlName[i] = st.nextToken();\r\n\t\t\tid[i] = Integer.parseInt(st.nextToken());\r\n\t\t\tage[i] = Integer.parseInt(st.nextToken());\t\t\t\t\r\n\t\t\tsalaries[i] = Double.parseDouble(st.nextToken());\r\n\t\t\tstatus[i] = st.nextToken();\r\n\t\t\t\r\n\t\t\tSystem.out.println(fName[i]+\" \"+ lName[i]+\" \"+ id[i]+\r\n\t\t\t\t\t\t\" \"+ age[i]+\" \"+salaries[i]+\" \"+status[i]);\t\r\n\t\t\t\r\n\t\t\traises[i]= (salaries[i]*.02) +salaries[i];//calculate new salaries\r\n\t\t\tSystem.out.println(\"Salary with raise: \" +raises[i]);//print raise amount\r\n\t\t\ti++;\r\n\t\t}//end while loop convert to proper type\r\n\t\tbr1.close();//close this buffered reader\r\n\t}", "@Override\n\t\t\t\tpublic void run() \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"reading..\" +next.getFileName());\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t//ts1.finalWrite(next.getFileName(),(int)file.length());\n\t\t\t\t\t\t\tInputStream in = new FileInputStream(readFile);\n\t\t\t\t\t\t\tint i;\n\t\t\t\t\t\t\tint fileNameLength =readFile.length();\n\t\t\t\t\t\t\tlong fileLength = file.length();\n\t\t\t\t\t\t\tlong total = (2+fileNameLength+fileLength);\n\t\t\t\t\t\t\t//System.out.println(\"toal length\" +total);\n\t\t\t\t\t\t\tqu.put((byte)total);\n\t\t\t\t\t\t\tqu.put((byte)readFile.length()); // file name length\n\t\t\t\t\t\t\tqu.put((byte)file.length()); //file content length\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int j=0;j<readFile.length();j++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)readFile.charAt(j)); //writing file Name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhile((i=in.read())!=-1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)i);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tin.close();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (IOException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "public abstract double read_double();", "public static double[] readRHat(File f)\n/* */ throws Exception\n/* */ {\n/* 78 */ throw new Error(\"Unresolved compilation problem: \\n\");\n/* */ }", "private boolean compareFile(java.io.FileInputStream r25, java.io.FileInputStream r26) {\n /*\n r24 = this;\n r7 = 5;\n r8 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n r2 = 0;\n r21 = r25.getChannel();\t Catch:{ IOException -> 0x00ce }\n r22 = r21.size();\t Catch:{ IOException -> 0x00ce }\n r0 = r22;\n r0 = (int) r0;\t Catch:{ IOException -> 0x00ce }\n r19 = r0;\n r21 = r26.getChannel();\t Catch:{ IOException -> 0x00ce }\n r22 = r21.size();\t Catch:{ IOException -> 0x00ce }\n r0 = r22;\n r9 = (int) r0;\n r0 = r19;\n if (r0 != r9) goto L_0x002e;\n L_0x0020:\n r21 = 1;\n r0 = r19;\n r1 = r21;\n if (r0 < r1) goto L_0x002e;\n L_0x0028:\n r21 = 1;\n r0 = r21;\n if (r9 >= r0) goto L_0x003c;\n L_0x002e:\n r21 = 0;\n r25.close();\t Catch:{ IOException -> 0x0037 }\n r26.close();\t Catch:{ IOException -> 0x0037 }\n L_0x0036:\n return r21;\n L_0x0037:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x0036;\n L_0x003c:\n r21 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n r0 = r19;\n r1 = r21;\n if (r0 > r1) goto L_0x00b4;\n L_0x0044:\n r6 = r19;\n L_0x0046:\n r20 = r19 / r6;\n r21 = 5;\n r0 = r20;\n r1 = r21;\n if (r0 < r1) goto L_0x00b7;\n L_0x0050:\n r14 = 5;\n L_0x0051:\n r21 = r6 * r14;\n r20 = r19 - r21;\n r15 = r20 / r14;\n r3 = 1;\n r5 = 0;\n r4 = 0;\n r16 = 0;\n r0 = new byte[r6];\t Catch:{ IOException -> 0x00ce }\n r18 = r0;\n r0 = new byte[r6];\t Catch:{ IOException -> 0x00ce }\n r17 = r0;\n r5 = new java.io.BufferedInputStream;\t Catch:{ IOException -> 0x00ce }\n r0 = r25;\n r5.<init>(r0);\t Catch:{ IOException -> 0x00ce }\n r4 = new java.io.BufferedInputStream;\t Catch:{ IOException -> 0x00ce }\n r0 = r26;\n r4.<init>(r0);\t Catch:{ IOException -> 0x00ce }\n r12 = 0;\n L_0x0073:\n if (r12 >= r14) goto L_0x00bf;\n L_0x0075:\n if (r3 == 0) goto L_0x00bf;\n L_0x0077:\n r21 = 0;\n r0 = r18;\n r1 = r21;\n r5.read(r0, r1, r6);\t Catch:{ IOException -> 0x00ce }\n r21 = 0;\n r0 = r17;\n r1 = r21;\n r4.read(r0, r1, r6);\t Catch:{ IOException -> 0x00ce }\n r21 = r6 + r15;\n r16 = r16 + r21;\n r0 = r16;\n r0 = (long) r0;\t Catch:{ IOException -> 0x00ce }\n r22 = r0;\n r0 = r22;\n r5.skip(r0);\t Catch:{ IOException -> 0x00ce }\n r0 = r16;\n r0 = (long) r0;\t Catch:{ IOException -> 0x00ce }\n r22 = r0;\n r0 = r22;\n r4.skip(r0);\t Catch:{ IOException -> 0x00ce }\n r13 = 0;\n L_0x00a2:\n if (r13 >= r6) goto L_0x00bc;\n L_0x00a4:\n if (r3 == 0) goto L_0x00bc;\n L_0x00a6:\n r21 = r18[r13];\t Catch:{ IOException -> 0x00ce }\n r22 = r17[r13];\t Catch:{ IOException -> 0x00ce }\n r0 = r21;\n r1 = r22;\n if (r0 != r1) goto L_0x00ba;\n L_0x00b0:\n r2 = 1;\n L_0x00b1:\n r13 = r13 + 1;\n goto L_0x00a2;\n L_0x00b4:\n r6 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n goto L_0x0046;\n L_0x00b7:\n r14 = r20;\n goto L_0x0051;\n L_0x00ba:\n r2 = 0;\n goto L_0x00b1;\n L_0x00bc:\n r12 = r12 + 1;\n goto L_0x0073;\n L_0x00bf:\n r25.close();\t Catch:{ IOException -> 0x00c9 }\n r26.close();\t Catch:{ IOException -> 0x00c9 }\n L_0x00c5:\n r21 = r2;\n goto L_0x0036;\n L_0x00c9:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00c5;\n L_0x00ce:\n r10 = move-exception;\n r10.printStackTrace();\t Catch:{ all -> 0x00df }\n r2 = 0;\n r25.close();\t Catch:{ IOException -> 0x00da }\n r26.close();\t Catch:{ IOException -> 0x00da }\n goto L_0x00c5;\n L_0x00da:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00c5;\n L_0x00df:\n r21 = move-exception;\n r25.close();\t Catch:{ IOException -> 0x00e7 }\n r26.close();\t Catch:{ IOException -> 0x00e7 }\n L_0x00e6:\n throw r21;\n L_0x00e7:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00e6;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.sec.clipboard.data.list.ClipboardDataBitmap.compareFile(java.io.FileInputStream, java.io.FileInputStream):boolean\");\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\tpublic static int fillHM(String fileName) throws Exception{\r\n\t\t//System.out.println(\"fileName:\"+fileName);\r\n\t\tcat.info(\"fileName:\"+fileName);\r\n\t\tif(hm == null){\r\n\t\t\thm = new HashMap();\r\n\t\t}\r\n//\t\tString fileURL = URL + fileName;\r\n\t\tString fileURL = fileName;\r\n\t\tFileInputStream in = new FileInputStream(fileURL);\r\n\t\tint len = in.available();\r\n\t\t////System.out.println(len);\r\n\t\tbyte[] bt = new byte[len];\r\n\t\tin.read(bt);\r\n\t\t////System.out.println(len);\r\n\t\t\r\n\t\tint pjz = Integer.parseInt(buffer);\r\n\t\tint zs = len/pjz;\r\n\t\tint xs = len%pjz;\r\n\t\t\r\n\t\tint count = 0;\r\n\t\tif(zs==0&&xs==0){\r\n\t\t\tcount = 0;\r\n\t\t}else if(zs==0&&xs!=0){\r\n\t\t\tcount = 1;\r\n\t\t}else if(zs!=0&&xs==0){\r\n\t\t\tcount = zs;\r\n\t\t}else if(zs!=0&&xs!=0){\r\n\t\t\tcount = zs + 1;\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<count-1;i++){\r\n\t\t\tbyte[] bt_i = new byte[pjz];\r\n\t\t\tSystem.arraycopy(bt,i*pjz,bt_i,0,pjz);\r\n\t\t\thm.put(fileName+\"[\"+String.valueOf(i)+\"]\",bt_i);\r\n\t\t}\r\n\t\tbyte[] bt_end = new byte[len-(count-1)*pjz];\r\n\t\tSystem.arraycopy(bt,(count-1)*pjz,bt_end,0,len-(count-1)*pjz);\r\n\t\thm.put(fileName+\"[\"+(count-1)+\"]\",bt_end);\r\n\t\t\r\n//\t\ti_count = count;\r\n//\t\tSystem.out.println(\"count-----------\"+count);\r\n\t\treturn count;\r\n\t}", "public Vector<file> count()\n {\n Vector<Model.file> files = new Vector<>();\n try\n {\n pw.println(11);\n\n files = (Vector<Model.file>) ois.readObject();\n\n }\n catch (ClassNotFoundException | IOException e)\n {\n System.out.println(e.getMessage());\n }\n return files ;\n }", "public static void main(String[] args) throws IOException {\n String last = \"\";\n HashSet<String> types = new HashSet<String>();\n\n int c = 0;\n try {\n FileReader fr = new FileReader(inDir + \"fr\" + \"/wkd_uris_selection\");\n BufferedReader br = new BufferedReader(fr);\n String line;\n while ((line = br.readLine()) != null) {\n addToFile(line);\n c++;\n //if(c > 100) break;\n }\n\n fw.close();\n br.close();\n } catch (FileNotFoundException fne) {// TODO\n fne.printStackTrace();\n } catch (IOException ioe) {// TODO\n ioe.printStackTrace();\n }\n\n }", "public double calculateFirstOccurrence(Token token, FileData file) {\n\t\t\n\t\treturn 1 - ((double) token.getBeginIndex() / file.getQttyTerms());\n\t}", "public GCFile(final File file, final int count) {\n\t\tthis.file = file;\n\t\tthis.count = count;\n\t}", "static void solution1Day1Part2() {\n\n Scanner file = null;\n Set<Integer> resultingFrequencies = new HashSet<>();\n int resultingFrequency = 0;\n int change = 0;\n boolean duplicateFound = false;\n\n try {\n while (!duplicateFound) {\n\n file = new Scanner(new FileReader(\"src/main/java/weekone/input01.txt\"));\n\n while (file.hasNext()) {\n //System.out.println(\"\\nCurrent frequency is: \" + resultingFrequency);\n change = file.nextInt();\n resultingFrequency += change;\n //System.out.println(\"Change of: \" + change);\n //System.out.println(\"Resulting frequency is: \" + resultingFrequency);\n\n if (resultingFrequencies.contains(resultingFrequency)) {\n System.out.println(\"\\nDay1 Part2 - The first duplicate resulting frequency is: \" + resultingFrequency);\n duplicateFound = true;\n break;\n }\n resultingFrequencies.add(resultingFrequency);\n }\n file.close();\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "public double nextDoubleOpen() {\n\tdouble result = d1 / POW3_33;\n\tnextIterate();\n\treturn result;\n }", "public static void main(String[] args) {\n FileInputStream fis =null;\r\n int num; \r\n int contador=0;\r\n \r\n try {\r\n fis = new FileInputStream(\"EnterosGrabadosComoBytes.dat\");\r\n \r\n num= fis.read();\r\n while (num !=-1){\r\n contador++;\r\n System.out.print(num+\" \");\r\n System.out.flush();\r\n num= fis.read(); //leo el sgte num \r\n }\r\n System.out.println(\"\\nYa no hay mas numeros en el fichero\");\r\n System.out.println(\"El total de números es \"+contador);\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error no encuentro el fichero\"); \r\n } catch (IOException ex) {\r\n System.out.println(\"Error en lectura\");}\r\n \r\n }", "public DoubleValue(int n) {\n\t\ttimesToWrite = n;\n\t}", "public synchronized File mo13094a(long j) {\n File d;\n d = m5344d();\n if (d == null) {\n d = m5342c(j);\n }\n return d;\n }", "public static void main(String[] args) throws FileNotFoundException {\nint zbir=0;\n\n\t\tFileReader file=new FileReader(\"maraton.txt\");\n\nArrayList<Integer> lista = new ArrayList<>();\nScanner input=new Scanner(file);\n\nwhile (input.hasNext()) {\n\t\nString ime = input.next();\n\nlista.add(input.nextInt());\n}\nfor(int i=0; i<lista.size();i++) {\n\n\t zbir += lista.get(i);\n\t \n\t\n}\nSystem.out.println(\"Zbir je :\" +zbir);\n\t System.out.println(\"Prosjek je :\" + (zbir/lista.size()));\n\n}", "public static void SequentialExecution(String path) {\n\t\tFile folder = new File(path);\n\t\tFile[] listoffiles = folder.listFiles();\n\t\tString content;\n\t\tMyThread ob = new MyThread();\n\t\tfor (int i=0; i < listoffiles.length; i++) {\n\t\t\tGZIPInputStream gzip = null;\n\t\t\ttry {\n\t\t\t\t//System.out.println(\"file :\" +listoffiles[i]);\n\t\t\t\tgzip = new GZIPInputStream(new FileInputStream(listoffiles[i]));\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(gzip));\n\t\t\ttry {\n\t\t\t\twhile ((content = br.readLine()) != null){\n\t\t\t\t\t// perform sanity test\n\t\t\t\t\tcontent = content.replaceAll(\"\\\"\", \"\");\n\t\t\t\t\tString formatedData = content.replaceAll(\", \", \":\");\n\t\t\t\t\tString[] data = formatedData.split(\",\");\n\t\t\t\t\tif (data.length != 110) {\n\t\t\t\t\t\tfailure++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (ob.validData(data)) {\n\t\t\t\t\t\t\tsuccess++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfailure++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"valid : \" +success);\n\t\tSystem.out.println(\"Invalid : \" +failure);\n\t\t\n\t\tfor (Map.Entry<String, ArrayList<Float>> entry : MyThread.map_t.entrySet()) {\n\t\t\tArrayList<Float> list = entry.getValue();\n\t\t\tCollections.sort(list);\n\t\t\tif(list.size()%2 != 0) \n\t\t\t\tsol_median.put(entry.getKey(), list.get(list.size()/2)); \n\t else\n\t \tsol_median.put(entry.getKey(), (list.get(list.size()/2) + list.get(list.size()/2 - 1))/2);\n\t\t\tfloat sum = 0;\n\t\t\t\n\t\t\tint size = entry.getValue().size();\n\t\t\tfor (int i=0; i<size; i++) {\n\t\t\t\tsum += entry.getValue().get(i);\n\t\t\t}\n\t\t\tsolution.put(entry.getKey(), sum/size);\n\t\t}\n\t\t\n\t\tHashMap<String, Float> result = sortedMap(solution);\n\t\tfor (Map.Entry<String, Float> entry : result.entrySet()) {\n\t\t\tSystem.out.println(entry.getKey()+\" \"+entry.getValue() + \" \" +sol_median.get(entry.getKey()));\n\t\t}\n\t}", "double sample();", "public static void main(String args[]) {\n\t\tString destination = \"C:\\\\Users\\\\VIIPL02\\\\Desktop\\\\hii\\\\kk_(1).jpg\";\n\t\t//System.out.println(destination);\n\t\t int index1= destination.lastIndexOf(\"_(\");\n \t int index2= destination.lastIndexOf(\")\");\n \t String rig_val=\"\";\n\t\t for(int k=2;k<(index2-index1);k++)\n \t\t rig_val=rig_val+destination.charAt(index1+k)+\"\";\n\t\t \n\t\t \n\t\t //System.out.println(rig_val);\n\t\tfor(int i=0;i<10000000;i++) {\n//\t\tdestination= destination.replace(\"_(\"+(destination.charAt((destination.lastIndexOf(\"(\")+1)))+\")\",\"_(\"+((Integer.parseInt((destination.charAt((destination.lastIndexOf(\"(\")+1)))+\"\" ))+1)+\")\").replace(\"_(\"+(destination.charAt((destination.lastIndexOf(\"(\")+1)))+\")\",\"_(\"+((Integer.parseInt((destination.charAt((destination.lastIndexOf(\"(\")+1)))+\"\" ))+1)+\")\");\n\t\t\t\n\t\t\n\t\t\tdestination=destination.replace(\"_(\"+rig_val+\")\",\"_(\"+(Integer.parseInt(rig_val)+1)+\")\");\n\t\t\trig_val=\"\"+(Integer.parseInt(rig_val)+1);\n\t\t\t//System.out.println(destination);\n\t\t}\n//\t\t //System.out.println( destination.replace(\"_(\"+(destination.charAt((destination.lastIndexOf(\"(\")+1)))+\")\",\"_(\"+((Integer.parseInt((destination.charAt((destination.lastIndexOf(\"(\")+1)))+\"\" ))+1)+\")\"));\n\n\t\t//System.out.println(\"completed\");\n\t}", "static void parseData(String filename) {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\t\t \n\t\t\tString line;\n\t\t String[] tokens;\n\t\t ArrayList<Double> temp;\n\t\t \n\t\t while ((line = br.readLine()) != null) {\n\t\t \ttemp = new ArrayList<Double>();\n\t\t \ttokens = line.split(\",\");\n\t\t \tfor(String s : tokens) {\n\t\t \t\ttemp.add(Double.parseDouble(s));\n\t\t \t}\n\t\t \tData.add(new Vector(temp));\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test32() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n File file0 = fileUtil0.getASINFile(\"\", \"v<B(aXlp#d/?cL2Q??\", \"i@\", \"g_\");\n assertNull(file0);\n }", "public static void main(String[] args) throws FileNotFoundException {\n final Scanner in = new Scanner(new FileInputStream(\"C:\\\\Projects\\\\Solutions\\\\src\\\\tests.txt\"));\r\n\r\n final int Q = in.nextInt();\r\n for (int q = 0; q < Q; q++) {\r\n final long a = in.nextLong();\r\n final long b = in.nextLong();\r\n final long k = in.nextLong();\r\n final int m = in.nextInt();\r\n\r\n final Complex result = exponentiate(new Complex(a, b), k, m);\r\n\r\n System.out.println(result.real + \" \" + result.imaginary);\r\n }\r\n }", "public static void WeightedVector() throws FileNotFoundException {\n int doc = 0;\n for(Entry<String, List<Integer>> entry: dictionary.entrySet()) {\n List<Integer> wtg = new ArrayList<>();\n List<Double> newList = new ArrayList<>();\n wtg = entry.getValue();\n int i = 0;\n Double mul = 0.0;\n while(i<57) {\n mul = wtg.get(i) * idfFinal.get(doc);\n newList.add(i, mul);\n i++;\n }\n wtgMap.put(entry.getKey(),newList);\n doc++;\n }\n savewtg();\n }", "public abstract File mo41087j();", "public void readInputFile(){\n no_of_videos = 5;\n video_size = new int [no_of_videos];\n\n }", "public ArrayList<Double> readFile(String m){\n ArrayList<Double> a = new ArrayList<Double>();\n Scanner r = null;\n try {\n File f = new File(m);\n r = new Scanner(f);\n String scan;\n while(r.hasNextLine()) {\n scan = r.nextLine();\n //System.out.println(scan);\n // look for comma because our price starts after comma\n int commaPosition = scan.indexOf(',');\n //go to next index of the string in one line\n int nextIndex = commaPosition + 1;\n // make a string named price to keep the price from one line\n //substring method takes two parameters- start point and end point(which is integers)\n //price = smaller string = \"2.50\", scan = bigger string = \"bananas,2.50\"\n String price = scan.substring(nextIndex,scan.length());\n double doublePrice = Double.parseDouble(price);\n //System.out.println(doublePrice);\n a.add(doublePrice);\n }\n } catch (FileNotFoundException ex) {\n\n } catch (IOException ex) {\n\n } finally {\n if(r!=null) r.close();\n }\n return a;\n\n }", "private void readFromFile(String filename) {\n\t\ttry {\n\t\t Scanner read = new Scanner(new File(filename));\n\t\t String line;\n\t\t int counter = 0;\n\t\t String temp;\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\t\t height = convertToInt(temp);\n\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\n\t\t length = convertToInt(temp);\n\t\t size = height*length;\n\t\t \n\t\t squares = new Square[size][size];\n\n\t\t while(read.hasNextLine()) {\n\t\t\t\tline = read.nextLine();\n\t\t \tfor (int i = 0; i < line.length(); i++) {\n\t\t \t temp = line.substring(i, i+1);\n\n\t\t \t if (temp.equals(\".\")) {\n\t\t \t\t\tsquares[counter][i] = new FindValue(0);\n\t\t \t } \n\t\t \t else {\n\t\t\t\t\t\tsquares[counter][i] = new PreFilled(convertToInt(temp));\n\t\t\t \t\t}\n\t\t \t}\n\t\t \tcounter++;\n\t\t }\n\t\t} catch(IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n }", "static void createDataForGraph() {\n double x = 2;\n String fileName = \"./lab1part2docs/dataRec.csv\";\n createFile(fileName);\n writeToFile(\"k,halfCounter,oneCounter,x=\" + x + \"\\n\", fileName);\n for (int k = 1; k <= 10000; k++) {\n Raise.runBoth(x, k);\n writeToFile(k + \",\" + Raise.recHalfCounter + \",\" + Raise.recOneCounter + '\\n', fileName);\n Raise.recHalfCounter = 0;\n Raise.recOneCounter = 0;\n }\n System.out.println(\"Finished\");\n }", "public static void main(String[] argv) {\n\t\t\n\t\tif (argv.length !=7){\n\t\t\tSystem.out.println(\"USAGE: executable <input_filename> <num_points_in_file> <dimension> <distribution[1..100]> <num_unique_query> <num_query> <slot>\\n\");\n\t\t\treturn ;\n\t\t}\n\t\t\nint type,num_mbr, extra,dim,DIMENSION,distribution,num_unique_query,POINTS;\nString filenm;\n\nint q,r,times,slot;\n\n\nfilenm = argv[0];\n\nPOINTS = Integer.parseInt(argv[1]);\nDIMENSION = Integer.parseInt(argv[2]);\n\ndistribution = Integer.parseInt(argv[3]);\n\nnum_unique_query = Integer.parseInt(argv[4]);\nq= Integer.parseInt(argv[5]);\nslot= Integer.parseInt(argv[6]);\n\ndouble[][][] pt =new double[POINTS+10][2][10];\t\t\n\t\t\n\t\t\t\t\t\n\t\t\t try {\n\t\t\t\t BufferedReader in = new BufferedReader(new FileReader(filenm));\n\t\t\t\t String str;\n//\t\t\t\t str = in.readLine();\n\t\t\t\t int i=0;\n\t\t\t\t while ((str = in.readLine()) != null && i != POINTS) {\n\t\t\t\t //System.out.println(str);\n\t\t\t\t str = in.readLine();\n\t\t\t\t String[] arr = str.split(\"\\t\");\t\t\t\t \n\t\t\t\t\t\tfor(int j=0;j<10;j++){\n\t\t\t\t\t\t\tpt[i][0][j] = Double.parseDouble(arr[j]);\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t str = in.readLine();\n\t\t\t\t arr = str.split(\"\\t\");\t\t\t\t \n\t\t\t\t \n\t\t\t\t\t\tfor(int j=0;j<10;j++){\n\t\t\t\t\t\t\tpt[i][1][j] = Double.parseDouble(arr[j]);\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t i++;\n\t\t\t\t }\n\t\t\t\t in.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t System.out.println(\"File Read Error Resource.in\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\tRandom rand = new Random();\n\t\t\tfor(int i2=0;i2 < slot; i2++){\n\t\t\t\tint rr= rand.nextInt(17);\n\t\t\t\tfor(int i1=0;i1 < q;){\n\n\t\t\t//while(q>0){\n\t\t\t\tif(rand.nextInt(100) < distribution){\n\t\t\t\t\t // Initialize random number generator.\n\t\n\t\t\t\t\t\tr = rand.nextInt(num_unique_query)* (int)((POINTS-10000)/(num_unique_query + rr));\n\t\t\t\t\t//cout <<\"random value \"<< r<< endl;\n\t\t\t\t\t// srand(pow(q,r));\n\t\t\t\t\t// srand(pow(q,r));\n\t\t\t\t\t//\ttimes=1;\n\t\t\t\t\t\ttimes =rand.nextInt(29) + 5 ;\n\n\t\t\t\t\t//\t\tfile>>dim;\t\n\t\t\t\t\t//\t\tfile>>num_mbr;\t\n\n\n\n\t\t\t\t\t\tfor(int k =0; k<times; k++){\n\t\t\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\t\t\ti1++;\n\t\t\t\t\t\tdouble r_1= 0.005 + (double)rand.nextInt(500)/10000.0;\n\t\t\t\t\t\tSystem.out.println(r_1);\n\n\t\t\t\t\t\tfor(int j=0;j<DIMENSION;j++){\n\t\t\t\t\t//\t\t\tcout<< pt[0][j];\n\t\t\t\t\t\t\tSystem.out.print(pt[r][0][j] + \"\\t\");\t\t\t\n\n\t\t\t\t\t\t\t}\t\n\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\t}\n\n\n\n\t\t\t\t}\n\t\t\t\telse{\t\t\t\t\t\t\t// nonpopular data \n\t\n\t\t\t\t\tfor(int idx =0 ; idx < 20 ; idx++){\n\t\n\t\t\t\t\t\t\tr = rand.nextInt(POINTS);\n\n\n\n\t\t\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\t\t\ti1++;\n\t\t\t\t\t\tdouble r_1= 0.005 + (double)rand.nextInt(500)/10000.0;\n\t\t\t\t\t\tSystem.out.println(r_1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t//\tcout<<r<<\"\\n\";\n\t\t\t\t\t\t\t\tfor(int j=0;j<DIMENSION;j++){\n\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tSystem.out.print(pt[r][0][j] + \"\\t\");\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\tSystem.out.println(\"\");\n\n\n\n\t\n\t\n\t\t\t\t\t}\t\n\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"-1\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t}", "public RandomAccessFile getCases() {\n \n return cases;\n}", "C3579d mo19710g(int i) throws IOException;", "public void addInMemory(double num) {\n memoryValue += SciCalculator.currentValue = num;\n }", "public static void main(String [] args){\n writeFile1(\"1234567890987654321\");\n }", "public List<Double> getData(String fileName,String sar_device, String sar_type) throws IOException {\n\t\tFileReader fr = new FileReader(\"./temp/\"+fileName);\n\t\tList<Double> resultListA = new ArrayList<Double>();\n\t\t \n\t\t//get the type:rxpck/txpck/rxkB...\n\t\tint i=getType(sar_type);\n\t\t \n\t\tresultListA=getdata(fr,sar_device,i);\n\t\treturn resultListA;\n\t}", "public void salvaPartita(String file) {\n\r\n }", "public static void createFile(double[] array){\n //String for the name of the file that's going to be created.\n String newFileName = \"results.csv\";\n\n //Create a file variable using the created file name\n try{\n File newFile = new File(newFileName);\n\n //Create new instance of PrintWriter to write into the new file\n FileWriter csvWriter = new FileWriter(newFile, false);\n //For each number, print the percentage into the file\n for(int i = 0; i < 9; i++){\n csvWriter.write((i+1) + \": \" + array[i] + \"%\\n\");\n }\n //Close the PrintWriter since we don't need it anymore.\n csvWriter.close();\n }\n catch(FileNotFoundException e){\n System.out.println(\"File not found\");\n }\n catch(IOException e){\n System.out.println(\"IO Exception\");\n }\n }", "public static void readfile(String FILENAME) {\n\t\tString[] parts = null;\n\t\t// Initialising s as 9100 since the cardinality for a src is 9060\n\t\tint s = 2500;\n\t\t// Choosing m\n\t\tint m = 500000000;\n\t\tArrayList<ArrayList<Integer>> UniversalHashList = new ArrayList<ArrayList<Integer>>();\n\t\tArrayList<ArrayList<Integer>> XsrcMasterList = new ArrayList<ArrayList<Integer>>();\n\t\tList masterDstList = new ArrayList<ArrayList<String>>();\n\t\tString[] BitArray = new String[m];\n\t\tPrintStream out = null;\n\t\ttry {\n\t\t\tout = new PrintStream(new FileOutputStream(\"output_virbitmap.csv\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString src = null;\n\t\tHashMap<String, List> srcDstMap = new HashMap<String, List>();\n\t\tArrayList<Integer> R = new ArrayList<Integer>();\n\t\tR = genRandomArray(s);\n\t\t// initializing bit array\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tBitArray[i] = \"False\";\n\t\t}\n\t\t// reading input file and writing to HashMap<src,dstlist>\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(FILENAME))) {\n\n\t\t\tString sCurrentLine;\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\tparts = sCurrentLine.trim().split(\"\\\\s+\");\n\t\t\t\tsrc = parts[0];\n\t\t\t\tString dst = parts[1];\n\t\t\t\tif (!srcDstMap.containsKey(src)) {\n\t\t\t\t\tArrayList<String> dstList = new ArrayList<String>();\n\t\t\t\t\tdstList.add(dst);\n\t\t\t\t\tsrcDstMap.put(src, dstList);\n\t\t\t\t\t// hashing(B,convertIPAddress(tokens[0]));\n\t\t\t\t} else\n\t\t\t\t\tsrcDstMap.get(src).add(dst);\n\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor (int i = 0; i < srcDstMap.size(); i++) {\n\t\t\tArrayList<Integer> masterHashList = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> XsrcList = new ArrayList<Integer>();\n\t\t\tUniversalHashList.add(masterHashList);\n\t\t\tXsrcMasterList.add(XsrcList);\n\t\t\t// System.out.println(\"XsrcmasterList\" + XsrcList);\n\n\t\t}\n\t\tIterator srcDstMapIt = srcDstMap.entrySet().iterator();\n\t\tfor (int i = 0; i < srcDstMap.size(); i++) {\n\t\t\tArrayList<Integer> XsrcList = XsrcMasterList.get(i);\n\t\t\tArrayList<Integer> masterHashList = UniversalHashList.get(i);\n\t\t\twhile (srcDstMapIt.hasNext()) {\n\t\t\t\tMap.Entry pair = (Map.Entry) srcDstMapIt.next();\n\t\t\t\tsrc = pair.getKey().toString();\n\t\t\t\tList dstList = (List) pair.getValue();\n\t\t\t\tmasterDstList.add(dstList);\n\t\t\t\tIterator dstListIt = dstList.iterator();\n\t\t\t\twhile (dstListIt.hasNext()) {\n\t\t\t\t\tint hashedSrc = masterHashSetGen(src, dstListIt.next().toString(), s, R);\n\t\t\t\t\t// String[] partsGeneratedStuff =\n\t\t\t\t\t// generatedStuff.trim().split(\":\");\n\t\t\t\t\t// String generatedIndex = partsGeneratedStuff[0];\n\t\t\t\t\t// String hashedSrc = partsGeneratedStuff[1];\n\t\t\t\t\tmasterHashList.add(hashedSrc % BitArray.length);\n\t\t\t\t\t// System.out.println(masterHashList);\n\t\t\t\t\tXsrcList.add(hashedSrc);\n\t\t\t\t\t// System.out.println(XsrcList);\n\t\t\t\t\tBitArray[Math.abs(hashedSrc % (BitArray.length))] = \"True\";\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tdouble bitMapCount = BitMapCount(BitArray, BitArray.length, s);\n\t\t// System.out.println(\"bitMapCount\"+bitMapCount);\n\n\t\tint XsrcIndexperDst = 0;\n\t\tIterator srcDstMapItrecons = srcDstMap.entrySet().iterator();\n\t\twhile (srcDstMapItrecons.hasNext()) {\n\t\t\tdouble XsrcRatio;\n\t\t\tMap.Entry pair = (Map.Entry) srcDstMapItrecons.next();\n\t\t\tsrc = pair.getKey().toString();\n\t\t\t// System.out.println(\"src\" + src);\n\t\t\tList dstList = (List) pair.getValue();\n\t\t\tmasterDstList.add(dstList);\n\t\t\tIterator dstListIt = dstList.iterator();\n\t\t\tString[] srcArray = new String[s];\n\t\t\tdouble count = 0;\n\t\t\t\twhile(dstListIt.hasNext()) {\n\t\t\t\t\tXsrcIndexperDst = XsrcIndexperDst(XsrcMasterList, masterDstList, s, BitArray, src,dstListIt.next().toString(), R) % m;\n\t\t\t\t\t// System.out.println(\"Value\"+BitArray[XsrcIndexperDst]);\n\t\t\t\t\tif (BitArray[XsrcIndexperDst] == \"True\") {\n\t\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\t}\n\t\t\t//System.out.println(\"count per source\" + count + \",\" + (s - count));\n\t\t\tXsrcRatio = -s * Math.log((s-count)/s);\n\t\t\tdouble estimatedSpread = -bitMapCount + XsrcRatio;\n\t\t\tif(estimatedSpread<=0)\n\t\t\t{\n\t\t\t\testimatedSpread=0;\n\t\t\t}\n\t\t\tout.println(dstList.size() + \",\" + estimatedSpread);\n\t\t}\n\n\t}", "private static void generateSequence() throws FileNotFoundException {\n Scanner s = new Scanner(new BufferedReader(new FileReader(inputPath + filename)));\n\t\tlrcSeq = new ArrayList<Integer>();\n\t\tmeloSeq = new ArrayList<Integer>();\n\t\tdurSeq = new ArrayList<Integer>();\n\t\t\n\t\tString line = null;\n\t\tint wordStress;\n\t\tint pitch;\n\t\tint melStress;\n\t\tint stress;\n\t\tint duration;\n\t\t\n\t\twhile(s.hasNextLine()) {\n\t\t\tline = s.nextLine();\n\t\t\tString[] temp = line.split(\",\");\n\t\t\t\n\t\t\twordStress = Integer.parseInt(temp[1]);\n\t\t\tpitch = Integer.parseInt(temp[2]);\n\t\t\tmelStress = Integer.parseInt(temp[3]);\n\t\t\tduration = Integer.parseInt(temp[4]);\n\t\t\t\n\n\t\t\t//combine word level stress and sentence level stress\n\t\t\tstress = wordStress * 3 + melStress;\n\t\t\t/*if(stress < 0 || stress > 9) {\n\t\t\t\tSystem.out.println(\"Stress range error\");\n\t\t\t}*/\n\t\t\tlrcSeq.add(stress);\n\t\t\tmeloSeq.add(pitch);\n\t\t\tdurSeq.add(duration);\n\t\t}\n\t\t\n\t\t//calculate relative value\n\t\tfor(int i = 0;i < lrcSeq.size() -1;++i) {\n\t\t\tlrcSeq.set(i, lrcSeq.get(i+1)-lrcSeq.get(i));\n\t\t\tmeloSeq.set(i, meloSeq.get(i+1) - meloSeq.get(i));\n\t\t\tif(durSeq.get(i+1) / durSeq.get(i)>=1)\n\t\t\t\tdurSeq.set(i, durSeq.get(i+1) / durSeq.get(i));\n\t\t\telse \n\t\t\t\tdurSeq.set(i,durSeq.get(i) / durSeq.get(i+1) * (-1));\n\t\t}\n\t\tlrcSeq.remove(lrcSeq.size()-1);\n\t\tmeloSeq.remove(meloSeq.size()-1);\n\t\tdurSeq.remove(durSeq.size()-1);\n\t\t\n\t}", "private void get_values(File f1){\n String line;\n Scanner read_file=null;\n try{\n read_file= new Scanner(f1);\n }catch(FileNotFoundException e){\n System.out.println(\"The specified file of the Student cannot be found.\");\n return;\n }\n line=read_file.nextLine();\n while(!(line.contains(\"OOP\"))){\n line=read_file.nextLine();\n }\n line=read_file.nextLine();\n while(!(line.contains(\"Chap_1\"))){\n line=read_file.nextLine();\n }\n //System.out.println(line.substring(8));\n OOP[0]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n OOP[1]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n OOP[2]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n OOP[3]=Float.parseFloat(line.substring(8));\n\n line=read_file.nextLine();\n while(!(line.contains(\"DE\"))){\n line=read_file.nextLine();\n }\n line=read_file.nextLine();\n while(!(line.contains(\"Chap_1\"))){\n line=read_file.nextLine();\n }\n DE[0]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n DE[1]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n DE[2]=Float.parseFloat(line.substring(8));\n\n line=read_file.nextLine();\n while(!(line.contains(\"DSA\"))){\n line=read_file.nextLine();\n }\n line=read_file.nextLine();\n while(!(line.contains(\"Chap_1\"))){\n line=read_file.nextLine();\n }\n DSA[0]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n DSA[1]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n DSA[2]=Float.parseFloat(line.substring(8));\n\n line=read_file.nextLine();\n line=read_file.nextLine();\n total_marks=Float.parseFloat(line.substring(13));\n average=total_marks/10;\n\n read_file.close();\n }", "private void gatherFile(FileStatus[] fstat)\r\n\t{\r\n\t inputSize = 0;\t\r\n\t paths = new Path[fstat.length];\t\r\n\t for(int i=0;i<fstat.length;i++)\r\n\t {\r\n\t inputSize+=fstat[i].getLen();\r\n\t paths[i] = fstat[i].getPath();\r\n\t }\r\n\t }", "public static void main(String[] args) throws FileNotFoundException {\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter a file of scores: \");\n String fileName = input.next();\n File file = new File(fileName);\n int numberOfScores = 0;\n double totalScores = 0;\n double avarege = 0;\n if (!file.exists()) {\n throw new FileNotFoundException();\n }\n\n try (\n Scanner inputFile = new Scanner(file);\n ) {\n while (inputFile.hasNext()) {\n totalScores += Double.parseDouble(inputFile.next());\n numberOfScores++;\n }\n\n }\n avarege = totalScores / numberOfScores;\n System.out.println(\"Total Score: \" + totalScores +\n \"\\nAvarage: \" + avarege);\n }", "public String getFirstFilename() {\n\t\tTreeMap<Double,File> tm = new TreeMap<Double,File>();\n\t\tFile file=new File(\"C:\\\\temp\");\n\t\tFile subFile[] = file.listFiles();\n\t\tint fileNum = subFile.length;\n\t\tfor (int i = 0; i < fileNum; i++) {\n\t\t Double tempDouble = new Double(subFile[i].lastModified());\n\t\t tm.put(tempDouble, subFile[i]);\n\t\t }\t \n\t\tint count=0;\n\t\tString fileName=null;\n\t\tSet<Double> set = tm.keySet();\n\t\tIterator<Double> it = set.iterator();\n\t\twhile (it.hasNext()) {\n\t\t Object key = it.next();\n\t\t Object objValue = tm.get(key);\n\t\t File tempFile = (File) objValue;\n\t\t if(count==fileNum-2)\n\t\t\t fileName=tempFile.getName();\n\t\t count++;\n\t\t }\n\t\tSystem.out.println(\"第一个log的文件名称-->\"+fileName);\n\t\treturn fileName;\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter filename: \");\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString filename = scanner.nextLine();\n\t\tBufferedReader fileReader = null;\n\t\tint[] counts = new int[10];\n\t\tint total = 0;\n\t\ttry {\n\t\t\tfileReader = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile ((line = fileReader.readLine()) != null) {\n\t\t\t\tif(line.length() > 0) {\n\t\t\t\t\tString[] parts = line.split(\" \");\n\t\t\t\t\tint num;\n\t\t\t\t\tif(parts.length > 0) {\n\t\t\t\t\t\tnum = Integer.parseInt(parts[parts.length - 1]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnum = Integer.parseInt(line); \n\t\t\t\t\t}\n\t\t\t\t\tint firstDigit = firstDigit(num);\n\t\t\t\t\tcounts[firstDigit]++;\n\t\t\t\t\ttotal++;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(int i = 1; i < counts.length; i++) {\n\t\t\tSystem.out.printf(\"%d : %d : %.2f%%\\n\", i, counts[i], counts[i] * 100. / total);\n\t\t}\n\t}", "public double nextDouble() {\n\tdouble result = (d1 - 1.0) / (POW3_33 - 1.0);\n\tnextIterate();\n\treturn result;\n }", "public abstract File mo41088k();", "public Student[] constructArray(String fileName)throws IOException{\n \n Student[] ans = new Student[10];\n Scanner Sc = new Scanner(new File(fileName));\n Sc.useDelimiter(\"\\t|\\n\");\n this.amount = 0;\n while(Sc.hasNext()){\n if(this.amount == ans.length){\n ans = doubler(ans);\n }\n String ID = Sc.next();\n String SName = Sc.next();\n String Email = Sc.next();\n String SClass = Sc.next();\n String major = Sc.next();\n ans[this.amount] = new Student(ID, SName, Email, SClass, major);\n amount++;\n }\n return ans;\n }", "private static ArrayList<Double> autoInput() {\n\t\tArrayList<Double> cumData = new ArrayList<Double>();\n\t\tString workingDir = System.getProperty(\"user.dir\");\n\n\t\tSystem.out.println(AUTO_MSG);\n\t\tin = new Scanner(System.in);\n\n\t\twhile (true) {\n\t\t\tString filename = in.nextLine();\n\t\t\tString path = workingDir + File.separator + filename;\n\t\t\tFile file = new File(path);\n\t\t\tif (!file.canRead()) {\n\t\t\t\tSystem.out.println(\"Can\\'t read file! Please try again.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Good until this point\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(file));\n\t\t\t\tString line = null;\n\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\tSystem.out.println(\"Line: \" + line);\n\t\t\t\t\tcumData.addAll(strToArrList(line));\n\t\t\t\t}\n\t\t\t\t// if (line == null)\n\t\t\t\treturn cumData;\n\t\t\t\t// cumData.addAll(strToArrList(line));\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(FILE_FORMAT_ERR_MSG);\n\t\t\t\tcontinue;\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(FILE_NOT_FOUND_MSG);\n\t\t\t\tcontinue;\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t}\n\t}", "public static void readDirectory(String dir){\n\t\tMap<Integer,Integer> catemap = new HashMap<Integer, Integer>();\r\n\t\tFile[] names = null;\r\n\t\tFile file = new File(dir);\r\n\t\tif(file.isFile())\r\n\t\t\tnames = new File[]{file};\r\n\t\telse\r\n\t\t\tnames = new File(dir).listFiles();\r\n\t\tList<String> lines = null;\r\n\t\tList<String> strs = null;\r\n\t\tList<Integer> keys = new ArrayList<Integer>();\r\n\t\tList<Integer> values = new ArrayList<Integer>();\r\n\t\tint v = 0;\r\n\t\tif(null!=names&&names.length>0){\r\n\t\t\tfor(File f:names){\r\n\t\t\t\tif(null!=lines)\r\n\t\t\t\t\tlines.clear();\r\n\t\t\t\tlines = readFile(f,\"utf-8\");\r\n\t\t\t\tif(null!=lines){\r\n\t\t\t\t\tint j = 0;\r\n\t\t\t\t\tint k=0;\r\n\t\t\t\t\tfor(String line:lines){\r\n\t\t\t\t\t\tstrs = parseStr2List(line, \"\\\\t\");\r\n//\t\t\t\t\t\tif(null!=strs&&strs.size()==7){\r\n//\t\t\t\t\t\t\tv = getPerValue(strs.get(3));\r\n//\t\t\t\t\t\t\tmaxmap.put(v, 1+DataFormat.parseInt(maxmap.get(v)));\r\n//\t\t\t\t\t\t\tv = getPerValue(strs.get(5));\r\n//\t\t\t\t\t\t\tcatemap.put(v, 1+DataFormat.parseInt(catemap.get(v)));\r\n//\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(null!=strs&&strs.size()==2){\r\n\t\t\t\t\t\t\tv = DataFormat.parseInt(strs.get(0));\r\n//\t\t\t\t\t\t\tif(v<=500){\r\n//\t\t\t\t\t\t\t\tv = j/5+1;\r\n//\t\t\t\t\t\t\t\tj = j+1;\r\n//\t\t\t\t\t\t\t}else{\r\n//\t\t\t\t\t\t\t\tv = 101;\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(k>500) break;\r\n\t\t\t\t\t\t\tk++;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(j<20){\r\n\t\t\t\t\t\t\t\tkeys.add(v);\r\n\t\t\t\t\t\t\t\tvalues.add(DataFormat.parseInt(strs.get(1)));\r\n\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(keys.toArray(new Integer[]{})));\r\n\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(values.toArray(new Integer[]{})));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n//\t\t\t\t\t\t\tcatemap.put(v, DataFormat.parseInt(strs.get(1))+DataFormat.parseInt(catemap.get(v)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\tfor(Entry<Integer, Integer> entry:maxmap.entrySet()){\r\n//\t\t\tUtils.appendToFile(\"/vol/user_log/maxmap.txt\", entry.getKey()+\"\\t\"+entry.getValue());\r\n//\t\t}\r\n//\t\tfor(Entry<Integer, Integer> entry:catemap.entrySet()){\r\n//\t\t\tUtils.appendToFile(\"C:\\\\Program Files\\\\SecureCRT\\\\download\\\\map.txt\", entry.getKey()+\"\\t\"+entry.getValue());\r\n//\t\t}\r\n\t}", "public Vector loadAffyGCOSExpressionFile(File f) throws IOException {\r\n \tthis.setTMEVDataType();\r\n final int preSpotRows = this.sflp.getXRow()+1;\r\n final int preExperimentColumns = this.sflp.getXColumn();\r\n int numLines = this.getCountOfLines(f);\r\n int spotCount = numLines - preSpotRows;\r\n\r\n if (spotCount <= 0) {\r\n JOptionPane.showMessageDialog(superLoader.getFrame(), \"There is no spot data available.\", \"TDMS Load Error\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n \r\n int[] rows = new int[] {0, 1, 0};\r\n int[] columns = new int[] {0, 1, 0};\r\n //String value,pvalue;\r\n String detection;\r\n\r\n float cy3, cy5;\r\n\r\n String[] moreFields = new String[1];\r\n String[] extraFields=null;\r\n final int rColumns = 1;\r\n final int rRows = spotCount;\r\n \r\n ISlideData slideDataArray[]=null;\r\n AffySlideDataElement sde=null;\r\n FloatSlideData slideData=null;\r\n \r\n BufferedReader reader = new BufferedReader(new FileReader(f));\r\n StringSplitter ss = new StringSplitter((char)0x09);\r\n String currentLine;\r\n int counter, row, column,experimentCount=0;\r\n counter = 0;\r\n row = column = 1;\r\n this.setFilesCount(1);\r\n this.setRemain(1);\r\n this.setFilesProgress(0);\r\n this.setLinesCount(numLines);\r\n this.setFileProgress(0);\r\n float[] intensities = new float[2];\r\n \r\n while ((currentLine = reader.readLine()) != null) {\r\n if (stop) {\r\n return null;\r\n }\r\n// fix empty tabbs appending to the end of line by wwang\r\n while(currentLine.endsWith(\"\\t\")){\r\n \tcurrentLine=currentLine.substring(0,currentLine.length()-1);\r\n }\r\n ss.init(currentLine);\r\n \r\n if (counter == 0) { // parse header\r\n \t\r\n \tif(sflp.onlyIntensityRadioButton.isSelected()) \r\n \t\texperimentCount = ss.countTokens()- preExperimentColumns;\r\n \t\t\r\n \tif(sflp.intensityWithDetectionRadioButton.isSelected()) \r\n \t\texperimentCount = (ss.countTokens()+1- preExperimentColumns)/2;\r\n \t\t\r\n \tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()) \r\n \t\texperimentCount = (ss.countTokens()+1- preExperimentColumns)/3;\r\n \t\r\n \t\r\n \tslideDataArray = new ISlideData[experimentCount];\r\n \tSampleAnnotation sampAnn=new SampleAnnotation();\r\n \tslideDataArray[0] = new SlideData(rRows, rColumns, sampAnn);//Added by Sarita to include SampleAnnotation model.\r\n \r\n slideDataArray[0].setSlideFileName(f.getPath());\r\n for (int i=1; i<experimentCount; i++) {\r\n \tsampAnn=new SampleAnnotation();\r\n \tslideDataArray[i] = new FloatSlideData(slideDataArray[0].getSlideMetaData(),spotCount, sampAnn);//Added by Sarita \r\n \tslideDataArray[i].setSlideFileName(f.getPath());\r\n \t//System.out.println(\"slideDataArray[i].slide file name: \"+ f.getPath());\r\n }\r\n if(sflp.onlyIntensityRadioButton.isSelected()){\r\n \tString [] fieldNames = new String[1];\r\n \t//extraFields = new String[1];\r\n \tfieldNames[0]=\"AffyID\";\r\n \tslideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n }else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \tString [] fieldNames = new String[2];\r\n \textraFields = new String[1];\r\n fieldNames[0]=\"AffyID\";\r\n fieldNames[1]=\"Detection\";\r\n slideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n }else{\r\n \tString [] fieldNames = new String[3];\r\n \textraFields = new String[2];\r\n fieldNames[0]=\"AffyID\";\r\n fieldNames[1]=\"Detection\";\r\n fieldNames[2]=\"P-value\";\r\n slideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n \r\n }\r\n ss.nextToken();//parse the blank on header\r\n for (int i=0; i<experimentCount; i++) {\r\n \tString val=ss.nextToken();\r\n\t\t\t\t\tslideDataArray[i].setSampleAnnotationLoaded(true);\r\n\t\t\t\t\tslideDataArray[i].getSampleAnnotation().setAnnotation(\"Default Slide Name\", val);\r\n\t\t\t\t\tslideDataArray[i].setSlideDataName(val);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.mav.getData().setSampleAnnotationLoaded(true);\r\n\t\t\t \t \r\n if(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \tss.nextToken();//parse the detection\r\n ss.nextToken();//parse the pvalue\r\n }else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \tss.nextToken();//parse the detection \r\n } \r\n }\r\n \r\n } else if (counter >= preSpotRows) { // data rows\r\n \trows[0] = rows[2] = row;\r\n \tcolumns[0] = columns[2] = column;\r\n \tif (column == rColumns) {\r\n \t\tcolumn = 1;\r\n \t\trow++;//commented by sarita\r\n \t\t\r\n \t\t\r\n \t} else {\r\n \t\tcolumn++;//commented by sarita\r\n \t\t\r\n \t\t\r\n \t}\r\n\r\n \t//affy ID\r\n \tmoreFields[0] = ss.nextToken();\r\n \r\n \t\r\n \t\r\n String cloneName = moreFields[0];\r\n if(_tempAnno.size()!=0) {\r\n \t \r\n \t \t \r\n \t if(((MevAnnotation)_tempAnno.get(cloneName))!=null) {\r\n \t\t MevAnnotation mevAnno = (MevAnnotation)_tempAnno.get(cloneName);\r\n\r\n \t\t sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, intensities, moreFields, mevAnno);\r\n \t }else {\r\n \t /**\r\n \t * Sarita: clone ID explicitly set here because if the data file\r\n \t * has a probe (for eg. Affy house keeping probes) for which Resourcerer\r\n \t * does not have annotation, MeV would still work fine. NA will be\r\n \t * appended for the rest of the fields. \r\n \t * \r\n \t * \r\n \t */\r\n \t\tMevAnnotation mevAnno = new MevAnnotation();\r\n \t\tmevAnno.setCloneID(cloneName);\r\n sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, new float[2], moreFields, mevAnno);\r\n \t \t\t \r\n }\r\n }\r\n /* Added by Sarita\r\n * Checks if annotation was loaded and accordingly use\r\n * the appropriate constructor.\r\n * \r\n * \r\n */\r\n \r\n else {\r\n sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, intensities, moreFields);\r\n }\r\n \r\n \t\r\n \t//sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, new float[2], moreFields);\r\n\r\n \tslideDataArray[0].addSlideDataElement(sde);\r\n \tint i=0;\r\n\r\n \tfor ( i=0; i<slideDataArray.length; i++) { \r\n \t\ttry {\t\r\n\r\n \t\t\t// Intensity\r\n \t\t\tintensities[0] = 1.0f;\r\n \t\t\tintensities[1] = ss.nextFloatToken(0.0f);\r\n \t\t\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\t\r\n \t\t\t\textraFields[0]=ss.nextToken();//detection\r\n \t\t\t\textraFields[1]=ss.nextToken();//p-value\r\n \t\t\t\t\r\n \t\t\t}else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\textraFields[0]=ss.nextToken();//detection\r\n \t\t\t}\r\n\r\n \t\t} catch (Exception e) {\r\n \t\t\t\r\n \t\t\tintensities[1] = Float.NaN;\r\n \t\t}\r\n \t\tif(i==0){\r\n \t\t\t\r\n \t\t\tslideDataArray[i].setIntensities(counter - preSpotRows, intensities[0], intensities[1]);\r\n \t\t\t//sde.setExtraFields(extraFields);\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\tsde.setDetection(extraFields[0]);\r\n \t\t\t\tsde.setPvalue(new Float(extraFields[1]).floatValue());\r\n \t\t\t}else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\tsde.setDetection(extraFields[0]);\r\n \t\t\t}\r\n \t\t}else{\r\n \t\t\tif(i==1){\r\n \t\t\t\tmeta = slideDataArray[0].getSlideMetaData(); \t\r\n \t\t\t}\r\n \t\t\tslideDataArray[i].setIntensities(counter-preSpotRows,intensities[0],intensities[1]);\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setDetection(counter-preSpotRows,extraFields[0]);\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setPvalue(counter-preSpotRows,new Float(extraFields[1]).floatValue());\r\n \t\t\t}\r\n \t\t\tif(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setDetection(counter-preSpotRows,extraFields[0]);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n\r\n } else {\r\n //we have additional sample annoation\r\n \r\n \tfor (int i = 0; i < preExperimentColumns - 1; i++) {\r\n\t\t\t\t\tss.nextToken();\r\n\t\t\t\t}\r\n\t\t\t\tString key = ss.nextToken();\r\n\r\n\t\t\t\tfor (int j = 0; j < slideDataArray.length; j++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(slideDataArray[j].getSampleAnnotation()!=null){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tString val=ss.nextToken();\r\n\t\t\t\t\t\tslideDataArray[j].getSampleAnnotation().setAnnotation(key, val);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tSampleAnnotation sampAnn=new SampleAnnotation();\r\n\t\t\t\t\t\t\tsampAnn.setAnnotation(key, ss.nextToken());\r\n\t\t\t\t\t\t\tslideDataArray[j].setSampleAnnotation(sampAnn);\r\n\t\t\t\t\t\t\tslideDataArray[j].setSampleAnnotationLoaded(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n \t}\r\n \t\r\n this.setFileProgress(counter);\r\n \tcounter++;\r\n \t//System.out.print(counter);\r\n \t}\r\n reader.close();\r\n \r\n \r\n Vector data = new Vector(slideDataArray.length);\r\n \r\n for(int j = 0; j < slideDataArray.length; j++)\r\n \tdata.add(slideDataArray[j]);\r\n \r\n this.setFilesProgress(1);\r\n return data;\r\n }", "private void joinFiles(String[] listFileContent, String filename0)\n\t{\n\t\tSystem.out.println(\"co vao day\");\n\t\tint[] start = new int[nu], next = new int[nu], copyPos = new int[nu];\n\t\tstart = intialStart();\n\t\tArrayList<Double> sumArray;\n\t\ttry {\n\t\t\tBufferedWriter out = new BufferedWriter(new FileWriter(filename0));\n\t\t\twhile (true)//while next1 = find (file1,+1)\n\t\t\t{\n\t\t\t\tnext = findNext(start, listFileContent);//find next\n\t\t\t\tif (checkNotFound(next)) break;\n\t\t\t\tcopyPos = findCopyPos(next);//find copyPos\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/*printNam(\"Day la next1: \");System.out.println(next1);\n\t\t\t\tprintNam(\"next2: \"); System.out.println(next2);\n\t\t\t\tprintNam(\"start1: \"); System.out.println(start1);\n\t\t\t\tprintNam(\"start2: \"); System.out.println(start2);\n\t\t\t\tprintNam(\"file: \"); System.out.println(index);*/\n\t\t\t\t//concatString = file1.substring(start1, copyPos1).concat(file2.substring(start2, copyPos2));\n\t\t\t\t\n\t\t\t\tsumArray = genConcatString(listFileContent, start, copyPos);\n\t\t\t\t\n\t\t\t\twriteToFile(out, sumArray);//write to 0.data.\n\t\t\t\t//update start\n\t\t\t\tstart = updateStart(next);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/*sumArray = genConcatString(listFileContent, start);\n\t\t\t\t\n\t\t\twriteToFile(out, sumArray);*/\n\t\t\t\t\n\t\t\tout.close();\n\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t}", "public ScanOperator(File file){\r\n\t\tthis.file = file;\r\n\t\ttry{\r\n\t\t br = new RandomAccessFile(this.file, \"r\");\r\n\t\t}catch(FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"File not found!\");\r\n\t\t}\r\n\t}", "private void readDataFile(int filetype, String filename) {\r\n\t\tint nfields=7; //number of data fields\r\n\t\tint i = 0; //temp elements counter\r\n\t\tint num_elements; //number of items (lines)\r\n\t\tString dataline;\r\n\t\tString[] elementdata;\r\n\t\ttry {\r\n\t\t\tFile filesource = new File(filename);\r\n\t\t\t//open data file\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(filesource.toURI().toURL().openStream()));\r\n\t\t\t//count elements\r\n\t\t\twhile(null != (dataline = in.readLine())) {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tnum_elements = i;\r\n\t\t\t//num_elements = i+1;\r\n\t\t\t//set arrays size by case\r\n\t\t\tif (filetype == 0) {\r\n\t\t\t\tsetMultipliersArraySize(num_elements);\r\n\t\t\t\tnfields = 3;\r\n\t\t\t}\r\n\t\t\telse if (filetype == 1) {\r\n\t\t\t\tsetCategoriesArraySize(num_elements);\r\n\t\t\t\tnfields = 1;\r\n\t\t\t}\r\n\t\t\telse if (filetype == 2) {\r\n\t\t\t\tsetUnitsArraySize(num_elements);\r\n\t\t\t\tnfields = 7;\r\n\t\t\t}\r\n\t\t\telse if (filetype == 3) {\r\n\t\t\t\tp_label = new String[i];\r\n\t\t\t\tnfields = 1;\r\n\t\t\t}\r\n\r\n\t\t\ti = 0;\r\n\t\t\tin = new BufferedReader(new InputStreamReader(filesource.toURI().toURL().openStream()));\r\n\t\t\t//read lines (each line is one menu element)\r\n\t\t\twhile(null != (dataline = in.readLine())) {\r\n\t\t\t\t//get element data array\r\n\t\t\t\telementdata = StringUtil.splitData(dataline, '\\t', nfields);\r\n\t\t\t\t//assign data\r\n\t\t\t\tif (filetype == 0) { //multipliers file\r\n\t\t\t\t\tp_multiplier_name[i] = getEncodedString(getDefaultValue(elementdata[0], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_multiplier_description[i] = getEncodedString(getDefaultValue(elementdata[1], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_multiplier_value[i] = parseNumber(getDefaultValue(elementdata[2], \"1\"));\r\n\t\t\t\t}\r\n\t\t\t\telse if (filetype == 1) { //category file\r\n\t\t\t\t\tp_category_name[i] = getEncodedString(getDefaultValue(elementdata[0], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t}\r\n\t\t\t\telse if (filetype == 2) { //units file\r\n\t\t\t\t\tp_unit_category_id[i] = new Integer(elementdata[0]);\r\n\t\t\t\t\tp_unit_symbol[i] = getEncodedString(getDefaultValue(elementdata[1], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_unit_name[i] = getEncodedString(getDefaultValue(elementdata[2], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_unit_scale[i] = parseNumber(getDefaultValue(elementdata[3], \"1\"));\r\n\t\t\t\t\tp_unit_offset[i] = parseNumber(getDefaultValue(elementdata[4], \"0\"));\r\n\t\t\t\t\tp_unit_power[i] = parseNumber(getDefaultValue(elementdata[5], \"1\"));\r\n\t\t\t\t\tp_unit_description[i] = getEncodedString(getDefaultValue(elementdata[6], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t}\r\n\t\t\t\telse if (filetype == 3) { //labels file\r\n\t\t\t\t\tp_label[i] = getEncodedString(getDefaultValue(elementdata[0], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "int attrib(int i, File v) {\n if (i < max) {\n AllFiles[i] = v;\n } else {\n File[] temp = new File[max];\n int j;\n for (j = 0; j < max; j++) temp[j] = AllFiles[j];\n AllFiles = new File[max + increase];\n for (j = 0; j < max; j++) AllFiles[j] = temp[j];\n max = max + increase;\n AllFiles[i] = v;\n }\n return (0);\n }", "@Test\r\n\tpublic void generateFile() {\n\t\tfor (int i = 1; i <= 5; i++) {\r\n\t\t\t// String filePath = \"C://Users//AtifKhan//Desktop//sample-\" + i +\r\n\t\t\t// \".csv\";\r\n\t\t\tString filePath = \"C://Users//olcay tarazan//Desktop//sample-\" + i + \".csv\";\r\n\t\t\tint numberOfDataLines = 400;\r\n\t\t\ttry {\r\n\t\t\t\tgenerateCsvFile(filePath, numberOfDataLines);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"File generated : sample-\" + i + \".csv \");\r\n\t\t}\r\n\t}", "public static double[] rawFreqCreator(){\n\t\tfinal int EXTERNAL_BUFFER_SIZE = 2097152;\n\t\t//128000\n\n\t\t//Get the location of the sound file\n\t\tFile soundFile = new File(\"MoodyLoop.wav\");\n\n\t\t//Load the Audio Input Stream from the file \n\t\tAudioInputStream audioInputStream = null;\n\t\ttry {\n\t\t\taudioInputStream = AudioSystem.getAudioInputStream(soundFile);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Get Audio Format information\n\t\tAudioFormat audioFormat = audioInputStream.getFormat();\n\n\t\t//Handle opening the line\n\t\tSourceDataLine\tline = null;\n\t\tDataLine.Info\tinfo = new DataLine.Info(SourceDataLine.class, audioFormat);\n\t\ttry {\n\t\t\tline = (SourceDataLine) AudioSystem.getLine(info);\n\t\t\tline.open(audioFormat);\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Start playing the sound\n\t\t//line.start();\n\n\t\t//Write the sound to an array of bytes\n\t\tint nBytesRead = 0;\n\t\tbyte[]\tabData = new byte[EXTERNAL_BUFFER_SIZE];\n\t\twhile (nBytesRead != -1) {\n\t\t\ttry {\n\t\t \t\tnBytesRead = audioInputStream.read(abData, 0, abData.length);\n\n\t\t\t} catch (IOException e) {\n\t\t \t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (nBytesRead >= 0) {\n\t\t \t\tint nBytesWritten = line.write(abData, 0, nBytesRead);\n\t\t\t}\n\n\t\t}\n\n\t\t//close the line \n\t\tline.drain();\n\t\tline.close();\n\t\t\n\t\t//Calculate the sample rate\n\t\tfloat sample_rate = audioFormat.getSampleRate();\n\t\tSystem.out.println(\"sample rate = \"+sample_rate);\n\n\t\t//Calculate the length in seconds of the sample\n\t\tfloat T = audioInputStream.getFrameLength() / audioFormat.getFrameRate();\n\t\tSystem.out.println(\"T = \"+T+ \" (length of sampled sound in seconds)\");\n\n\t\t//Calculate the number of equidistant points in time\n\t\tint n = (int) (T * sample_rate) / 2;\n\t\tSystem.out.println(\"n = \"+n+\" (number of equidistant points)\");\n\n\t\t//Calculate the time interval at each equidistant point\n\t\tfloat h = (T / n);\n\t\tSystem.out.println(\"h = \"+h+\" (length of each time interval in second)\");\n\t\t\n\t\t//Determine the original Endian encoding format\n\t\tboolean isBigEndian = audioFormat.isBigEndian();\n\n\t\t//this array is the value of the signal at time i*h\n\t\tint x[] = new int[n];\n\n\t\t//convert each pair of byte values from the byte array to an Endian value\n\t\tfor (int i = 0; i < n*2; i+=2) {\n\t\t\tint b1 = abData[i];\n\t\t\tint b2 = abData[i + 1];\n\t\t\tif (b1 < 0) b1 += 0x100;\n\t\t\tif (b2 < 0) b2 += 0x100;\n\t\t\tint value;\n\n\t\t\t//Store the data based on the original Endian encoding format\n\t\t\tif (!isBigEndian) value = (b1 << 8) + b2;\n\t\t\telse value = b1 + (b2 << 8);\n\t\t\tx[i/2] = value;\n\t\t\t\n\t\t}\n\t\t\n\t\t//do the DFT for each value of x sub j and store as f sub j\n\t\tdouble f[] = new double[n/2];\n\t\tfor (int j = 0; j < n/2; j++) {\n\n\t\t\tdouble firstSummation = 0;\n\t\t\tdouble secondSummation = 0;\n\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t \t\tdouble twoPInjk = ((2 * Math.PI) / n) * (j * k);\n\t\t \t\tfirstSummation += x[k] * Math.cos(twoPInjk);\n\t\t \t\tsecondSummation += x[k] * Math.sin(twoPInjk);\n\t\t\t}\n\n\t\t f[j] = Math.abs( Math.sqrt(Math.pow(firstSummation,2) + \n\t\t Math.pow(secondSummation,2)) );\n\n\t\t\tdouble amplitude = 2 * f[j]/n;\n\t\t\tdouble frequency = j * h / T * sample_rate;\n\t\t\tSystem.out.println(\"frequency = \"+frequency+\", amp = \"+amplitude);\n\t\t}\n\t\tSystem.out.println(\"DONE\");\n\t\treturn f;\n\t\t\n\t}" ]
[ "0.64843285", "0.6192742", "0.5850097", "0.5670009", "0.56388485", "0.5569738", "0.5567814", "0.5529964", "0.55221784", "0.54607415", "0.53880584", "0.5384534", "0.5373062", "0.5350121", "0.5257411", "0.52378935", "0.5233628", "0.52258384", "0.52193993", "0.521704", "0.5208909", "0.5168997", "0.51504886", "0.5126325", "0.51024044", "0.50996685", "0.50857466", "0.5082414", "0.5080363", "0.5066481", "0.5066056", "0.5049725", "0.50483406", "0.5038564", "0.5025779", "0.500111", "0.5000416", "0.4995992", "0.4986726", "0.49827006", "0.49758387", "0.4974921", "0.497067", "0.49683288", "0.49657917", "0.49657828", "0.4960449", "0.49561965", "0.49424174", "0.4940805", "0.49390662", "0.4931588", "0.49239254", "0.49188998", "0.49185663", "0.49055806", "0.48935184", "0.48865488", "0.48780546", "0.4875744", "0.48750603", "0.48691356", "0.4865007", "0.48642907", "0.48619378", "0.48602566", "0.48572698", "0.48506662", "0.48493087", "0.48483527", "0.48478204", "0.4839424", "0.48373276", "0.48358598", "0.48357275", "0.48354918", "0.48238266", "0.48198906", "0.48187056", "0.4818474", "0.48129207", "0.4812427", "0.48065665", "0.48012954", "0.48008013", "0.47808626", "0.47737065", "0.47709346", "0.47694752", "0.4751052", "0.47478545", "0.47445297", "0.47431508", "0.47381946", "0.47292858", "0.47254956", "0.47198534", "0.4719138", "0.47164908", "0.4715388" ]
0.53907883
10
repeated double file = 1;
int getFileCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getFile(int index);", "void mo80454a(File file, long j);", "public float[] accumulateSimpleSilentPeriodFiles(ArrayList<File> files){\r\n\t\t\tfloat[] values = new float[10];\r\n\t\t\tfloat[] returnValue = new float[10];\r\n\t\t\t\r\n\t\t for(File file:files){\t\t\t\t\t\r\n\t\t BufferedReader reader;\r\n\t\t try{\r\n\t\t reader = new BufferedReader(new FileReader(file));\r\n\t\t String line = reader.readLine(); \r\n\t\t while(line != null){\t\r\n\t\t \tif(!line.substring(0,1).equals(\"#\")){\r\n\t\t \t\tString[] values2 = line.split(\" \");\r\n\t\t \t\tSystem.out.println(file.getAbsolutePath());\r\n\t\t \t\tfor(int i = 1; i < values2.length; i++) {\r\n\t\t \t\t\tSystem.out.println(\"+ \" + values2[i]);\r\n\t\t \t\t\tvalues[i-1] += Float.valueOf(values2[i]);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t \tline = reader.readLine();\r\n\t\t }\r\n\t\t \r\n\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t System.err.println(\"FileNotFoundException: \" + e.getMessage());\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t System.err.println(\"Caught IOException: \" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t }\r\n\r\n\t\t for(int j = 0; j < values.length; j++) if(values[j] != 0) returnValue[j] = (float)values[j]/files.size();\r\n\t\t \r\n\t\t return returnValue;\r\n\t\t}", "private void doubleFunction(File file, ProbingHashTable doubleProb) throws FileNotFoundException{\n\t\tScanner numbers = new Scanner(file);\n\t\tint intervalCount = 0;\n\t\tdoubleProb = new DoubleProbingHashTable<Integer>(tableSize, R);\n\t\tprintTable(\"Double\");\n\t\twhile(numbers.hasNextInt() && intervalCount < inputs){\n\t\t\tdoubleProb.insert(numbers.nextInt());\n\t\t\tif(++intervalCount % interval == 0)\n\t\t\t\tdoubleProb.print(intervalCount);\n\t\t}\n\t\tnumbers.close();\n\t}", "public static void main(String[] args) {\n FilesParser filesParser = new FilesParser();\r\n ArrayList<Double> time = filesParser.get_timeList();\r\n Map<Double, ArrayList<Double>> expFile = new HashMap<>();\r\n ArrayList<Map<Double, ArrayList<Double>>> theorFiles = new ArrayList<>();\r\n\r\n try {\r\n expFile = filesParser.trimStringsAndGetData(0,\r\n filesParser.getDirectories()[0],\r\n filesParser.get_expFiles()[2]);\r\n List<String> fileList = filesParser.get_theorFileList();\r\n for (int i = 0; i < fileList.size(); i++) {\r\n theorFiles.add(filesParser.trimStringsAndGetData(1,\r\n filesParser.getDirectories()[1],\r\n filesParser.get_theorFileList().get(i)));\r\n }\r\n //System.out.println(expFile.get(0.00050));\r\n //System.out.println(expFile.get(-0.25));\r\n //System.out.println(expFile);\r\n //System.out.println(theorFiles.get(0.00050));\r\n //System.out.println(theorFiles);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n /*for (int i = 0; i < theorFiles.size(); i++) {\r\n Map<Double, ArrayList<Double>> theorFile = theorFiles.get(i);\r\n for (int ik = 0; ik < time.size(); ik++) {\r\n ArrayList<Double> theorFileLine = theorFile.get(time.get(ik));\r\n if (theorFileLine != null) {\r\n for (int j = 0; j < theorFileLine.size(); j++) {\r\n double theord = theorFileLine.get(j);\r\n for (int k = 0; k < expFile.size(); k++) {\r\n ArrayList<Double> expFileLine = expFile.get(time.get(ik));\r\n if (expFileLine != null) {\r\n for (int l = 0; l < expFileLine.size(); l++) {\r\n double expd = expFileLine.get(l);\r\n\r\n double div = expd / theord;\r\n if (div == 1) System.out.println(i);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }*/\r\n\r\n }", "public double cardinalDXSingleSpeedsDuplicatesFile(String fileName) {\n // this method returns the cardinality of the duplicated DXSingleSpeed coils data\n\n double value;\n // store the recorded DXSingleSpeeds in a string array\n ArrayList<String> recordedDXSingleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXSingleSpeed> dxSingleSpeedIterator = dxSingleSpeeds.iterator(); dxSingleSpeedIterator\n .hasNext();) {\n recordedDXSingleSpeedsStrings.add(dxSingleSpeedIterator.next()\n .toMoRecordString());\n }\n\n // remove any duplicates in the array;\n ArrayList<String> rmDuplicatesRecordedDXSingleSpeedsStrings = new ArrayList<String>();\n rmDuplicatesRecordedDXSingleSpeedsStrings = removeDuplicates(recordedDXSingleSpeedsStrings);\n\n // System.out.println\n // (\"size of the dxSingleSpeeds after removing the duplicates \" +\n // rmDuplicatesRecordedDXSingleSpeedsStrings.size());\n value = rmDuplicatesRecordedDXSingleSpeedsStrings.size()\n - dxSingleSpeeds.size();\n\n return value;\n }", "public synchronized long nextFs(){\n\t\treturn fs++;\n\t}", "public double cardinalDXDoubleSpeedsDuplicatesFile(String fileName) {\n // this method returns the cardinality of the duplicated DXDoubleSpeed coils data\n\n double value;\n // store the recorded DXDoubleSpeeds in a string array\n ArrayList<String> recordedDXDoubleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXDoubleSpeed> dxDoubleSpeedIterator = dxDoubleSpeeds.iterator(); dxDoubleSpeedIterator\n .hasNext();) {\n recordedDXDoubleSpeedsStrings.add(dxDoubleSpeedIterator.next()\n .toMoRecordString());\n }\n\n // remove any duplicates in the array;\n ArrayList<String> rmDuplicatesRecordedDXDoubleSpeedsStrings = new ArrayList<String>();\n rmDuplicatesRecordedDXDoubleSpeedsStrings = removeDuplicates(recordedDXDoubleSpeedsStrings);\n\n // System.out.println\n // (\"size of the dxDoubleSpeeds after removing the duplicates \" +\n // rmDuplicatesRecordedDXDoubleSpeedsStrings.size());\n value = rmDuplicatesRecordedDXDoubleSpeedsStrings.size()\n - dxDoubleSpeeds.size();\n\n return value;\n }", "public float[] accumulateDetailFiles(ArrayList<File> files){\r\n\t\tfloat[] values = new float[100];\r\n\t\tint counter = 0;\r\n\r\n\t for(File file:files){\t\t\r\n\t \tSystem.out.println(file.getName());\r\n\t \tcounter = 0;\r\n\t BufferedReader reader;\r\n\t try{\r\n\t reader = new BufferedReader(new FileReader(file));\r\n\t String line = reader.readLine(); \r\n\t while(line != null){\t\r\n\t \tif(!line.substring(0,1).equals(\"#\")){\r\n\t \t\tString[] values2 = line.split(\" \");\r\n\t \t\tvalues[counter] += Float.valueOf(values2[values2.length-1]);\r\n\t\t \tcounter++;\r\n\t \t}\r\n\t \tline = reader.readLine();\r\n\t }\r\n\t \r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t System.err.println(\"FileNotFoundException: \" + e.getMessage());\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t System.err.println(\"Caught IOException: \" + e.getMessage());\r\n\t\t\t}\r\n\t }\r\n\r\n\t float[] returnValues = new float[counter];\r\n\t \r\n\t for(int j = 0; j < returnValues.length; j++) \treturnValues[j] = ((float)values[j]/files.size());\r\n\t\r\n\t \r\n \treturn returnValues;\r\n\t}", "public void incFileCount(){\n\t\tthis.num_files++;\n\t}", "java.util.List<java.lang.Double> getFileList();", "public void cool()throws IOException{\n int q= 2;\n ArrayList<Scanner> f = new ArrayList();\n String input = j.showInputDialog(\"Choose a file to use:\");\n f.add(new Scanner(new File(input+\".ppm\")));\n //\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"jkndanwladlanfseuihrvniurhceimucauqrcal3iuirlheunrliuvznmlriunh.ppm\")));\n out.println(f.get(0).next());out.println(f.get(0).next()); out.println(f.get(0).next());int uh=Integer.parseInt(f.get(0).next()); out.println(uh);\n while(f.get(0).hasNext()){\n for(int rgb=0;rgb<3;rgb++){\n if(f.get(0).hasNext()){\n String ass=f.get(0).next();\n\n int azz= Integer.parseInt(ass);\n if(azz<(uh/2)){\n out.println(\"\"+0);\n }else{\n out.println(\"\"+uh);\n }\n }\n }\n }\n out.close(); //\n \n f.set(0,(new Scanner(new File(input+\".ppm\"))));f.add(new Scanner(new File(\"jkndanwladlanfseuihrvniurhceimucauqrcal3iuirlheunrliuvznmlriunh.ppm\")));\n input = j.showInputDialog(\"Choose a name for the new file:\");\n out = new PrintWriter(new BufferedWriter(new FileWriter(input+\".ppm\")));\n out.println(\"P3\");\n int height[]= new int[q]; int width[]= new int[q];\n int largest=0;\n for(int a=0;a<q;a++){\n f.get(a).next();\n height[a]=Integer.parseInt(f.get(a).next());\n width[a]=Integer.parseInt(f.get(a).next());\n //f.get(a).next();\n }\n for(int a=0;a<q;a++){\n if(height[largest]*width[largest]<height[a]*width[a]){\n largest=a;\n }\n }\n out.println(height[largest]);out.println(width[largest]);\n int ass=0;\n int azz=0;\n\n for(int x=0;x<width[largest];x++){\n for(int y=0;y<height[largest];y++){\n for(int c=0;c<3;c++){\n for(int a=0;a<q;a++){\n if(f.get(a).hasNext()){\n if(x<width[a]&&y<height[a]){\n ass=ass+Integer.parseInt(f.get(a).next());\n azz++;\n }\n }\n }\n ass=ass/azz;\n out.print(ass+\" \");\n ass=0;\n azz=0;\n }\n }\n }\n\n for(int a =0;a<q;a++){\n f.get(a).close();\n }\n out.close();\n System.exit(0);\n }", "public Interface(String filename) throws FileNotFoundException \n {\n //read file for first time to find size of array\n File f = new File(filename);\n Scanner b = new Scanner(f);\n\n while(b.hasNextLine())\n {\n b.nextLine();\n arraySize++;\n }\n //create properly sized array\n array= new double[arraySize];\n //open and close the file, scanner class does not support rewinding\n b.close();\n b = new Scanner(f);\n //read input \n for(int i = 0; i < arraySize; i++)\n { \n array[i] = b.nextDouble();\n }\n //create a stats object of the proper size\n a = new Stats(arraySize);\n a.loadNums(array); //pass entire array to loadNums to allow Stats object a to have a pointer to the array\n }", "public float[] accumulateSimpleMixFiles(ArrayList<File> files){\r\n\t\t\tfloat[] returnValue = new float[10];\r\n\t\t\tfloat[] values = new float[10];\r\n\t\t\t\r\n\t\t for(File file:files){\t\t\t\t\t\r\n\t\t BufferedReader reader;\r\n\t\t try{\r\n\t\t reader = new BufferedReader(new FileReader(file));\r\n\t\t String line = reader.readLine(); \r\n\t\t while(line != null){\t\r\n\t\t \tif(line.substring(0,5).equals(\"Total\")){\r\n\t\t \t\tString[] values2 = line.split(\" \");\r\n\t\t \t\t\r\n\t\t \t\tfor(int i = 2; i < values2.length; i++) values[i-2] += Float.valueOf(values2[i]);\r\n\t\t \t}\r\n\t\t \tline = reader.readLine();\r\n\t\t }\r\n\t\t \r\n\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t System.err.println(\"FileNotFoundException: \" + e.getMessage());\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t System.err.println(\"Caught IOException: \" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t }\r\n\r\n\t\t for(int j = 0; j < values.length; j++) returnValue[j] = (float)values[j]/files.size();\t\r\n\t\t \r\n\t\t return returnValue;\r\n\t\t}", "private double createCumulativeResults(){\n File f = new File(this.cumulativeResultsFileName); \n Scanner sc; \n if(!f.exists()){\n return 0;\n }else{\n try{\n double s = 0; \n int n = 0; \n sc = new Scanner(new File(this.cumulativeResultsFileName));\n while(sc.hasNext()){\n String inputLine = sc.nextLine(); System.out.println(inputLine);\n String temp = inputLine.split(\",\")[1] ;\n s = s + Double.parseDouble(temp);\n n++;\n }\n return s/(double)n;\n }catch(Exception e){\n e.printStackTrace();\n return 0; \n }\n }\n }", "public double getNumFiles(){\n\t\treturn (this.num_files);\n\t}", "private void writeTest1File1() throws IOException{\n fillFile(1, true);\n }", "void startFile() {\n writeToFile(defaultScore);\n for (int i = 0; i < 5; i++) {\n writeToFile(readFromFile() + defaultScore);\n }\n }", "public abstract long NewFileNumber();", "public static List<double[]> readAlpha(File f)\n/* */ throws Exception\n/* */ {\n/* 89 */ throw new Error(\"Unresolved compilation problem: \\n\");\n/* */ }", "public static void main(String[] args) throws IOException {\n FileWriter fw = new FileWriter(new File(\"src/output_files/threesumA.txt\"));\n StringBuilder sb = new StringBuilder();\n // the rest input files\n String[] inputFiles = {\"src/input_files/8ints.txt\", \"src/input_files/1Kints.txt\", \"src/input_files/2Kints.txt\",\n \"src/input_files/2Kints.txt\", \"src/input_files/4Kints.txt\", \"src/input_files/8Kints.txt\",\n \"src/input_files/16Kints.txt\", \"src/input_files/32Kints.txt\"};\n int i = 8;\n for (String file : inputFiles) {\n In in = new In(file);\n int[] a = in.readAllInts();\n long startTime = System.nanoTime();\n int result = count(a);\n long elapsedTime = System.nanoTime() - startTime;\n sb.append(String.format(\"%d %d\\n\", i, elapsedTime));\n System.out.println(result);\n if (i == 8) {\n i = 1000;\n } else {\n i *= 2;\n }\n }\n fw.write(sb.toString());\n fw.close();\n }", "public void mo210a(File file) {\n }", "void setFile(String i) {\n file = i;\n }", "public void addSample(int note, String fileName) {\n\t\taddSample(note, fileName, -1, -1, 1.0);\n\t}", "public void average()throws IOException{\n String input = j.showInputDialog(\"Choose how many images you'll be using:\");\n int q= Integer.parseInt(input);\n ArrayList<Scanner> f = new ArrayList();\n for(int a=0;a<q;a++){\n input = j.showInputDialog(\"Choose a file (\"+(a+1)+\"/\"+q+ \") to use:\");\n f.add(new Scanner(new File(input+\".ppm\")));\n }\n input = j.showInputDialog(\"Choose a name for the new file:\");\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(input+\".ppm\")));\n out.println(\"P3\");\n int height[]= new int[q]; int width[]= new int[q];\n int largest=0;\n for(int a=0;a<q;a++){\n f.get(a).next();\n height[a]=Integer.parseInt(f.get(a).next());\n width[a]=Integer.parseInt(f.get(a).next());\n //f.get(a).next();\n }\n for(int a=0;a<q;a++){\n if(height[largest]*width[largest]<height[a]*width[a]){\n largest=a;\n }\n }\n out.println(height[largest]);out.println(width[largest]);\n int ass=0;\n int azz=0;\n\n for(int x=0;x<width[largest];x++){\n for(int y=0;y<height[largest];y++){\n for(int c=0;c<3;c++){\n for(int a=0;a<q;a++){\n if(f.get(a).hasNext()){\n if(x<width[a]&&y<height[a]){\n ass=ass+Integer.parseInt(f.get(a).next());\n azz++;\n }\n }\n }\n ass=ass/azz;\n out.print(ass+\" \");\n ass=0;\n azz=0;\n }\n }\n }\n\n for(int a =0;a<q;a++){\n f.get(a).close();\n }\n out.close();\n System.exit(0);\n }", "public List<Double> processFile() throws AggregateFileInitializationException {\n \t\t \n \t\tint maxTime = 0;\n \t\tHashMap<String, List<Double>> data = new HashMap<String,List<Double>>();\n \t\ttry {\n \t String record; \n \t String header;\n \t int recCount = 0;\n \t List<String> headerElements = new ArrayList<String>();\n \t FileInputStream fis = new FileInputStream(scenarioData); \n \t BufferedReader d = new BufferedReader(new InputStreamReader(fis));\n \t \n \t //\n \t // Read the file header\n \t //\n \t if ( (header=d.readLine()) != null ) { \n \t \t\n \t\t StringTokenizer st = new StringTokenizer(header );\n \t\t \n \t\t while (st.hasMoreTokens()) {\n \t\t \t String val = st.nextToken(\",\");\n \t\t \t headerElements.add(val.trim());\n \t\t }\n \t } // read the header\n \t /////////////////////\n \t \n \t // set up the empty lists\n \t int numColumns = headerElements.size();\n \t for (int i = 0; i < numColumns; i ++) {\n \t \tString key = headerElements.get(i);\n \t \t if(validate(key)) {\n \t \t\tdata.put(key, new ArrayList<Double>());\n \t\t }\n \t \t\n \t }\n \t \n \t // Here we check the type of the data file\n \t // by checking the header elements\n \t \n \t \n \t \n \t //////////////////////\n // Read the data\n //\n while ( (record=d.readLine()) != null ) { \n recCount++; \n \n StringTokenizer st = new StringTokenizer(record );\n int tcount = 0;\n \t\t\t\twhile (st.hasMoreTokens()) {\n \t\t\t\t\tString val = st.nextToken(\",\");\n \t\t\t\t\tString key = headerElements.get(tcount);\n \t\t\t\t\tif(validate(key)) {\n \t\t\t\t\t\tidSet.add(key);\n \t\t\t\t\t\tList<Double> dataList = data.get(key);\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tDouble dVal = new Double(val.trim());\n \t\t\t\t\t\t\tdataList.add(dVal);\n \t\t\t\t\t\t\tif (dataList.size() >= maxTime) maxTime = dataList.size();\n \t\t\t\t\t\t\tdata.put(key,dataList);\n \t\t\t\t\t\t} catch(NumberFormatException nfe) {\n \t\t\t\t\t\t\tdata.remove(key);\n \t\t\t\t\t\t\tidSet.remove(key);\n \t\t\t\t\t\t\tActivator.logInformation(\"Not a valid number (\"+val+\") ... Removing key \"+key, null);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\t\t\t\n \t\t\t\t\ttcount ++;\n \t\t\t\t}\n \t\t\t} // while file has data\n } catch (IOException e) { \n // catch io errors from FileInputStream or readLine()\n \t Activator.logError(\" IOException error!\", e);\n \t throw new AggregateFileInitializationException(e);\n }\n \n List<Double> aggregate = new ArrayList<Double>();\n for (int i = 0; i < maxTime; i ++) {\n \t aggregate.add(i, new Double(0.0));\n }\n // loop over all location ids\n Iterator<String> iter = idSet.iterator();\n while((iter!=null)&&(iter.hasNext())) {\n \t String key = iter.next();\n \t List<Double> dataList = data.get(key);\n \t for (int i = 0; i < maxTime; i ++) {\n \t\t double val = aggregate.get(i).doubleValue();\n \t\t val += dataList.get(i).doubleValue();\n \t aggregate.set(i,new Double(val));\n }\n }\n \n return aggregate;\n \t }", "String doubleRead();", "public void dxDoubleSpeedsDuplicates(String fileName) throws IOException {\n // This method prints all the duplicated DXDoubleSpeeds in the output\n // file.\n\n // concatenate the recorded DXDoubleSpeeds in a string\n ArrayList<String> recordedDXDoubleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXDoubleSpeed> dxDoubleSpeedIterator = dxDoubleSpeeds.iterator(); dxDoubleSpeedIterator\n .hasNext();) {\n recordedDXDoubleSpeedsStrings.add(dxDoubleSpeedIterator.next()\n .toMoRecordString());\n }\n\n ArrayList<String> duplicates = new ArrayList<String>();\n duplicates = saveDuplicates(recordedDXDoubleSpeedsStrings);\n\n // define the header of the output file\n String fileHeader = \"There are \"\n + String.format(\"%s\", duplicates.size()) + \" duplicate(s) \"\n + \"in the input file. The duplicate(s) is(are) :\" + \"\\n\" + \"\\n\";\n\n String recordedDuplicatesStrings = \"\";\n\n // concatenate the recorded DXDoubleSpeed in a string\n for (Iterator<String> it = duplicates.iterator(); it.hasNext();) {\n recordedDuplicatesStrings += it.next() + \"\\n\";\n }\n\n // print the header + DXDoubleSpeed + footer in the output file\n OutputStreamWriter fw = new FileWriter(fileName);\n fw.write(fileHeader + recordedDuplicatesStrings);\n fw.close();\n }", "private static boolean a(java.io.File r8, defpackage.edw r9) {\n /*\n r0 = 0\n r2 = 0\n long r4 = r8.length() // Catch:{ all -> 0x003c }\n r6 = 0\n int r1 = (r4 > r6 ? 1 : (r4 == r6 ? 0 : -1))\n if (r1 <= 0) goto L_0x0033\n r6 = 2147483647(0x7fffffff, double:1.060997895E-314)\n int r1 = (r4 > r6 ? 1 : (r4 == r6 ? 0 : -1))\n if (r1 >= 0) goto L_0x0033\n int r3 = (int) r4 // Catch:{ all -> 0x003c }\n byte[] r4 = new byte[r3] // Catch:{ all -> 0x003c }\n java.io.FileInputStream r1 = new java.io.FileInputStream // Catch:{ all -> 0x003c }\n r1.<init>(r8) // Catch:{ all -> 0x003c }\n L_0x001b:\n if (r0 >= r3) goto L_0x0025\n int r2 = r3 - r0\n int r2 = r1.read(r4, r0, r2) // Catch:{ all -> 0x0044 }\n int r0 = r0 + r2\n goto L_0x001b\n L_0x0025:\n r0 = 0\n defpackage.dmf.a(r9, r4, r0, r3) // Catch:{ all -> 0x0044 }\n L_0x0029:\n boolean r0 = r8.delete() // Catch:{ all -> 0x0044 }\n if (r1 == 0) goto L_0x0032\n r1.close()\n L_0x0032:\n return r0\n L_0x0033:\n r0 = 1\n java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0) // Catch:{ all -> 0x003c }\n r9.a = r0 // Catch:{ all -> 0x003c }\n r1 = r2\n goto L_0x0029\n L_0x003c:\n r0 = move-exception\n r1 = r2\n L_0x003e:\n if (r1 == 0) goto L_0x0043\n r1.close()\n L_0x0043:\n throw r0\n L_0x0044:\n r0 = move-exception\n goto L_0x003e\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.chn.a(java.io.File, edw):boolean\");\n }", "private static void getFile(String path){\n File file = new File(path); \r\n // get the folder list \r\n File[] array = file.listFiles();\r\n // flag = array.length;\r\n \r\n for(int i=0;i<array.length;i++){ \r\n if(array[i].isFile()){ \r\n // only take file name \r\n //System.out.println(\"^^^^^\" + array[i].getName()); \r\n // take file path and name \r\n //System.out.println(\"#####\" + array[i]); \r\n // take file path and name \r\n System.out.println(\"*****\" + array[i].getPath()); \r\n\t\t\tcalculate_Ave(array[i].getPath());\r\n } \r\n }\r\n}", "public void dxSingleSpeedsDuplicates(String fileName) throws IOException {\n // This method prints all the duplicated DXSingleSpeeds in the output\n // file.\n\n // concatenate the recorded DXSingleSpeeds in a string\n ArrayList<String> recordedDXSingleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXSingleSpeed> dxSingleSpeedIterator = dxSingleSpeeds.iterator(); dxSingleSpeedIterator\n .hasNext();) {\n recordedDXSingleSpeedsStrings.add(dxSingleSpeedIterator.next()\n .toMoRecordString());\n }\n\n ArrayList<String> duplicates = new ArrayList<String>();\n duplicates = saveDuplicates(recordedDXSingleSpeedsStrings);\n\n // define the header of the output file\n String fileHeader = \"There are \"\n + String.format(\"%s\", duplicates.size()) + \" duplicate(s) \"\n + \"in the input file. The duplicate(s) is(are) :\" + \"\\n\" + \"\\n\";\n\n String recordedDuplicatesStrings = \"\";\n\n // concatenate the recorded DXSingleSpeed in a string\n for (Iterator<String> it = duplicates.iterator(); it.hasNext();) {\n recordedDuplicatesStrings += it.next() + \"\\n\";\n }\n\n // print the header + DXSingleSpeed + footer in the output file\n OutputStreamWriter fw = new FileWriter(fileName);\n fw.write(fileHeader + recordedDuplicatesStrings);\n fw.close();\n }", "public synchronized static void write(double[] xxx,String fileName){\n\t\ttry{\n\t\t \tFileOutputStream fos = new FileOutputStream(fileName);\n\t\t \tDataOutputStream dos = new DataOutputStream(fos);\n\t\t\t\n\t\t\tfor(double x:xxx)\n\t\t\t\tdos.writeDouble(x);\n\t\t\tdos.close();\n\t\t\tfos.close();\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private static void generateForSingleFile() throws IOException {\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(singlePatternPath+ filename));\n\t\t\n\t\tIterator iter = countOne.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tMap.Entry entry = (Entry) iter.next();\n\t\t\tInteger value = (Integer) entry.getValue();\n\t\t\tSequencePair key = (SequencePair) entry.getKey();//System.out.println(\"current\" + \"[\" + key.firstSeq +\":\"+key.secondSeq +\"]\" + \" ; \"+ value);\n\t\t\tout.write(\"[\" + key.firstSeq + \":\" + key.secondSeq + \"]\" +\":\" +value + \"\\n\");\n\t\t}\n\t\tif(out!=null)\n\t\t\tout.close();\n\t\t\n\t\t\n\t\tBufferedWriter out1 = new BufferedWriter(new FileWriter(newSinglePatternPath+filename));\n\t\titer = countTwo.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tMap.Entry entry = (Entry) iter.next();\n\t\t\tInteger value = (Integer) entry.getValue();\n\t\t\tSequencePair key = (SequencePair) entry.getKey();//System.out.println(\"current\" + \"[\" + key.firstSeq +\":\"+key.secondSeq +\"]\" + \" ; \"+ value);\n\t\t\tout1.write(\"[\" + key.firstSeq + \":\" + key.secondSeq + \"]\" +\":\" +value + \"\\n\");\n\t\t}\n\t\t \n\t\tif(out1!=null)\n\t\t\tout1.close();\n\t}", "public File getFileValue();", "public static void main(String[] args) throws FileNotFoundException\n {\n Scanner sc = new Scanner(new File(\"JudgeData/sakshi.dat\"));\n while (sc.hasNext())\n {\n double base = sc.nextDouble();\n double pow = sc.nextDouble();\n\n System.out.printf(\"%.3f\\n\", Math.pow(base, pow));\n }\n }", "void readFiles(Boolean smart) \n\t//throws IOException// more here for safety\n\t{\n\t\tint i;\n\t\tfor (i = 0; i<165; ++i)\n\t\tfor (int j = 0; j<11; ++j)\n\t\t{\t//if(smart)memoryFile.readInt(board(i,j));\n\t\t\t//else \n\t\t\t\tboard[i][j] = 0;\n\t\t}\n\t\t//try memoryFileStream.close(); catch (IOException e);\n\t}", "double readDouble();", "public static void main(String[] args) // FileNotFoundException caught by this application\n {\n\n Scanner console = new Scanner(System.in);\n System.out.print(\"Input file: \");\n String inputFileName = console.next();\n System.out.print(\"Output file: \");\n String outputFileName = console.next();\n\n Scanner in = null;\n PrintWriter out =null;\n\n File inputFile = new File(inputFileName);\n try\n {\n in = new Scanner(inputFile);\n out = new PrintWriter(outputFileName);\n\n double total = 0;\n\n while (in.hasNextDouble())\n {\n double value = in.nextDouble();\n int x = in.nextInt();\n out.printf(\"%15.2f\\n\", value);\n total = total + value;\n }\n\n out.printf(\"Total: %8.2f\\n\", total);\n\n\n } catch (FileNotFoundException exception)\n {\n System.out.println(\"FileNotFoundException caught.\" + exception);\n exception.printStackTrace();\n }\n catch (InputMismatchException exception)\n {\n System.out.println(\"InputMismatchexception caught.\" + exception);\n }\n finally\n {\n\n in.close();\n out.close();\n }\n\n }", "void citire(FileReader f);", "public Files(){\n this.fileNameArray.add(\"bridge_1.txt\");\n this.fileNameArray.add(\"bridge_2.txt\");\n this.fileNameArray.add(\"bridge_3.txt\");\n this.fileNameArray.add(\"bridge_4.txt\");\n this.fileNameArray.add(\"bridge_5.txt\");\n this.fileNameArray.add(\"bridge_6.txt\");\n this.fileNameArray.add(\"bridge_7.txt\");\n this.fileNameArray.add(\"bridge_8.txt\");\n this.fileNameArray.add(\"bridge_9.txt\");\n this.fileNameArray.add(\"ladder_1.txt\");\n this.fileNameArray.add(\"ladder_2.txt\");\n this.fileNameArray.add(\"ladder_3.txt\");\n this.fileNameArray.add(\"ladder_4.txt\");\n this.fileNameArray.add(\"ladder_5.txt\");\n this.fileNameArray.add(\"ladder_6.txt\");\n this.fileNameArray.add(\"ladder_7.txt\");\n this.fileNameArray.add(\"ladder_8.txt\");\n this.fileNameArray.add(\"ladder_9.txt\");\n }", "public static void main(String[] args) {\n\n\t\tBufferedReader br=null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(args[0]));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"The specified file \" + args[0] + \"was not found\");\n\t\t\te1.printStackTrace();\n\t\t}\n String line = \"\";\n //HashMap<String, Integer> wordmap = new HashMap<String, Integer>();\n\t\tInteger totalCount = 0;\n try {\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t totalCount++;\n\t\t\t}\n br.close();\n br = new BufferedReader(new FileReader(args[0]));\n Double multiplier = Math.log (1/totalCount.doubleValue());\n FileWriter fstream = new FileWriter(\"juice_inter_\" + args[1], true);\n\t\t\tBufferedWriter output = new BufferedWriter(fstream);\n while ((line = br.readLine()) != null) {\n\t\t\t String[] values = line.split(\":\")[1].split(\",\");\n\t\t\t String fileName = values[0];\n\t\t\t String tf_string = values[1];\n\t\t\t Double tf = Double.parseDouble(tf_string);\n\t\t\t Double result = tf * multiplier;\n\t\t\t output.write( line.split(\":\")[0]+ \" , \" + fileName + \" : \" + result + \"\\n\");\n\t\t\t \n\t\t\t}\n output.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void addFile(int numberLines);", "@Override\n public void addSingleFile(FileInfo file) {\n }", "public TwoSum(int size, File file) throws FileNotFoundException{\n this.size = size;\n ht = new Node[size];\n \n //create and populate array from file\n Scanner sc = new Scanner(file);\n long x,i=0;\n while(sc.hasNext()){\n x=sc.nextLong();\n insert(x);\n System.out.println(i+\" \"+x);\n i++;\n }\n \n findTwoSum();\n }", "public final void mo14831s() {\n Iterator it = ((ArrayList) mo14817d()).iterator();\n while (it.hasNext()) {\n File file = (File) it.next();\n if (file.listFiles() != null) {\n m6739b(file);\n long c = m6740c(file, false);\n if (((long) this.f6567b.mo14797a()) != c) {\n try {\n new File(new File(file, String.valueOf(c)), \"stale.tmp\").createNewFile();\n } catch (IOException unused) {\n f6563c.mo14884b(6, \"Could not write staleness marker.\", new Object[0]);\n }\n }\n for (File b : file.listFiles()) {\n m6739b(b);\n }\n }\n }\n }", "private static void tokenFiles() throws IOException\r\n\t{\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br1 = new BufferedReader(fr);\r\n\t\t\r\n\t\tDouble[] salaries = new Double[10];//array for salary\r\n\t\tInteger[] id = new Integer[10];//array for id\r\n\t\tInteger[] age = new Integer[10];//array for age\r\n\t\tString[] fName = new String[10];//array for first name\r\n\t\tString[] lName = new String[10];//array for last name\r\n\t\tString[] status = new String[10];//array for status\r\n\t\tDouble[] raises = new Double[10];//array for the raised salary\r\n\t\tString s1;//string for readLine of files\r\n\t\tint i = 0;//index for loop of arrays\r\n\t\t\r\n\t\tSystem.out.println(\"\\nWith a 2% raise\\n\");\r\n\t\t//while loop to convert to proper type\r\n\t\twhile ((s1 = br1.readLine())!=null && i<10)\r\n\t\t{\r\n\t\t\tStringTokenizer st = new StringTokenizer(s1);//create new obj tokenizer\r\n\t\t\tfName[i] = st.nextToken();\r\n\t\t\tlName[i] = st.nextToken();\r\n\t\t\tid[i] = Integer.parseInt(st.nextToken());\r\n\t\t\tage[i] = Integer.parseInt(st.nextToken());\t\t\t\t\r\n\t\t\tsalaries[i] = Double.parseDouble(st.nextToken());\r\n\t\t\tstatus[i] = st.nextToken();\r\n\t\t\t\r\n\t\t\tSystem.out.println(fName[i]+\" \"+ lName[i]+\" \"+ id[i]+\r\n\t\t\t\t\t\t\" \"+ age[i]+\" \"+salaries[i]+\" \"+status[i]);\t\r\n\t\t\t\r\n\t\t\traises[i]= (salaries[i]*.02) +salaries[i];//calculate new salaries\r\n\t\t\tSystem.out.println(\"Salary with raise: \" +raises[i]);//print raise amount\r\n\t\t\ti++;\r\n\t\t}//end while loop convert to proper type\r\n\t\tbr1.close();//close this buffered reader\r\n\t}", "@Override\n\t\t\t\tpublic void run() \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"reading..\" +next.getFileName());\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t//ts1.finalWrite(next.getFileName(),(int)file.length());\n\t\t\t\t\t\t\tInputStream in = new FileInputStream(readFile);\n\t\t\t\t\t\t\tint i;\n\t\t\t\t\t\t\tint fileNameLength =readFile.length();\n\t\t\t\t\t\t\tlong fileLength = file.length();\n\t\t\t\t\t\t\tlong total = (2+fileNameLength+fileLength);\n\t\t\t\t\t\t\t//System.out.println(\"toal length\" +total);\n\t\t\t\t\t\t\tqu.put((byte)total);\n\t\t\t\t\t\t\tqu.put((byte)readFile.length()); // file name length\n\t\t\t\t\t\t\tqu.put((byte)file.length()); //file content length\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int j=0;j<readFile.length();j++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)readFile.charAt(j)); //writing file Name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhile((i=in.read())!=-1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)i);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tin.close();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (IOException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "public abstract double read_double();", "public static double[] readRHat(File f)\n/* */ throws Exception\n/* */ {\n/* 78 */ throw new Error(\"Unresolved compilation problem: \\n\");\n/* */ }", "private boolean compareFile(java.io.FileInputStream r25, java.io.FileInputStream r26) {\n /*\n r24 = this;\n r7 = 5;\n r8 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n r2 = 0;\n r21 = r25.getChannel();\t Catch:{ IOException -> 0x00ce }\n r22 = r21.size();\t Catch:{ IOException -> 0x00ce }\n r0 = r22;\n r0 = (int) r0;\t Catch:{ IOException -> 0x00ce }\n r19 = r0;\n r21 = r26.getChannel();\t Catch:{ IOException -> 0x00ce }\n r22 = r21.size();\t Catch:{ IOException -> 0x00ce }\n r0 = r22;\n r9 = (int) r0;\n r0 = r19;\n if (r0 != r9) goto L_0x002e;\n L_0x0020:\n r21 = 1;\n r0 = r19;\n r1 = r21;\n if (r0 < r1) goto L_0x002e;\n L_0x0028:\n r21 = 1;\n r0 = r21;\n if (r9 >= r0) goto L_0x003c;\n L_0x002e:\n r21 = 0;\n r25.close();\t Catch:{ IOException -> 0x0037 }\n r26.close();\t Catch:{ IOException -> 0x0037 }\n L_0x0036:\n return r21;\n L_0x0037:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x0036;\n L_0x003c:\n r21 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n r0 = r19;\n r1 = r21;\n if (r0 > r1) goto L_0x00b4;\n L_0x0044:\n r6 = r19;\n L_0x0046:\n r20 = r19 / r6;\n r21 = 5;\n r0 = r20;\n r1 = r21;\n if (r0 < r1) goto L_0x00b7;\n L_0x0050:\n r14 = 5;\n L_0x0051:\n r21 = r6 * r14;\n r20 = r19 - r21;\n r15 = r20 / r14;\n r3 = 1;\n r5 = 0;\n r4 = 0;\n r16 = 0;\n r0 = new byte[r6];\t Catch:{ IOException -> 0x00ce }\n r18 = r0;\n r0 = new byte[r6];\t Catch:{ IOException -> 0x00ce }\n r17 = r0;\n r5 = new java.io.BufferedInputStream;\t Catch:{ IOException -> 0x00ce }\n r0 = r25;\n r5.<init>(r0);\t Catch:{ IOException -> 0x00ce }\n r4 = new java.io.BufferedInputStream;\t Catch:{ IOException -> 0x00ce }\n r0 = r26;\n r4.<init>(r0);\t Catch:{ IOException -> 0x00ce }\n r12 = 0;\n L_0x0073:\n if (r12 >= r14) goto L_0x00bf;\n L_0x0075:\n if (r3 == 0) goto L_0x00bf;\n L_0x0077:\n r21 = 0;\n r0 = r18;\n r1 = r21;\n r5.read(r0, r1, r6);\t Catch:{ IOException -> 0x00ce }\n r21 = 0;\n r0 = r17;\n r1 = r21;\n r4.read(r0, r1, r6);\t Catch:{ IOException -> 0x00ce }\n r21 = r6 + r15;\n r16 = r16 + r21;\n r0 = r16;\n r0 = (long) r0;\t Catch:{ IOException -> 0x00ce }\n r22 = r0;\n r0 = r22;\n r5.skip(r0);\t Catch:{ IOException -> 0x00ce }\n r0 = r16;\n r0 = (long) r0;\t Catch:{ IOException -> 0x00ce }\n r22 = r0;\n r0 = r22;\n r4.skip(r0);\t Catch:{ IOException -> 0x00ce }\n r13 = 0;\n L_0x00a2:\n if (r13 >= r6) goto L_0x00bc;\n L_0x00a4:\n if (r3 == 0) goto L_0x00bc;\n L_0x00a6:\n r21 = r18[r13];\t Catch:{ IOException -> 0x00ce }\n r22 = r17[r13];\t Catch:{ IOException -> 0x00ce }\n r0 = r21;\n r1 = r22;\n if (r0 != r1) goto L_0x00ba;\n L_0x00b0:\n r2 = 1;\n L_0x00b1:\n r13 = r13 + 1;\n goto L_0x00a2;\n L_0x00b4:\n r6 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n goto L_0x0046;\n L_0x00b7:\n r14 = r20;\n goto L_0x0051;\n L_0x00ba:\n r2 = 0;\n goto L_0x00b1;\n L_0x00bc:\n r12 = r12 + 1;\n goto L_0x0073;\n L_0x00bf:\n r25.close();\t Catch:{ IOException -> 0x00c9 }\n r26.close();\t Catch:{ IOException -> 0x00c9 }\n L_0x00c5:\n r21 = r2;\n goto L_0x0036;\n L_0x00c9:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00c5;\n L_0x00ce:\n r10 = move-exception;\n r10.printStackTrace();\t Catch:{ all -> 0x00df }\n r2 = 0;\n r25.close();\t Catch:{ IOException -> 0x00da }\n r26.close();\t Catch:{ IOException -> 0x00da }\n goto L_0x00c5;\n L_0x00da:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00c5;\n L_0x00df:\n r21 = move-exception;\n r25.close();\t Catch:{ IOException -> 0x00e7 }\n r26.close();\t Catch:{ IOException -> 0x00e7 }\n L_0x00e6:\n throw r21;\n L_0x00e7:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00e6;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.sec.clipboard.data.list.ClipboardDataBitmap.compareFile(java.io.FileInputStream, java.io.FileInputStream):boolean\");\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\tpublic static int fillHM(String fileName) throws Exception{\r\n\t\t//System.out.println(\"fileName:\"+fileName);\r\n\t\tcat.info(\"fileName:\"+fileName);\r\n\t\tif(hm == null){\r\n\t\t\thm = new HashMap();\r\n\t\t}\r\n//\t\tString fileURL = URL + fileName;\r\n\t\tString fileURL = fileName;\r\n\t\tFileInputStream in = new FileInputStream(fileURL);\r\n\t\tint len = in.available();\r\n\t\t////System.out.println(len);\r\n\t\tbyte[] bt = new byte[len];\r\n\t\tin.read(bt);\r\n\t\t////System.out.println(len);\r\n\t\t\r\n\t\tint pjz = Integer.parseInt(buffer);\r\n\t\tint zs = len/pjz;\r\n\t\tint xs = len%pjz;\r\n\t\t\r\n\t\tint count = 0;\r\n\t\tif(zs==0&&xs==0){\r\n\t\t\tcount = 0;\r\n\t\t}else if(zs==0&&xs!=0){\r\n\t\t\tcount = 1;\r\n\t\t}else if(zs!=0&&xs==0){\r\n\t\t\tcount = zs;\r\n\t\t}else if(zs!=0&&xs!=0){\r\n\t\t\tcount = zs + 1;\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<count-1;i++){\r\n\t\t\tbyte[] bt_i = new byte[pjz];\r\n\t\t\tSystem.arraycopy(bt,i*pjz,bt_i,0,pjz);\r\n\t\t\thm.put(fileName+\"[\"+String.valueOf(i)+\"]\",bt_i);\r\n\t\t}\r\n\t\tbyte[] bt_end = new byte[len-(count-1)*pjz];\r\n\t\tSystem.arraycopy(bt,(count-1)*pjz,bt_end,0,len-(count-1)*pjz);\r\n\t\thm.put(fileName+\"[\"+(count-1)+\"]\",bt_end);\r\n\t\t\r\n//\t\ti_count = count;\r\n//\t\tSystem.out.println(\"count-----------\"+count);\r\n\t\treturn count;\r\n\t}", "public Vector<file> count()\n {\n Vector<Model.file> files = new Vector<>();\n try\n {\n pw.println(11);\n\n files = (Vector<Model.file>) ois.readObject();\n\n }\n catch (ClassNotFoundException | IOException e)\n {\n System.out.println(e.getMessage());\n }\n return files ;\n }", "public static void main(String[] args) throws IOException {\n String last = \"\";\n HashSet<String> types = new HashSet<String>();\n\n int c = 0;\n try {\n FileReader fr = new FileReader(inDir + \"fr\" + \"/wkd_uris_selection\");\n BufferedReader br = new BufferedReader(fr);\n String line;\n while ((line = br.readLine()) != null) {\n addToFile(line);\n c++;\n //if(c > 100) break;\n }\n\n fw.close();\n br.close();\n } catch (FileNotFoundException fne) {// TODO\n fne.printStackTrace();\n } catch (IOException ioe) {// TODO\n ioe.printStackTrace();\n }\n\n }", "public double calculateFirstOccurrence(Token token, FileData file) {\n\t\t\n\t\treturn 1 - ((double) token.getBeginIndex() / file.getQttyTerms());\n\t}", "public GCFile(final File file, final int count) {\n\t\tthis.file = file;\n\t\tthis.count = count;\n\t}", "static void solution1Day1Part2() {\n\n Scanner file = null;\n Set<Integer> resultingFrequencies = new HashSet<>();\n int resultingFrequency = 0;\n int change = 0;\n boolean duplicateFound = false;\n\n try {\n while (!duplicateFound) {\n\n file = new Scanner(new FileReader(\"src/main/java/weekone/input01.txt\"));\n\n while (file.hasNext()) {\n //System.out.println(\"\\nCurrent frequency is: \" + resultingFrequency);\n change = file.nextInt();\n resultingFrequency += change;\n //System.out.println(\"Change of: \" + change);\n //System.out.println(\"Resulting frequency is: \" + resultingFrequency);\n\n if (resultingFrequencies.contains(resultingFrequency)) {\n System.out.println(\"\\nDay1 Part2 - The first duplicate resulting frequency is: \" + resultingFrequency);\n duplicateFound = true;\n break;\n }\n resultingFrequencies.add(resultingFrequency);\n }\n file.close();\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "public double nextDoubleOpen() {\n\tdouble result = d1 / POW3_33;\n\tnextIterate();\n\treturn result;\n }", "public static void main(String[] args) {\n FileInputStream fis =null;\r\n int num; \r\n int contador=0;\r\n \r\n try {\r\n fis = new FileInputStream(\"EnterosGrabadosComoBytes.dat\");\r\n \r\n num= fis.read();\r\n while (num !=-1){\r\n contador++;\r\n System.out.print(num+\" \");\r\n System.out.flush();\r\n num= fis.read(); //leo el sgte num \r\n }\r\n System.out.println(\"\\nYa no hay mas numeros en el fichero\");\r\n System.out.println(\"El total de números es \"+contador);\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error no encuentro el fichero\"); \r\n } catch (IOException ex) {\r\n System.out.println(\"Error en lectura\");}\r\n \r\n }", "public DoubleValue(int n) {\n\t\ttimesToWrite = n;\n\t}", "public synchronized File mo13094a(long j) {\n File d;\n d = m5344d();\n if (d == null) {\n d = m5342c(j);\n }\n return d;\n }", "public static void main(String[] args) throws FileNotFoundException {\nint zbir=0;\n\n\t\tFileReader file=new FileReader(\"maraton.txt\");\n\nArrayList<Integer> lista = new ArrayList<>();\nScanner input=new Scanner(file);\n\nwhile (input.hasNext()) {\n\t\nString ime = input.next();\n\nlista.add(input.nextInt());\n}\nfor(int i=0; i<lista.size();i++) {\n\n\t zbir += lista.get(i);\n\t \n\t\n}\nSystem.out.println(\"Zbir je :\" +zbir);\n\t System.out.println(\"Prosjek je :\" + (zbir/lista.size()));\n\n}", "public static void SequentialExecution(String path) {\n\t\tFile folder = new File(path);\n\t\tFile[] listoffiles = folder.listFiles();\n\t\tString content;\n\t\tMyThread ob = new MyThread();\n\t\tfor (int i=0; i < listoffiles.length; i++) {\n\t\t\tGZIPInputStream gzip = null;\n\t\t\ttry {\n\t\t\t\t//System.out.println(\"file :\" +listoffiles[i]);\n\t\t\t\tgzip = new GZIPInputStream(new FileInputStream(listoffiles[i]));\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(gzip));\n\t\t\ttry {\n\t\t\t\twhile ((content = br.readLine()) != null){\n\t\t\t\t\t// perform sanity test\n\t\t\t\t\tcontent = content.replaceAll(\"\\\"\", \"\");\n\t\t\t\t\tString formatedData = content.replaceAll(\", \", \":\");\n\t\t\t\t\tString[] data = formatedData.split(\",\");\n\t\t\t\t\tif (data.length != 110) {\n\t\t\t\t\t\tfailure++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (ob.validData(data)) {\n\t\t\t\t\t\t\tsuccess++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfailure++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"valid : \" +success);\n\t\tSystem.out.println(\"Invalid : \" +failure);\n\t\t\n\t\tfor (Map.Entry<String, ArrayList<Float>> entry : MyThread.map_t.entrySet()) {\n\t\t\tArrayList<Float> list = entry.getValue();\n\t\t\tCollections.sort(list);\n\t\t\tif(list.size()%2 != 0) \n\t\t\t\tsol_median.put(entry.getKey(), list.get(list.size()/2)); \n\t else\n\t \tsol_median.put(entry.getKey(), (list.get(list.size()/2) + list.get(list.size()/2 - 1))/2);\n\t\t\tfloat sum = 0;\n\t\t\t\n\t\t\tint size = entry.getValue().size();\n\t\t\tfor (int i=0; i<size; i++) {\n\t\t\t\tsum += entry.getValue().get(i);\n\t\t\t}\n\t\t\tsolution.put(entry.getKey(), sum/size);\n\t\t}\n\t\t\n\t\tHashMap<String, Float> result = sortedMap(solution);\n\t\tfor (Map.Entry<String, Float> entry : result.entrySet()) {\n\t\t\tSystem.out.println(entry.getKey()+\" \"+entry.getValue() + \" \" +sol_median.get(entry.getKey()));\n\t\t}\n\t}", "double sample();", "public static void main(String args[]) {\n\t\tString destination = \"C:\\\\Users\\\\VIIPL02\\\\Desktop\\\\hii\\\\kk_(1).jpg\";\n\t\t//System.out.println(destination);\n\t\t int index1= destination.lastIndexOf(\"_(\");\n \t int index2= destination.lastIndexOf(\")\");\n \t String rig_val=\"\";\n\t\t for(int k=2;k<(index2-index1);k++)\n \t\t rig_val=rig_val+destination.charAt(index1+k)+\"\";\n\t\t \n\t\t \n\t\t //System.out.println(rig_val);\n\t\tfor(int i=0;i<10000000;i++) {\n//\t\tdestination= destination.replace(\"_(\"+(destination.charAt((destination.lastIndexOf(\"(\")+1)))+\")\",\"_(\"+((Integer.parseInt((destination.charAt((destination.lastIndexOf(\"(\")+1)))+\"\" ))+1)+\")\").replace(\"_(\"+(destination.charAt((destination.lastIndexOf(\"(\")+1)))+\")\",\"_(\"+((Integer.parseInt((destination.charAt((destination.lastIndexOf(\"(\")+1)))+\"\" ))+1)+\")\");\n\t\t\t\n\t\t\n\t\t\tdestination=destination.replace(\"_(\"+rig_val+\")\",\"_(\"+(Integer.parseInt(rig_val)+1)+\")\");\n\t\t\trig_val=\"\"+(Integer.parseInt(rig_val)+1);\n\t\t\t//System.out.println(destination);\n\t\t}\n//\t\t //System.out.println( destination.replace(\"_(\"+(destination.charAt((destination.lastIndexOf(\"(\")+1)))+\")\",\"_(\"+((Integer.parseInt((destination.charAt((destination.lastIndexOf(\"(\")+1)))+\"\" ))+1)+\")\"));\n\n\t\t//System.out.println(\"completed\");\n\t}", "static void parseData(String filename) {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\t\t \n\t\t\tString line;\n\t\t String[] tokens;\n\t\t ArrayList<Double> temp;\n\t\t \n\t\t while ((line = br.readLine()) != null) {\n\t\t \ttemp = new ArrayList<Double>();\n\t\t \ttokens = line.split(\",\");\n\t\t \tfor(String s : tokens) {\n\t\t \t\ttemp.add(Double.parseDouble(s));\n\t\t \t}\n\t\t \tData.add(new Vector(temp));\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test32() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n File file0 = fileUtil0.getASINFile(\"\", \"v<B(aXlp#d/?cL2Q??\", \"i@\", \"g_\");\n assertNull(file0);\n }", "public static void main(String[] args) throws FileNotFoundException {\n final Scanner in = new Scanner(new FileInputStream(\"C:\\\\Projects\\\\Solutions\\\\src\\\\tests.txt\"));\r\n\r\n final int Q = in.nextInt();\r\n for (int q = 0; q < Q; q++) {\r\n final long a = in.nextLong();\r\n final long b = in.nextLong();\r\n final long k = in.nextLong();\r\n final int m = in.nextInt();\r\n\r\n final Complex result = exponentiate(new Complex(a, b), k, m);\r\n\r\n System.out.println(result.real + \" \" + result.imaginary);\r\n }\r\n }", "public static void WeightedVector() throws FileNotFoundException {\n int doc = 0;\n for(Entry<String, List<Integer>> entry: dictionary.entrySet()) {\n List<Integer> wtg = new ArrayList<>();\n List<Double> newList = new ArrayList<>();\n wtg = entry.getValue();\n int i = 0;\n Double mul = 0.0;\n while(i<57) {\n mul = wtg.get(i) * idfFinal.get(doc);\n newList.add(i, mul);\n i++;\n }\n wtgMap.put(entry.getKey(),newList);\n doc++;\n }\n savewtg();\n }", "public abstract File mo41087j();", "public void readInputFile(){\n no_of_videos = 5;\n video_size = new int [no_of_videos];\n\n }", "public ArrayList<Double> readFile(String m){\n ArrayList<Double> a = new ArrayList<Double>();\n Scanner r = null;\n try {\n File f = new File(m);\n r = new Scanner(f);\n String scan;\n while(r.hasNextLine()) {\n scan = r.nextLine();\n //System.out.println(scan);\n // look for comma because our price starts after comma\n int commaPosition = scan.indexOf(',');\n //go to next index of the string in one line\n int nextIndex = commaPosition + 1;\n // make a string named price to keep the price from one line\n //substring method takes two parameters- start point and end point(which is integers)\n //price = smaller string = \"2.50\", scan = bigger string = \"bananas,2.50\"\n String price = scan.substring(nextIndex,scan.length());\n double doublePrice = Double.parseDouble(price);\n //System.out.println(doublePrice);\n a.add(doublePrice);\n }\n } catch (FileNotFoundException ex) {\n\n } catch (IOException ex) {\n\n } finally {\n if(r!=null) r.close();\n }\n return a;\n\n }", "private void readFromFile(String filename) {\n\t\ttry {\n\t\t Scanner read = new Scanner(new File(filename));\n\t\t String line;\n\t\t int counter = 0;\n\t\t String temp;\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\t\t height = convertToInt(temp);\n\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\n\t\t length = convertToInt(temp);\n\t\t size = height*length;\n\t\t \n\t\t squares = new Square[size][size];\n\n\t\t while(read.hasNextLine()) {\n\t\t\t\tline = read.nextLine();\n\t\t \tfor (int i = 0; i < line.length(); i++) {\n\t\t \t temp = line.substring(i, i+1);\n\n\t\t \t if (temp.equals(\".\")) {\n\t\t \t\t\tsquares[counter][i] = new FindValue(0);\n\t\t \t } \n\t\t \t else {\n\t\t\t\t\t\tsquares[counter][i] = new PreFilled(convertToInt(temp));\n\t\t\t \t\t}\n\t\t \t}\n\t\t \tcounter++;\n\t\t }\n\t\t} catch(IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n }", "static void createDataForGraph() {\n double x = 2;\n String fileName = \"./lab1part2docs/dataRec.csv\";\n createFile(fileName);\n writeToFile(\"k,halfCounter,oneCounter,x=\" + x + \"\\n\", fileName);\n for (int k = 1; k <= 10000; k++) {\n Raise.runBoth(x, k);\n writeToFile(k + \",\" + Raise.recHalfCounter + \",\" + Raise.recOneCounter + '\\n', fileName);\n Raise.recHalfCounter = 0;\n Raise.recOneCounter = 0;\n }\n System.out.println(\"Finished\");\n }", "public static void main(String[] argv) {\n\t\t\n\t\tif (argv.length !=7){\n\t\t\tSystem.out.println(\"USAGE: executable <input_filename> <num_points_in_file> <dimension> <distribution[1..100]> <num_unique_query> <num_query> <slot>\\n\");\n\t\t\treturn ;\n\t\t}\n\t\t\nint type,num_mbr, extra,dim,DIMENSION,distribution,num_unique_query,POINTS;\nString filenm;\n\nint q,r,times,slot;\n\n\nfilenm = argv[0];\n\nPOINTS = Integer.parseInt(argv[1]);\nDIMENSION = Integer.parseInt(argv[2]);\n\ndistribution = Integer.parseInt(argv[3]);\n\nnum_unique_query = Integer.parseInt(argv[4]);\nq= Integer.parseInt(argv[5]);\nslot= Integer.parseInt(argv[6]);\n\ndouble[][][] pt =new double[POINTS+10][2][10];\t\t\n\t\t\n\t\t\t\t\t\n\t\t\t try {\n\t\t\t\t BufferedReader in = new BufferedReader(new FileReader(filenm));\n\t\t\t\t String str;\n//\t\t\t\t str = in.readLine();\n\t\t\t\t int i=0;\n\t\t\t\t while ((str = in.readLine()) != null && i != POINTS) {\n\t\t\t\t //System.out.println(str);\n\t\t\t\t str = in.readLine();\n\t\t\t\t String[] arr = str.split(\"\\t\");\t\t\t\t \n\t\t\t\t\t\tfor(int j=0;j<10;j++){\n\t\t\t\t\t\t\tpt[i][0][j] = Double.parseDouble(arr[j]);\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t str = in.readLine();\n\t\t\t\t arr = str.split(\"\\t\");\t\t\t\t \n\t\t\t\t \n\t\t\t\t\t\tfor(int j=0;j<10;j++){\n\t\t\t\t\t\t\tpt[i][1][j] = Double.parseDouble(arr[j]);\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t i++;\n\t\t\t\t }\n\t\t\t\t in.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t System.out.println(\"File Read Error Resource.in\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\tRandom rand = new Random();\n\t\t\tfor(int i2=0;i2 < slot; i2++){\n\t\t\t\tint rr= rand.nextInt(17);\n\t\t\t\tfor(int i1=0;i1 < q;){\n\n\t\t\t//while(q>0){\n\t\t\t\tif(rand.nextInt(100) < distribution){\n\t\t\t\t\t // Initialize random number generator.\n\t\n\t\t\t\t\t\tr = rand.nextInt(num_unique_query)* (int)((POINTS-10000)/(num_unique_query + rr));\n\t\t\t\t\t//cout <<\"random value \"<< r<< endl;\n\t\t\t\t\t// srand(pow(q,r));\n\t\t\t\t\t// srand(pow(q,r));\n\t\t\t\t\t//\ttimes=1;\n\t\t\t\t\t\ttimes =rand.nextInt(29) + 5 ;\n\n\t\t\t\t\t//\t\tfile>>dim;\t\n\t\t\t\t\t//\t\tfile>>num_mbr;\t\n\n\n\n\t\t\t\t\t\tfor(int k =0; k<times; k++){\n\t\t\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\t\t\ti1++;\n\t\t\t\t\t\tdouble r_1= 0.005 + (double)rand.nextInt(500)/10000.0;\n\t\t\t\t\t\tSystem.out.println(r_1);\n\n\t\t\t\t\t\tfor(int j=0;j<DIMENSION;j++){\n\t\t\t\t\t//\t\t\tcout<< pt[0][j];\n\t\t\t\t\t\t\tSystem.out.print(pt[r][0][j] + \"\\t\");\t\t\t\n\n\t\t\t\t\t\t\t}\t\n\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\t}\n\n\n\n\t\t\t\t}\n\t\t\t\telse{\t\t\t\t\t\t\t// nonpopular data \n\t\n\t\t\t\t\tfor(int idx =0 ; idx < 20 ; idx++){\n\t\n\t\t\t\t\t\t\tr = rand.nextInt(POINTS);\n\n\n\n\t\t\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\t\t\ti1++;\n\t\t\t\t\t\tdouble r_1= 0.005 + (double)rand.nextInt(500)/10000.0;\n\t\t\t\t\t\tSystem.out.println(r_1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t//\tcout<<r<<\"\\n\";\n\t\t\t\t\t\t\t\tfor(int j=0;j<DIMENSION;j++){\n\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tSystem.out.print(pt[r][0][j] + \"\\t\");\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\tSystem.out.println(\"\");\n\n\n\n\t\n\t\n\t\t\t\t\t}\t\n\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"-1\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t}", "public RandomAccessFile getCases() {\n \n return cases;\n}", "C3579d mo19710g(int i) throws IOException;", "public void addInMemory(double num) {\n memoryValue += SciCalculator.currentValue = num;\n }", "public static void main(String [] args){\n writeFile1(\"1234567890987654321\");\n }", "public List<Double> getData(String fileName,String sar_device, String sar_type) throws IOException {\n\t\tFileReader fr = new FileReader(\"./temp/\"+fileName);\n\t\tList<Double> resultListA = new ArrayList<Double>();\n\t\t \n\t\t//get the type:rxpck/txpck/rxkB...\n\t\tint i=getType(sar_type);\n\t\t \n\t\tresultListA=getdata(fr,sar_device,i);\n\t\treturn resultListA;\n\t}", "public void salvaPartita(String file) {\n\r\n }", "public static void createFile(double[] array){\n //String for the name of the file that's going to be created.\n String newFileName = \"results.csv\";\n\n //Create a file variable using the created file name\n try{\n File newFile = new File(newFileName);\n\n //Create new instance of PrintWriter to write into the new file\n FileWriter csvWriter = new FileWriter(newFile, false);\n //For each number, print the percentage into the file\n for(int i = 0; i < 9; i++){\n csvWriter.write((i+1) + \": \" + array[i] + \"%\\n\");\n }\n //Close the PrintWriter since we don't need it anymore.\n csvWriter.close();\n }\n catch(FileNotFoundException e){\n System.out.println(\"File not found\");\n }\n catch(IOException e){\n System.out.println(\"IO Exception\");\n }\n }", "public static void readfile(String FILENAME) {\n\t\tString[] parts = null;\n\t\t// Initialising s as 9100 since the cardinality for a src is 9060\n\t\tint s = 2500;\n\t\t// Choosing m\n\t\tint m = 500000000;\n\t\tArrayList<ArrayList<Integer>> UniversalHashList = new ArrayList<ArrayList<Integer>>();\n\t\tArrayList<ArrayList<Integer>> XsrcMasterList = new ArrayList<ArrayList<Integer>>();\n\t\tList masterDstList = new ArrayList<ArrayList<String>>();\n\t\tString[] BitArray = new String[m];\n\t\tPrintStream out = null;\n\t\ttry {\n\t\t\tout = new PrintStream(new FileOutputStream(\"output_virbitmap.csv\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString src = null;\n\t\tHashMap<String, List> srcDstMap = new HashMap<String, List>();\n\t\tArrayList<Integer> R = new ArrayList<Integer>();\n\t\tR = genRandomArray(s);\n\t\t// initializing bit array\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tBitArray[i] = \"False\";\n\t\t}\n\t\t// reading input file and writing to HashMap<src,dstlist>\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(FILENAME))) {\n\n\t\t\tString sCurrentLine;\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\tparts = sCurrentLine.trim().split(\"\\\\s+\");\n\t\t\t\tsrc = parts[0];\n\t\t\t\tString dst = parts[1];\n\t\t\t\tif (!srcDstMap.containsKey(src)) {\n\t\t\t\t\tArrayList<String> dstList = new ArrayList<String>();\n\t\t\t\t\tdstList.add(dst);\n\t\t\t\t\tsrcDstMap.put(src, dstList);\n\t\t\t\t\t// hashing(B,convertIPAddress(tokens[0]));\n\t\t\t\t} else\n\t\t\t\t\tsrcDstMap.get(src).add(dst);\n\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor (int i = 0; i < srcDstMap.size(); i++) {\n\t\t\tArrayList<Integer> masterHashList = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> XsrcList = new ArrayList<Integer>();\n\t\t\tUniversalHashList.add(masterHashList);\n\t\t\tXsrcMasterList.add(XsrcList);\n\t\t\t// System.out.println(\"XsrcmasterList\" + XsrcList);\n\n\t\t}\n\t\tIterator srcDstMapIt = srcDstMap.entrySet().iterator();\n\t\tfor (int i = 0; i < srcDstMap.size(); i++) {\n\t\t\tArrayList<Integer> XsrcList = XsrcMasterList.get(i);\n\t\t\tArrayList<Integer> masterHashList = UniversalHashList.get(i);\n\t\t\twhile (srcDstMapIt.hasNext()) {\n\t\t\t\tMap.Entry pair = (Map.Entry) srcDstMapIt.next();\n\t\t\t\tsrc = pair.getKey().toString();\n\t\t\t\tList dstList = (List) pair.getValue();\n\t\t\t\tmasterDstList.add(dstList);\n\t\t\t\tIterator dstListIt = dstList.iterator();\n\t\t\t\twhile (dstListIt.hasNext()) {\n\t\t\t\t\tint hashedSrc = masterHashSetGen(src, dstListIt.next().toString(), s, R);\n\t\t\t\t\t// String[] partsGeneratedStuff =\n\t\t\t\t\t// generatedStuff.trim().split(\":\");\n\t\t\t\t\t// String generatedIndex = partsGeneratedStuff[0];\n\t\t\t\t\t// String hashedSrc = partsGeneratedStuff[1];\n\t\t\t\t\tmasterHashList.add(hashedSrc % BitArray.length);\n\t\t\t\t\t// System.out.println(masterHashList);\n\t\t\t\t\tXsrcList.add(hashedSrc);\n\t\t\t\t\t// System.out.println(XsrcList);\n\t\t\t\t\tBitArray[Math.abs(hashedSrc % (BitArray.length))] = \"True\";\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tdouble bitMapCount = BitMapCount(BitArray, BitArray.length, s);\n\t\t// System.out.println(\"bitMapCount\"+bitMapCount);\n\n\t\tint XsrcIndexperDst = 0;\n\t\tIterator srcDstMapItrecons = srcDstMap.entrySet().iterator();\n\t\twhile (srcDstMapItrecons.hasNext()) {\n\t\t\tdouble XsrcRatio;\n\t\t\tMap.Entry pair = (Map.Entry) srcDstMapItrecons.next();\n\t\t\tsrc = pair.getKey().toString();\n\t\t\t// System.out.println(\"src\" + src);\n\t\t\tList dstList = (List) pair.getValue();\n\t\t\tmasterDstList.add(dstList);\n\t\t\tIterator dstListIt = dstList.iterator();\n\t\t\tString[] srcArray = new String[s];\n\t\t\tdouble count = 0;\n\t\t\t\twhile(dstListIt.hasNext()) {\n\t\t\t\t\tXsrcIndexperDst = XsrcIndexperDst(XsrcMasterList, masterDstList, s, BitArray, src,dstListIt.next().toString(), R) % m;\n\t\t\t\t\t// System.out.println(\"Value\"+BitArray[XsrcIndexperDst]);\n\t\t\t\t\tif (BitArray[XsrcIndexperDst] == \"True\") {\n\t\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\t}\n\t\t\t//System.out.println(\"count per source\" + count + \",\" + (s - count));\n\t\t\tXsrcRatio = -s * Math.log((s-count)/s);\n\t\t\tdouble estimatedSpread = -bitMapCount + XsrcRatio;\n\t\t\tif(estimatedSpread<=0)\n\t\t\t{\n\t\t\t\testimatedSpread=0;\n\t\t\t}\n\t\t\tout.println(dstList.size() + \",\" + estimatedSpread);\n\t\t}\n\n\t}", "private static void generateSequence() throws FileNotFoundException {\n Scanner s = new Scanner(new BufferedReader(new FileReader(inputPath + filename)));\n\t\tlrcSeq = new ArrayList<Integer>();\n\t\tmeloSeq = new ArrayList<Integer>();\n\t\tdurSeq = new ArrayList<Integer>();\n\t\t\n\t\tString line = null;\n\t\tint wordStress;\n\t\tint pitch;\n\t\tint melStress;\n\t\tint stress;\n\t\tint duration;\n\t\t\n\t\twhile(s.hasNextLine()) {\n\t\t\tline = s.nextLine();\n\t\t\tString[] temp = line.split(\",\");\n\t\t\t\n\t\t\twordStress = Integer.parseInt(temp[1]);\n\t\t\tpitch = Integer.parseInt(temp[2]);\n\t\t\tmelStress = Integer.parseInt(temp[3]);\n\t\t\tduration = Integer.parseInt(temp[4]);\n\t\t\t\n\n\t\t\t//combine word level stress and sentence level stress\n\t\t\tstress = wordStress * 3 + melStress;\n\t\t\t/*if(stress < 0 || stress > 9) {\n\t\t\t\tSystem.out.println(\"Stress range error\");\n\t\t\t}*/\n\t\t\tlrcSeq.add(stress);\n\t\t\tmeloSeq.add(pitch);\n\t\t\tdurSeq.add(duration);\n\t\t}\n\t\t\n\t\t//calculate relative value\n\t\tfor(int i = 0;i < lrcSeq.size() -1;++i) {\n\t\t\tlrcSeq.set(i, lrcSeq.get(i+1)-lrcSeq.get(i));\n\t\t\tmeloSeq.set(i, meloSeq.get(i+1) - meloSeq.get(i));\n\t\t\tif(durSeq.get(i+1) / durSeq.get(i)>=1)\n\t\t\t\tdurSeq.set(i, durSeq.get(i+1) / durSeq.get(i));\n\t\t\telse \n\t\t\t\tdurSeq.set(i,durSeq.get(i) / durSeq.get(i+1) * (-1));\n\t\t}\n\t\tlrcSeq.remove(lrcSeq.size()-1);\n\t\tmeloSeq.remove(meloSeq.size()-1);\n\t\tdurSeq.remove(durSeq.size()-1);\n\t\t\n\t}", "private void get_values(File f1){\n String line;\n Scanner read_file=null;\n try{\n read_file= new Scanner(f1);\n }catch(FileNotFoundException e){\n System.out.println(\"The specified file of the Student cannot be found.\");\n return;\n }\n line=read_file.nextLine();\n while(!(line.contains(\"OOP\"))){\n line=read_file.nextLine();\n }\n line=read_file.nextLine();\n while(!(line.contains(\"Chap_1\"))){\n line=read_file.nextLine();\n }\n //System.out.println(line.substring(8));\n OOP[0]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n OOP[1]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n OOP[2]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n OOP[3]=Float.parseFloat(line.substring(8));\n\n line=read_file.nextLine();\n while(!(line.contains(\"DE\"))){\n line=read_file.nextLine();\n }\n line=read_file.nextLine();\n while(!(line.contains(\"Chap_1\"))){\n line=read_file.nextLine();\n }\n DE[0]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n DE[1]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n DE[2]=Float.parseFloat(line.substring(8));\n\n line=read_file.nextLine();\n while(!(line.contains(\"DSA\"))){\n line=read_file.nextLine();\n }\n line=read_file.nextLine();\n while(!(line.contains(\"Chap_1\"))){\n line=read_file.nextLine();\n }\n DSA[0]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n DSA[1]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n DSA[2]=Float.parseFloat(line.substring(8));\n\n line=read_file.nextLine();\n line=read_file.nextLine();\n total_marks=Float.parseFloat(line.substring(13));\n average=total_marks/10;\n\n read_file.close();\n }", "private void gatherFile(FileStatus[] fstat)\r\n\t{\r\n\t inputSize = 0;\t\r\n\t paths = new Path[fstat.length];\t\r\n\t for(int i=0;i<fstat.length;i++)\r\n\t {\r\n\t inputSize+=fstat[i].getLen();\r\n\t paths[i] = fstat[i].getPath();\r\n\t }\r\n\t }", "public static void main(String[] args) throws FileNotFoundException {\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter a file of scores: \");\n String fileName = input.next();\n File file = new File(fileName);\n int numberOfScores = 0;\n double totalScores = 0;\n double avarege = 0;\n if (!file.exists()) {\n throw new FileNotFoundException();\n }\n\n try (\n Scanner inputFile = new Scanner(file);\n ) {\n while (inputFile.hasNext()) {\n totalScores += Double.parseDouble(inputFile.next());\n numberOfScores++;\n }\n\n }\n avarege = totalScores / numberOfScores;\n System.out.println(\"Total Score: \" + totalScores +\n \"\\nAvarage: \" + avarege);\n }", "public String getFirstFilename() {\n\t\tTreeMap<Double,File> tm = new TreeMap<Double,File>();\n\t\tFile file=new File(\"C:\\\\temp\");\n\t\tFile subFile[] = file.listFiles();\n\t\tint fileNum = subFile.length;\n\t\tfor (int i = 0; i < fileNum; i++) {\n\t\t Double tempDouble = new Double(subFile[i].lastModified());\n\t\t tm.put(tempDouble, subFile[i]);\n\t\t }\t \n\t\tint count=0;\n\t\tString fileName=null;\n\t\tSet<Double> set = tm.keySet();\n\t\tIterator<Double> it = set.iterator();\n\t\twhile (it.hasNext()) {\n\t\t Object key = it.next();\n\t\t Object objValue = tm.get(key);\n\t\t File tempFile = (File) objValue;\n\t\t if(count==fileNum-2)\n\t\t\t fileName=tempFile.getName();\n\t\t count++;\n\t\t }\n\t\tSystem.out.println(\"第一个log的文件名称-->\"+fileName);\n\t\treturn fileName;\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter filename: \");\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString filename = scanner.nextLine();\n\t\tBufferedReader fileReader = null;\n\t\tint[] counts = new int[10];\n\t\tint total = 0;\n\t\ttry {\n\t\t\tfileReader = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile ((line = fileReader.readLine()) != null) {\n\t\t\t\tif(line.length() > 0) {\n\t\t\t\t\tString[] parts = line.split(\" \");\n\t\t\t\t\tint num;\n\t\t\t\t\tif(parts.length > 0) {\n\t\t\t\t\t\tnum = Integer.parseInt(parts[parts.length - 1]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnum = Integer.parseInt(line); \n\t\t\t\t\t}\n\t\t\t\t\tint firstDigit = firstDigit(num);\n\t\t\t\t\tcounts[firstDigit]++;\n\t\t\t\t\ttotal++;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(int i = 1; i < counts.length; i++) {\n\t\t\tSystem.out.printf(\"%d : %d : %.2f%%\\n\", i, counts[i], counts[i] * 100. / total);\n\t\t}\n\t}", "public double nextDouble() {\n\tdouble result = (d1 - 1.0) / (POW3_33 - 1.0);\n\tnextIterate();\n\treturn result;\n }", "public abstract File mo41088k();", "public Student[] constructArray(String fileName)throws IOException{\n \n Student[] ans = new Student[10];\n Scanner Sc = new Scanner(new File(fileName));\n Sc.useDelimiter(\"\\t|\\n\");\n this.amount = 0;\n while(Sc.hasNext()){\n if(this.amount == ans.length){\n ans = doubler(ans);\n }\n String ID = Sc.next();\n String SName = Sc.next();\n String Email = Sc.next();\n String SClass = Sc.next();\n String major = Sc.next();\n ans[this.amount] = new Student(ID, SName, Email, SClass, major);\n amount++;\n }\n return ans;\n }", "private static ArrayList<Double> autoInput() {\n\t\tArrayList<Double> cumData = new ArrayList<Double>();\n\t\tString workingDir = System.getProperty(\"user.dir\");\n\n\t\tSystem.out.println(AUTO_MSG);\n\t\tin = new Scanner(System.in);\n\n\t\twhile (true) {\n\t\t\tString filename = in.nextLine();\n\t\t\tString path = workingDir + File.separator + filename;\n\t\t\tFile file = new File(path);\n\t\t\tif (!file.canRead()) {\n\t\t\t\tSystem.out.println(\"Can\\'t read file! Please try again.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Good until this point\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(file));\n\t\t\t\tString line = null;\n\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\tSystem.out.println(\"Line: \" + line);\n\t\t\t\t\tcumData.addAll(strToArrList(line));\n\t\t\t\t}\n\t\t\t\t// if (line == null)\n\t\t\t\treturn cumData;\n\t\t\t\t// cumData.addAll(strToArrList(line));\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(FILE_FORMAT_ERR_MSG);\n\t\t\t\tcontinue;\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(FILE_NOT_FOUND_MSG);\n\t\t\t\tcontinue;\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t}\n\t}", "public static void readDirectory(String dir){\n\t\tMap<Integer,Integer> catemap = new HashMap<Integer, Integer>();\r\n\t\tFile[] names = null;\r\n\t\tFile file = new File(dir);\r\n\t\tif(file.isFile())\r\n\t\t\tnames = new File[]{file};\r\n\t\telse\r\n\t\t\tnames = new File(dir).listFiles();\r\n\t\tList<String> lines = null;\r\n\t\tList<String> strs = null;\r\n\t\tList<Integer> keys = new ArrayList<Integer>();\r\n\t\tList<Integer> values = new ArrayList<Integer>();\r\n\t\tint v = 0;\r\n\t\tif(null!=names&&names.length>0){\r\n\t\t\tfor(File f:names){\r\n\t\t\t\tif(null!=lines)\r\n\t\t\t\t\tlines.clear();\r\n\t\t\t\tlines = readFile(f,\"utf-8\");\r\n\t\t\t\tif(null!=lines){\r\n\t\t\t\t\tint j = 0;\r\n\t\t\t\t\tint k=0;\r\n\t\t\t\t\tfor(String line:lines){\r\n\t\t\t\t\t\tstrs = parseStr2List(line, \"\\\\t\");\r\n//\t\t\t\t\t\tif(null!=strs&&strs.size()==7){\r\n//\t\t\t\t\t\t\tv = getPerValue(strs.get(3));\r\n//\t\t\t\t\t\t\tmaxmap.put(v, 1+DataFormat.parseInt(maxmap.get(v)));\r\n//\t\t\t\t\t\t\tv = getPerValue(strs.get(5));\r\n//\t\t\t\t\t\t\tcatemap.put(v, 1+DataFormat.parseInt(catemap.get(v)));\r\n//\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(null!=strs&&strs.size()==2){\r\n\t\t\t\t\t\t\tv = DataFormat.parseInt(strs.get(0));\r\n//\t\t\t\t\t\t\tif(v<=500){\r\n//\t\t\t\t\t\t\t\tv = j/5+1;\r\n//\t\t\t\t\t\t\t\tj = j+1;\r\n//\t\t\t\t\t\t\t}else{\r\n//\t\t\t\t\t\t\t\tv = 101;\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(k>500) break;\r\n\t\t\t\t\t\t\tk++;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(j<20){\r\n\t\t\t\t\t\t\t\tkeys.add(v);\r\n\t\t\t\t\t\t\t\tvalues.add(DataFormat.parseInt(strs.get(1)));\r\n\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(keys.toArray(new Integer[]{})));\r\n\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(values.toArray(new Integer[]{})));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n//\t\t\t\t\t\t\tcatemap.put(v, DataFormat.parseInt(strs.get(1))+DataFormat.parseInt(catemap.get(v)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\tfor(Entry<Integer, Integer> entry:maxmap.entrySet()){\r\n//\t\t\tUtils.appendToFile(\"/vol/user_log/maxmap.txt\", entry.getKey()+\"\\t\"+entry.getValue());\r\n//\t\t}\r\n//\t\tfor(Entry<Integer, Integer> entry:catemap.entrySet()){\r\n//\t\t\tUtils.appendToFile(\"C:\\\\Program Files\\\\SecureCRT\\\\download\\\\map.txt\", entry.getKey()+\"\\t\"+entry.getValue());\r\n//\t\t}\r\n\t}", "public Vector loadAffyGCOSExpressionFile(File f) throws IOException {\r\n \tthis.setTMEVDataType();\r\n final int preSpotRows = this.sflp.getXRow()+1;\r\n final int preExperimentColumns = this.sflp.getXColumn();\r\n int numLines = this.getCountOfLines(f);\r\n int spotCount = numLines - preSpotRows;\r\n\r\n if (spotCount <= 0) {\r\n JOptionPane.showMessageDialog(superLoader.getFrame(), \"There is no spot data available.\", \"TDMS Load Error\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n \r\n int[] rows = new int[] {0, 1, 0};\r\n int[] columns = new int[] {0, 1, 0};\r\n //String value,pvalue;\r\n String detection;\r\n\r\n float cy3, cy5;\r\n\r\n String[] moreFields = new String[1];\r\n String[] extraFields=null;\r\n final int rColumns = 1;\r\n final int rRows = spotCount;\r\n \r\n ISlideData slideDataArray[]=null;\r\n AffySlideDataElement sde=null;\r\n FloatSlideData slideData=null;\r\n \r\n BufferedReader reader = new BufferedReader(new FileReader(f));\r\n StringSplitter ss = new StringSplitter((char)0x09);\r\n String currentLine;\r\n int counter, row, column,experimentCount=0;\r\n counter = 0;\r\n row = column = 1;\r\n this.setFilesCount(1);\r\n this.setRemain(1);\r\n this.setFilesProgress(0);\r\n this.setLinesCount(numLines);\r\n this.setFileProgress(0);\r\n float[] intensities = new float[2];\r\n \r\n while ((currentLine = reader.readLine()) != null) {\r\n if (stop) {\r\n return null;\r\n }\r\n// fix empty tabbs appending to the end of line by wwang\r\n while(currentLine.endsWith(\"\\t\")){\r\n \tcurrentLine=currentLine.substring(0,currentLine.length()-1);\r\n }\r\n ss.init(currentLine);\r\n \r\n if (counter == 0) { // parse header\r\n \t\r\n \tif(sflp.onlyIntensityRadioButton.isSelected()) \r\n \t\texperimentCount = ss.countTokens()- preExperimentColumns;\r\n \t\t\r\n \tif(sflp.intensityWithDetectionRadioButton.isSelected()) \r\n \t\texperimentCount = (ss.countTokens()+1- preExperimentColumns)/2;\r\n \t\t\r\n \tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()) \r\n \t\texperimentCount = (ss.countTokens()+1- preExperimentColumns)/3;\r\n \t\r\n \t\r\n \tslideDataArray = new ISlideData[experimentCount];\r\n \tSampleAnnotation sampAnn=new SampleAnnotation();\r\n \tslideDataArray[0] = new SlideData(rRows, rColumns, sampAnn);//Added by Sarita to include SampleAnnotation model.\r\n \r\n slideDataArray[0].setSlideFileName(f.getPath());\r\n for (int i=1; i<experimentCount; i++) {\r\n \tsampAnn=new SampleAnnotation();\r\n \tslideDataArray[i] = new FloatSlideData(slideDataArray[0].getSlideMetaData(),spotCount, sampAnn);//Added by Sarita \r\n \tslideDataArray[i].setSlideFileName(f.getPath());\r\n \t//System.out.println(\"slideDataArray[i].slide file name: \"+ f.getPath());\r\n }\r\n if(sflp.onlyIntensityRadioButton.isSelected()){\r\n \tString [] fieldNames = new String[1];\r\n \t//extraFields = new String[1];\r\n \tfieldNames[0]=\"AffyID\";\r\n \tslideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n }else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \tString [] fieldNames = new String[2];\r\n \textraFields = new String[1];\r\n fieldNames[0]=\"AffyID\";\r\n fieldNames[1]=\"Detection\";\r\n slideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n }else{\r\n \tString [] fieldNames = new String[3];\r\n \textraFields = new String[2];\r\n fieldNames[0]=\"AffyID\";\r\n fieldNames[1]=\"Detection\";\r\n fieldNames[2]=\"P-value\";\r\n slideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n \r\n }\r\n ss.nextToken();//parse the blank on header\r\n for (int i=0; i<experimentCount; i++) {\r\n \tString val=ss.nextToken();\r\n\t\t\t\t\tslideDataArray[i].setSampleAnnotationLoaded(true);\r\n\t\t\t\t\tslideDataArray[i].getSampleAnnotation().setAnnotation(\"Default Slide Name\", val);\r\n\t\t\t\t\tslideDataArray[i].setSlideDataName(val);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.mav.getData().setSampleAnnotationLoaded(true);\r\n\t\t\t \t \r\n if(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \tss.nextToken();//parse the detection\r\n ss.nextToken();//parse the pvalue\r\n }else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \tss.nextToken();//parse the detection \r\n } \r\n }\r\n \r\n } else if (counter >= preSpotRows) { // data rows\r\n \trows[0] = rows[2] = row;\r\n \tcolumns[0] = columns[2] = column;\r\n \tif (column == rColumns) {\r\n \t\tcolumn = 1;\r\n \t\trow++;//commented by sarita\r\n \t\t\r\n \t\t\r\n \t} else {\r\n \t\tcolumn++;//commented by sarita\r\n \t\t\r\n \t\t\r\n \t}\r\n\r\n \t//affy ID\r\n \tmoreFields[0] = ss.nextToken();\r\n \r\n \t\r\n \t\r\n String cloneName = moreFields[0];\r\n if(_tempAnno.size()!=0) {\r\n \t \r\n \t \t \r\n \t if(((MevAnnotation)_tempAnno.get(cloneName))!=null) {\r\n \t\t MevAnnotation mevAnno = (MevAnnotation)_tempAnno.get(cloneName);\r\n\r\n \t\t sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, intensities, moreFields, mevAnno);\r\n \t }else {\r\n \t /**\r\n \t * Sarita: clone ID explicitly set here because if the data file\r\n \t * has a probe (for eg. Affy house keeping probes) for which Resourcerer\r\n \t * does not have annotation, MeV would still work fine. NA will be\r\n \t * appended for the rest of the fields. \r\n \t * \r\n \t * \r\n \t */\r\n \t\tMevAnnotation mevAnno = new MevAnnotation();\r\n \t\tmevAnno.setCloneID(cloneName);\r\n sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, new float[2], moreFields, mevAnno);\r\n \t \t\t \r\n }\r\n }\r\n /* Added by Sarita\r\n * Checks if annotation was loaded and accordingly use\r\n * the appropriate constructor.\r\n * \r\n * \r\n */\r\n \r\n else {\r\n sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, intensities, moreFields);\r\n }\r\n \r\n \t\r\n \t//sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, new float[2], moreFields);\r\n\r\n \tslideDataArray[0].addSlideDataElement(sde);\r\n \tint i=0;\r\n\r\n \tfor ( i=0; i<slideDataArray.length; i++) { \r\n \t\ttry {\t\r\n\r\n \t\t\t// Intensity\r\n \t\t\tintensities[0] = 1.0f;\r\n \t\t\tintensities[1] = ss.nextFloatToken(0.0f);\r\n \t\t\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\t\r\n \t\t\t\textraFields[0]=ss.nextToken();//detection\r\n \t\t\t\textraFields[1]=ss.nextToken();//p-value\r\n \t\t\t\t\r\n \t\t\t}else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\textraFields[0]=ss.nextToken();//detection\r\n \t\t\t}\r\n\r\n \t\t} catch (Exception e) {\r\n \t\t\t\r\n \t\t\tintensities[1] = Float.NaN;\r\n \t\t}\r\n \t\tif(i==0){\r\n \t\t\t\r\n \t\t\tslideDataArray[i].setIntensities(counter - preSpotRows, intensities[0], intensities[1]);\r\n \t\t\t//sde.setExtraFields(extraFields);\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\tsde.setDetection(extraFields[0]);\r\n \t\t\t\tsde.setPvalue(new Float(extraFields[1]).floatValue());\r\n \t\t\t}else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\tsde.setDetection(extraFields[0]);\r\n \t\t\t}\r\n \t\t}else{\r\n \t\t\tif(i==1){\r\n \t\t\t\tmeta = slideDataArray[0].getSlideMetaData(); \t\r\n \t\t\t}\r\n \t\t\tslideDataArray[i].setIntensities(counter-preSpotRows,intensities[0],intensities[1]);\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setDetection(counter-preSpotRows,extraFields[0]);\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setPvalue(counter-preSpotRows,new Float(extraFields[1]).floatValue());\r\n \t\t\t}\r\n \t\t\tif(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setDetection(counter-preSpotRows,extraFields[0]);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n\r\n } else {\r\n //we have additional sample annoation\r\n \r\n \tfor (int i = 0; i < preExperimentColumns - 1; i++) {\r\n\t\t\t\t\tss.nextToken();\r\n\t\t\t\t}\r\n\t\t\t\tString key = ss.nextToken();\r\n\r\n\t\t\t\tfor (int j = 0; j < slideDataArray.length; j++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(slideDataArray[j].getSampleAnnotation()!=null){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tString val=ss.nextToken();\r\n\t\t\t\t\t\tslideDataArray[j].getSampleAnnotation().setAnnotation(key, val);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tSampleAnnotation sampAnn=new SampleAnnotation();\r\n\t\t\t\t\t\t\tsampAnn.setAnnotation(key, ss.nextToken());\r\n\t\t\t\t\t\t\tslideDataArray[j].setSampleAnnotation(sampAnn);\r\n\t\t\t\t\t\t\tslideDataArray[j].setSampleAnnotationLoaded(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n \t}\r\n \t\r\n this.setFileProgress(counter);\r\n \tcounter++;\r\n \t//System.out.print(counter);\r\n \t}\r\n reader.close();\r\n \r\n \r\n Vector data = new Vector(slideDataArray.length);\r\n \r\n for(int j = 0; j < slideDataArray.length; j++)\r\n \tdata.add(slideDataArray[j]);\r\n \r\n this.setFilesProgress(1);\r\n return data;\r\n }", "private void joinFiles(String[] listFileContent, String filename0)\n\t{\n\t\tSystem.out.println(\"co vao day\");\n\t\tint[] start = new int[nu], next = new int[nu], copyPos = new int[nu];\n\t\tstart = intialStart();\n\t\tArrayList<Double> sumArray;\n\t\ttry {\n\t\t\tBufferedWriter out = new BufferedWriter(new FileWriter(filename0));\n\t\t\twhile (true)//while next1 = find (file1,+1)\n\t\t\t{\n\t\t\t\tnext = findNext(start, listFileContent);//find next\n\t\t\t\tif (checkNotFound(next)) break;\n\t\t\t\tcopyPos = findCopyPos(next);//find copyPos\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/*printNam(\"Day la next1: \");System.out.println(next1);\n\t\t\t\tprintNam(\"next2: \"); System.out.println(next2);\n\t\t\t\tprintNam(\"start1: \"); System.out.println(start1);\n\t\t\t\tprintNam(\"start2: \"); System.out.println(start2);\n\t\t\t\tprintNam(\"file: \"); System.out.println(index);*/\n\t\t\t\t//concatString = file1.substring(start1, copyPos1).concat(file2.substring(start2, copyPos2));\n\t\t\t\t\n\t\t\t\tsumArray = genConcatString(listFileContent, start, copyPos);\n\t\t\t\t\n\t\t\t\twriteToFile(out, sumArray);//write to 0.data.\n\t\t\t\t//update start\n\t\t\t\tstart = updateStart(next);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/*sumArray = genConcatString(listFileContent, start);\n\t\t\t\t\n\t\t\twriteToFile(out, sumArray);*/\n\t\t\t\t\n\t\t\tout.close();\n\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t}", "public ScanOperator(File file){\r\n\t\tthis.file = file;\r\n\t\ttry{\r\n\t\t br = new RandomAccessFile(this.file, \"r\");\r\n\t\t}catch(FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"File not found!\");\r\n\t\t}\r\n\t}", "private void readDataFile(int filetype, String filename) {\r\n\t\tint nfields=7; //number of data fields\r\n\t\tint i = 0; //temp elements counter\r\n\t\tint num_elements; //number of items (lines)\r\n\t\tString dataline;\r\n\t\tString[] elementdata;\r\n\t\ttry {\r\n\t\t\tFile filesource = new File(filename);\r\n\t\t\t//open data file\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(filesource.toURI().toURL().openStream()));\r\n\t\t\t//count elements\r\n\t\t\twhile(null != (dataline = in.readLine())) {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tnum_elements = i;\r\n\t\t\t//num_elements = i+1;\r\n\t\t\t//set arrays size by case\r\n\t\t\tif (filetype == 0) {\r\n\t\t\t\tsetMultipliersArraySize(num_elements);\r\n\t\t\t\tnfields = 3;\r\n\t\t\t}\r\n\t\t\telse if (filetype == 1) {\r\n\t\t\t\tsetCategoriesArraySize(num_elements);\r\n\t\t\t\tnfields = 1;\r\n\t\t\t}\r\n\t\t\telse if (filetype == 2) {\r\n\t\t\t\tsetUnitsArraySize(num_elements);\r\n\t\t\t\tnfields = 7;\r\n\t\t\t}\r\n\t\t\telse if (filetype == 3) {\r\n\t\t\t\tp_label = new String[i];\r\n\t\t\t\tnfields = 1;\r\n\t\t\t}\r\n\r\n\t\t\ti = 0;\r\n\t\t\tin = new BufferedReader(new InputStreamReader(filesource.toURI().toURL().openStream()));\r\n\t\t\t//read lines (each line is one menu element)\r\n\t\t\twhile(null != (dataline = in.readLine())) {\r\n\t\t\t\t//get element data array\r\n\t\t\t\telementdata = StringUtil.splitData(dataline, '\\t', nfields);\r\n\t\t\t\t//assign data\r\n\t\t\t\tif (filetype == 0) { //multipliers file\r\n\t\t\t\t\tp_multiplier_name[i] = getEncodedString(getDefaultValue(elementdata[0], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_multiplier_description[i] = getEncodedString(getDefaultValue(elementdata[1], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_multiplier_value[i] = parseNumber(getDefaultValue(elementdata[2], \"1\"));\r\n\t\t\t\t}\r\n\t\t\t\telse if (filetype == 1) { //category file\r\n\t\t\t\t\tp_category_name[i] = getEncodedString(getDefaultValue(elementdata[0], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t}\r\n\t\t\t\telse if (filetype == 2) { //units file\r\n\t\t\t\t\tp_unit_category_id[i] = new Integer(elementdata[0]);\r\n\t\t\t\t\tp_unit_symbol[i] = getEncodedString(getDefaultValue(elementdata[1], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_unit_name[i] = getEncodedString(getDefaultValue(elementdata[2], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_unit_scale[i] = parseNumber(getDefaultValue(elementdata[3], \"1\"));\r\n\t\t\t\t\tp_unit_offset[i] = parseNumber(getDefaultValue(elementdata[4], \"0\"));\r\n\t\t\t\t\tp_unit_power[i] = parseNumber(getDefaultValue(elementdata[5], \"1\"));\r\n\t\t\t\t\tp_unit_description[i] = getEncodedString(getDefaultValue(elementdata[6], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t}\r\n\t\t\t\telse if (filetype == 3) { //labels file\r\n\t\t\t\t\tp_label[i] = getEncodedString(getDefaultValue(elementdata[0], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "int attrib(int i, File v) {\n if (i < max) {\n AllFiles[i] = v;\n } else {\n File[] temp = new File[max];\n int j;\n for (j = 0; j < max; j++) temp[j] = AllFiles[j];\n AllFiles = new File[max + increase];\n for (j = 0; j < max; j++) AllFiles[j] = temp[j];\n max = max + increase;\n AllFiles[i] = v;\n }\n return (0);\n }", "@Test\r\n\tpublic void generateFile() {\n\t\tfor (int i = 1; i <= 5; i++) {\r\n\t\t\t// String filePath = \"C://Users//AtifKhan//Desktop//sample-\" + i +\r\n\t\t\t// \".csv\";\r\n\t\t\tString filePath = \"C://Users//olcay tarazan//Desktop//sample-\" + i + \".csv\";\r\n\t\t\tint numberOfDataLines = 400;\r\n\t\t\ttry {\r\n\t\t\t\tgenerateCsvFile(filePath, numberOfDataLines);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"File generated : sample-\" + i + \".csv \");\r\n\t\t}\r\n\t}", "public static double[] rawFreqCreator(){\n\t\tfinal int EXTERNAL_BUFFER_SIZE = 2097152;\n\t\t//128000\n\n\t\t//Get the location of the sound file\n\t\tFile soundFile = new File(\"MoodyLoop.wav\");\n\n\t\t//Load the Audio Input Stream from the file \n\t\tAudioInputStream audioInputStream = null;\n\t\ttry {\n\t\t\taudioInputStream = AudioSystem.getAudioInputStream(soundFile);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Get Audio Format information\n\t\tAudioFormat audioFormat = audioInputStream.getFormat();\n\n\t\t//Handle opening the line\n\t\tSourceDataLine\tline = null;\n\t\tDataLine.Info\tinfo = new DataLine.Info(SourceDataLine.class, audioFormat);\n\t\ttry {\n\t\t\tline = (SourceDataLine) AudioSystem.getLine(info);\n\t\t\tline.open(audioFormat);\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Start playing the sound\n\t\t//line.start();\n\n\t\t//Write the sound to an array of bytes\n\t\tint nBytesRead = 0;\n\t\tbyte[]\tabData = new byte[EXTERNAL_BUFFER_SIZE];\n\t\twhile (nBytesRead != -1) {\n\t\t\ttry {\n\t\t \t\tnBytesRead = audioInputStream.read(abData, 0, abData.length);\n\n\t\t\t} catch (IOException e) {\n\t\t \t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (nBytesRead >= 0) {\n\t\t \t\tint nBytesWritten = line.write(abData, 0, nBytesRead);\n\t\t\t}\n\n\t\t}\n\n\t\t//close the line \n\t\tline.drain();\n\t\tline.close();\n\t\t\n\t\t//Calculate the sample rate\n\t\tfloat sample_rate = audioFormat.getSampleRate();\n\t\tSystem.out.println(\"sample rate = \"+sample_rate);\n\n\t\t//Calculate the length in seconds of the sample\n\t\tfloat T = audioInputStream.getFrameLength() / audioFormat.getFrameRate();\n\t\tSystem.out.println(\"T = \"+T+ \" (length of sampled sound in seconds)\");\n\n\t\t//Calculate the number of equidistant points in time\n\t\tint n = (int) (T * sample_rate) / 2;\n\t\tSystem.out.println(\"n = \"+n+\" (number of equidistant points)\");\n\n\t\t//Calculate the time interval at each equidistant point\n\t\tfloat h = (T / n);\n\t\tSystem.out.println(\"h = \"+h+\" (length of each time interval in second)\");\n\t\t\n\t\t//Determine the original Endian encoding format\n\t\tboolean isBigEndian = audioFormat.isBigEndian();\n\n\t\t//this array is the value of the signal at time i*h\n\t\tint x[] = new int[n];\n\n\t\t//convert each pair of byte values from the byte array to an Endian value\n\t\tfor (int i = 0; i < n*2; i+=2) {\n\t\t\tint b1 = abData[i];\n\t\t\tint b2 = abData[i + 1];\n\t\t\tif (b1 < 0) b1 += 0x100;\n\t\t\tif (b2 < 0) b2 += 0x100;\n\t\t\tint value;\n\n\t\t\t//Store the data based on the original Endian encoding format\n\t\t\tif (!isBigEndian) value = (b1 << 8) + b2;\n\t\t\telse value = b1 + (b2 << 8);\n\t\t\tx[i/2] = value;\n\t\t\t\n\t\t}\n\t\t\n\t\t//do the DFT for each value of x sub j and store as f sub j\n\t\tdouble f[] = new double[n/2];\n\t\tfor (int j = 0; j < n/2; j++) {\n\n\t\t\tdouble firstSummation = 0;\n\t\t\tdouble secondSummation = 0;\n\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t \t\tdouble twoPInjk = ((2 * Math.PI) / n) * (j * k);\n\t\t \t\tfirstSummation += x[k] * Math.cos(twoPInjk);\n\t\t \t\tsecondSummation += x[k] * Math.sin(twoPInjk);\n\t\t\t}\n\n\t\t f[j] = Math.abs( Math.sqrt(Math.pow(firstSummation,2) + \n\t\t Math.pow(secondSummation,2)) );\n\n\t\t\tdouble amplitude = 2 * f[j]/n;\n\t\t\tdouble frequency = j * h / T * sample_rate;\n\t\t\tSystem.out.println(\"frequency = \"+frequency+\", amp = \"+amplitude);\n\t\t}\n\t\tSystem.out.println(\"DONE\");\n\t\treturn f;\n\t\t\n\t}" ]
[ "0.64843285", "0.6192742", "0.5850097", "0.5670009", "0.56388485", "0.5569738", "0.5567814", "0.5529964", "0.55221784", "0.54607415", "0.53907883", "0.53880584", "0.5384534", "0.5373062", "0.5350121", "0.5257411", "0.52378935", "0.5233628", "0.52258384", "0.52193993", "0.521704", "0.5208909", "0.5168997", "0.51504886", "0.5126325", "0.51024044", "0.50996685", "0.50857466", "0.5082414", "0.5080363", "0.5066481", "0.5066056", "0.5049725", "0.50483406", "0.5038564", "0.5025779", "0.500111", "0.5000416", "0.4995992", "0.49827006", "0.49758387", "0.4974921", "0.497067", "0.49683288", "0.49657917", "0.49657828", "0.4960449", "0.49561965", "0.49424174", "0.4940805", "0.49390662", "0.4931588", "0.49239254", "0.49188998", "0.49185663", "0.49055806", "0.48935184", "0.48865488", "0.48780546", "0.4875744", "0.48750603", "0.48691356", "0.4865007", "0.48642907", "0.48619378", "0.48602566", "0.48572698", "0.48506662", "0.48493087", "0.48483527", "0.48478204", "0.4839424", "0.48373276", "0.48358598", "0.48357275", "0.48354918", "0.48238266", "0.48198906", "0.48187056", "0.4818474", "0.48129207", "0.4812427", "0.48065665", "0.48012954", "0.48008013", "0.47808626", "0.47737065", "0.47709346", "0.47694752", "0.4751052", "0.47478545", "0.47445297", "0.47431508", "0.47381946", "0.47292858", "0.47254956", "0.47198534", "0.4719138", "0.47164908", "0.4715388" ]
0.4986726
39
repeated double file = 1;
double getFile(int index);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo80454a(File file, long j);", "public float[] accumulateSimpleSilentPeriodFiles(ArrayList<File> files){\r\n\t\t\tfloat[] values = new float[10];\r\n\t\t\tfloat[] returnValue = new float[10];\r\n\t\t\t\r\n\t\t for(File file:files){\t\t\t\t\t\r\n\t\t BufferedReader reader;\r\n\t\t try{\r\n\t\t reader = new BufferedReader(new FileReader(file));\r\n\t\t String line = reader.readLine(); \r\n\t\t while(line != null){\t\r\n\t\t \tif(!line.substring(0,1).equals(\"#\")){\r\n\t\t \t\tString[] values2 = line.split(\" \");\r\n\t\t \t\tSystem.out.println(file.getAbsolutePath());\r\n\t\t \t\tfor(int i = 1; i < values2.length; i++) {\r\n\t\t \t\t\tSystem.out.println(\"+ \" + values2[i]);\r\n\t\t \t\t\tvalues[i-1] += Float.valueOf(values2[i]);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t \tline = reader.readLine();\r\n\t\t }\r\n\t\t \r\n\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t System.err.println(\"FileNotFoundException: \" + e.getMessage());\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t System.err.println(\"Caught IOException: \" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t }\r\n\r\n\t\t for(int j = 0; j < values.length; j++) if(values[j] != 0) returnValue[j] = (float)values[j]/files.size();\r\n\t\t \r\n\t\t return returnValue;\r\n\t\t}", "private void doubleFunction(File file, ProbingHashTable doubleProb) throws FileNotFoundException{\n\t\tScanner numbers = new Scanner(file);\n\t\tint intervalCount = 0;\n\t\tdoubleProb = new DoubleProbingHashTable<Integer>(tableSize, R);\n\t\tprintTable(\"Double\");\n\t\twhile(numbers.hasNextInt() && intervalCount < inputs){\n\t\t\tdoubleProb.insert(numbers.nextInt());\n\t\t\tif(++intervalCount % interval == 0)\n\t\t\t\tdoubleProb.print(intervalCount);\n\t\t}\n\t\tnumbers.close();\n\t}", "public static void main(String[] args) {\n FilesParser filesParser = new FilesParser();\r\n ArrayList<Double> time = filesParser.get_timeList();\r\n Map<Double, ArrayList<Double>> expFile = new HashMap<>();\r\n ArrayList<Map<Double, ArrayList<Double>>> theorFiles = new ArrayList<>();\r\n\r\n try {\r\n expFile = filesParser.trimStringsAndGetData(0,\r\n filesParser.getDirectories()[0],\r\n filesParser.get_expFiles()[2]);\r\n List<String> fileList = filesParser.get_theorFileList();\r\n for (int i = 0; i < fileList.size(); i++) {\r\n theorFiles.add(filesParser.trimStringsAndGetData(1,\r\n filesParser.getDirectories()[1],\r\n filesParser.get_theorFileList().get(i)));\r\n }\r\n //System.out.println(expFile.get(0.00050));\r\n //System.out.println(expFile.get(-0.25));\r\n //System.out.println(expFile);\r\n //System.out.println(theorFiles.get(0.00050));\r\n //System.out.println(theorFiles);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n /*for (int i = 0; i < theorFiles.size(); i++) {\r\n Map<Double, ArrayList<Double>> theorFile = theorFiles.get(i);\r\n for (int ik = 0; ik < time.size(); ik++) {\r\n ArrayList<Double> theorFileLine = theorFile.get(time.get(ik));\r\n if (theorFileLine != null) {\r\n for (int j = 0; j < theorFileLine.size(); j++) {\r\n double theord = theorFileLine.get(j);\r\n for (int k = 0; k < expFile.size(); k++) {\r\n ArrayList<Double> expFileLine = expFile.get(time.get(ik));\r\n if (expFileLine != null) {\r\n for (int l = 0; l < expFileLine.size(); l++) {\r\n double expd = expFileLine.get(l);\r\n\r\n double div = expd / theord;\r\n if (div == 1) System.out.println(i);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }*/\r\n\r\n }", "public double cardinalDXSingleSpeedsDuplicatesFile(String fileName) {\n // this method returns the cardinality of the duplicated DXSingleSpeed coils data\n\n double value;\n // store the recorded DXSingleSpeeds in a string array\n ArrayList<String> recordedDXSingleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXSingleSpeed> dxSingleSpeedIterator = dxSingleSpeeds.iterator(); dxSingleSpeedIterator\n .hasNext();) {\n recordedDXSingleSpeedsStrings.add(dxSingleSpeedIterator.next()\n .toMoRecordString());\n }\n\n // remove any duplicates in the array;\n ArrayList<String> rmDuplicatesRecordedDXSingleSpeedsStrings = new ArrayList<String>();\n rmDuplicatesRecordedDXSingleSpeedsStrings = removeDuplicates(recordedDXSingleSpeedsStrings);\n\n // System.out.println\n // (\"size of the dxSingleSpeeds after removing the duplicates \" +\n // rmDuplicatesRecordedDXSingleSpeedsStrings.size());\n value = rmDuplicatesRecordedDXSingleSpeedsStrings.size()\n - dxSingleSpeeds.size();\n\n return value;\n }", "public synchronized long nextFs(){\n\t\treturn fs++;\n\t}", "public double cardinalDXDoubleSpeedsDuplicatesFile(String fileName) {\n // this method returns the cardinality of the duplicated DXDoubleSpeed coils data\n\n double value;\n // store the recorded DXDoubleSpeeds in a string array\n ArrayList<String> recordedDXDoubleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXDoubleSpeed> dxDoubleSpeedIterator = dxDoubleSpeeds.iterator(); dxDoubleSpeedIterator\n .hasNext();) {\n recordedDXDoubleSpeedsStrings.add(dxDoubleSpeedIterator.next()\n .toMoRecordString());\n }\n\n // remove any duplicates in the array;\n ArrayList<String> rmDuplicatesRecordedDXDoubleSpeedsStrings = new ArrayList<String>();\n rmDuplicatesRecordedDXDoubleSpeedsStrings = removeDuplicates(recordedDXDoubleSpeedsStrings);\n\n // System.out.println\n // (\"size of the dxDoubleSpeeds after removing the duplicates \" +\n // rmDuplicatesRecordedDXDoubleSpeedsStrings.size());\n value = rmDuplicatesRecordedDXDoubleSpeedsStrings.size()\n - dxDoubleSpeeds.size();\n\n return value;\n }", "public float[] accumulateDetailFiles(ArrayList<File> files){\r\n\t\tfloat[] values = new float[100];\r\n\t\tint counter = 0;\r\n\r\n\t for(File file:files){\t\t\r\n\t \tSystem.out.println(file.getName());\r\n\t \tcounter = 0;\r\n\t BufferedReader reader;\r\n\t try{\r\n\t reader = new BufferedReader(new FileReader(file));\r\n\t String line = reader.readLine(); \r\n\t while(line != null){\t\r\n\t \tif(!line.substring(0,1).equals(\"#\")){\r\n\t \t\tString[] values2 = line.split(\" \");\r\n\t \t\tvalues[counter] += Float.valueOf(values2[values2.length-1]);\r\n\t\t \tcounter++;\r\n\t \t}\r\n\t \tline = reader.readLine();\r\n\t }\r\n\t \r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t System.err.println(\"FileNotFoundException: \" + e.getMessage());\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t System.err.println(\"Caught IOException: \" + e.getMessage());\r\n\t\t\t}\r\n\t }\r\n\r\n\t float[] returnValues = new float[counter];\r\n\t \r\n\t for(int j = 0; j < returnValues.length; j++) \treturnValues[j] = ((float)values[j]/files.size());\r\n\t\r\n\t \r\n \treturn returnValues;\r\n\t}", "public void incFileCount(){\n\t\tthis.num_files++;\n\t}", "java.util.List<java.lang.Double> getFileList();", "public void cool()throws IOException{\n int q= 2;\n ArrayList<Scanner> f = new ArrayList();\n String input = j.showInputDialog(\"Choose a file to use:\");\n f.add(new Scanner(new File(input+\".ppm\")));\n //\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"jkndanwladlanfseuihrvniurhceimucauqrcal3iuirlheunrliuvznmlriunh.ppm\")));\n out.println(f.get(0).next());out.println(f.get(0).next()); out.println(f.get(0).next());int uh=Integer.parseInt(f.get(0).next()); out.println(uh);\n while(f.get(0).hasNext()){\n for(int rgb=0;rgb<3;rgb++){\n if(f.get(0).hasNext()){\n String ass=f.get(0).next();\n\n int azz= Integer.parseInt(ass);\n if(azz<(uh/2)){\n out.println(\"\"+0);\n }else{\n out.println(\"\"+uh);\n }\n }\n }\n }\n out.close(); //\n \n f.set(0,(new Scanner(new File(input+\".ppm\"))));f.add(new Scanner(new File(\"jkndanwladlanfseuihrvniurhceimucauqrcal3iuirlheunrliuvznmlriunh.ppm\")));\n input = j.showInputDialog(\"Choose a name for the new file:\");\n out = new PrintWriter(new BufferedWriter(new FileWriter(input+\".ppm\")));\n out.println(\"P3\");\n int height[]= new int[q]; int width[]= new int[q];\n int largest=0;\n for(int a=0;a<q;a++){\n f.get(a).next();\n height[a]=Integer.parseInt(f.get(a).next());\n width[a]=Integer.parseInt(f.get(a).next());\n //f.get(a).next();\n }\n for(int a=0;a<q;a++){\n if(height[largest]*width[largest]<height[a]*width[a]){\n largest=a;\n }\n }\n out.println(height[largest]);out.println(width[largest]);\n int ass=0;\n int azz=0;\n\n for(int x=0;x<width[largest];x++){\n for(int y=0;y<height[largest];y++){\n for(int c=0;c<3;c++){\n for(int a=0;a<q;a++){\n if(f.get(a).hasNext()){\n if(x<width[a]&&y<height[a]){\n ass=ass+Integer.parseInt(f.get(a).next());\n azz++;\n }\n }\n }\n ass=ass/azz;\n out.print(ass+\" \");\n ass=0;\n azz=0;\n }\n }\n }\n\n for(int a =0;a<q;a++){\n f.get(a).close();\n }\n out.close();\n System.exit(0);\n }", "public Interface(String filename) throws FileNotFoundException \n {\n //read file for first time to find size of array\n File f = new File(filename);\n Scanner b = new Scanner(f);\n\n while(b.hasNextLine())\n {\n b.nextLine();\n arraySize++;\n }\n //create properly sized array\n array= new double[arraySize];\n //open and close the file, scanner class does not support rewinding\n b.close();\n b = new Scanner(f);\n //read input \n for(int i = 0; i < arraySize; i++)\n { \n array[i] = b.nextDouble();\n }\n //create a stats object of the proper size\n a = new Stats(arraySize);\n a.loadNums(array); //pass entire array to loadNums to allow Stats object a to have a pointer to the array\n }", "public float[] accumulateSimpleMixFiles(ArrayList<File> files){\r\n\t\t\tfloat[] returnValue = new float[10];\r\n\t\t\tfloat[] values = new float[10];\r\n\t\t\t\r\n\t\t for(File file:files){\t\t\t\t\t\r\n\t\t BufferedReader reader;\r\n\t\t try{\r\n\t\t reader = new BufferedReader(new FileReader(file));\r\n\t\t String line = reader.readLine(); \r\n\t\t while(line != null){\t\r\n\t\t \tif(line.substring(0,5).equals(\"Total\")){\r\n\t\t \t\tString[] values2 = line.split(\" \");\r\n\t\t \t\t\r\n\t\t \t\tfor(int i = 2; i < values2.length; i++) values[i-2] += Float.valueOf(values2[i]);\r\n\t\t \t}\r\n\t\t \tline = reader.readLine();\r\n\t\t }\r\n\t\t \r\n\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t System.err.println(\"FileNotFoundException: \" + e.getMessage());\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t System.err.println(\"Caught IOException: \" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t }\r\n\r\n\t\t for(int j = 0; j < values.length; j++) returnValue[j] = (float)values[j]/files.size();\t\r\n\t\t \r\n\t\t return returnValue;\r\n\t\t}", "private double createCumulativeResults(){\n File f = new File(this.cumulativeResultsFileName); \n Scanner sc; \n if(!f.exists()){\n return 0;\n }else{\n try{\n double s = 0; \n int n = 0; \n sc = new Scanner(new File(this.cumulativeResultsFileName));\n while(sc.hasNext()){\n String inputLine = sc.nextLine(); System.out.println(inputLine);\n String temp = inputLine.split(\",\")[1] ;\n s = s + Double.parseDouble(temp);\n n++;\n }\n return s/(double)n;\n }catch(Exception e){\n e.printStackTrace();\n return 0; \n }\n }\n }", "public double getNumFiles(){\n\t\treturn (this.num_files);\n\t}", "private void writeTest1File1() throws IOException{\n fillFile(1, true);\n }", "void startFile() {\n writeToFile(defaultScore);\n for (int i = 0; i < 5; i++) {\n writeToFile(readFromFile() + defaultScore);\n }\n }", "public abstract long NewFileNumber();", "public static List<double[]> readAlpha(File f)\n/* */ throws Exception\n/* */ {\n/* 89 */ throw new Error(\"Unresolved compilation problem: \\n\");\n/* */ }", "public static void main(String[] args) throws IOException {\n FileWriter fw = new FileWriter(new File(\"src/output_files/threesumA.txt\"));\n StringBuilder sb = new StringBuilder();\n // the rest input files\n String[] inputFiles = {\"src/input_files/8ints.txt\", \"src/input_files/1Kints.txt\", \"src/input_files/2Kints.txt\",\n \"src/input_files/2Kints.txt\", \"src/input_files/4Kints.txt\", \"src/input_files/8Kints.txt\",\n \"src/input_files/16Kints.txt\", \"src/input_files/32Kints.txt\"};\n int i = 8;\n for (String file : inputFiles) {\n In in = new In(file);\n int[] a = in.readAllInts();\n long startTime = System.nanoTime();\n int result = count(a);\n long elapsedTime = System.nanoTime() - startTime;\n sb.append(String.format(\"%d %d\\n\", i, elapsedTime));\n System.out.println(result);\n if (i == 8) {\n i = 1000;\n } else {\n i *= 2;\n }\n }\n fw.write(sb.toString());\n fw.close();\n }", "public void mo210a(File file) {\n }", "void setFile(String i) {\n file = i;\n }", "public void addSample(int note, String fileName) {\n\t\taddSample(note, fileName, -1, -1, 1.0);\n\t}", "public void average()throws IOException{\n String input = j.showInputDialog(\"Choose how many images you'll be using:\");\n int q= Integer.parseInt(input);\n ArrayList<Scanner> f = new ArrayList();\n for(int a=0;a<q;a++){\n input = j.showInputDialog(\"Choose a file (\"+(a+1)+\"/\"+q+ \") to use:\");\n f.add(new Scanner(new File(input+\".ppm\")));\n }\n input = j.showInputDialog(\"Choose a name for the new file:\");\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(input+\".ppm\")));\n out.println(\"P3\");\n int height[]= new int[q]; int width[]= new int[q];\n int largest=0;\n for(int a=0;a<q;a++){\n f.get(a).next();\n height[a]=Integer.parseInt(f.get(a).next());\n width[a]=Integer.parseInt(f.get(a).next());\n //f.get(a).next();\n }\n for(int a=0;a<q;a++){\n if(height[largest]*width[largest]<height[a]*width[a]){\n largest=a;\n }\n }\n out.println(height[largest]);out.println(width[largest]);\n int ass=0;\n int azz=0;\n\n for(int x=0;x<width[largest];x++){\n for(int y=0;y<height[largest];y++){\n for(int c=0;c<3;c++){\n for(int a=0;a<q;a++){\n if(f.get(a).hasNext()){\n if(x<width[a]&&y<height[a]){\n ass=ass+Integer.parseInt(f.get(a).next());\n azz++;\n }\n }\n }\n ass=ass/azz;\n out.print(ass+\" \");\n ass=0;\n azz=0;\n }\n }\n }\n\n for(int a =0;a<q;a++){\n f.get(a).close();\n }\n out.close();\n System.exit(0);\n }", "public List<Double> processFile() throws AggregateFileInitializationException {\n \t\t \n \t\tint maxTime = 0;\n \t\tHashMap<String, List<Double>> data = new HashMap<String,List<Double>>();\n \t\ttry {\n \t String record; \n \t String header;\n \t int recCount = 0;\n \t List<String> headerElements = new ArrayList<String>();\n \t FileInputStream fis = new FileInputStream(scenarioData); \n \t BufferedReader d = new BufferedReader(new InputStreamReader(fis));\n \t \n \t //\n \t // Read the file header\n \t //\n \t if ( (header=d.readLine()) != null ) { \n \t \t\n \t\t StringTokenizer st = new StringTokenizer(header );\n \t\t \n \t\t while (st.hasMoreTokens()) {\n \t\t \t String val = st.nextToken(\",\");\n \t\t \t headerElements.add(val.trim());\n \t\t }\n \t } // read the header\n \t /////////////////////\n \t \n \t // set up the empty lists\n \t int numColumns = headerElements.size();\n \t for (int i = 0; i < numColumns; i ++) {\n \t \tString key = headerElements.get(i);\n \t \t if(validate(key)) {\n \t \t\tdata.put(key, new ArrayList<Double>());\n \t\t }\n \t \t\n \t }\n \t \n \t // Here we check the type of the data file\n \t // by checking the header elements\n \t \n \t \n \t \n \t //////////////////////\n // Read the data\n //\n while ( (record=d.readLine()) != null ) { \n recCount++; \n \n StringTokenizer st = new StringTokenizer(record );\n int tcount = 0;\n \t\t\t\twhile (st.hasMoreTokens()) {\n \t\t\t\t\tString val = st.nextToken(\",\");\n \t\t\t\t\tString key = headerElements.get(tcount);\n \t\t\t\t\tif(validate(key)) {\n \t\t\t\t\t\tidSet.add(key);\n \t\t\t\t\t\tList<Double> dataList = data.get(key);\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tDouble dVal = new Double(val.trim());\n \t\t\t\t\t\t\tdataList.add(dVal);\n \t\t\t\t\t\t\tif (dataList.size() >= maxTime) maxTime = dataList.size();\n \t\t\t\t\t\t\tdata.put(key,dataList);\n \t\t\t\t\t\t} catch(NumberFormatException nfe) {\n \t\t\t\t\t\t\tdata.remove(key);\n \t\t\t\t\t\t\tidSet.remove(key);\n \t\t\t\t\t\t\tActivator.logInformation(\"Not a valid number (\"+val+\") ... Removing key \"+key, null);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\t\t\t\n \t\t\t\t\ttcount ++;\n \t\t\t\t}\n \t\t\t} // while file has data\n } catch (IOException e) { \n // catch io errors from FileInputStream or readLine()\n \t Activator.logError(\" IOException error!\", e);\n \t throw new AggregateFileInitializationException(e);\n }\n \n List<Double> aggregate = new ArrayList<Double>();\n for (int i = 0; i < maxTime; i ++) {\n \t aggregate.add(i, new Double(0.0));\n }\n // loop over all location ids\n Iterator<String> iter = idSet.iterator();\n while((iter!=null)&&(iter.hasNext())) {\n \t String key = iter.next();\n \t List<Double> dataList = data.get(key);\n \t for (int i = 0; i < maxTime; i ++) {\n \t\t double val = aggregate.get(i).doubleValue();\n \t\t val += dataList.get(i).doubleValue();\n \t aggregate.set(i,new Double(val));\n }\n }\n \n return aggregate;\n \t }", "String doubleRead();", "public void dxDoubleSpeedsDuplicates(String fileName) throws IOException {\n // This method prints all the duplicated DXDoubleSpeeds in the output\n // file.\n\n // concatenate the recorded DXDoubleSpeeds in a string\n ArrayList<String> recordedDXDoubleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXDoubleSpeed> dxDoubleSpeedIterator = dxDoubleSpeeds.iterator(); dxDoubleSpeedIterator\n .hasNext();) {\n recordedDXDoubleSpeedsStrings.add(dxDoubleSpeedIterator.next()\n .toMoRecordString());\n }\n\n ArrayList<String> duplicates = new ArrayList<String>();\n duplicates = saveDuplicates(recordedDXDoubleSpeedsStrings);\n\n // define the header of the output file\n String fileHeader = \"There are \"\n + String.format(\"%s\", duplicates.size()) + \" duplicate(s) \"\n + \"in the input file. The duplicate(s) is(are) :\" + \"\\n\" + \"\\n\";\n\n String recordedDuplicatesStrings = \"\";\n\n // concatenate the recorded DXDoubleSpeed in a string\n for (Iterator<String> it = duplicates.iterator(); it.hasNext();) {\n recordedDuplicatesStrings += it.next() + \"\\n\";\n }\n\n // print the header + DXDoubleSpeed + footer in the output file\n OutputStreamWriter fw = new FileWriter(fileName);\n fw.write(fileHeader + recordedDuplicatesStrings);\n fw.close();\n }", "private static boolean a(java.io.File r8, defpackage.edw r9) {\n /*\n r0 = 0\n r2 = 0\n long r4 = r8.length() // Catch:{ all -> 0x003c }\n r6 = 0\n int r1 = (r4 > r6 ? 1 : (r4 == r6 ? 0 : -1))\n if (r1 <= 0) goto L_0x0033\n r6 = 2147483647(0x7fffffff, double:1.060997895E-314)\n int r1 = (r4 > r6 ? 1 : (r4 == r6 ? 0 : -1))\n if (r1 >= 0) goto L_0x0033\n int r3 = (int) r4 // Catch:{ all -> 0x003c }\n byte[] r4 = new byte[r3] // Catch:{ all -> 0x003c }\n java.io.FileInputStream r1 = new java.io.FileInputStream // Catch:{ all -> 0x003c }\n r1.<init>(r8) // Catch:{ all -> 0x003c }\n L_0x001b:\n if (r0 >= r3) goto L_0x0025\n int r2 = r3 - r0\n int r2 = r1.read(r4, r0, r2) // Catch:{ all -> 0x0044 }\n int r0 = r0 + r2\n goto L_0x001b\n L_0x0025:\n r0 = 0\n defpackage.dmf.a(r9, r4, r0, r3) // Catch:{ all -> 0x0044 }\n L_0x0029:\n boolean r0 = r8.delete() // Catch:{ all -> 0x0044 }\n if (r1 == 0) goto L_0x0032\n r1.close()\n L_0x0032:\n return r0\n L_0x0033:\n r0 = 1\n java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0) // Catch:{ all -> 0x003c }\n r9.a = r0 // Catch:{ all -> 0x003c }\n r1 = r2\n goto L_0x0029\n L_0x003c:\n r0 = move-exception\n r1 = r2\n L_0x003e:\n if (r1 == 0) goto L_0x0043\n r1.close()\n L_0x0043:\n throw r0\n L_0x0044:\n r0 = move-exception\n goto L_0x003e\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.chn.a(java.io.File, edw):boolean\");\n }", "private static void getFile(String path){\n File file = new File(path); \r\n // get the folder list \r\n File[] array = file.listFiles();\r\n // flag = array.length;\r\n \r\n for(int i=0;i<array.length;i++){ \r\n if(array[i].isFile()){ \r\n // only take file name \r\n //System.out.println(\"^^^^^\" + array[i].getName()); \r\n // take file path and name \r\n //System.out.println(\"#####\" + array[i]); \r\n // take file path and name \r\n System.out.println(\"*****\" + array[i].getPath()); \r\n\t\t\tcalculate_Ave(array[i].getPath());\r\n } \r\n }\r\n}", "public void dxSingleSpeedsDuplicates(String fileName) throws IOException {\n // This method prints all the duplicated DXSingleSpeeds in the output\n // file.\n\n // concatenate the recorded DXSingleSpeeds in a string\n ArrayList<String> recordedDXSingleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXSingleSpeed> dxSingleSpeedIterator = dxSingleSpeeds.iterator(); dxSingleSpeedIterator\n .hasNext();) {\n recordedDXSingleSpeedsStrings.add(dxSingleSpeedIterator.next()\n .toMoRecordString());\n }\n\n ArrayList<String> duplicates = new ArrayList<String>();\n duplicates = saveDuplicates(recordedDXSingleSpeedsStrings);\n\n // define the header of the output file\n String fileHeader = \"There are \"\n + String.format(\"%s\", duplicates.size()) + \" duplicate(s) \"\n + \"in the input file. The duplicate(s) is(are) :\" + \"\\n\" + \"\\n\";\n\n String recordedDuplicatesStrings = \"\";\n\n // concatenate the recorded DXSingleSpeed in a string\n for (Iterator<String> it = duplicates.iterator(); it.hasNext();) {\n recordedDuplicatesStrings += it.next() + \"\\n\";\n }\n\n // print the header + DXSingleSpeed + footer in the output file\n OutputStreamWriter fw = new FileWriter(fileName);\n fw.write(fileHeader + recordedDuplicatesStrings);\n fw.close();\n }", "public synchronized static void write(double[] xxx,String fileName){\n\t\ttry{\n\t\t \tFileOutputStream fos = new FileOutputStream(fileName);\n\t\t \tDataOutputStream dos = new DataOutputStream(fos);\n\t\t\t\n\t\t\tfor(double x:xxx)\n\t\t\t\tdos.writeDouble(x);\n\t\t\tdos.close();\n\t\t\tfos.close();\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private static void generateForSingleFile() throws IOException {\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(singlePatternPath+ filename));\n\t\t\n\t\tIterator iter = countOne.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tMap.Entry entry = (Entry) iter.next();\n\t\t\tInteger value = (Integer) entry.getValue();\n\t\t\tSequencePair key = (SequencePair) entry.getKey();//System.out.println(\"current\" + \"[\" + key.firstSeq +\":\"+key.secondSeq +\"]\" + \" ; \"+ value);\n\t\t\tout.write(\"[\" + key.firstSeq + \":\" + key.secondSeq + \"]\" +\":\" +value + \"\\n\");\n\t\t}\n\t\tif(out!=null)\n\t\t\tout.close();\n\t\t\n\t\t\n\t\tBufferedWriter out1 = new BufferedWriter(new FileWriter(newSinglePatternPath+filename));\n\t\titer = countTwo.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tMap.Entry entry = (Entry) iter.next();\n\t\t\tInteger value = (Integer) entry.getValue();\n\t\t\tSequencePair key = (SequencePair) entry.getKey();//System.out.println(\"current\" + \"[\" + key.firstSeq +\":\"+key.secondSeq +\"]\" + \" ; \"+ value);\n\t\t\tout1.write(\"[\" + key.firstSeq + \":\" + key.secondSeq + \"]\" +\":\" +value + \"\\n\");\n\t\t}\n\t\t \n\t\tif(out1!=null)\n\t\t\tout1.close();\n\t}", "public File getFileValue();", "public static void main(String[] args) throws FileNotFoundException\n {\n Scanner sc = new Scanner(new File(\"JudgeData/sakshi.dat\"));\n while (sc.hasNext())\n {\n double base = sc.nextDouble();\n double pow = sc.nextDouble();\n\n System.out.printf(\"%.3f\\n\", Math.pow(base, pow));\n }\n }", "void readFiles(Boolean smart) \n\t//throws IOException// more here for safety\n\t{\n\t\tint i;\n\t\tfor (i = 0; i<165; ++i)\n\t\tfor (int j = 0; j<11; ++j)\n\t\t{\t//if(smart)memoryFile.readInt(board(i,j));\n\t\t\t//else \n\t\t\t\tboard[i][j] = 0;\n\t\t}\n\t\t//try memoryFileStream.close(); catch (IOException e);\n\t}", "double readDouble();", "public static void main(String[] args) // FileNotFoundException caught by this application\n {\n\n Scanner console = new Scanner(System.in);\n System.out.print(\"Input file: \");\n String inputFileName = console.next();\n System.out.print(\"Output file: \");\n String outputFileName = console.next();\n\n Scanner in = null;\n PrintWriter out =null;\n\n File inputFile = new File(inputFileName);\n try\n {\n in = new Scanner(inputFile);\n out = new PrintWriter(outputFileName);\n\n double total = 0;\n\n while (in.hasNextDouble())\n {\n double value = in.nextDouble();\n int x = in.nextInt();\n out.printf(\"%15.2f\\n\", value);\n total = total + value;\n }\n\n out.printf(\"Total: %8.2f\\n\", total);\n\n\n } catch (FileNotFoundException exception)\n {\n System.out.println(\"FileNotFoundException caught.\" + exception);\n exception.printStackTrace();\n }\n catch (InputMismatchException exception)\n {\n System.out.println(\"InputMismatchexception caught.\" + exception);\n }\n finally\n {\n\n in.close();\n out.close();\n }\n\n }", "void citire(FileReader f);", "int getFileCount();", "public Files(){\n this.fileNameArray.add(\"bridge_1.txt\");\n this.fileNameArray.add(\"bridge_2.txt\");\n this.fileNameArray.add(\"bridge_3.txt\");\n this.fileNameArray.add(\"bridge_4.txt\");\n this.fileNameArray.add(\"bridge_5.txt\");\n this.fileNameArray.add(\"bridge_6.txt\");\n this.fileNameArray.add(\"bridge_7.txt\");\n this.fileNameArray.add(\"bridge_8.txt\");\n this.fileNameArray.add(\"bridge_9.txt\");\n this.fileNameArray.add(\"ladder_1.txt\");\n this.fileNameArray.add(\"ladder_2.txt\");\n this.fileNameArray.add(\"ladder_3.txt\");\n this.fileNameArray.add(\"ladder_4.txt\");\n this.fileNameArray.add(\"ladder_5.txt\");\n this.fileNameArray.add(\"ladder_6.txt\");\n this.fileNameArray.add(\"ladder_7.txt\");\n this.fileNameArray.add(\"ladder_8.txt\");\n this.fileNameArray.add(\"ladder_9.txt\");\n }", "public static void main(String[] args) {\n\n\t\tBufferedReader br=null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(args[0]));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"The specified file \" + args[0] + \"was not found\");\n\t\t\te1.printStackTrace();\n\t\t}\n String line = \"\";\n //HashMap<String, Integer> wordmap = new HashMap<String, Integer>();\n\t\tInteger totalCount = 0;\n try {\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t totalCount++;\n\t\t\t}\n br.close();\n br = new BufferedReader(new FileReader(args[0]));\n Double multiplier = Math.log (1/totalCount.doubleValue());\n FileWriter fstream = new FileWriter(\"juice_inter_\" + args[1], true);\n\t\t\tBufferedWriter output = new BufferedWriter(fstream);\n while ((line = br.readLine()) != null) {\n\t\t\t String[] values = line.split(\":\")[1].split(\",\");\n\t\t\t String fileName = values[0];\n\t\t\t String tf_string = values[1];\n\t\t\t Double tf = Double.parseDouble(tf_string);\n\t\t\t Double result = tf * multiplier;\n\t\t\t output.write( line.split(\":\")[0]+ \" , \" + fileName + \" : \" + result + \"\\n\");\n\t\t\t \n\t\t\t}\n output.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void addFile(int numberLines);", "@Override\n public void addSingleFile(FileInfo file) {\n }", "public TwoSum(int size, File file) throws FileNotFoundException{\n this.size = size;\n ht = new Node[size];\n \n //create and populate array from file\n Scanner sc = new Scanner(file);\n long x,i=0;\n while(sc.hasNext()){\n x=sc.nextLong();\n insert(x);\n System.out.println(i+\" \"+x);\n i++;\n }\n \n findTwoSum();\n }", "public final void mo14831s() {\n Iterator it = ((ArrayList) mo14817d()).iterator();\n while (it.hasNext()) {\n File file = (File) it.next();\n if (file.listFiles() != null) {\n m6739b(file);\n long c = m6740c(file, false);\n if (((long) this.f6567b.mo14797a()) != c) {\n try {\n new File(new File(file, String.valueOf(c)), \"stale.tmp\").createNewFile();\n } catch (IOException unused) {\n f6563c.mo14884b(6, \"Could not write staleness marker.\", new Object[0]);\n }\n }\n for (File b : file.listFiles()) {\n m6739b(b);\n }\n }\n }\n }", "private static void tokenFiles() throws IOException\r\n\t{\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br1 = new BufferedReader(fr);\r\n\t\t\r\n\t\tDouble[] salaries = new Double[10];//array for salary\r\n\t\tInteger[] id = new Integer[10];//array for id\r\n\t\tInteger[] age = new Integer[10];//array for age\r\n\t\tString[] fName = new String[10];//array for first name\r\n\t\tString[] lName = new String[10];//array for last name\r\n\t\tString[] status = new String[10];//array for status\r\n\t\tDouble[] raises = new Double[10];//array for the raised salary\r\n\t\tString s1;//string for readLine of files\r\n\t\tint i = 0;//index for loop of arrays\r\n\t\t\r\n\t\tSystem.out.println(\"\\nWith a 2% raise\\n\");\r\n\t\t//while loop to convert to proper type\r\n\t\twhile ((s1 = br1.readLine())!=null && i<10)\r\n\t\t{\r\n\t\t\tStringTokenizer st = new StringTokenizer(s1);//create new obj tokenizer\r\n\t\t\tfName[i] = st.nextToken();\r\n\t\t\tlName[i] = st.nextToken();\r\n\t\t\tid[i] = Integer.parseInt(st.nextToken());\r\n\t\t\tage[i] = Integer.parseInt(st.nextToken());\t\t\t\t\r\n\t\t\tsalaries[i] = Double.parseDouble(st.nextToken());\r\n\t\t\tstatus[i] = st.nextToken();\r\n\t\t\t\r\n\t\t\tSystem.out.println(fName[i]+\" \"+ lName[i]+\" \"+ id[i]+\r\n\t\t\t\t\t\t\" \"+ age[i]+\" \"+salaries[i]+\" \"+status[i]);\t\r\n\t\t\t\r\n\t\t\traises[i]= (salaries[i]*.02) +salaries[i];//calculate new salaries\r\n\t\t\tSystem.out.println(\"Salary with raise: \" +raises[i]);//print raise amount\r\n\t\t\ti++;\r\n\t\t}//end while loop convert to proper type\r\n\t\tbr1.close();//close this buffered reader\r\n\t}", "@Override\n\t\t\t\tpublic void run() \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"reading..\" +next.getFileName());\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t//ts1.finalWrite(next.getFileName(),(int)file.length());\n\t\t\t\t\t\t\tInputStream in = new FileInputStream(readFile);\n\t\t\t\t\t\t\tint i;\n\t\t\t\t\t\t\tint fileNameLength =readFile.length();\n\t\t\t\t\t\t\tlong fileLength = file.length();\n\t\t\t\t\t\t\tlong total = (2+fileNameLength+fileLength);\n\t\t\t\t\t\t\t//System.out.println(\"toal length\" +total);\n\t\t\t\t\t\t\tqu.put((byte)total);\n\t\t\t\t\t\t\tqu.put((byte)readFile.length()); // file name length\n\t\t\t\t\t\t\tqu.put((byte)file.length()); //file content length\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int j=0;j<readFile.length();j++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)readFile.charAt(j)); //writing file Name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhile((i=in.read())!=-1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)i);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tin.close();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (IOException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "public abstract double read_double();", "public static double[] readRHat(File f)\n/* */ throws Exception\n/* */ {\n/* 78 */ throw new Error(\"Unresolved compilation problem: \\n\");\n/* */ }", "private boolean compareFile(java.io.FileInputStream r25, java.io.FileInputStream r26) {\n /*\n r24 = this;\n r7 = 5;\n r8 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n r2 = 0;\n r21 = r25.getChannel();\t Catch:{ IOException -> 0x00ce }\n r22 = r21.size();\t Catch:{ IOException -> 0x00ce }\n r0 = r22;\n r0 = (int) r0;\t Catch:{ IOException -> 0x00ce }\n r19 = r0;\n r21 = r26.getChannel();\t Catch:{ IOException -> 0x00ce }\n r22 = r21.size();\t Catch:{ IOException -> 0x00ce }\n r0 = r22;\n r9 = (int) r0;\n r0 = r19;\n if (r0 != r9) goto L_0x002e;\n L_0x0020:\n r21 = 1;\n r0 = r19;\n r1 = r21;\n if (r0 < r1) goto L_0x002e;\n L_0x0028:\n r21 = 1;\n r0 = r21;\n if (r9 >= r0) goto L_0x003c;\n L_0x002e:\n r21 = 0;\n r25.close();\t Catch:{ IOException -> 0x0037 }\n r26.close();\t Catch:{ IOException -> 0x0037 }\n L_0x0036:\n return r21;\n L_0x0037:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x0036;\n L_0x003c:\n r21 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n r0 = r19;\n r1 = r21;\n if (r0 > r1) goto L_0x00b4;\n L_0x0044:\n r6 = r19;\n L_0x0046:\n r20 = r19 / r6;\n r21 = 5;\n r0 = r20;\n r1 = r21;\n if (r0 < r1) goto L_0x00b7;\n L_0x0050:\n r14 = 5;\n L_0x0051:\n r21 = r6 * r14;\n r20 = r19 - r21;\n r15 = r20 / r14;\n r3 = 1;\n r5 = 0;\n r4 = 0;\n r16 = 0;\n r0 = new byte[r6];\t Catch:{ IOException -> 0x00ce }\n r18 = r0;\n r0 = new byte[r6];\t Catch:{ IOException -> 0x00ce }\n r17 = r0;\n r5 = new java.io.BufferedInputStream;\t Catch:{ IOException -> 0x00ce }\n r0 = r25;\n r5.<init>(r0);\t Catch:{ IOException -> 0x00ce }\n r4 = new java.io.BufferedInputStream;\t Catch:{ IOException -> 0x00ce }\n r0 = r26;\n r4.<init>(r0);\t Catch:{ IOException -> 0x00ce }\n r12 = 0;\n L_0x0073:\n if (r12 >= r14) goto L_0x00bf;\n L_0x0075:\n if (r3 == 0) goto L_0x00bf;\n L_0x0077:\n r21 = 0;\n r0 = r18;\n r1 = r21;\n r5.read(r0, r1, r6);\t Catch:{ IOException -> 0x00ce }\n r21 = 0;\n r0 = r17;\n r1 = r21;\n r4.read(r0, r1, r6);\t Catch:{ IOException -> 0x00ce }\n r21 = r6 + r15;\n r16 = r16 + r21;\n r0 = r16;\n r0 = (long) r0;\t Catch:{ IOException -> 0x00ce }\n r22 = r0;\n r0 = r22;\n r5.skip(r0);\t Catch:{ IOException -> 0x00ce }\n r0 = r16;\n r0 = (long) r0;\t Catch:{ IOException -> 0x00ce }\n r22 = r0;\n r0 = r22;\n r4.skip(r0);\t Catch:{ IOException -> 0x00ce }\n r13 = 0;\n L_0x00a2:\n if (r13 >= r6) goto L_0x00bc;\n L_0x00a4:\n if (r3 == 0) goto L_0x00bc;\n L_0x00a6:\n r21 = r18[r13];\t Catch:{ IOException -> 0x00ce }\n r22 = r17[r13];\t Catch:{ IOException -> 0x00ce }\n r0 = r21;\n r1 = r22;\n if (r0 != r1) goto L_0x00ba;\n L_0x00b0:\n r2 = 1;\n L_0x00b1:\n r13 = r13 + 1;\n goto L_0x00a2;\n L_0x00b4:\n r6 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n goto L_0x0046;\n L_0x00b7:\n r14 = r20;\n goto L_0x0051;\n L_0x00ba:\n r2 = 0;\n goto L_0x00b1;\n L_0x00bc:\n r12 = r12 + 1;\n goto L_0x0073;\n L_0x00bf:\n r25.close();\t Catch:{ IOException -> 0x00c9 }\n r26.close();\t Catch:{ IOException -> 0x00c9 }\n L_0x00c5:\n r21 = r2;\n goto L_0x0036;\n L_0x00c9:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00c5;\n L_0x00ce:\n r10 = move-exception;\n r10.printStackTrace();\t Catch:{ all -> 0x00df }\n r2 = 0;\n r25.close();\t Catch:{ IOException -> 0x00da }\n r26.close();\t Catch:{ IOException -> 0x00da }\n goto L_0x00c5;\n L_0x00da:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00c5;\n L_0x00df:\n r21 = move-exception;\n r25.close();\t Catch:{ IOException -> 0x00e7 }\n r26.close();\t Catch:{ IOException -> 0x00e7 }\n L_0x00e6:\n throw r21;\n L_0x00e7:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00e6;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.sec.clipboard.data.list.ClipboardDataBitmap.compareFile(java.io.FileInputStream, java.io.FileInputStream):boolean\");\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\tpublic static int fillHM(String fileName) throws Exception{\r\n\t\t//System.out.println(\"fileName:\"+fileName);\r\n\t\tcat.info(\"fileName:\"+fileName);\r\n\t\tif(hm == null){\r\n\t\t\thm = new HashMap();\r\n\t\t}\r\n//\t\tString fileURL = URL + fileName;\r\n\t\tString fileURL = fileName;\r\n\t\tFileInputStream in = new FileInputStream(fileURL);\r\n\t\tint len = in.available();\r\n\t\t////System.out.println(len);\r\n\t\tbyte[] bt = new byte[len];\r\n\t\tin.read(bt);\r\n\t\t////System.out.println(len);\r\n\t\t\r\n\t\tint pjz = Integer.parseInt(buffer);\r\n\t\tint zs = len/pjz;\r\n\t\tint xs = len%pjz;\r\n\t\t\r\n\t\tint count = 0;\r\n\t\tif(zs==0&&xs==0){\r\n\t\t\tcount = 0;\r\n\t\t}else if(zs==0&&xs!=0){\r\n\t\t\tcount = 1;\r\n\t\t}else if(zs!=0&&xs==0){\r\n\t\t\tcount = zs;\r\n\t\t}else if(zs!=0&&xs!=0){\r\n\t\t\tcount = zs + 1;\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<count-1;i++){\r\n\t\t\tbyte[] bt_i = new byte[pjz];\r\n\t\t\tSystem.arraycopy(bt,i*pjz,bt_i,0,pjz);\r\n\t\t\thm.put(fileName+\"[\"+String.valueOf(i)+\"]\",bt_i);\r\n\t\t}\r\n\t\tbyte[] bt_end = new byte[len-(count-1)*pjz];\r\n\t\tSystem.arraycopy(bt,(count-1)*pjz,bt_end,0,len-(count-1)*pjz);\r\n\t\thm.put(fileName+\"[\"+(count-1)+\"]\",bt_end);\r\n\t\t\r\n//\t\ti_count = count;\r\n//\t\tSystem.out.println(\"count-----------\"+count);\r\n\t\treturn count;\r\n\t}", "public Vector<file> count()\n {\n Vector<Model.file> files = new Vector<>();\n try\n {\n pw.println(11);\n\n files = (Vector<Model.file>) ois.readObject();\n\n }\n catch (ClassNotFoundException | IOException e)\n {\n System.out.println(e.getMessage());\n }\n return files ;\n }", "public static void main(String[] args) throws IOException {\n String last = \"\";\n HashSet<String> types = new HashSet<String>();\n\n int c = 0;\n try {\n FileReader fr = new FileReader(inDir + \"fr\" + \"/wkd_uris_selection\");\n BufferedReader br = new BufferedReader(fr);\n String line;\n while ((line = br.readLine()) != null) {\n addToFile(line);\n c++;\n //if(c > 100) break;\n }\n\n fw.close();\n br.close();\n } catch (FileNotFoundException fne) {// TODO\n fne.printStackTrace();\n } catch (IOException ioe) {// TODO\n ioe.printStackTrace();\n }\n\n }", "public double calculateFirstOccurrence(Token token, FileData file) {\n\t\t\n\t\treturn 1 - ((double) token.getBeginIndex() / file.getQttyTerms());\n\t}", "public GCFile(final File file, final int count) {\n\t\tthis.file = file;\n\t\tthis.count = count;\n\t}", "static void solution1Day1Part2() {\n\n Scanner file = null;\n Set<Integer> resultingFrequencies = new HashSet<>();\n int resultingFrequency = 0;\n int change = 0;\n boolean duplicateFound = false;\n\n try {\n while (!duplicateFound) {\n\n file = new Scanner(new FileReader(\"src/main/java/weekone/input01.txt\"));\n\n while (file.hasNext()) {\n //System.out.println(\"\\nCurrent frequency is: \" + resultingFrequency);\n change = file.nextInt();\n resultingFrequency += change;\n //System.out.println(\"Change of: \" + change);\n //System.out.println(\"Resulting frequency is: \" + resultingFrequency);\n\n if (resultingFrequencies.contains(resultingFrequency)) {\n System.out.println(\"\\nDay1 Part2 - The first duplicate resulting frequency is: \" + resultingFrequency);\n duplicateFound = true;\n break;\n }\n resultingFrequencies.add(resultingFrequency);\n }\n file.close();\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "public double nextDoubleOpen() {\n\tdouble result = d1 / POW3_33;\n\tnextIterate();\n\treturn result;\n }", "public static void main(String[] args) {\n FileInputStream fis =null;\r\n int num; \r\n int contador=0;\r\n \r\n try {\r\n fis = new FileInputStream(\"EnterosGrabadosComoBytes.dat\");\r\n \r\n num= fis.read();\r\n while (num !=-1){\r\n contador++;\r\n System.out.print(num+\" \");\r\n System.out.flush();\r\n num= fis.read(); //leo el sgte num \r\n }\r\n System.out.println(\"\\nYa no hay mas numeros en el fichero\");\r\n System.out.println(\"El total de números es \"+contador);\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error no encuentro el fichero\"); \r\n } catch (IOException ex) {\r\n System.out.println(\"Error en lectura\");}\r\n \r\n }", "public DoubleValue(int n) {\n\t\ttimesToWrite = n;\n\t}", "public synchronized File mo13094a(long j) {\n File d;\n d = m5344d();\n if (d == null) {\n d = m5342c(j);\n }\n return d;\n }", "public static void main(String[] args) throws FileNotFoundException {\nint zbir=0;\n\n\t\tFileReader file=new FileReader(\"maraton.txt\");\n\nArrayList<Integer> lista = new ArrayList<>();\nScanner input=new Scanner(file);\n\nwhile (input.hasNext()) {\n\t\nString ime = input.next();\n\nlista.add(input.nextInt());\n}\nfor(int i=0; i<lista.size();i++) {\n\n\t zbir += lista.get(i);\n\t \n\t\n}\nSystem.out.println(\"Zbir je :\" +zbir);\n\t System.out.println(\"Prosjek je :\" + (zbir/lista.size()));\n\n}", "public static void SequentialExecution(String path) {\n\t\tFile folder = new File(path);\n\t\tFile[] listoffiles = folder.listFiles();\n\t\tString content;\n\t\tMyThread ob = new MyThread();\n\t\tfor (int i=0; i < listoffiles.length; i++) {\n\t\t\tGZIPInputStream gzip = null;\n\t\t\ttry {\n\t\t\t\t//System.out.println(\"file :\" +listoffiles[i]);\n\t\t\t\tgzip = new GZIPInputStream(new FileInputStream(listoffiles[i]));\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(gzip));\n\t\t\ttry {\n\t\t\t\twhile ((content = br.readLine()) != null){\n\t\t\t\t\t// perform sanity test\n\t\t\t\t\tcontent = content.replaceAll(\"\\\"\", \"\");\n\t\t\t\t\tString formatedData = content.replaceAll(\", \", \":\");\n\t\t\t\t\tString[] data = formatedData.split(\",\");\n\t\t\t\t\tif (data.length != 110) {\n\t\t\t\t\t\tfailure++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (ob.validData(data)) {\n\t\t\t\t\t\t\tsuccess++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfailure++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"valid : \" +success);\n\t\tSystem.out.println(\"Invalid : \" +failure);\n\t\t\n\t\tfor (Map.Entry<String, ArrayList<Float>> entry : MyThread.map_t.entrySet()) {\n\t\t\tArrayList<Float> list = entry.getValue();\n\t\t\tCollections.sort(list);\n\t\t\tif(list.size()%2 != 0) \n\t\t\t\tsol_median.put(entry.getKey(), list.get(list.size()/2)); \n\t else\n\t \tsol_median.put(entry.getKey(), (list.get(list.size()/2) + list.get(list.size()/2 - 1))/2);\n\t\t\tfloat sum = 0;\n\t\t\t\n\t\t\tint size = entry.getValue().size();\n\t\t\tfor (int i=0; i<size; i++) {\n\t\t\t\tsum += entry.getValue().get(i);\n\t\t\t}\n\t\t\tsolution.put(entry.getKey(), sum/size);\n\t\t}\n\t\t\n\t\tHashMap<String, Float> result = sortedMap(solution);\n\t\tfor (Map.Entry<String, Float> entry : result.entrySet()) {\n\t\t\tSystem.out.println(entry.getKey()+\" \"+entry.getValue() + \" \" +sol_median.get(entry.getKey()));\n\t\t}\n\t}", "double sample();", "public static void main(String args[]) {\n\t\tString destination = \"C:\\\\Users\\\\VIIPL02\\\\Desktop\\\\hii\\\\kk_(1).jpg\";\n\t\t//System.out.println(destination);\n\t\t int index1= destination.lastIndexOf(\"_(\");\n \t int index2= destination.lastIndexOf(\")\");\n \t String rig_val=\"\";\n\t\t for(int k=2;k<(index2-index1);k++)\n \t\t rig_val=rig_val+destination.charAt(index1+k)+\"\";\n\t\t \n\t\t \n\t\t //System.out.println(rig_val);\n\t\tfor(int i=0;i<10000000;i++) {\n//\t\tdestination= destination.replace(\"_(\"+(destination.charAt((destination.lastIndexOf(\"(\")+1)))+\")\",\"_(\"+((Integer.parseInt((destination.charAt((destination.lastIndexOf(\"(\")+1)))+\"\" ))+1)+\")\").replace(\"_(\"+(destination.charAt((destination.lastIndexOf(\"(\")+1)))+\")\",\"_(\"+((Integer.parseInt((destination.charAt((destination.lastIndexOf(\"(\")+1)))+\"\" ))+1)+\")\");\n\t\t\t\n\t\t\n\t\t\tdestination=destination.replace(\"_(\"+rig_val+\")\",\"_(\"+(Integer.parseInt(rig_val)+1)+\")\");\n\t\t\trig_val=\"\"+(Integer.parseInt(rig_val)+1);\n\t\t\t//System.out.println(destination);\n\t\t}\n//\t\t //System.out.println( destination.replace(\"_(\"+(destination.charAt((destination.lastIndexOf(\"(\")+1)))+\")\",\"_(\"+((Integer.parseInt((destination.charAt((destination.lastIndexOf(\"(\")+1)))+\"\" ))+1)+\")\"));\n\n\t\t//System.out.println(\"completed\");\n\t}", "static void parseData(String filename) {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\t\t \n\t\t\tString line;\n\t\t String[] tokens;\n\t\t ArrayList<Double> temp;\n\t\t \n\t\t while ((line = br.readLine()) != null) {\n\t\t \ttemp = new ArrayList<Double>();\n\t\t \ttokens = line.split(\",\");\n\t\t \tfor(String s : tokens) {\n\t\t \t\ttemp.add(Double.parseDouble(s));\n\t\t \t}\n\t\t \tData.add(new Vector(temp));\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test32() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n File file0 = fileUtil0.getASINFile(\"\", \"v<B(aXlp#d/?cL2Q??\", \"i@\", \"g_\");\n assertNull(file0);\n }", "public static void main(String[] args) throws FileNotFoundException {\n final Scanner in = new Scanner(new FileInputStream(\"C:\\\\Projects\\\\Solutions\\\\src\\\\tests.txt\"));\r\n\r\n final int Q = in.nextInt();\r\n for (int q = 0; q < Q; q++) {\r\n final long a = in.nextLong();\r\n final long b = in.nextLong();\r\n final long k = in.nextLong();\r\n final int m = in.nextInt();\r\n\r\n final Complex result = exponentiate(new Complex(a, b), k, m);\r\n\r\n System.out.println(result.real + \" \" + result.imaginary);\r\n }\r\n }", "public static void WeightedVector() throws FileNotFoundException {\n int doc = 0;\n for(Entry<String, List<Integer>> entry: dictionary.entrySet()) {\n List<Integer> wtg = new ArrayList<>();\n List<Double> newList = new ArrayList<>();\n wtg = entry.getValue();\n int i = 0;\n Double mul = 0.0;\n while(i<57) {\n mul = wtg.get(i) * idfFinal.get(doc);\n newList.add(i, mul);\n i++;\n }\n wtgMap.put(entry.getKey(),newList);\n doc++;\n }\n savewtg();\n }", "public abstract File mo41087j();", "public void readInputFile(){\n no_of_videos = 5;\n video_size = new int [no_of_videos];\n\n }", "public ArrayList<Double> readFile(String m){\n ArrayList<Double> a = new ArrayList<Double>();\n Scanner r = null;\n try {\n File f = new File(m);\n r = new Scanner(f);\n String scan;\n while(r.hasNextLine()) {\n scan = r.nextLine();\n //System.out.println(scan);\n // look for comma because our price starts after comma\n int commaPosition = scan.indexOf(',');\n //go to next index of the string in one line\n int nextIndex = commaPosition + 1;\n // make a string named price to keep the price from one line\n //substring method takes two parameters- start point and end point(which is integers)\n //price = smaller string = \"2.50\", scan = bigger string = \"bananas,2.50\"\n String price = scan.substring(nextIndex,scan.length());\n double doublePrice = Double.parseDouble(price);\n //System.out.println(doublePrice);\n a.add(doublePrice);\n }\n } catch (FileNotFoundException ex) {\n\n } catch (IOException ex) {\n\n } finally {\n if(r!=null) r.close();\n }\n return a;\n\n }", "private void readFromFile(String filename) {\n\t\ttry {\n\t\t Scanner read = new Scanner(new File(filename));\n\t\t String line;\n\t\t int counter = 0;\n\t\t String temp;\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\t\t height = convertToInt(temp);\n\n\t\t line = read.nextLine();\n\t\t temp = line.substring(0);\n\n\t\t length = convertToInt(temp);\n\t\t size = height*length;\n\t\t \n\t\t squares = new Square[size][size];\n\n\t\t while(read.hasNextLine()) {\n\t\t\t\tline = read.nextLine();\n\t\t \tfor (int i = 0; i < line.length(); i++) {\n\t\t \t temp = line.substring(i, i+1);\n\n\t\t \t if (temp.equals(\".\")) {\n\t\t \t\t\tsquares[counter][i] = new FindValue(0);\n\t\t \t } \n\t\t \t else {\n\t\t\t\t\t\tsquares[counter][i] = new PreFilled(convertToInt(temp));\n\t\t\t \t\t}\n\t\t \t}\n\t\t \tcounter++;\n\t\t }\n\t\t} catch(IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n }", "static void createDataForGraph() {\n double x = 2;\n String fileName = \"./lab1part2docs/dataRec.csv\";\n createFile(fileName);\n writeToFile(\"k,halfCounter,oneCounter,x=\" + x + \"\\n\", fileName);\n for (int k = 1; k <= 10000; k++) {\n Raise.runBoth(x, k);\n writeToFile(k + \",\" + Raise.recHalfCounter + \",\" + Raise.recOneCounter + '\\n', fileName);\n Raise.recHalfCounter = 0;\n Raise.recOneCounter = 0;\n }\n System.out.println(\"Finished\");\n }", "public static void main(String[] argv) {\n\t\t\n\t\tif (argv.length !=7){\n\t\t\tSystem.out.println(\"USAGE: executable <input_filename> <num_points_in_file> <dimension> <distribution[1..100]> <num_unique_query> <num_query> <slot>\\n\");\n\t\t\treturn ;\n\t\t}\n\t\t\nint type,num_mbr, extra,dim,DIMENSION,distribution,num_unique_query,POINTS;\nString filenm;\n\nint q,r,times,slot;\n\n\nfilenm = argv[0];\n\nPOINTS = Integer.parseInt(argv[1]);\nDIMENSION = Integer.parseInt(argv[2]);\n\ndistribution = Integer.parseInt(argv[3]);\n\nnum_unique_query = Integer.parseInt(argv[4]);\nq= Integer.parseInt(argv[5]);\nslot= Integer.parseInt(argv[6]);\n\ndouble[][][] pt =new double[POINTS+10][2][10];\t\t\n\t\t\n\t\t\t\t\t\n\t\t\t try {\n\t\t\t\t BufferedReader in = new BufferedReader(new FileReader(filenm));\n\t\t\t\t String str;\n//\t\t\t\t str = in.readLine();\n\t\t\t\t int i=0;\n\t\t\t\t while ((str = in.readLine()) != null && i != POINTS) {\n\t\t\t\t //System.out.println(str);\n\t\t\t\t str = in.readLine();\n\t\t\t\t String[] arr = str.split(\"\\t\");\t\t\t\t \n\t\t\t\t\t\tfor(int j=0;j<10;j++){\n\t\t\t\t\t\t\tpt[i][0][j] = Double.parseDouble(arr[j]);\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t str = in.readLine();\n\t\t\t\t arr = str.split(\"\\t\");\t\t\t\t \n\t\t\t\t \n\t\t\t\t\t\tfor(int j=0;j<10;j++){\n\t\t\t\t\t\t\tpt[i][1][j] = Double.parseDouble(arr[j]);\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t i++;\n\t\t\t\t }\n\t\t\t\t in.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t System.out.println(\"File Read Error Resource.in\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\tRandom rand = new Random();\n\t\t\tfor(int i2=0;i2 < slot; i2++){\n\t\t\t\tint rr= rand.nextInt(17);\n\t\t\t\tfor(int i1=0;i1 < q;){\n\n\t\t\t//while(q>0){\n\t\t\t\tif(rand.nextInt(100) < distribution){\n\t\t\t\t\t // Initialize random number generator.\n\t\n\t\t\t\t\t\tr = rand.nextInt(num_unique_query)* (int)((POINTS-10000)/(num_unique_query + rr));\n\t\t\t\t\t//cout <<\"random value \"<< r<< endl;\n\t\t\t\t\t// srand(pow(q,r));\n\t\t\t\t\t// srand(pow(q,r));\n\t\t\t\t\t//\ttimes=1;\n\t\t\t\t\t\ttimes =rand.nextInt(29) + 5 ;\n\n\t\t\t\t\t//\t\tfile>>dim;\t\n\t\t\t\t\t//\t\tfile>>num_mbr;\t\n\n\n\n\t\t\t\t\t\tfor(int k =0; k<times; k++){\n\t\t\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\t\t\ti1++;\n\t\t\t\t\t\tdouble r_1= 0.005 + (double)rand.nextInt(500)/10000.0;\n\t\t\t\t\t\tSystem.out.println(r_1);\n\n\t\t\t\t\t\tfor(int j=0;j<DIMENSION;j++){\n\t\t\t\t\t//\t\t\tcout<< pt[0][j];\n\t\t\t\t\t\t\tSystem.out.print(pt[r][0][j] + \"\\t\");\t\t\t\n\n\t\t\t\t\t\t\t}\t\n\n\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\t}\n\n\n\n\t\t\t\t}\n\t\t\t\telse{\t\t\t\t\t\t\t// nonpopular data \n\t\n\t\t\t\t\tfor(int idx =0 ; idx < 20 ; idx++){\n\t\n\t\t\t\t\t\t\tr = rand.nextInt(POINTS);\n\n\n\n\t\t\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\t\t\ti1++;\n\t\t\t\t\t\tdouble r_1= 0.005 + (double)rand.nextInt(500)/10000.0;\n\t\t\t\t\t\tSystem.out.println(r_1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t//\tcout<<r<<\"\\n\";\n\t\t\t\t\t\t\t\tfor(int j=0;j<DIMENSION;j++){\n\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tSystem.out.print(pt[r][0][j] + \"\\t\");\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\tSystem.out.println(\"\");\n\n\n\n\t\n\t\n\t\t\t\t\t}\t\n\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"-1\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t}", "public RandomAccessFile getCases() {\n \n return cases;\n}", "C3579d mo19710g(int i) throws IOException;", "public void addInMemory(double num) {\n memoryValue += SciCalculator.currentValue = num;\n }", "public static void main(String [] args){\n writeFile1(\"1234567890987654321\");\n }", "public List<Double> getData(String fileName,String sar_device, String sar_type) throws IOException {\n\t\tFileReader fr = new FileReader(\"./temp/\"+fileName);\n\t\tList<Double> resultListA = new ArrayList<Double>();\n\t\t \n\t\t//get the type:rxpck/txpck/rxkB...\n\t\tint i=getType(sar_type);\n\t\t \n\t\tresultListA=getdata(fr,sar_device,i);\n\t\treturn resultListA;\n\t}", "public void salvaPartita(String file) {\n\r\n }", "public static void createFile(double[] array){\n //String for the name of the file that's going to be created.\n String newFileName = \"results.csv\";\n\n //Create a file variable using the created file name\n try{\n File newFile = new File(newFileName);\n\n //Create new instance of PrintWriter to write into the new file\n FileWriter csvWriter = new FileWriter(newFile, false);\n //For each number, print the percentage into the file\n for(int i = 0; i < 9; i++){\n csvWriter.write((i+1) + \": \" + array[i] + \"%\\n\");\n }\n //Close the PrintWriter since we don't need it anymore.\n csvWriter.close();\n }\n catch(FileNotFoundException e){\n System.out.println(\"File not found\");\n }\n catch(IOException e){\n System.out.println(\"IO Exception\");\n }\n }", "public static void readfile(String FILENAME) {\n\t\tString[] parts = null;\n\t\t// Initialising s as 9100 since the cardinality for a src is 9060\n\t\tint s = 2500;\n\t\t// Choosing m\n\t\tint m = 500000000;\n\t\tArrayList<ArrayList<Integer>> UniversalHashList = new ArrayList<ArrayList<Integer>>();\n\t\tArrayList<ArrayList<Integer>> XsrcMasterList = new ArrayList<ArrayList<Integer>>();\n\t\tList masterDstList = new ArrayList<ArrayList<String>>();\n\t\tString[] BitArray = new String[m];\n\t\tPrintStream out = null;\n\t\ttry {\n\t\t\tout = new PrintStream(new FileOutputStream(\"output_virbitmap.csv\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString src = null;\n\t\tHashMap<String, List> srcDstMap = new HashMap<String, List>();\n\t\tArrayList<Integer> R = new ArrayList<Integer>();\n\t\tR = genRandomArray(s);\n\t\t// initializing bit array\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tBitArray[i] = \"False\";\n\t\t}\n\t\t// reading input file and writing to HashMap<src,dstlist>\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(FILENAME))) {\n\n\t\t\tString sCurrentLine;\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\tparts = sCurrentLine.trim().split(\"\\\\s+\");\n\t\t\t\tsrc = parts[0];\n\t\t\t\tString dst = parts[1];\n\t\t\t\tif (!srcDstMap.containsKey(src)) {\n\t\t\t\t\tArrayList<String> dstList = new ArrayList<String>();\n\t\t\t\t\tdstList.add(dst);\n\t\t\t\t\tsrcDstMap.put(src, dstList);\n\t\t\t\t\t// hashing(B,convertIPAddress(tokens[0]));\n\t\t\t\t} else\n\t\t\t\t\tsrcDstMap.get(src).add(dst);\n\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor (int i = 0; i < srcDstMap.size(); i++) {\n\t\t\tArrayList<Integer> masterHashList = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> XsrcList = new ArrayList<Integer>();\n\t\t\tUniversalHashList.add(masterHashList);\n\t\t\tXsrcMasterList.add(XsrcList);\n\t\t\t// System.out.println(\"XsrcmasterList\" + XsrcList);\n\n\t\t}\n\t\tIterator srcDstMapIt = srcDstMap.entrySet().iterator();\n\t\tfor (int i = 0; i < srcDstMap.size(); i++) {\n\t\t\tArrayList<Integer> XsrcList = XsrcMasterList.get(i);\n\t\t\tArrayList<Integer> masterHashList = UniversalHashList.get(i);\n\t\t\twhile (srcDstMapIt.hasNext()) {\n\t\t\t\tMap.Entry pair = (Map.Entry) srcDstMapIt.next();\n\t\t\t\tsrc = pair.getKey().toString();\n\t\t\t\tList dstList = (List) pair.getValue();\n\t\t\t\tmasterDstList.add(dstList);\n\t\t\t\tIterator dstListIt = dstList.iterator();\n\t\t\t\twhile (dstListIt.hasNext()) {\n\t\t\t\t\tint hashedSrc = masterHashSetGen(src, dstListIt.next().toString(), s, R);\n\t\t\t\t\t// String[] partsGeneratedStuff =\n\t\t\t\t\t// generatedStuff.trim().split(\":\");\n\t\t\t\t\t// String generatedIndex = partsGeneratedStuff[0];\n\t\t\t\t\t// String hashedSrc = partsGeneratedStuff[1];\n\t\t\t\t\tmasterHashList.add(hashedSrc % BitArray.length);\n\t\t\t\t\t// System.out.println(masterHashList);\n\t\t\t\t\tXsrcList.add(hashedSrc);\n\t\t\t\t\t// System.out.println(XsrcList);\n\t\t\t\t\tBitArray[Math.abs(hashedSrc % (BitArray.length))] = \"True\";\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tdouble bitMapCount = BitMapCount(BitArray, BitArray.length, s);\n\t\t// System.out.println(\"bitMapCount\"+bitMapCount);\n\n\t\tint XsrcIndexperDst = 0;\n\t\tIterator srcDstMapItrecons = srcDstMap.entrySet().iterator();\n\t\twhile (srcDstMapItrecons.hasNext()) {\n\t\t\tdouble XsrcRatio;\n\t\t\tMap.Entry pair = (Map.Entry) srcDstMapItrecons.next();\n\t\t\tsrc = pair.getKey().toString();\n\t\t\t// System.out.println(\"src\" + src);\n\t\t\tList dstList = (List) pair.getValue();\n\t\t\tmasterDstList.add(dstList);\n\t\t\tIterator dstListIt = dstList.iterator();\n\t\t\tString[] srcArray = new String[s];\n\t\t\tdouble count = 0;\n\t\t\t\twhile(dstListIt.hasNext()) {\n\t\t\t\t\tXsrcIndexperDst = XsrcIndexperDst(XsrcMasterList, masterDstList, s, BitArray, src,dstListIt.next().toString(), R) % m;\n\t\t\t\t\t// System.out.println(\"Value\"+BitArray[XsrcIndexperDst]);\n\t\t\t\t\tif (BitArray[XsrcIndexperDst] == \"True\") {\n\t\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\t}\n\t\t\t//System.out.println(\"count per source\" + count + \",\" + (s - count));\n\t\t\tXsrcRatio = -s * Math.log((s-count)/s);\n\t\t\tdouble estimatedSpread = -bitMapCount + XsrcRatio;\n\t\t\tif(estimatedSpread<=0)\n\t\t\t{\n\t\t\t\testimatedSpread=0;\n\t\t\t}\n\t\t\tout.println(dstList.size() + \",\" + estimatedSpread);\n\t\t}\n\n\t}", "private static void generateSequence() throws FileNotFoundException {\n Scanner s = new Scanner(new BufferedReader(new FileReader(inputPath + filename)));\n\t\tlrcSeq = new ArrayList<Integer>();\n\t\tmeloSeq = new ArrayList<Integer>();\n\t\tdurSeq = new ArrayList<Integer>();\n\t\t\n\t\tString line = null;\n\t\tint wordStress;\n\t\tint pitch;\n\t\tint melStress;\n\t\tint stress;\n\t\tint duration;\n\t\t\n\t\twhile(s.hasNextLine()) {\n\t\t\tline = s.nextLine();\n\t\t\tString[] temp = line.split(\",\");\n\t\t\t\n\t\t\twordStress = Integer.parseInt(temp[1]);\n\t\t\tpitch = Integer.parseInt(temp[2]);\n\t\t\tmelStress = Integer.parseInt(temp[3]);\n\t\t\tduration = Integer.parseInt(temp[4]);\n\t\t\t\n\n\t\t\t//combine word level stress and sentence level stress\n\t\t\tstress = wordStress * 3 + melStress;\n\t\t\t/*if(stress < 0 || stress > 9) {\n\t\t\t\tSystem.out.println(\"Stress range error\");\n\t\t\t}*/\n\t\t\tlrcSeq.add(stress);\n\t\t\tmeloSeq.add(pitch);\n\t\t\tdurSeq.add(duration);\n\t\t}\n\t\t\n\t\t//calculate relative value\n\t\tfor(int i = 0;i < lrcSeq.size() -1;++i) {\n\t\t\tlrcSeq.set(i, lrcSeq.get(i+1)-lrcSeq.get(i));\n\t\t\tmeloSeq.set(i, meloSeq.get(i+1) - meloSeq.get(i));\n\t\t\tif(durSeq.get(i+1) / durSeq.get(i)>=1)\n\t\t\t\tdurSeq.set(i, durSeq.get(i+1) / durSeq.get(i));\n\t\t\telse \n\t\t\t\tdurSeq.set(i,durSeq.get(i) / durSeq.get(i+1) * (-1));\n\t\t}\n\t\tlrcSeq.remove(lrcSeq.size()-1);\n\t\tmeloSeq.remove(meloSeq.size()-1);\n\t\tdurSeq.remove(durSeq.size()-1);\n\t\t\n\t}", "private void get_values(File f1){\n String line;\n Scanner read_file=null;\n try{\n read_file= new Scanner(f1);\n }catch(FileNotFoundException e){\n System.out.println(\"The specified file of the Student cannot be found.\");\n return;\n }\n line=read_file.nextLine();\n while(!(line.contains(\"OOP\"))){\n line=read_file.nextLine();\n }\n line=read_file.nextLine();\n while(!(line.contains(\"Chap_1\"))){\n line=read_file.nextLine();\n }\n //System.out.println(line.substring(8));\n OOP[0]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n OOP[1]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n OOP[2]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n OOP[3]=Float.parseFloat(line.substring(8));\n\n line=read_file.nextLine();\n while(!(line.contains(\"DE\"))){\n line=read_file.nextLine();\n }\n line=read_file.nextLine();\n while(!(line.contains(\"Chap_1\"))){\n line=read_file.nextLine();\n }\n DE[0]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n DE[1]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n DE[2]=Float.parseFloat(line.substring(8));\n\n line=read_file.nextLine();\n while(!(line.contains(\"DSA\"))){\n line=read_file.nextLine();\n }\n line=read_file.nextLine();\n while(!(line.contains(\"Chap_1\"))){\n line=read_file.nextLine();\n }\n DSA[0]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n DSA[1]=Float.parseFloat(line.substring(8));\n line=read_file.nextLine();\n DSA[2]=Float.parseFloat(line.substring(8));\n\n line=read_file.nextLine();\n line=read_file.nextLine();\n total_marks=Float.parseFloat(line.substring(13));\n average=total_marks/10;\n\n read_file.close();\n }", "private void gatherFile(FileStatus[] fstat)\r\n\t{\r\n\t inputSize = 0;\t\r\n\t paths = new Path[fstat.length];\t\r\n\t for(int i=0;i<fstat.length;i++)\r\n\t {\r\n\t inputSize+=fstat[i].getLen();\r\n\t paths[i] = fstat[i].getPath();\r\n\t }\r\n\t }", "public static void main(String[] args) throws FileNotFoundException {\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter a file of scores: \");\n String fileName = input.next();\n File file = new File(fileName);\n int numberOfScores = 0;\n double totalScores = 0;\n double avarege = 0;\n if (!file.exists()) {\n throw new FileNotFoundException();\n }\n\n try (\n Scanner inputFile = new Scanner(file);\n ) {\n while (inputFile.hasNext()) {\n totalScores += Double.parseDouble(inputFile.next());\n numberOfScores++;\n }\n\n }\n avarege = totalScores / numberOfScores;\n System.out.println(\"Total Score: \" + totalScores +\n \"\\nAvarage: \" + avarege);\n }", "public String getFirstFilename() {\n\t\tTreeMap<Double,File> tm = new TreeMap<Double,File>();\n\t\tFile file=new File(\"C:\\\\temp\");\n\t\tFile subFile[] = file.listFiles();\n\t\tint fileNum = subFile.length;\n\t\tfor (int i = 0; i < fileNum; i++) {\n\t\t Double tempDouble = new Double(subFile[i].lastModified());\n\t\t tm.put(tempDouble, subFile[i]);\n\t\t }\t \n\t\tint count=0;\n\t\tString fileName=null;\n\t\tSet<Double> set = tm.keySet();\n\t\tIterator<Double> it = set.iterator();\n\t\twhile (it.hasNext()) {\n\t\t Object key = it.next();\n\t\t Object objValue = tm.get(key);\n\t\t File tempFile = (File) objValue;\n\t\t if(count==fileNum-2)\n\t\t\t fileName=tempFile.getName();\n\t\t count++;\n\t\t }\n\t\tSystem.out.println(\"第一个log的文件名称-->\"+fileName);\n\t\treturn fileName;\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter filename: \");\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString filename = scanner.nextLine();\n\t\tBufferedReader fileReader = null;\n\t\tint[] counts = new int[10];\n\t\tint total = 0;\n\t\ttry {\n\t\t\tfileReader = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile ((line = fileReader.readLine()) != null) {\n\t\t\t\tif(line.length() > 0) {\n\t\t\t\t\tString[] parts = line.split(\" \");\n\t\t\t\t\tint num;\n\t\t\t\t\tif(parts.length > 0) {\n\t\t\t\t\t\tnum = Integer.parseInt(parts[parts.length - 1]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnum = Integer.parseInt(line); \n\t\t\t\t\t}\n\t\t\t\t\tint firstDigit = firstDigit(num);\n\t\t\t\t\tcounts[firstDigit]++;\n\t\t\t\t\ttotal++;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(int i = 1; i < counts.length; i++) {\n\t\t\tSystem.out.printf(\"%d : %d : %.2f%%\\n\", i, counts[i], counts[i] * 100. / total);\n\t\t}\n\t}", "public double nextDouble() {\n\tdouble result = (d1 - 1.0) / (POW3_33 - 1.0);\n\tnextIterate();\n\treturn result;\n }", "public abstract File mo41088k();", "public Student[] constructArray(String fileName)throws IOException{\n \n Student[] ans = new Student[10];\n Scanner Sc = new Scanner(new File(fileName));\n Sc.useDelimiter(\"\\t|\\n\");\n this.amount = 0;\n while(Sc.hasNext()){\n if(this.amount == ans.length){\n ans = doubler(ans);\n }\n String ID = Sc.next();\n String SName = Sc.next();\n String Email = Sc.next();\n String SClass = Sc.next();\n String major = Sc.next();\n ans[this.amount] = new Student(ID, SName, Email, SClass, major);\n amount++;\n }\n return ans;\n }", "private static ArrayList<Double> autoInput() {\n\t\tArrayList<Double> cumData = new ArrayList<Double>();\n\t\tString workingDir = System.getProperty(\"user.dir\");\n\n\t\tSystem.out.println(AUTO_MSG);\n\t\tin = new Scanner(System.in);\n\n\t\twhile (true) {\n\t\t\tString filename = in.nextLine();\n\t\t\tString path = workingDir + File.separator + filename;\n\t\t\tFile file = new File(path);\n\t\t\tif (!file.canRead()) {\n\t\t\t\tSystem.out.println(\"Can\\'t read file! Please try again.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Good until this point\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(file));\n\t\t\t\tString line = null;\n\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\tSystem.out.println(\"Line: \" + line);\n\t\t\t\t\tcumData.addAll(strToArrList(line));\n\t\t\t\t}\n\t\t\t\t// if (line == null)\n\t\t\t\treturn cumData;\n\t\t\t\t// cumData.addAll(strToArrList(line));\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(FILE_FORMAT_ERR_MSG);\n\t\t\t\tcontinue;\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(FILE_NOT_FOUND_MSG);\n\t\t\t\tcontinue;\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t}\n\t}", "public static void readDirectory(String dir){\n\t\tMap<Integer,Integer> catemap = new HashMap<Integer, Integer>();\r\n\t\tFile[] names = null;\r\n\t\tFile file = new File(dir);\r\n\t\tif(file.isFile())\r\n\t\t\tnames = new File[]{file};\r\n\t\telse\r\n\t\t\tnames = new File(dir).listFiles();\r\n\t\tList<String> lines = null;\r\n\t\tList<String> strs = null;\r\n\t\tList<Integer> keys = new ArrayList<Integer>();\r\n\t\tList<Integer> values = new ArrayList<Integer>();\r\n\t\tint v = 0;\r\n\t\tif(null!=names&&names.length>0){\r\n\t\t\tfor(File f:names){\r\n\t\t\t\tif(null!=lines)\r\n\t\t\t\t\tlines.clear();\r\n\t\t\t\tlines = readFile(f,\"utf-8\");\r\n\t\t\t\tif(null!=lines){\r\n\t\t\t\t\tint j = 0;\r\n\t\t\t\t\tint k=0;\r\n\t\t\t\t\tfor(String line:lines){\r\n\t\t\t\t\t\tstrs = parseStr2List(line, \"\\\\t\");\r\n//\t\t\t\t\t\tif(null!=strs&&strs.size()==7){\r\n//\t\t\t\t\t\t\tv = getPerValue(strs.get(3));\r\n//\t\t\t\t\t\t\tmaxmap.put(v, 1+DataFormat.parseInt(maxmap.get(v)));\r\n//\t\t\t\t\t\t\tv = getPerValue(strs.get(5));\r\n//\t\t\t\t\t\t\tcatemap.put(v, 1+DataFormat.parseInt(catemap.get(v)));\r\n//\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(null!=strs&&strs.size()==2){\r\n\t\t\t\t\t\t\tv = DataFormat.parseInt(strs.get(0));\r\n//\t\t\t\t\t\t\tif(v<=500){\r\n//\t\t\t\t\t\t\t\tv = j/5+1;\r\n//\t\t\t\t\t\t\t\tj = j+1;\r\n//\t\t\t\t\t\t\t}else{\r\n//\t\t\t\t\t\t\t\tv = 101;\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(k>500) break;\r\n\t\t\t\t\t\t\tk++;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(j<20){\r\n\t\t\t\t\t\t\t\tkeys.add(v);\r\n\t\t\t\t\t\t\t\tvalues.add(DataFormat.parseInt(strs.get(1)));\r\n\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(keys.toArray(new Integer[]{})));\r\n\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(values.toArray(new Integer[]{})));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n//\t\t\t\t\t\t\tcatemap.put(v, DataFormat.parseInt(strs.get(1))+DataFormat.parseInt(catemap.get(v)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\tfor(Entry<Integer, Integer> entry:maxmap.entrySet()){\r\n//\t\t\tUtils.appendToFile(\"/vol/user_log/maxmap.txt\", entry.getKey()+\"\\t\"+entry.getValue());\r\n//\t\t}\r\n//\t\tfor(Entry<Integer, Integer> entry:catemap.entrySet()){\r\n//\t\t\tUtils.appendToFile(\"C:\\\\Program Files\\\\SecureCRT\\\\download\\\\map.txt\", entry.getKey()+\"\\t\"+entry.getValue());\r\n//\t\t}\r\n\t}", "public Vector loadAffyGCOSExpressionFile(File f) throws IOException {\r\n \tthis.setTMEVDataType();\r\n final int preSpotRows = this.sflp.getXRow()+1;\r\n final int preExperimentColumns = this.sflp.getXColumn();\r\n int numLines = this.getCountOfLines(f);\r\n int spotCount = numLines - preSpotRows;\r\n\r\n if (spotCount <= 0) {\r\n JOptionPane.showMessageDialog(superLoader.getFrame(), \"There is no spot data available.\", \"TDMS Load Error\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n \r\n int[] rows = new int[] {0, 1, 0};\r\n int[] columns = new int[] {0, 1, 0};\r\n //String value,pvalue;\r\n String detection;\r\n\r\n float cy3, cy5;\r\n\r\n String[] moreFields = new String[1];\r\n String[] extraFields=null;\r\n final int rColumns = 1;\r\n final int rRows = spotCount;\r\n \r\n ISlideData slideDataArray[]=null;\r\n AffySlideDataElement sde=null;\r\n FloatSlideData slideData=null;\r\n \r\n BufferedReader reader = new BufferedReader(new FileReader(f));\r\n StringSplitter ss = new StringSplitter((char)0x09);\r\n String currentLine;\r\n int counter, row, column,experimentCount=0;\r\n counter = 0;\r\n row = column = 1;\r\n this.setFilesCount(1);\r\n this.setRemain(1);\r\n this.setFilesProgress(0);\r\n this.setLinesCount(numLines);\r\n this.setFileProgress(0);\r\n float[] intensities = new float[2];\r\n \r\n while ((currentLine = reader.readLine()) != null) {\r\n if (stop) {\r\n return null;\r\n }\r\n// fix empty tabbs appending to the end of line by wwang\r\n while(currentLine.endsWith(\"\\t\")){\r\n \tcurrentLine=currentLine.substring(0,currentLine.length()-1);\r\n }\r\n ss.init(currentLine);\r\n \r\n if (counter == 0) { // parse header\r\n \t\r\n \tif(sflp.onlyIntensityRadioButton.isSelected()) \r\n \t\texperimentCount = ss.countTokens()- preExperimentColumns;\r\n \t\t\r\n \tif(sflp.intensityWithDetectionRadioButton.isSelected()) \r\n \t\texperimentCount = (ss.countTokens()+1- preExperimentColumns)/2;\r\n \t\t\r\n \tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()) \r\n \t\texperimentCount = (ss.countTokens()+1- preExperimentColumns)/3;\r\n \t\r\n \t\r\n \tslideDataArray = new ISlideData[experimentCount];\r\n \tSampleAnnotation sampAnn=new SampleAnnotation();\r\n \tslideDataArray[0] = new SlideData(rRows, rColumns, sampAnn);//Added by Sarita to include SampleAnnotation model.\r\n \r\n slideDataArray[0].setSlideFileName(f.getPath());\r\n for (int i=1; i<experimentCount; i++) {\r\n \tsampAnn=new SampleAnnotation();\r\n \tslideDataArray[i] = new FloatSlideData(slideDataArray[0].getSlideMetaData(),spotCount, sampAnn);//Added by Sarita \r\n \tslideDataArray[i].setSlideFileName(f.getPath());\r\n \t//System.out.println(\"slideDataArray[i].slide file name: \"+ f.getPath());\r\n }\r\n if(sflp.onlyIntensityRadioButton.isSelected()){\r\n \tString [] fieldNames = new String[1];\r\n \t//extraFields = new String[1];\r\n \tfieldNames[0]=\"AffyID\";\r\n \tslideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n }else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \tString [] fieldNames = new String[2];\r\n \textraFields = new String[1];\r\n fieldNames[0]=\"AffyID\";\r\n fieldNames[1]=\"Detection\";\r\n slideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n }else{\r\n \tString [] fieldNames = new String[3];\r\n \textraFields = new String[2];\r\n fieldNames[0]=\"AffyID\";\r\n fieldNames[1]=\"Detection\";\r\n fieldNames[2]=\"P-value\";\r\n slideDataArray[0].getSlideMetaData().appendFieldNames(fieldNames);\r\n \r\n }\r\n ss.nextToken();//parse the blank on header\r\n for (int i=0; i<experimentCount; i++) {\r\n \tString val=ss.nextToken();\r\n\t\t\t\t\tslideDataArray[i].setSampleAnnotationLoaded(true);\r\n\t\t\t\t\tslideDataArray[i].getSampleAnnotation().setAnnotation(\"Default Slide Name\", val);\r\n\t\t\t\t\tslideDataArray[i].setSlideDataName(val);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.mav.getData().setSampleAnnotationLoaded(true);\r\n\t\t\t \t \r\n if(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \tss.nextToken();//parse the detection\r\n ss.nextToken();//parse the pvalue\r\n }else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \tss.nextToken();//parse the detection \r\n } \r\n }\r\n \r\n } else if (counter >= preSpotRows) { // data rows\r\n \trows[0] = rows[2] = row;\r\n \tcolumns[0] = columns[2] = column;\r\n \tif (column == rColumns) {\r\n \t\tcolumn = 1;\r\n \t\trow++;//commented by sarita\r\n \t\t\r\n \t\t\r\n \t} else {\r\n \t\tcolumn++;//commented by sarita\r\n \t\t\r\n \t\t\r\n \t}\r\n\r\n \t//affy ID\r\n \tmoreFields[0] = ss.nextToken();\r\n \r\n \t\r\n \t\r\n String cloneName = moreFields[0];\r\n if(_tempAnno.size()!=0) {\r\n \t \r\n \t \t \r\n \t if(((MevAnnotation)_tempAnno.get(cloneName))!=null) {\r\n \t\t MevAnnotation mevAnno = (MevAnnotation)_tempAnno.get(cloneName);\r\n\r\n \t\t sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, intensities, moreFields, mevAnno);\r\n \t }else {\r\n \t /**\r\n \t * Sarita: clone ID explicitly set here because if the data file\r\n \t * has a probe (for eg. Affy house keeping probes) for which Resourcerer\r\n \t * does not have annotation, MeV would still work fine. NA will be\r\n \t * appended for the rest of the fields. \r\n \t * \r\n \t * \r\n \t */\r\n \t\tMevAnnotation mevAnno = new MevAnnotation();\r\n \t\tmevAnno.setCloneID(cloneName);\r\n sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, new float[2], moreFields, mevAnno);\r\n \t \t\t \r\n }\r\n }\r\n /* Added by Sarita\r\n * Checks if annotation was loaded and accordingly use\r\n * the appropriate constructor.\r\n * \r\n * \r\n */\r\n \r\n else {\r\n sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, intensities, moreFields);\r\n }\r\n \r\n \t\r\n \t//sde = new AffySlideDataElement(String.valueOf(row+1), rows, columns, new float[2], moreFields);\r\n\r\n \tslideDataArray[0].addSlideDataElement(sde);\r\n \tint i=0;\r\n\r\n \tfor ( i=0; i<slideDataArray.length; i++) { \r\n \t\ttry {\t\r\n\r\n \t\t\t// Intensity\r\n \t\t\tintensities[0] = 1.0f;\r\n \t\t\tintensities[1] = ss.nextFloatToken(0.0f);\r\n \t\t\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\t\r\n \t\t\t\textraFields[0]=ss.nextToken();//detection\r\n \t\t\t\textraFields[1]=ss.nextToken();//p-value\r\n \t\t\t\t\r\n \t\t\t}else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\textraFields[0]=ss.nextToken();//detection\r\n \t\t\t}\r\n\r\n \t\t} catch (Exception e) {\r\n \t\t\t\r\n \t\t\tintensities[1] = Float.NaN;\r\n \t\t}\r\n \t\tif(i==0){\r\n \t\t\t\r\n \t\t\tslideDataArray[i].setIntensities(counter - preSpotRows, intensities[0], intensities[1]);\r\n \t\t\t//sde.setExtraFields(extraFields);\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\tsde.setDetection(extraFields[0]);\r\n \t\t\t\tsde.setPvalue(new Float(extraFields[1]).floatValue());\r\n \t\t\t}else if(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\tsde.setDetection(extraFields[0]);\r\n \t\t\t}\r\n \t\t}else{\r\n \t\t\tif(i==1){\r\n \t\t\t\tmeta = slideDataArray[0].getSlideMetaData(); \t\r\n \t\t\t}\r\n \t\t\tslideDataArray[i].setIntensities(counter-preSpotRows,intensities[0],intensities[1]);\r\n \t\t\tif(sflp.intensityWithDetectionPvalRadioButton.isSelected()){\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setDetection(counter-preSpotRows,extraFields[0]);\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setPvalue(counter-preSpotRows,new Float(extraFields[1]).floatValue());\r\n \t\t\t}\r\n \t\t\tif(sflp.intensityWithDetectionRadioButton.isSelected()){\r\n \t\t\t\t((FloatSlideData)slideDataArray[i]).setDetection(counter-preSpotRows,extraFields[0]);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n\r\n } else {\r\n //we have additional sample annoation\r\n \r\n \tfor (int i = 0; i < preExperimentColumns - 1; i++) {\r\n\t\t\t\t\tss.nextToken();\r\n\t\t\t\t}\r\n\t\t\t\tString key = ss.nextToken();\r\n\r\n\t\t\t\tfor (int j = 0; j < slideDataArray.length; j++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(slideDataArray[j].getSampleAnnotation()!=null){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tString val=ss.nextToken();\r\n\t\t\t\t\t\tslideDataArray[j].getSampleAnnotation().setAnnotation(key, val);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tSampleAnnotation sampAnn=new SampleAnnotation();\r\n\t\t\t\t\t\t\tsampAnn.setAnnotation(key, ss.nextToken());\r\n\t\t\t\t\t\t\tslideDataArray[j].setSampleAnnotation(sampAnn);\r\n\t\t\t\t\t\t\tslideDataArray[j].setSampleAnnotationLoaded(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n \t}\r\n \t\r\n this.setFileProgress(counter);\r\n \tcounter++;\r\n \t//System.out.print(counter);\r\n \t}\r\n reader.close();\r\n \r\n \r\n Vector data = new Vector(slideDataArray.length);\r\n \r\n for(int j = 0; j < slideDataArray.length; j++)\r\n \tdata.add(slideDataArray[j]);\r\n \r\n this.setFilesProgress(1);\r\n return data;\r\n }", "private void joinFiles(String[] listFileContent, String filename0)\n\t{\n\t\tSystem.out.println(\"co vao day\");\n\t\tint[] start = new int[nu], next = new int[nu], copyPos = new int[nu];\n\t\tstart = intialStart();\n\t\tArrayList<Double> sumArray;\n\t\ttry {\n\t\t\tBufferedWriter out = new BufferedWriter(new FileWriter(filename0));\n\t\t\twhile (true)//while next1 = find (file1,+1)\n\t\t\t{\n\t\t\t\tnext = findNext(start, listFileContent);//find next\n\t\t\t\tif (checkNotFound(next)) break;\n\t\t\t\tcopyPos = findCopyPos(next);//find copyPos\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/*printNam(\"Day la next1: \");System.out.println(next1);\n\t\t\t\tprintNam(\"next2: \"); System.out.println(next2);\n\t\t\t\tprintNam(\"start1: \"); System.out.println(start1);\n\t\t\t\tprintNam(\"start2: \"); System.out.println(start2);\n\t\t\t\tprintNam(\"file: \"); System.out.println(index);*/\n\t\t\t\t//concatString = file1.substring(start1, copyPos1).concat(file2.substring(start2, copyPos2));\n\t\t\t\t\n\t\t\t\tsumArray = genConcatString(listFileContent, start, copyPos);\n\t\t\t\t\n\t\t\t\twriteToFile(out, sumArray);//write to 0.data.\n\t\t\t\t//update start\n\t\t\t\tstart = updateStart(next);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/*sumArray = genConcatString(listFileContent, start);\n\t\t\t\t\n\t\t\twriteToFile(out, sumArray);*/\n\t\t\t\t\n\t\t\tout.close();\n\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t}", "public ScanOperator(File file){\r\n\t\tthis.file = file;\r\n\t\ttry{\r\n\t\t br = new RandomAccessFile(this.file, \"r\");\r\n\t\t}catch(FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"File not found!\");\r\n\t\t}\r\n\t}", "private void readDataFile(int filetype, String filename) {\r\n\t\tint nfields=7; //number of data fields\r\n\t\tint i = 0; //temp elements counter\r\n\t\tint num_elements; //number of items (lines)\r\n\t\tString dataline;\r\n\t\tString[] elementdata;\r\n\t\ttry {\r\n\t\t\tFile filesource = new File(filename);\r\n\t\t\t//open data file\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(filesource.toURI().toURL().openStream()));\r\n\t\t\t//count elements\r\n\t\t\twhile(null != (dataline = in.readLine())) {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tnum_elements = i;\r\n\t\t\t//num_elements = i+1;\r\n\t\t\t//set arrays size by case\r\n\t\t\tif (filetype == 0) {\r\n\t\t\t\tsetMultipliersArraySize(num_elements);\r\n\t\t\t\tnfields = 3;\r\n\t\t\t}\r\n\t\t\telse if (filetype == 1) {\r\n\t\t\t\tsetCategoriesArraySize(num_elements);\r\n\t\t\t\tnfields = 1;\r\n\t\t\t}\r\n\t\t\telse if (filetype == 2) {\r\n\t\t\t\tsetUnitsArraySize(num_elements);\r\n\t\t\t\tnfields = 7;\r\n\t\t\t}\r\n\t\t\telse if (filetype == 3) {\r\n\t\t\t\tp_label = new String[i];\r\n\t\t\t\tnfields = 1;\r\n\t\t\t}\r\n\r\n\t\t\ti = 0;\r\n\t\t\tin = new BufferedReader(new InputStreamReader(filesource.toURI().toURL().openStream()));\r\n\t\t\t//read lines (each line is one menu element)\r\n\t\t\twhile(null != (dataline = in.readLine())) {\r\n\t\t\t\t//get element data array\r\n\t\t\t\telementdata = StringUtil.splitData(dataline, '\\t', nfields);\r\n\t\t\t\t//assign data\r\n\t\t\t\tif (filetype == 0) { //multipliers file\r\n\t\t\t\t\tp_multiplier_name[i] = getEncodedString(getDefaultValue(elementdata[0], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_multiplier_description[i] = getEncodedString(getDefaultValue(elementdata[1], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_multiplier_value[i] = parseNumber(getDefaultValue(elementdata[2], \"1\"));\r\n\t\t\t\t}\r\n\t\t\t\telse if (filetype == 1) { //category file\r\n\t\t\t\t\tp_category_name[i] = getEncodedString(getDefaultValue(elementdata[0], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t}\r\n\t\t\t\telse if (filetype == 2) { //units file\r\n\t\t\t\t\tp_unit_category_id[i] = new Integer(elementdata[0]);\r\n\t\t\t\t\tp_unit_symbol[i] = getEncodedString(getDefaultValue(elementdata[1], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_unit_name[i] = getEncodedString(getDefaultValue(elementdata[2], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t\tp_unit_scale[i] = parseNumber(getDefaultValue(elementdata[3], \"1\"));\r\n\t\t\t\t\tp_unit_offset[i] = parseNumber(getDefaultValue(elementdata[4], \"0\"));\r\n\t\t\t\t\tp_unit_power[i] = parseNumber(getDefaultValue(elementdata[5], \"1\"));\r\n\t\t\t\t\tp_unit_description[i] = getEncodedString(getDefaultValue(elementdata[6], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t}\r\n\t\t\t\telse if (filetype == 3) { //labels file\r\n\t\t\t\t\tp_label[i] = getEncodedString(getDefaultValue(elementdata[0], \"\"), p_page_encoding, p_encoding);\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "int attrib(int i, File v) {\n if (i < max) {\n AllFiles[i] = v;\n } else {\n File[] temp = new File[max];\n int j;\n for (j = 0; j < max; j++) temp[j] = AllFiles[j];\n AllFiles = new File[max + increase];\n for (j = 0; j < max; j++) AllFiles[j] = temp[j];\n max = max + increase;\n AllFiles[i] = v;\n }\n return (0);\n }", "@Test\r\n\tpublic void generateFile() {\n\t\tfor (int i = 1; i <= 5; i++) {\r\n\t\t\t// String filePath = \"C://Users//AtifKhan//Desktop//sample-\" + i +\r\n\t\t\t// \".csv\";\r\n\t\t\tString filePath = \"C://Users//olcay tarazan//Desktop//sample-\" + i + \".csv\";\r\n\t\t\tint numberOfDataLines = 400;\r\n\t\t\ttry {\r\n\t\t\t\tgenerateCsvFile(filePath, numberOfDataLines);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"File generated : sample-\" + i + \".csv \");\r\n\t\t}\r\n\t}", "public static double[] rawFreqCreator(){\n\t\tfinal int EXTERNAL_BUFFER_SIZE = 2097152;\n\t\t//128000\n\n\t\t//Get the location of the sound file\n\t\tFile soundFile = new File(\"MoodyLoop.wav\");\n\n\t\t//Load the Audio Input Stream from the file \n\t\tAudioInputStream audioInputStream = null;\n\t\ttry {\n\t\t\taudioInputStream = AudioSystem.getAudioInputStream(soundFile);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Get Audio Format information\n\t\tAudioFormat audioFormat = audioInputStream.getFormat();\n\n\t\t//Handle opening the line\n\t\tSourceDataLine\tline = null;\n\t\tDataLine.Info\tinfo = new DataLine.Info(SourceDataLine.class, audioFormat);\n\t\ttry {\n\t\t\tline = (SourceDataLine) AudioSystem.getLine(info);\n\t\t\tline.open(audioFormat);\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Start playing the sound\n\t\t//line.start();\n\n\t\t//Write the sound to an array of bytes\n\t\tint nBytesRead = 0;\n\t\tbyte[]\tabData = new byte[EXTERNAL_BUFFER_SIZE];\n\t\twhile (nBytesRead != -1) {\n\t\t\ttry {\n\t\t \t\tnBytesRead = audioInputStream.read(abData, 0, abData.length);\n\n\t\t\t} catch (IOException e) {\n\t\t \t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (nBytesRead >= 0) {\n\t\t \t\tint nBytesWritten = line.write(abData, 0, nBytesRead);\n\t\t\t}\n\n\t\t}\n\n\t\t//close the line \n\t\tline.drain();\n\t\tline.close();\n\t\t\n\t\t//Calculate the sample rate\n\t\tfloat sample_rate = audioFormat.getSampleRate();\n\t\tSystem.out.println(\"sample rate = \"+sample_rate);\n\n\t\t//Calculate the length in seconds of the sample\n\t\tfloat T = audioInputStream.getFrameLength() / audioFormat.getFrameRate();\n\t\tSystem.out.println(\"T = \"+T+ \" (length of sampled sound in seconds)\");\n\n\t\t//Calculate the number of equidistant points in time\n\t\tint n = (int) (T * sample_rate) / 2;\n\t\tSystem.out.println(\"n = \"+n+\" (number of equidistant points)\");\n\n\t\t//Calculate the time interval at each equidistant point\n\t\tfloat h = (T / n);\n\t\tSystem.out.println(\"h = \"+h+\" (length of each time interval in second)\");\n\t\t\n\t\t//Determine the original Endian encoding format\n\t\tboolean isBigEndian = audioFormat.isBigEndian();\n\n\t\t//this array is the value of the signal at time i*h\n\t\tint x[] = new int[n];\n\n\t\t//convert each pair of byte values from the byte array to an Endian value\n\t\tfor (int i = 0; i < n*2; i+=2) {\n\t\t\tint b1 = abData[i];\n\t\t\tint b2 = abData[i + 1];\n\t\t\tif (b1 < 0) b1 += 0x100;\n\t\t\tif (b2 < 0) b2 += 0x100;\n\t\t\tint value;\n\n\t\t\t//Store the data based on the original Endian encoding format\n\t\t\tif (!isBigEndian) value = (b1 << 8) + b2;\n\t\t\telse value = b1 + (b2 << 8);\n\t\t\tx[i/2] = value;\n\t\t\t\n\t\t}\n\t\t\n\t\t//do the DFT for each value of x sub j and store as f sub j\n\t\tdouble f[] = new double[n/2];\n\t\tfor (int j = 0; j < n/2; j++) {\n\n\t\t\tdouble firstSummation = 0;\n\t\t\tdouble secondSummation = 0;\n\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t \t\tdouble twoPInjk = ((2 * Math.PI) / n) * (j * k);\n\t\t \t\tfirstSummation += x[k] * Math.cos(twoPInjk);\n\t\t \t\tsecondSummation += x[k] * Math.sin(twoPInjk);\n\t\t\t}\n\n\t\t f[j] = Math.abs( Math.sqrt(Math.pow(firstSummation,2) + \n\t\t Math.pow(secondSummation,2)) );\n\n\t\t\tdouble amplitude = 2 * f[j]/n;\n\t\t\tdouble frequency = j * h / T * sample_rate;\n\t\t\tSystem.out.println(\"frequency = \"+frequency+\", amp = \"+amplitude);\n\t\t}\n\t\tSystem.out.println(\"DONE\");\n\t\treturn f;\n\t\t\n\t}" ]
[ "0.6192742", "0.5850097", "0.5670009", "0.56388485", "0.5569738", "0.5567814", "0.5529964", "0.55221784", "0.54607415", "0.53907883", "0.53880584", "0.5384534", "0.5373062", "0.5350121", "0.5257411", "0.52378935", "0.5233628", "0.52258384", "0.52193993", "0.521704", "0.5208909", "0.5168997", "0.51504886", "0.5126325", "0.51024044", "0.50996685", "0.50857466", "0.5082414", "0.5080363", "0.5066481", "0.5066056", "0.5049725", "0.50483406", "0.5038564", "0.5025779", "0.500111", "0.5000416", "0.4995992", "0.4986726", "0.49827006", "0.49758387", "0.4974921", "0.497067", "0.49683288", "0.49657917", "0.49657828", "0.4960449", "0.49561965", "0.49424174", "0.4940805", "0.49390662", "0.4931588", "0.49239254", "0.49188998", "0.49185663", "0.49055806", "0.48935184", "0.48865488", "0.48780546", "0.4875744", "0.48750603", "0.48691356", "0.4865007", "0.48642907", "0.48619378", "0.48602566", "0.48572698", "0.48506662", "0.48493087", "0.48483527", "0.48478204", "0.4839424", "0.48373276", "0.48358598", "0.48357275", "0.48354918", "0.48238266", "0.48198906", "0.48187056", "0.4818474", "0.48129207", "0.4812427", "0.48065665", "0.48012954", "0.48008013", "0.47808626", "0.47737065", "0.47709346", "0.47694752", "0.4751052", "0.47478545", "0.47445297", "0.47431508", "0.47381946", "0.47292858", "0.47254956", "0.47198534", "0.4719138", "0.47164908", "0.4715388" ]
0.64843285
0
/ConversationListFragment conversationsFragment = new ConversationListFragment(); activity.getSupportFragmentManager() .beginTransaction() .replace(R.id.container,conversationsFragment) .commit();
@Override public void toMyBookings() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void goAddFriends (View view){\n Fragment newFragment = new AddFriendsFragment();\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack if needed\n transaction.replace(R.id.fragment_container, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n\n }", "private void changeFragment() {\n TeacherAddNotificationFragment fragment = new TeacherAddNotificationFragment();\n // Put classIds to bundle and set bundle to fragment\n Bundle bundle = new Bundle();\n bundle.putString(\"ListIDs\", classesIds);\n fragment.setArguments(bundle);\n\n // Replace fragment\n getFragmentManager().beginTransaction().replace(R.id.main, fragment)\n .addToBackStack(null)\n .commit();\n }", "@Override\r\n public void changeFragment() {\r\n fm.beginTransaction()\r\n .replace(R.id.fragmentContainer, new ListWonderFragment())\r\n .commit();\r\n }", "@Override\n public void onClick(View view) {\n Fragment fragment = null;\n fragment = new CommentPeopleDetail();\n Bundle bundle = new Bundle();\n bundle.putString(\"queid\", details.getQueId());\n\n if (fragment != null) {\n fragment.setArguments(bundle);\n FragmentManager fm = ((FragmentActivity) context).getSupportFragmentManager();\n FragmentTransaction transaction = fm.beginTransaction();\n transaction.replace(R.id.frame_contain_layout, fragment);\n transaction.commit();\n }\n }", "@Override\n public void onClick(View view) {\n Fragment newCase=new TripNoteAddFragment();\n FragmentTransaction transaction=getFragmentManager().beginTransaction();\n transaction.replace(R.id.content_frames,newCase); // give your fragment container id in first parameter\n transaction.addToBackStack(null); // if written, this transaction will be added to backstack\n transaction.commit();\n }", "public void onClick(View v) {\n getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new MyContactFragment()).commit();\n\n // Replace\n Toast.makeText( getActivity(),\"Emergency contact\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n CompteEnsg nextFrag = new CompteEnsg();\n getActivity().getFragmentManager().beginTransaction()\n .replace(R.id.content_frame, nextFrag, \"TAG_FRAGMENT\")\n .addToBackStack(null)\n .commit();\n }", "@Override\n public void onClick(View view) {\n getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new EditContactFragment()).commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.activity_list,container);\n Button button = (Button) rootView.findViewById(R.id.fragment_button);\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n android.app.FragmentManager fragmentManager = getActivity().getFragmentManager();\n android.app.FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n Bundle bundle = new Bundle();\n bundle.putString(\"main\", null);\n fragmentTransaction.replace(R.id.fragment_container_framelayout, null);\n fragmentTransaction.addToBackStack(\"next\");\n fragmentTransaction.commit();\n }\n });\n return rootView;\n }", "@Override\n public void onClick(View v){\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.frame_layout,new final_confirmation());\n transaction.commit();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n FragmentTransaction fragmentTransaction = mFragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.containerView,new SentFragment()).commit();\n //Intent i = new Intent(getApplicationContext(), Task_Process.class);\n //startActivity(i);\n //finish();\n }", "public void goToFriends() {\n\t\tFragmentManager manager = getActivity().getSupportFragmentManager();\n\t\tFragmentTransaction transaction = manager.beginTransaction();\n\t\ttransaction.replace(R.id.container_fragment_main,new FragmentFriends());\n\t\ttransaction.commit();\n\t}", "@Override\n public void onStartConversationSuccessful(StartConversation startConversation) {\n\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n chatFragment = new ChatFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"id\", startConversation.getConversationId());\n bundle.putString(\"token\", startConversation.getToken());\n chatFragment.setArguments(bundle);\n ft.add(R.id.fl_chatlist, chatFragment);\n ft.commit();\n }", "@Override\n public void onClick(View view) {\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.container, new CadastrarFragments())\n .commitNow();\n }", "@Override\n public void onClick(View v){\n SignUpFragment fragment = new SignUpFragment();\n FragmentManager manager = getFragmentManager();\n manager.beginTransaction().replace(R.id.fragmentHolder,fragment,\"Sign Up\").commit();\n }", "@Override\n public void onClick(View v) {\n CompteEtudiant nextFrag = new CompteEtudiant();\n getActivity().getFragmentManager().beginTransaction()\n .replace(R.id.content_frame, nextFrag, \"TAG_FRAGMENT\")\n .addToBackStack(null)\n .commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_activity_summary, container, false);\n\n // Transaction party\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction ft = fragmentManager.beginTransaction();\n\n if(fragmentManager.findFragmentById(R.id.frame1)!=null) {\n ft.remove(fragmentManager.findFragmentById(R.id.frame1));\n }\n Fragment fragment = new SummaryFragment();\n ft.replace(R.id.frame1, fragment).commit();\n return v;\n }", "private void displayCareerFragment() {\n getSupportFragmentManager().beginTransaction().replace(R.id.container, UserProfileCareerFragment.getInstance()).commit();\n\n }", "public void onClick(View v) {\n android.support.v4.app.FragmentManager fm = getFragmentManager();\n FragmentTransaction ft = fm.beginTransaction();\n ProductFragment itemListFragment = ((MainActivity)getActivity()).getItemListFragment();\n ft.replace(R.id.container, itemListFragment, \"List\");\n ft.commit();\n }", "@Override\n public void onClick(View v) {\n Fragment newFragment = new NewMovimientoFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack\n transaction.replace(R.id.frame_container, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n }", "public void switchToAddFragment() {\n FragmentManager manager = getSupportFragmentManager();\n manager.beginTransaction().replace(R.id.fragment_container, new AddActivity()).commit();\n }", "@Override\n public void onClick(View v) {\n FragmentManager fragmentManager = getFragmentManager();\n AllRequestedColleges allRequestedColleges=AllRequestedColleges.newInstance();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.add(android.R.id.content,allRequestedColleges).addToBackStack(\"faf\").commit();\n\n }", "@Override\n public void onComplete(@NonNull Task<Void> task)\n {\n FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.fragment_container, new Fragment_VacatureOmschrijving()).addToBackStack(\"tag\").commit();\n Toast.makeText(getActivity(), \"Uw sollicitatie is succesvol verzonden\", Toast.LENGTH_LONG).show();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_messages, container, false);\n\n mConversationsRecycler = (RecyclerView) view.findViewById(R.id.messages_recycler);\n mConversationAdapter = new ConversationAdapter();\n mConversationAdapter.setOnItemClickListener(new OnItemClickListener() {\n @Override\n public void onClick(View v, int position) {\n Conversation conversation = mConversations.get(position);\n Toast.makeText(getActivity(), \"You want to chat with: \" + mConversations.get(position).getUserInfo().getUserId(), Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getActivity(), ChatActivity.class);\n intent.putExtra(\"friend_name\", conversation.getUserInfo().getUserId());\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n\n }\n });\n mLayoutManager = new LinearLayoutManager(getActivity());\n mConversationsRecycler.setLayoutManager(mLayoutManager);\n mConversationsRecycler.setAdapter(mConversationAdapter);\n\n mConversationAdapter.updateUserInfo(mConversations);\n return view;\n }", "@Override\n public void onEstadoCambiado() {\n fragment = new ListadoPeticionesRecibidasVista();\n getFragmentManager().beginTransaction().replace(R.id.content_main, fragment ).commit();\n\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.btn_add:\n Log.i(\"pressing this button\", \"pressing it\");\n AddFragment frg2=new AddFragment();//create the fragment instance for the bottom fragment\n\n FragmentManager manager= getActivity().getSupportFragmentManager();//create an instance of fragment manager\n\n FragmentTransaction transaction=manager.beginTransaction();//create an instance of Fragment-transaction\n\n transaction.add(R.id.container2, frg2, \"Frag_Bot\");\n\n transaction.addToBackStack(null);\n\n transaction.commit();\n\n break;\n\n case R.id.btn_list:\n Log.i(\"pressing this button\", \"Pressing list\");\n EventItemFragment ilfragment = new EventItemFragment();\n\n Bundle username = new Bundle();\n username.putString(\"username\", mUsername);\n\n ilfragment.setArguments(username);\n\n FragmentManager manager2= getActivity().getSupportFragmentManager();//create an instance of fragment manager\n\n FragmentTransaction transaction2=manager2.beginTransaction();//create an instance of Fragment-transaction\n\n transaction2.replace(R.id.container2, ilfragment, \"Frag_Bot\");\n\n transaction2.addToBackStack(null);\n\n transaction2.commit();\n\n break;\n\n case R.id.btn_refresh:\n Log.i(\"clicking refresh\", \"work pls\");\n getActivity().finish();\n startActivity(getActivity().getIntent());\n break;\n\n }\n }", "@Override\n public void onClick(View v) {\n FragmentManager fragmentManager = ((AppCompatActivity) getContext()).getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.replace(R.id.rel_main_parentAllView, new FragmentFavoritesApp());\n transaction.commit();\n }", "public void onUPP()\r\n {\r\n Fragment frag = getSupportFragmentManager().findFragmentById(R.id.fragmentSad);\r\n// //android.app.FragmentManager fm = getFragmentManager();\r\n// FragmentTransaction ft = getFragmentManager().beginTransaction();\r\n// ft.remove(frag);\r\n// ft.commit();\r\n//}\r\n\r\n FragmentManager fm = getSupportFragmentManager();\r\n fm.beginTransaction()\r\n .setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out)\r\n .show(frag)\r\n .commit();\r\n\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View retView = inflater.inflate(R.layout.fragment_food_list, container, false);\n\n\n //FragmentManager fragmentManager = this.getFragmentManager();\n //FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n //FoodFragment foodFragment = (FoodFragment)fragmentManager.findFragmentById(R.id.foodFragment);\n // fragmentTransaction.hide(foodFragment);\n //fragmentTransaction.commit();\n\n ImageButton newFood = (ImageButton) retView.findViewById(R.id.fragmentFoodListAddFoodButton);\n newFood.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n addFood(view);\n }\n });\n\n buildList(retView);\n return retView;\n }", "@Override \n public void onClick(View v) \n {\n \tShowFragmentXXH2 demoFragment = new ShowFragmentXXH2();\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction transaction =fragmentManager.beginTransaction();\n transaction.replace(R.id.fragment_container, demoFragment);\n transaction.commit();\n \n }", "@Override\n public void onClick(View view) {\n Fragment newFragment = new QuestFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.container, newFragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_contact, container, false);\n FragmentManager fragmentManager = getActivity().getSupportFragmentManager();\n final FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n\n FloatingActionButton fab = view.findViewById(R.id.fab);\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n fragmentTransaction.replace(R.id.container, new AddContactFragment());\n fragmentTransaction.commit();\n }\n });\n\n\n Context context = getActivity();\n\n final ArrayList<String> mail_list = new ArrayList<>();\n final ArrayList<Integer> id_list = new ArrayList<>();\n\n FeedReaderDbHelper mDbHelper = new FeedReaderDbHelper(context);\n SQLiteDatabase db = mDbHelper.getWritableDatabase();\n\n try {\n db.execSQL(FeedReaderDbHelper.SQL_CREATE_ENTRIES);\n }\n catch (SQLException e) {\n e.printStackTrace();\n }\n\n ListView listview = view.findViewById(R.id.listView);\n\n\n Cursor cursor = db.rawQuery(\"SELECT * FROM contact\", null);\n\n\n while (cursor.moveToNext()) {\n id_list.add(cursor.getInt(0));\n mail_list.add(cursor.getString(2));\n }\n\n final MyCursorAdapter arrayAdapter = new MyCursorAdapter(context, cursor);\n listview.setAdapter(arrayAdapter);\n\n db.close();\n\n listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n str = mail_list.get(position);\n\n fragmentTransaction.replace(R.id.container, new SendMailFragment());\n fragmentTransaction.commit();\n }\n });\n\n listview.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {\n @Override\n public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {\n FeedReaderDbHelper mDbHelper = new FeedReaderDbHelper(getActivity());\n\n SQLiteDatabase db = mDbHelper.getWritableDatabase();\n db.delete(\"contact\", FeedReaderDbHelper.FeedEntry._ID + \"=\" + id, null);\n id_list.remove(position);\n mail_list.remove(position);\n\n Toast.makeText(getActivity(), R.string.contact_delete, Toast.LENGTH_SHORT).show();\n\n arrayAdapter.notifyDataSetChanged();\n db.close();\n fragmentTransaction.replace(R.id.container, new ContactFragment());\n fragmentTransaction.commit();\n\n return false;\n }\n });\n //cursor.close();\n\n return view;\n }", "private void placeNewFragment(Fragment f) {\r\n\t\tFragmentManager manager = getSupportFragmentManager();\r\n FragmentTransaction fragmentTransaction = manager.beginTransaction();\r\n fragmentTransaction.replace(R.id.fragmentHolder, f);\r\n fragmentTransaction.addToBackStack(null);\r\n fragmentTransaction.commit();\r\n\t}", "private void fragmentChange(){\n HCFragment newFragment = new HCFragment();\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack if needed\n transaction.replace(R.id.hc_layout, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n }", "@Override \n public void onClick(View v) \n {\n \tShowFragmentXXH1 demoFragment = new ShowFragmentXXH1();\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction transaction =fragmentManager.beginTransaction();\n transaction.replace(R.id.fragment_container, demoFragment);\n transaction.commit();\n \n }", "@Override\n public void onClick(View v) {\n ((MyApplication) getActivity().getApplicationContext()).addToListeRecettes(recette);\n\n // Réinitialisation des recyclerview et redirection vers mes recettes\n closeFragment();\n\n// ((MakeTacos) getParentFragment()).getActivity();\n// getActivity().getSupportFragmentManager().beginTransaction()\n// .replace(R.id.constraintLayout, new MyRecipes())\n// .commitNow();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n {\n View v = inflater.inflate(R.layout.libraryfragment, container, false);\n tracks=new ArrayList<String>();\n new JSONParse().execute();\n\n list=(ListView) v.findViewById(R.id.list);\n\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1,\n int position, long arg3) {\n // TODO Auto-generate2d method stub\n\nSingletonTracks.getInstance().setTrack(position);\n PlayingFragment fragment = new PlayingFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.fragement_container, fragment);\n transaction.addToBackStack(null);\n transaction.commit();\n\n\n }\n });\n\n return v;\n\n }", "@Override\n public void onClick(View v) {\n android.app.Fragment onjF = null;\n onjF = new BlankFragment();\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.fragment,onjF).commit();\n }", "private void openTeacherCheck() {\n FragmentTransaction fr1 = getFragmentManager().beginTransaction().addToBackStack(\"Tag\");\n fr1.replace(R.id.fragment_container, new Fragment_View_In_Out());\n fr1.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_trans, container, false);\n listView = view.findViewById(R.id.trans_list);\n view.findViewById(R.id.trans_insert).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n TransDialog transDialog = new TransDialog(getContext());\n transDialog.setFragment(TransFragment.this);\n transDialog.show();\n }\n });\n adapter = new TransAdapter(getContext());\n adapter.setTransFragment(this);\n listView.setAdapter(adapter);\n loadData();\n return view;\n }", "@Override\n public void onClick(View v) {\n int position = getAdapterPosition();\n FragmentManager manager = adapter.activity.getSupportFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n Log.d(\"ProblemAdapter\", \"we are on index: \" + position);\n RecordsFragment fragment = RecordsFragment.newInstance(position);\n transaction.addToBackStack(null);\n transaction.replace(R.id.content, fragment);\n transaction.commit();\n }", "private void startValveFragment() {\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n Fragment valveFragment = new vavlesFragment(mUser, ProfileActivity.this, dialogCallBack);\n ft.replace(R.id.fragment_container, valveFragment).commit();\n }", "private void loadBookPageFragment() {\n\n FragmentManager manager = getFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n transaction.addToBackStack(\"ListView\"); // enables to press \"return\" and go back to the list view\n transaction.replace(R.id.main_fragment_container, new BookPageFragment());\n transaction.commit();\n }", "public void requestSent (View view){\n Fragment newFragment = new RequestSentFragment();\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack if needed\n transaction.replace(R.id.fragment_container, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n }", "public void goToPortfolioFragment(){\n Fragment fragment = new PortfolioFragment();\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction transaction = fm.beginTransaction();\n transaction.replace(R.id.contentFragment, fragment);\n transaction.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_start, container, false);\n\n mLvAps = (ListView) view.findViewById(R.id.lvAps);\n mScanResults = new ArrayList<ScanResult>();\n mApAdapter = new ApAdapter(mActivity, mScanResults);\n mLvAps.setAdapter(mApAdapter);\n\n mBtnSend = (Button) view.findViewById(R.id.btnSend);\n mBtnSend.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ((MyActivity) mActivity).getSupportFragmentManager().beginTransaction().replace(R\n .id.container, FileFragment.newInstance(\"arg\",\n \"arg\")).addToBackStack(\"FileFragment\").commit();\n }\n });\n mBtnReceive = (Button) view.findViewById(R.id.btnReceive);\n mBtnReceive.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n }\n });\n return view;\n }", "@Override\n public void onClick(View v) {\n Fragment f = new RecordingFragment();\n mng.beginTransaction().replace(R.id.content_frame, f).addToBackStack(null).commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.root_fragment, container, false);\n//replace root_frame with newGameView\n FragmentTransaction transaction = getFragmentManager()\n .beginTransaction();\n transaction.replace(R.id.root_frame, new NewGameView());\n transaction.commit();\n\n return view;\n }", "public void goMainStampCard() {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager\n .beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.abc_fade_in,\n R.anim.abc_fade_out);\n fragmentTransaction.addToBackStack(null);\n FragmentMainStampCard fragmentMain = FragmentMainStampCard\n .newInstances();\n fragmentTransaction.replace(R.id.container, fragmentMain);\n fragmentTransaction.commit();\n }", "private void addFragments() {\n\n Fragment f = SideFilterFragment.newInstance();\n getFragmentManager().beginTransaction().replace(R.id.side_filter_container, f).commit();\n }", "@Override\n public void onClick(View view) {\n\n Fragment fragment1 = getSupportFragmentManager().findFragmentByTag(fragment1Tag);\n if(fragment1 == null) {\n fragment1 = new IngrediantFragment();\n getSupportFragmentManager().beginTransaction()\n .add(R.id.fram1, fragment1,fragment1Tag)\n .commit();\n }\n else\n Toast.makeText(getApplicationContext(),\"fragment = null\",Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View v) {\n\n Bundle args = new Bundle();\n\n args.putInt(\"index\",getAdapterPosition());\n\n MyFragmentClass fragment = new MyFragmentClass();\n\n fragment.setArguments(args);\n\n\n AppCompatActivity activity = (AppCompatActivity) v.getContext();\n\n activity.getSupportFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.fragment_container,fragment).commit();\n }", "@Override\n public void onClick(View v) {\n fragment = fragmentManager.findFragmentByTag(\"frag1\"); // you gonna find a fragment by a tag ..u defined that in acitivty when you called that fragment\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n if (fragment != null) {\n fragmentTransaction.remove(fragment); // remove Transaction\n }\n\n // now calling and adding another fragment after remove its parent fragment (where you are calling fragmetn from) fragment to fragment call\n fragment = new Fragment2();\n fragmentTransaction.add(R.id.base_layout, fragment, \"frag2\"); //giving tag to fragment\n fragmentTransaction.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.chat_room_item, container, false);\n Log.d(\"TAGGOW\", \"onCreateView: \");\n\n findViews();\n\n //to initialize the values\n initViews();\n\n mChatTogetherBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n //add chat fragment\n if (getActivity().getClass() == HomepageActivity.class) {\n //pass in the user details here\n\n if (slideAnimation != null) {\n mNewMsgLayoutContainer.clearAnimation();\n slideAnimation.reset();\n slideAnimation = null;\n }\n\n if (fadeInOutAnim != null) {\n mChatTogetherBtn.clearAnimation();\n fadeInOutAnim.reset();\n fadeInOutAnim = null;\n }\n\n mChatBtnContainer.setBackgroundColor(getResources().getColor(R.color.sixty_black));\n\n if (!((HomepageActivity) getActivity()).mDKLiveChat.checkIfUserNameIsSet())\n createNameAlertDialog();\n\n FragmentTransaction transaction = ((HomepageActivity) getActivity()).getSupportFragmentManager().beginTransaction();\n transaction.replace(((((HomepageActivity) getActivity()).chatSessionFragContainer.getId())), chatSessionFragment);\n transaction.addToBackStack(null);\n transaction.commit();\n isInBckGrnd = true;\n isDetailChatOpen = true;\n }\n\n }\n });\n\n\n ((HomepageActivity) Objects.requireNonNull(getActivity())).mDKLiveChat.joinSession(getRoomName(ChatRoomPagerAdapter.getCurrentItem()), createUserInfo(), new CallbackListener() {\n @Override\n public void onSuccess(String msg, Object... obj) {\n //handle success\n }\n\n @Override\n public void onError(String msg, Object... obj) {\n //handle error\n }\n });\n\n HomepageActivity.currentRoomName = getRoomName(ChatRoomPagerAdapter.getCurrentItem());\n\n liveChatCallbackListener = new LiveChatCallbackListener() {\n @Override\n public void receivedChatMessage(String roomName, MessageInfo message) {\n if(isDetailChatOpen) {\n messageUpdateList(message);\n }else {\n incomingMsgSlideAnimation(message.getChatMessage());\n updateChatMessagList(message);\n }\n }\n };\n\n userPresenceCallBackListener = new UserPresenceCallBackListener() {\n @Override\n public void userEntered(String roomName, UserInfo participant) {\n String userEnteredMessage = participant.getName() + \" entered the room\";\n MessageInfo messageInfo = new MessageInfo();\n messageInfo.setUserId(participant.getUserId());\n messageInfo.setUserName(participant.getName());\n messageInfo.setChatMessage(userEnteredMessage);\n messageInfo.setSystemMessage(true);\n if(isDetailChatOpen) {\n messageUpdateList(messageInfo);\n }else{\n incomingMsgSlideAnimation(userEnteredMessage);\n updateChatMessagList(messageInfo);\n }\n }\n//\n @Override\n public void userExited(String roomName, UserInfo participant) {\n String userExitMessage = participant.getName() + \" exited the room\";\n MessageInfo messageInfo = new MessageInfo();\n messageInfo.setUserId(participant.getUserId());\n messageInfo.setUserName(participant.getName());\n messageInfo.setChatMessage(userExitMessage);\n messageInfo.setSystemMessage(true);\n if(isDetailChatOpen) {\n messageUpdateList(messageInfo);\n }else{\n incomingMsgSlideAnimation(userExitMessage);\n updateChatMessagList(messageInfo);\n }\n }\n//\n @Override\n public void userDataUpdated(String roomName, UserInfo participant) {\n }\n//\n @Override\n public void getNumberOfUsersLiveNow(String roomName, int userCount) {\n\n mUserCount.setText(String.valueOf(userCount));\n\n }\n\n\n\n\n };\n\n ChatRoom room = ((HomepageActivity) getActivity()).mRoomPagerAdapter.listOfRooms.get(roomPos);\n\n ((HomepageActivity) Objects.requireNonNull(getActivity())).mDKLiveChat.subscribe(room.getRoomName(), liveChatCallbackListener, userPresenceCallBackListener, new CallbackListener() {\n @Override\n public void onSuccess(String msg, Object... obj) {\n addMyStatus();\n }\n\n @Override\n public void onError(String msg, Object... obj) {\n\n }\n });\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ((HomePengajuan) getActivity()).setActionBarTitle(\"Menu\");\n View rootView = inflater.inflate(R.layout.fragment_volunteer_home, container, false);\n final FragmentTransaction ft = getFragmentManager().beginTransaction();\n\n mSampahku = rootView.findViewById(R.id.cv_sampahku);\n mMemasukan = rootView.findViewById(R.id.cv_memasukan);\n mBankSampah = rootView.findViewById(R.id.cv_bank_sampah);\n mLeaderboard=rootView.findViewById(R.id.cv_leaderboard);\n\n mSampahku.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ft.replace(R.id.container_volunteer, new LihatPengajuan()).commit();\n }\n });\n mMemasukan.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ft.replace(R.id.container_volunteer, new MemasukanPengajuan()).commit();\n }\n });\n mBankSampah.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ft.replace(R.id.container_volunteer, new LihatDaftarPakan()).commit();\n }\n });\n\n mLeaderboard.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ft.replace(R.id.container_volunteer, new Volunteer_leaderboard()).commit();\n }\n });\n\n\n return rootView;\n }", "@Override\r\n public void setFragment(FragmentManager fragmentManager) {\n\r\n }", "@Override\n public void onClick(View v) {\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n Fragment fragment = new FavoriteFragment();\n ft.replace(R.id.layout_fragment, fragment, \"FavoriteFragment\");\n ft.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n activity=this.getActivity();\n View viewPQR=inflater.inflate(R.layout.fragment_pqr, container, false);\n list = (ListView) viewPQR.findViewById(R.id.list_message);\n editText = (EditText) viewPQR.findViewById(R.id.message);\n btn_send_message = (ImageButton) viewPQR.findViewById(R.id.btn_send);\n adapter = new CustomAdapter(list_chat,this.getActivity());\n\n btn_send_message.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String text = editText.getText().toString();\n ChatMo model = new ChatMo(text,true); // user send msg\n list_chat.add(model);\n tempMsg=editText.getText().toString();\n new SimsimiAPI().execute(list_chat);\n //remove\n editText.setText(\"\");\n }\n });\n\n\n return viewPQR;\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n ((MainActivity) getActivity()).replaceFragmentsAndReset(new AppointmentListFragment());\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1,\n int position, long arg3) {\n\nSingletonTracks.getInstance().setTrack(position);\n PlayingFragment fragment = new PlayingFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.fragement_container, fragment);\n transaction.addToBackStack(null);\n transaction.commit();\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, final ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.registrado, container, false);\n\n // aButton = (Button)rootView.findViewById(R.id.button_registrado);\n\n ((Button) rootView.findViewById(R.id.button_registrado)).setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n //Log.d(\"ENTRO\", \"ENTRAAAAAA***************************************************888888888\");\n FragmentManager manager=getActivity().getSupportFragmentManager();\n FragmentTransaction ft = manager.beginTransaction();\n PerfilFragment perfil= new PerfilFragment();\n //Eventos perfil= new Eventos();\n Fragment newFragment = perfil;\n Fragment actual= visualiza();\n actual.onDestroy();\n ft.remove(actual);\n ft.replace(container.getId(),newFragment);\n //container is the ViewGroup of current fragment\n ft.addToBackStack(null);\n ft.commit();\n }\n });\n\n return rootView;\n }", "@Override\n public void onClick(View view, int position) {\n Fragment fragment = new CategoryFragment();\n FragmentManager fragmentManager = ((FragmentActivity) activity)\n .getSupportFragmentManager();\n String title = \"CategoryFragment\";\n Bundle bundle = new Bundle();\n bundle.putString(\"spot_id\", id);\n bundle.putString(\"section_id\", sectionsArrayList.get(position).getSectionID());\n bundle.putString(\"name\", sectionsArrayList.get(position).getSectionName());\n fragment.setArguments(bundle);\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.container_body, fragment, title);\n fragmentTransaction.addToBackStack(title);\n fragmentTransaction.commit();\n }", "public MessageListFragment() {\n setConversationListItemClickListener(new EaseConversationListItemClickListener() {\n @Override\n public void onListItemClicked(EMConversation conversation) {\n startActivity(new Intent(getActivity(), ChatActivity.class).putExtra(EaseConstant.EXTRA_USER_ID, conversation.conversationId()));\n }\n });\n // Required empty public constructor\n }", "public void loadFragment(Fragment fragment) { Animation connectingAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.slide_up);\n//\n FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();\n transaction.replace(R.id.nowShowingFrame, fragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }", "public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n StoreMembership storeMembership = (StoreMembership) parent.getItemAtPosition(position);\n // Toast.makeText(getContext(), storeMembership.getCardimage(), Toast.LENGTH_LONG);\n\n Fragment fragment = new StoreMembershipFragment();\n Bundle bundle = new Bundle();\n bundle.putLong(\"storemembershipid\", storeMembership.getId());\n fragment.setArguments(bundle);\n\n FragmentManager fragmentManager = getActivity().getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.main_container, fragment);\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }", "private void fillUpFragment() {\n try {\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n sensorFragment = getSensorFragment();\n transaction.replace(R.id.sensor_frame, sensorFragment, getSensorName());\n transaction.commit();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onNavigationDrawerItemSelected(int position) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.container, createFragment(position + 1))\n .commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view =inflater.inflate(R.layout.activity_crearno, container, false);\n titulo = (EditText) view.findViewById(R.id.titulo);\n nota = (TextView) view.findViewById(R.id.titu1);\n Button btnCre = (Button) view.findViewById(R.id.crearno);\n\n btnCre.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n titu=titulo.getText().toString();\n\n NotasFragment fragment = new NotasFragment();\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();\n\n\n\n\n }\n });\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n int layout_id = R.layout.fragment_layout_support;\n View v = inflater.inflate(layout_id, container, false);\n\n // PostListFragment titles = (PostListFragment)\n // getFragmentManager().findFragmentById(R.id.titles);\n // if (titles == null) {\n // Make new fragment to show this selection.\n PostListFragment titles = new PostListFragment();\n titles.setArguments(getArguments());\n\n // Execute a transaction, replacing any existing fragment\n // with this one inside the frame.\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n ft.replace(R.id.titles, titles);\n ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);\n ft.commit();\n \n return v;\n }", "@Override\n public void onClick(View v) {\n\n Fragment fragmento = null;\n\n Bundle bundle = new Bundle();\n bundle.putParcelableArrayList(\"key_entrenadores\", entrenadores);\n bundle.putParcelableArrayList(\"key_participantes\",participantes);\n\n switch (v.getId()) {\n case R.id.cardview1:\n fragmento = new EntrenadorFragment();\n fragmento.setArguments(bundle);\n break;\n\n case R.id.cardview2:\n fragmento = new ParticipanteFragment();\n fragmento.setArguments(bundle);\n break;\n\n case R.id.cardview3:\n fragmento = new VotacionFragment();\n fragmento.setArguments(bundle);\n break;\n }\n\n if (fragmento != null) {\n\n FragmentManager fragmentManager = getActivity().getSupportFragmentManager();\n FragmentTransaction transaccion = fragmentManager.beginTransaction();\n\n transaccion.replace(R.id.contenedor_principal, fragmento);\n transaccion.addToBackStack(null);\n //Hago commit a la transaccion\n transaccion.commit();\n }\n // Falta modificar estos titulos Setear título actual\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_conversation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view= inflater.inflate(R.layout.fragment_result_main, container, false);\n Assesment=(FrameLayout)view.findViewById(R.id.Asses);\n Exams=(FrameLayout)view.findViewById(R.id.Exams);\n Count_Exams=(TextView)view.findViewById(R.id.Exam_Count);\n Count_Ass=(TextView)view.findViewById(R.id.Ass_Count);\n\n Bundle bundle = this.getArguments();\n if (bundle != null) {\n _ID = bundle.getString(\"ID\");\n }\n\n getActivity().setTitle(\"Result\");\n\n GetCount();\n// Frame=(FrameLayout)view.findViewById(R.id.FrameResultList);\n\n Assesment.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n AssesmentFrag assesmentFrag = new AssesmentFrag();\n Bundle bundle = new Bundle();\n bundle.putString(\"ID\", _ID);\n assesmentFrag.setArguments(bundle);\n android.support.v4.app.FragmentTransaction transaction = getParentFragment().getChildFragmentManager().beginTransaction();\n transaction.replace(R.id.FrameResultList, assesmentFrag);\n transaction.addToBackStack(null);\n transaction.commit();\n Global.Tabfrg = getParentFragment().getChildFragmentManager();\n }\n });\n\n Exams.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ExamFrag examFrag = new ExamFrag();\n Bundle bundle = new Bundle();\n bundle.putString(\"ID\", _ID);\n examFrag.setArguments(bundle);\n android.support.v4.app.FragmentTransaction transaction = getParentFragment().getChildFragmentManager().beginTransaction();\n transaction.replace(R.id.FrameResultList, examFrag);\n transaction.addToBackStack(null);\n transaction.commit();\n Global.Tabfrg = getParentFragment().getChildFragmentManager();\n }\n });\n\n return view;\n }", "private void replaceFragment(int pos) {\n Fragment fragment = null;\n switch (pos) {\n case 0:\n //mis tarjetas\n fragment = new CardsActivity();\n break;\n case 1:\n //buscador online\n fragment = new CardsActivityOnline();\n break;\n case 2:\n //active camera\n Intent it = new Intent(this, com.google.zxing.client.android.CaptureActivity.class);\n startActivityForResult(it, 0);\n break;\n case 3:\n ParseUser.getCurrentUser().logOut();\n finish();\n onBackPressed();\n break;\n default:\n //fragment = new CardsActivity();\n break;\n }\n\n if(null!=fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.replace(R.id.main_content, fragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }\n }", "public void listaVacia() {\n\n mProgressDialog.dismiss();\n\n Bundle arguments = new Bundle();\n\n arguments.putString(\"ficha\", ActivosFragment.TAG);\n\n mBlankFragment = BlankFragment.newInstance(arguments);\n FragmentTransaction mFragmentTransaction = getFragmentManager().beginTransaction();\n mFragmentTransaction.replace(R.id.main_content, mBlankFragment, BlankFragment.TAG);\n //mFragmentTransaction.addToBackStack(FragmentDepartamento.TAG); // Agrega a la pila el fragmento para poder retroceder\n mFragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE); //Agrega una transición al fragment\n\n mFragmentTransaction.commit();\n\n }", "public void onClick(View arg0) {\n getActivity().getSupportFragmentManager().beginTransaction()\r\n .replace(R.id.container, new Criar_Viagem_Paradas()).commit();\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_content, container, false);\n FloatingActionButton fab = (FloatingActionButton) view.findViewById(R.id.fab);\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.main_container,new CreateContentFragment());\n fragmentTransaction.commit();\n }\n });\n\n //\n PublishedContentViewAdapter adapter = new PublishedContentViewAdapter(this.getActivity(),testTable());\n ListView contentListView = (ListView) view.findViewById(R.id.content_list_view);\n\n contentListView.setAdapter(adapter);\n contentListView.setOnItemClickListener(this);\n return view;\n }", "@Override\n public void onLoginHelpClicked() {\n \tFragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n \ttransaction.replace(fragmentContainer, new ParseLoginHelpFragment());\n \ttransaction.addToBackStack(null);\n \ttransaction.commit();\n }", "private void loadTextChatFragment(){\n int containerId = R.id.fragment_textchat_container;\n mFragmentTransaction = getFragmentManager().beginTransaction();\n mTextChatFragment = (TextChatFragment)this.getFragmentManager().findFragmentByTag(\"TextChatFragment\");\n\n if (mTextChatFragment == null) {\n mTextChatFragment = new TextChatFragment();\n mTextChatFragment.setMaxTextLength(1050);\n mTextChatFragment.setTextChatListener(this);\n mTextChatFragment.setSenderInfo(mSession.getConnection().getConnectionId(), mSession.getConnection().getData());\n\n mFragmentTransaction.add(containerId, mTextChatFragment, \"TextChatFragment\").commit();\n }\n }", "private void showHome(){\n fragment = new HomeFragment();\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.mainLayout, fragment, fragment.getTag()).commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n context = getActivity();\n view = inflater.inflate(R.layout.fragment_chat_list, container, false);\n init();\n return view;\n }", "private void setFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.frame, fragment);\n fragmentTransaction.commit();\n\n }", "private void defaultFragment() {\n\n Fragment fragment = new Helpline();\n FragmentManager fm = getFragmentManager();\n //TODO: try this with add\n fm.beginTransaction().replace(R.id.content_frame,fragment).commit();\n }", "@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_work_history, container, false);\n addwork=view.findViewById(R.id.btnaddwork);\n nextdu=view.findViewById(R.id.nextedu);\n l12=view.findViewById(R.id.workexper2);\n nextdu.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n\n\n\n\n\n Fragment someFragment = new EducationFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.fragment_container, someFragment ); // give your fragment container id in first parameter\n transaction.addToBackStack(null); // if written, this transaction will be added to backstack\n transaction.commit();\n }\n });\n addwork.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n addwork.setVisibility(View.INVISIBLE);\n l12.setVisibility(View.VISIBLE);\n }\n });\n return view;\n }", "@Override\n public void onClick(View view) {\n if (uuidString == null) {\n SignupFragment fragment = new SignupFragment();\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.fragment_container, fragment,\"findThisFragment\")\n .addToBackStack(null)\n .commit();\n } else {\n Intent intent = new Intent(getActivity(), DashboardActivity.class);\n startActivity(intent);\n }\n }", "@Override\n public void onBindViewHolder(CustomAdapterForDepartment.MyViewHolder holder, final int position) {\n holder.name.setText(departmentNames.get(position).toString());\n\n\n holder.itemView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n s = departmentNames.get(position).toString();\n\n\n Fragment fragment = new DoctorList();\n\n FragmentManager fragmentManager = ((DashboardActivity) context).getFragmentManager();\n\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n Bundle bundle = new Bundle();\n bundle.putString(\"departmentName\", s); //key and value\n//set Fragmentclass Arguments\n fragment.setArguments(bundle);\n\n\n // this is basically context of the class\n fragmentTransaction.replace(R.id.fragment_department_id, fragment);\n// fragmentTransaction.remove();\n // fragmentTransaction.replace(R.id.fragment_department_id, fragment);\n //fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);\n\n fragmentTransaction.commit();\n }\n });\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n getFragmentManager().beginTransaction().replace(android.R.id.content, new PreferenciasFragment()).commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_meeting,container,false);\n initView(view);\n fabMeeting.setOnClickListener(new FabMeetingListener());\n getDataFromDB();\n\n if (list.isEmpty()){\n tvNoNoteMeeting.setVisibility(View.VISIBLE);\n }\n\n Collections.reverse(list);\n adapter = new MeetingItemAdapter(getActivity(),list);\n recyclerViewMeeting.setAdapter(adapter);\n adapter.setItemClickListener(new OnRecyclerViewOnClickListener() {\n\n @Override\n public void OnItemClick(View view, int position) {\n Toast.makeText(getActivity(), \"meeting item clicked\", Toast.LENGTH_SHORT).show();\n\n }\n\n @Override\n public void OnSubViewClick(View view, int position) {\n //点击编辑图标弹出对话框\n if(view.getId()==R.id.image_view_edit){\n Toast.makeText(getActivity(), \"meeting item edit clicked\", Toast.LENGTH_SHORT).show();\n createDialog(position);\n }else if(view.getId()==R.id.text_view_title){\n Toast.makeText(getActivity(), \"meeting item title clicked\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getActivity(),ShowMeetingItemActivity.class);\n MeetingItem tempItem = list.get(position);\n intent.putExtra(\"title\",tempItem.getTitle());\n intent.putExtra(\"time\",tempItem.getTime());\n intent.putExtra(\"input\",tempItem.getInput());\n intent.putExtra(\"output\",tempItem.getOutput());\n\n startActivity(intent);\n\n }\n }\n\n });\n return view;//inflater.inflate(R.layout.fragment_meeting, container, false);\n }", "private void initFragment(Fragment newsFragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.replace(R.id.fl_news, newsFragment);\n transaction.commit();\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_community_group, container, false);\n\n // remember parent\n parentActivity = (MainActivity)getActivity();\n parentFragment = (CommunityFragment) getParentFragment();\n\n // Set title\n TextView tvwTitle = view.findViewById(R.id.tvwTitle);\n String title = mCommunity + \" Community\";\n tvwTitle.setText(title);\n\n // configure back button\n View btnBack = view.findViewById(R.id.btnBack);\n btnBack.setOnClickListener(this);\n\n // configure form of group name\n edtGroupName = (EditText) view.findViewById(R.id.edtGroupName);\n edtGroupName.addTextChangedListener(this);\n\n // configure createNewGroup button\n Button btnCreate = (Button)view.findViewById(R.id.btnCreate);\n btnCreate.setOnClickListener(this);\n\n // configure listview for groups\n lvwGroups = (ListView)view.findViewById(R.id.lvwGroups);\n ApiManager.instance().groupList(parentActivity, mCommunity, \"\", new ApiManager.GroupListCallBack() {\n @Override\n public void success(ArrayList<GroupModel> groups) {\n GroupListAdapter adapter = new GroupListAdapter(parentActivity, groups);\n lvwGroups.setAdapter(adapter);\n }\n });\n lvwGroups.setOnItemClickListener(this);\n\n // configure Join button\n btnJoin = (Button)view.findViewById(R.id.btnJoin);\n btnJoin.setOnClickListener(this);\n\n\n return view;\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tfollowUpId = getArguments().getLong(Commons.FOLLOWUP_ID);\n\t\tLog.i(TAG,\"followUpId: \"+ followUpId );\n\n\t\tdatasource = new ContactsDataSource(getActivity());\n\t\tdatasource.open();\n\t\tfollowUp=datasource.findFollowUpbyId(followUpId);\n\t\t\n\t\n\t\t\n\t\ttextViewTitle= (TextView) getView().findViewById(\n\t\t\t\tR.id.textViewTitle);\n\t\ttextViewNotes= (TextView) getView().findViewById(\n\t\t\t\tR.id.textViewNotes);\n\t\ttextViewDate= (TextView) getView().findViewById(\n\t\t\t\tR.id.textViewDueDate);\n\t\ttextViewTitle.setText(followUp.getTitle());\n\t\ttextViewNotes.setText(followUp.getNotes());\n\t\ttextViewDate.setText(followUp.getDate());\n\n\t\t imageButtonEdit = (ImageButton) getActivity().findViewById(\n\t\t\t\tR.id.imageButtonEdit);\n\t\t imageButtonDelete = (ImageButton) getActivity()\n\t\t\t\t.findViewById(R.id.imageButtonDelete);\n\n\n\t\t/*\n\t\tImageButton imagebuttonEdit = (ImageButton) getActivity().findViewById(\n\t\t\t\tR.id.imageButtonEdit);\n\t\tImageButton imagebuttonDelete = (ImageButton) getActivity()\n\t\t\t\t.findViewById(R.id.imageButtonDelete);\n\n\t\ttvName.setText(contact.getName());\n\t\ttvTitle.setText(contact.getTitle());\n\t\ttvCompany.setText(contact.getCompany());\n\t\ttvPhone.setText(contact.getHome_phone());\n\t\ttvEmail.setText(contact.getEmail());\n\t\ttvLocation.setText(contact.getLocation());\n\t\t\n\t\n\t\t\n\n\t\timagebuttonEdit.setOnClickListener(new View.OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBundle b = new Bundle();\n\t\t\t\tb.putLong(\"contactId\", contactId);\n\t\t\t\tEditContactFragment editContactFragment = new EditContactFragment();\n\t\t\t\teditContactFragment.setArguments(b);\n\t\t\t\tFragmentManager fmi = getFragmentManager();\n\t\t\t\tFragmentTransaction ftu = fmi.beginTransaction();\n\t\t\t\tftu.replace(android.R.id.content, editContactFragment)\n\t\t\t\t\t\t.addToBackStack(null).commit();\n\t\t\t}\n\t\t});\n\n\t\timagebuttonDelete.setOnClickListener(new View.OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tDialogFragment newFragment = MyAlertDialogFragment\n\t\t\t\t\t\t.newInstance(contactId);\n\t\t\t\tnewFragment.show(getFragmentManager(), \"dialog\");\n\n\t\t\t}\n\t\t});\n*/\n\t}", "private void updateFragment() {\n Fragment fragment = getSupportFragmentManager().findFragmentByTag(CURRENT_FRAGMENT);\n if (fragment != null) {\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n ft.detach(fragment).attach(fragment).commit();\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View rootView = inflater.inflate(R.layout.fragment_facilities_home, container, false);\n BottomNavigationView navegacion = (BottomNavigationView) rootView.findViewById(R.id.navbartransporte);\n navegacion.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);\n CafeteriaFragment cafeteriaFragment = new CafeteriaFragment();\n FragmentManager fragmentManagerlatestNewsFragment = getChildFragmentManager();\n fragmentManagerlatestNewsFragment.beginTransaction().replace(R.id.espacioLineas, cafeteriaFragment).commit();\n\n return rootView;\n }", "private void setFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.main_frame, fragment);\n// fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View v = inflater.inflate(R.layout.fragment_transaction, container, false);\n\n rv_trans = v.findViewById(R.id.frag_trans);\n list = new ArrayList<>();\n dashboardTransAdapter = new DashboardTransAdapter(list);\n rv_trans.setLayoutManager(new LinearLayoutManager(getContext()));\n rv_trans.setAdapter(dashboardTransAdapter);\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n {\n return inflater.inflate(R.layout.fragment_sponsors, container, false);\n }", "private void setFragment(Fragment fragments) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.framelayout,fragments);\n fragmentTransaction.commit();\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\ttry {\n\t\t\tlist_contacts = new ArrayList<table_interaction_contacts>();\n\t\t\tcmd_view_container = inflater.inflate(R.layout.fragment_interaction_dialogue, null);\n\t\t\t// --\n\t\t\tcmd_listview_interaction_dialogue = (UIListView) cmd_view_container.findViewById(R.id.fragment_interaction_dialogue_listview_container);\n\t\t\tdialogue_listview_adapter = new adapter_fragment_interaction_dialogue_listview(getActivity());\n\t\t\tcmd_listview_interaction_dialogue.setAdapter(dialogue_listview_adapter);\n\t\t\tcmd_listview_interaction_dialogue.setOnItemClickListener(new OnItemClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\tint index, long arg3) {\n\t\t\t\t\tt_interaction_contacts = (table_interaction_contacts) dialogue_listview_adapter.getItem(index);\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\t\tbundle.putSerializable(\"chat_receiver\", t_interaction_contacts);\n\t\t\t\t\tintent.putExtra(\"chat_receiver\", bundle);\n\t\t\t\t\tintent.setClass(getActivity(), ActivityInteractionChatB.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}\n\t\t\t});\n\t\t\tcmd_listview_interaction_dialogue.setonRefreshListener(new OnRefreshListener() {// 下拉刷新\n\t\t\t\t@Override\n\t\t\t\tpublic void onRefresh() {\n\t\t\t\t\tnew AsyncTask<Void, Void, Void>() {\n\t\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tf_action_refesh_data();//查询本地数据\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\t\tSystem.out.println(\"onPostExecute...\");\n\t\t\t\t\t\t\tdialogue_listview_adapter.notifyDataSetChanged();\n\t\t\t\t\t\t\tcmd_listview_interaction_dialogue.onRefreshComplete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}.execute(null);\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\tf_action_refesh_data();//查询本地数据\n\t\t\n\t\treturn cmd_view_container;\n\t}", "@Override\n public void gofavouritepage() {\n getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container_home,new FavouriteFragment()).addToBackStack(\"Homepage\").commit();\n }", "@Override\n public void onClick(View v) {\n frameLayoutSearch.setVisibility(View.GONE);\n songBelongAlbumFragment = new SongBelongAlbumFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"nameSongOfAlbum\",tvAlbumName.getText().toString());\n songBelongAlbumFragment.setArguments(bundle);\n android.support.v4.app.FragmentTransaction fragmentTransaction = ( (FragmentActivity)context).getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.fragment_container, songBelongAlbumFragment);\n fragmentTransaction.commit();\n }" ]
[ "0.7576492", "0.73260903", "0.7290789", "0.72778445", "0.72612816", "0.72003806", "0.7194607", "0.71579814", "0.713823", "0.71091074", "0.7040369", "0.70105696", "0.6981323", "0.6981027", "0.6922821", "0.68823457", "0.6870721", "0.6861627", "0.6841174", "0.68251127", "0.68008536", "0.6745191", "0.6741893", "0.6735037", "0.6729415", "0.6714555", "0.66886455", "0.66846734", "0.66674554", "0.6663148", "0.66560006", "0.6654788", "0.66445076", "0.6623768", "0.6618457", "0.6616967", "0.66021425", "0.65909445", "0.65620995", "0.65619975", "0.654982", "0.6532615", "0.6530604", "0.65276736", "0.6527001", "0.6519572", "0.6518225", "0.65150833", "0.6500152", "0.6471878", "0.6463384", "0.64581275", "0.6444557", "0.64444935", "0.64371884", "0.6423897", "0.6417445", "0.6416402", "0.63861", "0.6383408", "0.6360387", "0.63578147", "0.6346877", "0.6346572", "0.6339939", "0.63343245", "0.6328444", "0.63267946", "0.6325979", "0.6323824", "0.6321957", "0.6309717", "0.63048685", "0.6300805", "0.62861925", "0.6283293", "0.62766874", "0.6273702", "0.6273654", "0.6265075", "0.6261613", "0.6260835", "0.62551135", "0.62447673", "0.62424684", "0.62321734", "0.6230072", "0.6229774", "0.622943", "0.6226432", "0.62247515", "0.62177515", "0.62160444", "0.6212991", "0.6204762", "0.61989087", "0.6198791", "0.61973953", "0.61951834", "0.61930203", "0.6190997" ]
0.0
-1
/ constructor is full
public CD(int id,String name, String singer, int numberOfSongs, double price) { super(); this.id = id; this.name = name; this.singer = singer; this.numberOfSongs = numberOfSongs; this.price = price; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "private void __sep__Constructors__() {}", "public Pitonyak_09_02() {\r\n }", "protected abstract void construct();", "private TMCourse() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public Clade() {}", "public CyanSus() {\n\n }", "private SingleObject()\r\n {\r\n }", "@Override\r\n\tpublic void init() {}", "public Orbiter() {\n }", "public CSSTidier() {\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public Pasien() {\r\n }", "private Instantiation(){}", "public _355() {\n\n }", "public Lanceur() {\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public Chauffeur() {\r\n\t}", "Reproducible newInstance();", "@Override\n public void init() {}", "public PSRelation()\n {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public Anschrift() {\r\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "public Coche() {\n super();\n }", "@Override\n protected void init() {\n }", "@Override\n public void init() {\n }", "public Aanbieder() {\r\n\t\t}", "private void init() {\n\n\n\n }", "@Override\n public void init() {\n }", "public void init() {\n \n }", "defaultConstructor(){}", "public Achterbahn() {\n }", "private void init() {\n }", "public void init(){}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public Pleasure() {\r\n\t\t}", "private void init() {\n\n\t}", "public void init() {}", "public void init() {}", "public Supercar() {\r\n\t\t\r\n\t}", "public Tbdcongvan36() {\n super();\n }", "public Chick() {\n\t}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "public JSFOla() {\n }", "public Odontologo() {\n }", "public lo() {}", "public void init() {\n\t\t\n\t}", "public void init() {\r\n\t\t// to override\r\n\t}", "public void init() { }", "public void init() { }", "@Override public void init()\n\t\t{\n\t\t}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public Ov_Chipkaart() {\n\t\t\n\t}", "public Cohete() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public Mannschaft() {\n }", "public Cgg_jur_anticipo(){}", "private Road()\n\t{\n\t\t\n\t}", "public Curso() {\r\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n void init() {\n }", "private SingleObject(){}", "public C23317d() {\n }", "public EnsembleLettre() {\n\t\t\n\t}", "public MethodEx2() {\n \n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "public void init() {\n\t\t \r\n\t\t }", "public Libro() {\r\n }", "protected void initialize() {}", "protected void initialize() {}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private UsineJoueur() {}", "private IndexBitmapObject() {\n\t}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "public Excellon ()\n {}", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}", "public Tbdtokhaihq3() {\n super();\n }", "private Marinator() {\n }", "private Marinator() {\n }", "public void init() {\r\n\r\n\t}", "public ChaCha()\n\t{\n\t\tsuper();\n\t}" ]
[ "0.81921446", "0.8030725", "0.7500753", "0.7489365", "0.73994184", "0.7368678", "0.7367401", "0.7297971", "0.7295265", "0.72513", "0.72223544", "0.7170991", "0.71641374", "0.71627694", "0.7147822", "0.71386987", "0.7119616", "0.7118183", "0.71161693", "0.7107815", "0.70950335", "0.70917416", "0.7079003", "0.70697886", "0.7067693", "0.7067693", "0.7067693", "0.7059933", "0.7030808", "0.7030808", "0.7030808", "0.7030808", "0.7030808", "0.70296174", "0.7029472", "0.70225143", "0.7012351", "0.700197", "0.69898057", "0.6980979", "0.6968266", "0.69635886", "0.69614035", "0.6960208", "0.6956741", "0.69521236", "0.6951915", "0.69518495", "0.6941578", "0.6941578", "0.6936763", "0.6936374", "0.6935921", "0.6935026", "0.6935026", "0.6935026", "0.6935026", "0.6931273", "0.6928832", "0.69269717", "0.69266117", "0.69263816", "0.69231266", "0.69231266", "0.6916038", "0.69148374", "0.6914529", "0.6905337", "0.69053066", "0.6904297", "0.69021595", "0.68977433", "0.6891364", "0.689007", "0.689007", "0.688914", "0.68863314", "0.6883632", "0.6882", "0.6881676", "0.6876149", "0.6876149", "0.6876149", "0.6871034", "0.68683916", "0.68673426", "0.68673426", "0.685614", "0.6855202", "0.68544376", "0.68544376", "0.6851502", "0.68514824", "0.6846692", "0.68463534", "0.6844605", "0.68443805", "0.68378556", "0.68378556", "0.68315566", "0.68292683" ]
0.0
-1
/ constructor is empty
public CD(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public Pitonyak_09_02() {\r\n }", "private Rekenhulp()\n\t{\n\t}", "public Clade() {}", "public CyanSus() {\n\n }", "private TMCourse() {\n\t}", "private Instantiation(){}", "public Pasien() {\r\n }", "public Orbiter() {\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public PSRelation()\n {\n }", "private SingleObject()\r\n {\r\n }", "public CSSTidier() {\n\t}", "public Curso() {\r\n }", "public _355() {\n\n }", "private void __sep__Constructors__() {}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public Chauffeur() {\r\n\t}", "public Odontologo() {\n }", "public Lanceur() {\n\t}", "public Basic() {}", "@Override\r\n\tpublic void init() {}", "public Anschrift() {\r\n }", "public JSFOla() {\n }", "public Chick() {\n\t}", "public Tbdtokhaihq3() {\n super();\n }", "protected abstract void construct();", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "@Override\n public void init() {}", "private MApi() {}", "public SlanjePoruke() {\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "public Coche() {\n super();\n }", "Reproducible newInstance();", "public Phl() {\n }", "defaultConstructor(){}", "public Libro() {\r\n }", "public Mannschaft() {\n }", "public Cohete() {\n\n\t}", "public lo() {}", "public Cgg_jur_anticipo(){}", "public Achterbahn() {\n }", "public Demo() {\n\t\t\n\t}", "public SgaexpedbultoImpl()\n {\n }", "private SingleObject(){}", "public TTau() {}", "public AntrianPasien() {\r\n\r\n }", "public Mitarbeit() {\r\n }", "public Trening() {\n }", "public Aanbieder() {\r\n\t\t}", "private Marinator() {\n }", "private Marinator() {\n }", "public MethodEx2() {\n \n }", "public Tbdcongvan36() {\n super();\n }", "@Override\n public void init() {\n }", "private Converter()\n\t{\n\t\tsuper();\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public Rol() {}", "public Magazzino() {\r\n }", "public Ov_Chipkaart() {\n\t\t\n\t}", "public RngObject() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "public Excellon ()\n {}", "private NfkjBasic()\n\t\t{\n\t\t\t\n\t\t}", "public Supercar() {\r\n\t\t\r\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public Pleasure() {\r\n\t\t}", "@Override\n protected void init() {\n }", "public Alojamiento() {\r\n\t}", "public Data() {}", "public Soil()\n\t{\n\n\t}", "private Ognl() {\n }", "public Method() {\n }", "public Person() {\n\t\t\n\t}", "public Tigre() {\r\n }", "public OOP_207(){\n\n }", "public void init() {\n \n }", "public Data() {\n }", "public Data() {\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "public Parser()\n {\n //nothing to do\n }", "public Demo3() {}", "void DefaultConstructor(){}", "private UsineJoueur() {}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "public p7p2() {\n }", "protected Asignatura()\r\n\t{}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public Gasto() {\r\n\t}", "public mapper3c() { super(); }", "public EnsembleLettre() {\n\t\t\n\t}", "public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }", "public AirAndPollen() {\n\n\t}" ]
[ "0.8313995", "0.8006065", "0.77166754", "0.761747", "0.75752985", "0.7556908", "0.7477879", "0.7473331", "0.7450198", "0.74440384", "0.7418512", "0.7393965", "0.7383968", "0.73500043", "0.73476833", "0.73469985", "0.73426867", "0.73256934", "0.7292622", "0.72921115", "0.72859055", "0.72797185", "0.72570217", "0.72549856", "0.72492474", "0.72361195", "0.7226203", "0.7225244", "0.7221367", "0.72138375", "0.72071785", "0.7205933", "0.7203584", "0.7200804", "0.71996236", "0.7195376", "0.71881515", "0.7186006", "0.71763235", "0.71722555", "0.7169872", "0.7155159", "0.7154951", "0.71535933", "0.7149151", "0.7128163", "0.71248484", "0.7123518", "0.7115994", "0.71074367", "0.7106545", "0.71056235", "0.71056235", "0.7105563", "0.7094322", "0.7089473", "0.7089279", "0.7085335", "0.7085335", "0.7085335", "0.70849615", "0.708203", "0.707929", "0.70708084", "0.7069126", "0.70657927", "0.70650417", "0.70399016", "0.7039037", "0.70388895", "0.70388895", "0.70388895", "0.70388895", "0.70388895", "0.703394", "0.7027398", "0.7024648", "0.7023593", "0.70227075", "0.70203495", "0.70138294", "0.7009446", "0.6997959", "0.69947493", "0.6993729", "0.6992849", "0.6992849", "0.6980387", "0.6980176", "0.69774956", "0.6977476", "0.6975193", "0.69739825", "0.6968203", "0.69664544", "0.69628245", "0.6960838", "0.6959378", "0.6958523", "0.6957195", "0.69512486" ]
0.0
-1
/ use to print information cd output String
@Override public String toString() { // TODO Auto-generated method stub return "Id: " + this.id + "\tName: " + this.name + "\tSinger: " + this.singer + "\tNumber of songs: " + this.numberOfSongs + "\tPrice: " + this.price; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString(){\n String temp = drv.getAbsolutePath() + \"\\n\";\n temp += freeSpace + \" / \" + totalSpace + \"\\n\";\n temp += getPercentRem() +\"%\\n\";\n temp += \"Drive Setup: \" + isSetup + \"\\n\";\n for(String i: drv.list()){\n temp += i + \"\\n\";\n }\n return temp;\n }", "public static void p_show_info_program() {\n System.out.println(\"╔══════════════════════════════╗\");\n System.out.println(\"║ SoftCalculator V1.2 ║\");\n System.out.println(\"║ Oscar Javier Cardozo Diaz ║\");\n System.out.println(\"║ 16/04/2021 ║\");\n System.out.println(\"╚══════════════════════════════╝\");\n }", "public void displayCharacter() {\n System.out.println(\"**************************\");\n System.out.println(p.showDetails());\n System.out.println(\"**************************\"+\"\\n\");\n\n }", "public void CD(String address){\r\n\r\n try {\r\n out.println(\"CWD \" + address);\r\n out.flush();\r\n System.out.println(in.readLine());\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n\r\n }", "public String printInfo() {\n\t\treturn \"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming Center Information\"+\r\n\t\t\t\t\"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming center Name \\t= \" + centerName +\r\n\t\t\t\t\"\\n Location \\t\\t= \" + location + \r\n\t\t\t\t\"\\n Contact Number \\t= \" + contact+\r\n\t\t\t\t\"\\n Operating hour \\t= \"+ operatingHour+\r\n\t\t\t\t\"\\n Number of Employee \\t= \"+ noOfEmployee+ \" pax\";\r\n\t}", "public String printOutput(driver driver){\n \t\tString street = new String();\n \t\tif(name == driver.start.option1.name){\n \t\t\t\tstreet = driver.start.outStreet1;\n \t\t\t}\n \t\t\telse{\n \t\t\t\tstreet = driver.start.outStreet2;\n \t\t\t}\n \tString printStr = \"Driver \" + driver.id + \" heading from \" + driver.start.name + \" to \" + name + \" via \" + street;\n \treturn printStr;\n \t\n \t}", "private static void printUsage() {\n\t\tSystem.out.println(\"[0] apk files directory\");\n\t\tSystem.out.println(\"[1] android-jar directory\");\n\t}", "public void printInfo() {\r\n System.out.printf(\"%-25s\", \"Nomor Rekam Medis Pasien\");\r\n System.out.println(\": \" + getNomorRekamMedis());\r\n System.out.printf(\"%-25s\", \"Nama Pasien\");\r\n System.out.println(\": \" + getNama());\r\n System.out.printf(\"%-25s\", \"Tempat, Tanggal Lahir\");\r\n System.out.print(\": \" + getTempatLahir() + \" , \");\r\n getTanggalKelahiran();\r\n System.out.printf(\"%-25s\", \"Alamat\");\r\n System.out.println(\": \" + getAlamat());\r\n System.out.println(\"\");\r\n }", "public void print_dev() {\n\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName\r\n\t\t\t\t\t\t\t\t+\t\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)\r\n\t\t\t\t\t\t\t\t+\t\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Function Limit Count\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Eat : \"+TMGCSYS.tmgcLimitEat+\", Sleep : \"+TMGCSYS.tmgcLimitSleep\r\n\t\t\t\t\t\t\t\t+\t\", Walk : \"+TMGCSYS.tmgcLimitWalk+\", Study : \"+TMGCSYS.tmgcLimitStudy+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Ability\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" STR : \"+TMGCSYS.tmgcSTR+\", INT : \"+TMGCSYS.tmgcINT\r\n\t\t\t\t\t\t\t\t+\t\", DEB : \"+TMGCSYS.tmgcDEB+\", HET : \"+TMGCSYS.tmgcHET+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Job : \"+TMGCSYS.tmgc2ndJob\r\n\t\t\t\t\t\t\t\t);\r\n\t}", "private static void printUsage(){\n\t\tprintLine(USAGE_STRING);\n\t}", "protected void showUsage() {\n\n\tStringBuffer usage = new StringBuffer();\n\tusage.append(\"------------------------------------------------------\\n\");\n\tusage.append(\" \" + APP_NAME + \" \" + APP_VERSION + \"\\n\");\n\tusage.append(\"------------------------------------------------------\\n\");\n\tusage.append(\"Prints the Tool Kit name for the given Branch and \\n\");\n\tusage.append(\"Component.\\n\");\n\tusage.append(\"\\n\");\n\tusage.append(\"USAGE:\\n\");\n\tusage.append(\"------\\n\");\n\tusage.append(APP_NAME + \" <-c component> <-b branch> [-y] [-h] [-db dbMode]\\n\");\n\tusage.append(\"\\n\");\n\tusage.append(\" component = Component name (ess, pds, model, einstimer ...).\\n\");\n\tusage.append(\" branch = Branch name.\\n\");\n\tusage.append(\" -y = (optional) Verbose mode (echo messages to screen)\\n\");\n\tusage.append(\" dbMode = (optional) DEV | PROD (defaults to PROD)\\n\");\n\tusage.append(\" -h = Help (shows this information)\\n\");\n\tusage.append(\"\\n\");\n\tusage.append(\"Return Codes\\n\");\n\tusage.append(\"------------\\n\");\n\tusage.append(\" 0 = application ran ok\\n\");\n\tusage.append(\" 1 = application error\\n\");\n\tusage.append(\"\\n\");\n\n\tSystem.out.println(usage);\n\n }", "public String processPWD() {\n System.out.println(\"Le dossier courant est : \" + currentDir);\n ps.println(\"257 \" + currentDir + \" is the CWD\");\n return \"257 \" + currentDir + \" is the CWD\";\n }", "public void printCommand() {\n System.out.println(\"Cette commande n'est pas supportee\");\n System.out.println(\"Quitter : \\\"quit\\\", Total: \\\"total\\\" , Liste: \\\"list\\\" ou Time: \\\"time\\\"\");\n System.out.println(\"--------\");\n }", "public static void shoInfo() {\n\t\tSystem.out.println(description);\n\t \n\t}", "public void showInfo(){\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tthis.cd.get(i).showInfo();\n\t\t}\n\t\tSystem.out.println(\"\\tToatl amount: \" + calTotalAmount());\n\t}", "void printInfo();", "private String printHelp()//refactored\n { String result = \"\";\n result += \"\\n\";\n result += \"You are weak if you have to ask me\\n\";\n result += \"Try not to die, while i´am mocking you.\\n\";\n result += \"\\n\";\n result += \"\" + currentRoom.getDescription() + \"\\n\"; //new\n result += \"\\nExits: \" + currentRoom.getExitDescription() + \"\\n\";//new\n result += \"\\nCommand words:\\n\";\n result += ValidAction.getValidCommandWords();\n result += \"\\n\";\n \n return result;\n }", "public String printInfo()\r\n {\r\n String info;\r\n \r\n info = \"Inputed number = \" + mark;\r\n \r\n return info;\r\n }", "private static void printUsage()\n {\n HelpFormatter hf = new HelpFormatter();\n String header = String.format(\n \"%nAvailable commands: ring, cluster, info, cleanup, compact, cfstats, snapshot [name], clearsnapshot, bootstrap\");\n String usage = String.format(\"java %s -host <arg> <command>%n\", NodeProbe.class.getName());\n hf.printHelp(usage, \"\", options, header);\n }", "private void getCommand(String cmlet) {\n\t\tSystem.out.println(\"Command Version\");\n\t\tSystem.out.println(\"----------- -------\");\n\t\tSystem.out.println(\" Exit 1.0\");\n\t\tSystem.out.println(\" Get-Host 1.0\");\n\t\tSystem.out.println(\" Get-Command 1.0\");\n\t\tSystem.out.println(\" Write-Host 1.0\");\n\t}", "private static void printUsage(){\n\t\tSystem.err.println(\"USAGE : java -jar ExtractWebCamFeed <Web Cam Code> <Output File Path> <Image Count>\");\n\t\tSystem.err.println(\"Web Cam Code : \\n\\t1 : West Lawns Camera\");\n\t\tSystem.err.println(\"\\t2 : Memorial Union Camera Camera\");\n\t\tSystem.err.println(\"Output File Path : to store the path of the file ( must be .mov)\");\n\t\tSystem.err.println(\"Image Count : Specifies the length of the video \");\n\t}", "private void printInfo() {\n System.out.println(\"\\nThis program reads the file lab4.dat and \" +\n \"inserts the elements into a linked list in non descending \"\n + \"order.\\n\" + \"The contents of the linked list are then \" +\n \"displayed to the user in column form.\\n\");\n }", "public void printDetails() \r\n\t{\r\n\t\t// Print cells in path\r\n\t\tSystem.out.print(\"Path:\");\r\n\t\tfor(Cell c: path)\r\n\t\t\tSystem.out.print(\" (\" + c.getRow() + ',' + c.getColumn() + ')');\r\n\t\t\r\n\t\t// Print path length\r\n\t\tSystem.out.println(\"\\nLength of path: \" + path.size());\r\n\t\t\r\n\t\t// Print visited cell amount\r\n\t\tint lastCell = path.size() - 1;\r\n\t\tint visitedCells = path.get(lastCell).getDiscoveryTime() + 1;\r\n\t\tSystem.out.println(\"Visited cells: \" + visitedCells + '\\n');\r\n\t}", "private static void displayHelp(){\n System.out.println(\"1. (R)eport\");\n System.out.println(\"2. (M)inimum Spanning Tree\");\n System.out.println(\"3. (S)hortest Path from i j\");\n System.out.println(\"4. (D)own i j\");\n System.out.println(\"5. (U)p i j\");\n System.out.println(\"6. (C)hange Weight i j x\");\n System.out.println(\"7. (E)ulerian\");\n System.out.println(\"8. (Q)uit\");\n }", "public void printInfo(){\n\t}", "public void printInfo(){\n\t}", "public String printfull(){\r\n\t\tString ans = this.toString() + \" \\n\";\r\n\t\t\r\n\t\tArrayList <String> details = getOpDetails();\r\n\t\tfor(String d: details){\r\n\t\t\tans = ans + d + \" \\n\";\r\n\t\t}\r\n\t\t\r\n\t\tans = ans + \"Input Files:\\n\" ;\r\n\t\tFileInfo fileIndex = (FileInfo)input.getFirstChild();\r\n\t\twhile(fileIndex != null){\r\n\t\t\tans = ans + fileIndex.toString() + \"\\n\";\r\n\t\t\tfileIndex = (FileInfo)fileIndex.getNextSibling();\r\n\t\t}//end input while\r\n\t\t\r\n\t\t\r\n\t\tans = ans + \"Output Files:\\n\";\r\n\t\tfileIndex = (FileInfo)output.getFirstChild();\r\n\t\twhile(fileIndex != null){\r\n\t\t\tans = ans + fileIndex.toString() + \"\\n\";\r\n\t\t\tfileIndex = (FileInfo) fileIndex.getNextSibling();\r\n\t\t}//end output while\r\n\t\treturn ans;\r\n\t}", "@Override\n public void help()\n {\n System.out.println(\"\\tcd [DEST]\");\n }", "private void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around at the university.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "private void cmdInfo(String line) throws NoSystemException {\n StringTokenizer tokenizer = new StringTokenizer(line);\n try {\n String subCmd = tokenizer.nextToken();\n if (subCmd.equals(\"class\")) {\n String arg = tokenizer.nextToken();\n cmdInfoClass(arg);\n } else if (subCmd.equals(\"model\")) {\n cmdInfoModel();\n } else if (subCmd.equals(\"state\")) {\n cmdInfoState();\n } else if (subCmd.equals(\"opstack\")) {\n cmdInfoOpStack();\n } else if (subCmd.equals(\"prog\")) {\n cmdInfoProg();\n } else if (subCmd.equals(\"vars\")) {\n cmdInfoVars();\n } else\n Log.error(\"Syntax error in info command. Try `help'.\");\n } catch (NoSuchElementException ex) {\n Log.error(\"Missing argument to `info' command. Try `help'.\");\n }\n }", "public void info()\n {\n System.out.println(toString());\n }", "public void printString()\r\n\t{\r\n\t\t//print the column labels\r\n\t\tSystem.out.printf(\"%-20s %s\\n\", \"Word\", \"Occurrences [form: (Paragraph#, Line#)]\");\r\n\t\tSystem.out.printf(\"%-20s %s\\n\", \"----\", \"-----------\");\r\n\t\troot.printString();\r\n\t}", "private void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around at the prision.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n System.out.println(parser.showCommands());\n }", "final private static void usage_print () {\n\t\tSystem.out.println (NAME + ' ' + VERSION + ' ' + COPYRIGHT) ;\n\t\tSystem.out.println () ;\n\n\t\tSystem.out.println (\n\t\t \"Usage: java bcmixin.Main [<options>] <modelname> <equationname>\"\n\t\t) ;\n\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where [<options>] include any of the following:\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" -help\") ;\n\t\tSystem.out.println (\" Prints this helpful message, then exits.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" where <modelname> means the model name that you want to work on.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where <equationname> provides the equation name, which must end with .equation.\") ;\n\t\tSystem.out.println () ;\n }", "private static void writeShortManual() {\n System.out.println(\"\\nPromethean CLI v1.0.0\");\n System.out.println(\"Commands:\");\n System.out.println(\"\\tplan - create (and optionally execute) a plan given input json\");\n System.out.println(\"\\ttestgen - generate a test input file given initial and goal states\");\n System.out.println(\"Run <command> --help to see all options\\n\");\n }", "public static String DeviceConnected(){\n StringBuilder outputDC = new StringBuilder();\n String cmd = \"route print\";\n try{\n outputDC.append(getCommand(cmd));\n }\n catch(Throwable se){\n se.printStackTrace();\n }\n return outputDC.toString();\n }", "@Override\n public String toString() {\n return \"ls [PATH ...]:\\n\" + \"\\tList the contents.\\n\" + \"\\tNote:\\n\"\n + \"\\t1.If no PATH given, print contents of current directory.\\n\"\n + \"\\t2.If PATH specifies a directory, print its contents(file or \"\n + \"directory).\\n\" + \"\\t3.If PATH specifies a file, print its name.\";\n }", "private void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around in a dense woods.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "void putdata()\n {\n System.out.printf(\"\\nCD Title \\\"%s\\\", is of %d minutes length and of %d rupees.\",title,length,price);\n }", "public void printString() {\n\t\tSystem.out.println(name);\n\t\t\n\t\t\n\t}", "private void printHelp() \n {\n Logger.Log(\"You have somehow ended up in this strange, magical land. But really you just want to go home.\");\n Logger.Log(\"\");\n Logger.Log(\"Your command words are:\");\n parser.showCommands();\n Logger.Log(\"You may view your inventory or your companions\");\n }", "void getInfo() {\n\tSystem.out.println(\"My name is \"+name+\" and I am going to \"+school+\" and my grade is \"+grade);\n\t}", "private static void displayHelp(){\n System.out.println(\"-host hostaddress: \\n\" +\n \" connect the host and run the game \\n\" +\n \"-help: \\n\" +\n \" display the help information \\n\" +\n \"-images: \\n\" +\n \" display the images directory \\n\" +\n \"-sound: \\n\" +\n \" display the sounds file directory \\n\"\n\n );\n }", "public String print(){\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.trackNumber, \r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.numRailCars, \r\n\t\t\t\tthis.destCity);\r\n\t\t}", "static void out_from_acc(String passed){\n\t\tSystem.out.println(\"Output to port \"+hexa_to_deci(passed.substring(3))+\" : \"+registers.get('A'));\n\t}", "private static String getUsage()\n {\n final StringBuilder usage = new StringBuilder(400);\n\n // Empty line before usage info\n usage.append(\"\\n \" \n // Describe commands/options\n + \"those <option> <command> <cmd-options> \\n\"\n + \" Options:\\n\"\n + \"\\t-v : Allows stack trace to be printed.\\n\" \n + \" Commands:\\n\"\n + getCreateUsage()\n + \" help\\n\" \n + \"\\t Displays this help message\\n\" \n + \" version\\n\" \n + \"\\t Displays the SDK version and supported Core APIs\\n\");\n\n return usage.toString();\n }", "private void help() {\n for (GameMainCommandType commandType : GameMainCommandType.values()) {\n System.out.printf(\"%-12s%s\\n\", commandType.getCommand(), commandType.getInfo());\n }\n System.out.println();\n }", "java.lang.String getOutput();", "static String printInstructions() {\n return \"Hello, Test Subject 525. I am Charlie, your personal helper bot.\\n\\n\" +\n \"I suggest you pick up the cryonic files in the starting area, and inspect them before proceeding.\" +\n \" You may drop them afterwards if you wish.\\n\\n\" +\n \"You awaken in the Cryostasis Containment Chamber, which only contains 'cryonics files'.\\n\" +\n \"You can traverse the ship by using the north, south, east, or west buttons.\\n\" +\n \"You can see what is in the room you are in by typing 'look', or you can use the current room button.\\n\" +\n \"You can pick things up by typing 'pickup thing' where thing is what you see in the room.\\n\"+\n \"You can drop things you are carrying by typing 'drop thing' where thing names something you have.\\n\"+\n \"You can see your status by typing status, and quit by using the quit button.\\n\" +\n \"If you wish to view the instructions again, press the instructions button.\\n\\n\" +\n \"You can also inspect things you are carrying by typing 'inspect thing' where thing names\" +\n \" something you have.\\n\" +\n \"Inspected things may possess different functions, so inspect them thoroughly.\\n\" +\n \"If you use things in your bag when you're not supposed to, I'll inform you.\" +\n \" If you continually try to use things when you're not supposed to...\\n\" +\n \"you can see for yourself what'll happen.\\n\\n\" +\n \"OBJECTIVE: My sensors have detected a dangerous invader among us...quietly lurking around the ship.\\n\" +\n \"Search the ship for weapons to arm yourself with, and find a transmitter to contact home base.\\n\" +\n \"I suggest you act quickly before this creature finds you first, 525.\\n\\n\";\n }", "private void cmdInfoProg() {\n long total = Runtime.getRuntime().totalMemory();\n long free = Runtime.getRuntime().freeMemory();\n NumberFormat nf = NumberFormat.getInstance();\n Log.println(\"(mem: \"\n + NumberFormat.getPercentInstance().format(\n (double) free / (double) total) + \" = \"\n + nf.format(free) + \" bytes free, \" + nf.format(total)\n + \" bytes total)\");\n }", "public static void printHomeChoises() {\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"\\nEcolha a seguir a ação deseja inserindo o numero relativo\")\n .append(\"\\n1 - Cadastrar Novo Usuário\")\n .append(\"\\n2 - Imprimir Usuários\")\n .append(\"\\n3 - Informação do Sistema/Empresa\")\n .append(\"\\n4 - Sair do Sistema\")\n .append(\"\\n==============================\");\n\n System.out.println(sb.toString());\n }", "abstract public void printInfo();", "public void print() {\n System.out.println(\"Command: \" + command);\n }", "public void printInfo() {\n\t\tSystem.out.println(\"User: \" + userName);\n\t\tSystem.out.println(\"Login: \" + loginName);\n\t\tSystem.out.println(\"Host: \" + hostName);\n\t}", "void printUsage(){\n\t\tSystem.out.println(\"Usage: RefactorCalculator [prettyPrint.tsv] [tokenfile.ccfxprep] [cloneM.tsv] [lineM.tsv]\");\n\t\tSystem.out.println(\"Type -h for help.\");\n\t\tSystem.exit(1); //error\n\t}", "public void display()\n\t{\n\t\tSystem.out.println(\"Bike No.\\t\"+\n\t\t\t\t\"Phone no.\\t\"+\n\t\t\t\t\"Name\\t\"+\n\t\t\t\t\"No. of days\\t\"+\n\t\t\t\t\"Charge\");\n\t\tSystem.out.println(bno+\n\t\t\t\t\"\\t\"+phno+\n\t\t\t\t\"\\t\"+name+\n\t\t\t\t\"\\t\"+days+\n\t\t\t\t\"\\t\"+charge);\n\t}", "void printToConsole() {\n\t\tSystem.out.println(\"PROVIDER DIRECTORY:\");\n\t\tfor (int i = 0; i < services.size(); i++) {\n\t\t\tString service = services.get(i).getServiceName() + \" (\" + services.get(i).getServiceNumber() + \") for $\" + services.get(i).getServiceFee();\n\t\t\tSystem.out.println(\"\\t\" + service);\n\t\t}\n\t}", "public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }", "public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}", "String diagnosticsOutput();", "public String toString(){\n\t\tFileHandler fw = new FileHandler(); //Create new object for file write\n \tformatText(title);\n \tformatText(snippet);\n \tsnippet = removeLineBreak(snippet);\n \t\n \t//Print out contents to screen\n \tSystem.out.println(urlLabel + link);\n \tSystem.out.println(titleLabel + title);\n\t\tSystem.out.println(snippetLabel + snippet);\n\t\t\n\t\t//Write contents to file\n\t\tfw.writeToFile(urlLabel, link, fw.file, false);\n\t\tfw.writeToFile(titleLabel, title, fw.file, false);\n\t\tfw.writeToFile(snippetLabel, snippet, fw.file, false);\n\t\tfw.writeToFile(\"---------- END OF RESULT -----------\",\"\", fw.file, false);\n\t return \"\";\n\t}", "public static void printInfo(){\n }", "private static void printHelp(){\r\n System.out.println(\"\\n\\n\\t\\t\\t ----HELP---\\n\\n\" +\r\n \"\\nYou can set the length of password like this \\n\" +\r\n \"\\t java -jar nipunpassgen.jar -l (where l is length of password) \\n\\n\" +\r\n \"\\nYou can also specifiy the which type of word your want to use like this-->\\n\" +\r\n \"\\t Type java -jar nipunpassgen.jar -l -tttt \\n \" +\r\n \"Here 1st t will set uselowercase true \\t 2nd t set useUppercase true\\n\" +\r\n \"\\t 3rd t set useDigit True \\t and 4th t set useSpecial Char true\\n\" +\r\n \"You can use 't' or 'T' for setting the true and 'f' or 'F' for setting the false\\n\" +\r\n \"You can pass -c flag at the end of command for directly copy the password in your\\n\" +\r\n \"clipboard without showing in console like this \\t java -jar nipunpassgen.jar -c \\t this will copy a\\n\" +\r\n \"random 8 digit password in your clipboard .\");\r\n }", "protected String cmdDetails(final int exitCode, final String id, final String cmdLine, final long elapsedNs) {\n return String.format(\n \"%s: id [%s], cmd [%s], elapsedNs [%d]\",\n (exitCode == 0 ? \"PASS\" : \"FAIL\"),\n id,\n cmdLine,\n elapsedNs);\n }", "private void writeHost(String cmlet) {\n\t\tif(cmlet.length() > 11) {\n\t\t\tString[] comando = cmlet.split(\" \");\n\t\t\tif(comando.length > 0) {\n\t\t\t\tString str = cmlet.substring(11);\n\t\t\t\tif(str.charAt(0) == '\"' && str.charAt(str.length()-1) == '\"') {\n\t\t\t\t\tSystem.out.println(str.substring(1, str.length()-1));\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(str);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.print(\"\");\n\t\t}\n\t\t\n\t}", "public void Display() {\n\t\tSystem.out.println(Integer.toHexString(PID) + \"\\t\" + Integer.toString(CreationTime) + \"\\t\"+ Integer.toHexString(CommandCounter) + \"\\t\" + ProcessStatus.toString() \n\t\t+ \"\\t\" + Integer.toString(MemoryVolume) + \"\\t\" + Integer.toHexString(Priority) + \"\\t\" + ((MemorySegments != null)? MemorySegments.toString() : \"null\"));\n\t}", "public void printInfo() {\n System.out.println(\"\\n\" + name + \"#\" + id);\n System.out.println(\"Wall clock time: \" + endWallClockTime + \" ms ~ \" + convertFromMillisToSec(endWallClockTime) + \" sec\");\n System.out.println(\"User time: \" + endUserTimeNano + \" ns ~ \" + convertFromNanoToSec(endUserTimeNano) + \" sec\");\n System.out.println(\"System time: \" + endSystemTimeNano + \" ns ~ \" + convertFromNanoToSec(endSystemTimeNano) + \" sec\");\n System.out.println(\"CPU time: \" + (endUserTimeNano + endSystemTimeNano) + \" ns ~ \" + convertFromNanoToSec(endUserTimeNano + endSystemTimeNano) + \" sec\\n\");\n }", "public static void mainText(){\n\t\tSystem.out.println(\"Enter: 1.'EXIT' 2.'STU' 3.'FAC' 4.SQL query 5.'MORE' -for more detail about options\");\n\t}", "private void showCommands() {\n System.out.println(\"\\n Commands:\");\n System.out.println(\"\\t lf: List reference frames\");\n System.out.println(\"\\t af: Add a reference frame\");\n System.out.println(\"\\t rf: Remove a reference frame\");\n System.out.println(\"\\t le: List events\");\n System.out.println(\"\\t ae: Add an event\");\n System.out.println(\"\\t re: Remove an event\");\n System.out.println(\"\\t ve: View all events from a certain frame\");\n System.out.println(\"\\t li: Calculate the Lorentz Invariant of two events\");\n System.out.println(\"\\t s: Save the world to file\");\n System.out.println(\"\\t l: Load the world from file\");\n System.out.println(\"\\t exit: Exit the program\");\n }", "@Override\n\tpublic String toString()\n\t{\n\t\tString result = \"\";\n\t\tfor(String c : commands)\n\t\t\tresult += c + '\\n';\n\t\treturn result;\n\t}", "private void printHelp() \n {\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "String getOutput();", "public void printLocationInfo()\n {\n System.out.println(currentRoom.getLongDescription());\n System.out.println();\n }", "public void getInfo() {\n System.out.println(\"Content : \" + content);\n System.out.println(\"Name : \" + name);\n System.out.println(\"Location : (\" + locX + \",\" + locY + \")\");\n System.out.println(\"Weight : \" + String.format(\"%.5f\", weight) + \" kg/day\");\n System.out.println(\"Habitat : \" + habitat);\n System.out.println(\"Type : \" + type);\n System.out.println(\"Diet : \" + diet);\n System.out.println(\"Fodder : \" + String.format(\"%.5f\", getFodder()) + \" kg\");\n System.out.println(tamed ? \"Tame : Yes \" : \"Tame : No \");\n System.out.println(\"Number of Legs : \" + legs);\n }", "public void output() {\n System.out.printf(\"Dien tich: %.2f \\n\", getArea());\n System.out.printf(\"Chu vi: %.2f \\n\", getPeripheral());\n }", "public void printHelp() {\n System.out.println(\". - jeden znak (bez znaku nowej linii)\");\n System.out.println(\".* - zero lub więcej znaków\");\n System.out.println(\"\\\\w* - zero lub więcej słów\");\n }", "private void printCRUDDoctorOption() {\n\t\tSystem.out.println(\"\\n\\n----Edit DOCTOR----\");\n\t\tSystem.out.println(\"1. Insert a new doctor\");\n\t\tSystem.out.println(\"2. List all doctors\");\n\t\tSystem.out.println(\"3. Update doctor data\");\n\t\tSystem.out.println(\"4. Remove doctor\");\n\t\tSystem.out.println(\"5. Back\");\n\t\tSystem.out.println(\"Enter your choice: \");\n\t}", "public String print(){\n\t\treturn this.sonsPaths_.toString();\n\t}", "private static String optionsListing() {\n\t\tString result = \"\\nUsage: java -jar comtor.jar -dir dirname\\n\\n\";\n\t\tresult += \"Options:\\n\";\n\t\t\n\t\tresult += \"-dir dirname\\t\\tSpecified the pathname of the directory in which COMTOR will \"; \n\t\tresult += \"search for Java source code\\n\\t\\t\\tfiles (packaged and non-packaged).\\n\\n\";\n\t\t\n\t\tresult += \"-help | --help\\t\\tThis help message\\n\";\n\t\tresult += \"\\n\\n\";\n\t\treturn result;\n\t}", "protected void help() {\n println(\"go - Begin execution at Start or resume execution from current pc location\");\n println(\"go <loc1> - Begin execution at <loc1>\");\n println(\"step - Execute next step\");\n println(\"dump <loc1> <loc2> - Dump memory locations from (including) <loc1> - <loc2>\");\n println(\"dumpr - Dump a table of registers\");\n println(\"exit - Exit debugger\");\n println(\"deas <loc1> <loc2> - Deassmble memory locations from (including) <loc1> - <loc2>\");\n println(\"brkt - List the current break point table\");\n println(\"sbrk <loc1> - Set break point at <loc1>\");\n println(\"cbrk <loc1> - Clear break point at <loc1>\");\n println(\"cbrkt - Clear breakpoint table\");\n println(\"help - Print a summary of debugger commands\");\n println(\"chngr <r#> <value> - Change the value of register <r#> to <value>\");\n println(\"chngm <loc1 <value> - Change the value of memory loaction <loc1> to <value>\");\n }", "public void printHelpCommands(){\r\n\t\t//Construct the help command output\r\n\t\tprintAsTable(\"exit\",\t\t \t\t\t\t\"Exit the program.\");\r\n\t\tprintAsTable(\"help\",\t\t \t\t\t\t\"Print out the usage.\");\r\n\t\tprintAsTable(\"host\",\t\t\t\t\t\t\"Enumerate all hosts.\");\r\n\t\tprintAsTable(\"host hname info\", \t\t\t\"Show info of host name.\");\r\n\t\tprintAsTable(\"host hname datastore\", \t\t\"Enumerate datastores of host hname.\");\r\n\t\tprintAsTable(\"host hname network\", \t\t\t\"Enumerate networks of host hname.\");\r\n\t\tprintAsTable(\"vm\", \t\t\t\t\t\t\t\"Enumerate all virtual machines.\");\r\n\t\tprintAsTable(\"vm vname info\", \t\t\t\t\"Show info of VM vname.\");\r\n\t\tprintAsTable(\"vm vname on\", \t\t\t\t\"Power on VM vname and wait until task completes.\");\r\n\t\tprintAsTable(\"vm vname off\", \t\t\t\t\"Power off VM vname and wait until task completes.\");\r\n\t\tprintAsTable(\"vm vname shutdown\", \t\t\t\"Shutdown guest of VM vname.\");\t\t\t\r\n\t}", "void printCarInfo();", "@Override\n\tpublic void printtest(String s)\n\t{\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Now executing the command \" + s + \"...\");\n\t\tSystem.out.println(\"The Results of this command are:\");\n\t\tif(!s.contentEquals(\"toString\")) System.out.println(toStringCursor());\n\t\telse System.out.println(toString());\n\t}", "public void printDetails()\r\n\t{\r\n\t\tSystem.out.println(flightNumber);\r\n\t\tSystem.out.println(departurePoint);\r\n\t\tSystem.out.println(destination);\r\n\t\tSystem.out.println(departureTime);\r\n\t\tSystem.out.println(arrivalTime);\r\n\t\tSystem.out.println(checkedInPassengers);\r\n\t\tif(status == 'S')\r\n\t\t\tSystem.out.println(\"Scheduled\");\r\n\t\t\t\r\n\t\tif(status == 'B')\r\n\t\t\tSystem.out.println(\"Boarding\");\r\n\t\tif(status == 'D')\r\n\t\t\tSystem.out.println(\"Departed\");\r\n\t\tif(status == 'C')\r\n\t\t\tSystem.out.println(\"Canceled\");\r\n\t\t\r\n\t\t\t\t\r\n\t}", "private void displayChampionshipDetails()\n {\n displayLine();\n System.out.println(\"########Formula 9131 Championship Details########\");\n displayLine();\n System.out.println(getDrivers().getChampionshipDetails());\n }", "private void print_help_and_exit() {\n System.out.println(\"A bunch of simple directus admin cli commands\");\n System.out.println(\"requires DIRECTUS_API_HOST and DIRECTUS_ADMIN_TOKEN environment variables to be set\");\n System.out.println();\n\n COMMAND_METHODS.values().forEach(c -> {\n for (String desriptionLine : c.descriptionLines) {\n System.out.println(desriptionLine);\n }\n System.out.println();\n });\n\n System.out.println();\n System.exit(-1);\n }", "private static void mostrarMenu() {\n\t\tSystem.out.println(\"AVAILABLE ORDERS\");\n\t\tSystem.out.println(\"================\");\n\t\tSystem.out\n\t\t\t\t.println(\"HELP - shows information on \" +\n\t\t\t\t\t\t\"available orders\");\n\t\tSystem.out\n\t\t\t\t.println(\"DIR - displays the content \" +\n\t\t\t\t\t\t\"of current directory\");\n\t\tSystem.out\n\t\t .println(\"DIRGALL - displays the content\" +\n\t\t\t\t \" of current directory\");\n System.out\n\t\t .println(\" and all its internal\" +\n\t\t\t\t \" subdirectories\"); \t\t\n\t\tSystem.out\n\t\t\t\t.println(\"CD dir - changes the current \" +\n\t\t\t\t\t\t\"directory to its subdirectory [dir]\");\n\t\tSystem.out\n\t\t\t\t.println(\"CD .. - changes the current \" +\n\t\t\t\t\t\t\"directory to its father directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"WHERE - shows the path and name \" +\n\t\t\t\t\t\t\"of current directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"FIND text - shows all the images \" +\n\t\t\t\t\t\t\"whose name includes [text]\");\n\t\tSystem.out\n\t\t\t\t.println(\"DEL text - information and delete \" +\n\t\t\t\t\t\t\"a picture named [text] of current \" +\n\t\t\t\t\t\t\"directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"MOVE text - move an image named \" +\n\t\t\t\t\t\t\"[text] to another directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"IMG time - displays a carousel \" +\n\t\t\t\t\t\t\"with the images in current directory;\");\n\t\tSystem.out\n\t\t\t\t.println(\" each image is displayed\" +\n\t\t\t\t\t\t\" [time] seconds\");\n\t\tSystem.out\n\t\t\t\t.println(\"IMGALL time - displays a carousel with\" +\n\t\t\t\t\t\t\" the images in current directory;\");\n\t\tSystem.out\n\t\t\t\t.println(\" and in all its internal\" +\n\t\t\t\t\t\t\" subdirectories; each image is\");\n\t\tSystem.out.println(\" displayed [time] \" +\n\t\t\t\t\"seconds\");\n\t\tSystem.out.println(\"BIGIMG - displays the bigest image int the current\" +\n\t\t\t\t\"directory\");\n\t\tSystem.out.println(\"END - ends of program \" +\n\t\t\t\t\"execution\");\n\t}", "public void printUsage() {\n printUsage(System.out);\n }", "public void printHelp() throws IOException {\n\n HelpFormatter hf = new HelpFormatter();\n hf.setShellCommand(m_name);\n hf.setGroup(m_options);\n hf.print();\n }", "public String getInfoString();", "private void printHelp() {\n TablePrinter helpTableHead = new TablePrinter(\"Command Name : \", \"textconvert\");\n helpTableHead.addRow(\"SYNOPSIS : \", \"textconvert [OPTION]...\");\n helpTableHead.addRow(\"DESCRIPTION : \", \"Convert text/file to Binary, Hexadecimal, Base64.\");\n helpTableHead.print();\n TablePrinter helpTable = new TablePrinter(\"Short Opt\", \"Long Opt\", \"Argument\", \"Desc\", \"Short Option Example\", \"Long Option Example\");\n helpTable.addRow(\"-h\", \"--help\", \"not required\", \"Show this help.\", \"help -h\", \"help --help\");\n helpTable.addRow(\"-f\", \"--file\", \"required\", \"Path to file\", \"textconvert -f /PATH/TO/FILE\", \"textconvert --file /PATH/TO/FILE\");\n helpTable.addRow(\"-ttb\", \"--texttobinary\", \"not required\", \"Convert text to Binary\", \"textconvert -ttb -f /PATH/TO/FILE\", \"textconvert --texttobinary --file /PATH/To/File\");\n helpTable.addRow(\"-btt\", \"--binarytotext\", \"not required\", \"Convert Binary to text\", \"textconvert -btt -f /PATH/To/FileWithBinaryData\", \"textconvert --binarytotext --file /PATH/To/FileWithBinaryData\");\n helpTable.print();\n this.done = true;\n }", "public static void showOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- The participants' directory.\")\n .add(\"2- The RDVs' agenda.\")\n .add(\"3- Quit the app.\")\n .add(\"*************************\")\n );\n }", "public void printProtocol()\n\t{\n\t\tString commands[] = {\"A\", \"UID\", \"S\", \"F\"};\n\t\t\n\t\tHashtable<String, String> commandDescription = new Hashtable<String, String>();\n\t\tHashtable<String, String> subStringCommands = new Hashtable<String, String>();\n\t\tcommandDescription.put(\"A\", \"Sends audio data using _ as a regex\");\n\t\tcommandDescription.put(\"UID\", \"Specifies the user's id so that the Network.Server may verify it\");\n\t\tcommandDescription.put(\"S\", \"Specifies server commands.\");\n\t\tcommandDescription.put(\"F\", \"Specifies audio format.\");\n\t\tsubStringCommands.put(\"A\", \"No commands\");\n\t\tsubStringCommands.put(\"UID\", \"No sub commands\");\n\t\tsubStringCommands.put(\"S\", \"Sub commands are: \\nclose - Closes the server.\\ndisconnect - Disconnects the client from the server.\\nclumpSize {int}\");\n\t\tsubStringCommands.put(\"F\", \"Split Audio specifications between spaces. The ordering is {float SampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate\");\n\t\t\n\t\tfor (String str: commands)\n\t\t{\n\t\t\tSystem.out.printf(\"Command format:\\n %s.xxxxxxx\\n\", str);\n\t\t\tSystem.out.printf(\"Command %s\\n Description: %s \\n sub commands %s\\n\", str, commandDescription.get(str),subStringCommands.get(str));\n\t\t\t\n\t\t}\n\t}", "private static void help() {\n\t\tSystem.out.println(\"\\n----------------------------------\");\n\t\tSystem.out.println(\"---Regatta Calculator Commands----\");\n\t\tSystem.out.println(\"----------------------------------\");\n\t\tSystem.out.println(\"addtype -- Adds a boat type and handicap to file. Format: name:lowHandicap:highHandicap\");\n\t\tSystem.out.println(\"format -- Provides a sample format for how input files should be arranged.\");\n\t\tSystem.out.println(\"help -- Lists every command that can be used to process regattas.\");\n\t\tSystem.out.println(\"podium -- Lists the results of the regatta, assuming one has been processed.\");\n\t\tSystem.out.println(\"regatta [inputfile] -- Accepts an input file as a parameter, this processes the regatta results outlined in the file.\");\n\t\tSystem.out.println(\"types -- lists every available boat type.\");\n\t\tSystem.out.println(\"write [outputfile] -- Takes the results of the regatta and writes them to the file passed as a parameter.\");\n\t\tSystem.out.println(\"----------------------------------\\n\");\n\t}", "public void describe() {\n\t\tSystem.out.println(\"这是汽车底盘\");\n\t}", "private static void printUsage()\n {\n StringBuilder usage = new StringBuilder();\n usage.append(String.format(\"semantika %s [OPTIONS...]\\n\", Environment.QUERYANSWER_OP));\n usage.append(\" (to execute query answer)\\n\");\n usage.append(String.format(\" semantika %s [OPTIONS...]\\n\", Environment.MATERIALIZE_OP));\n usage.append(\" (to execute RDB2RDF export)\");\n String header = \"where OPTIONS include:\"; //$NON-NLS-1$\n String footer =\n \"\\nExample:\\n\" + //$NON-NLS-1$\n \" ./semantika queryanswer -c application.cfg.xml -l 100 -sparql 'SELECT ?x WHERE { ?x a :Person }'\\n\" + //$NON-NLS-1$\n \" ./semantika rdb2rdf -c application.cfg.xml -o output.n3 -f N3\"; //$NON-NLS-1$\n mFormatter.setOptionComparator(null);\n mFormatter.printHelp(400, usage.toString(), header, sOptions, footer);\n }", "public void printInfo() throws IOException {\n System.out.println();\n System.out.println(\"* Current books in the database.\\n\");\n for(Book book :bookdatabase){\n System.out.println(book.getTitle());\n }\n System.out.println();\n System.out.println(\"* Current students in the database.\\n\");\n for(Student student :studentdatabase){\n System.out.println(student.getUsername());\n }\n System.out.println();\n System.out.println(\"* Current librarians in the database.\\n\");\n for(Librarian l :lib_db){\n System.out.println(l.getUsername());\n }\n\n\n\n }", "private String getCommandWithPrompt() {\n print(\"dbg<\" + pc + getLabel(pc) + \">\");\n return nextLine();\n }", "public String toString()\n\t{\n\t\treturn getArea() + \".\" + getLine() + \".\" + getDevice();\n\t}", "public String printDetails(){\n System.out.println(\"This is the Title of the book:\");\n return title;\n System.out.println(\"This is the Author of the book:\");\n return author;\n System.out.println(\"This is how many pages there are:\");\n return pages;\n System.out.println(\"This is the Ref Number:\");\n return refNumber;\n \n }", "public String toString(){\n return \"MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION - sysid:\"+sysid+\" compid:\"+compid+\" time_boot_ms:\"+time_boot_ms+\" firmware_version:\"+firmware_version+\" tilt_max:\"+tilt_max+\" tilt_min:\"+tilt_min+\" tilt_rate_max:\"+tilt_rate_max+\" pan_max:\"+pan_max+\" pan_min:\"+pan_min+\" pan_rate_max:\"+pan_rate_max+\" cap_flags:\"+cap_flags+\" vendor_name:\"+vendor_name+\" model_name:\"+model_name+\"\";\n }" ]
[ "0.6329627", "0.63036454", "0.6276214", "0.627392", "0.6223826", "0.60992384", "0.60857296", "0.6020301", "0.5976071", "0.5970779", "0.59655875", "0.5961455", "0.59535503", "0.5929946", "0.5919134", "0.59174603", "0.58997077", "0.5886722", "0.58846307", "0.58723205", "0.58622026", "0.58562297", "0.5842309", "0.5834705", "0.58333385", "0.58333385", "0.5826366", "0.5797715", "0.5782417", "0.57817733", "0.5780352", "0.57757574", "0.5775552", "0.5767505", "0.57530546", "0.57457745", "0.5743415", "0.5742675", "0.5741555", "0.57352376", "0.5734517", "0.5731084", "0.5718096", "0.5710416", "0.57102984", "0.57033396", "0.56974614", "0.56939495", "0.56860876", "0.56851447", "0.56822586", "0.56802857", "0.5676788", "0.56705135", "0.5668409", "0.56662065", "0.5665993", "0.5659798", "0.5650482", "0.5647453", "0.56447273", "0.56401414", "0.563964", "0.5632585", "0.56270164", "0.5620313", "0.56117266", "0.5603081", "0.56004333", "0.56001425", "0.55990475", "0.5595554", "0.5595494", "0.55940795", "0.55936974", "0.55846834", "0.5583826", "0.55817974", "0.5578144", "0.5576254", "0.5568628", "0.5560434", "0.55586225", "0.55584013", "0.5557349", "0.55435336", "0.55418366", "0.5539983", "0.55342674", "0.5530071", "0.5523892", "0.5521148", "0.5518371", "0.55139256", "0.5513036", "0.5507526", "0.54984236", "0.549596", "0.5493269", "0.54867256", "0.5484659" ]
0.0
-1
Note: we get a byte buffer in lieu of a string; this handles converting the byte buffer into a string for storage.
@SuppressWarnings("unchecked") public void arrayAddValue(LinkedList<String> keyList, Object array, Object value) throws IOException { if (value instanceof JSONParseEngine.ByteBuffer) { value = value.toString(); } ((ArrayList) array).add(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String strBufToString() {\n return new String(strBuf, 0, strBufLen);\n }", "private String asString(ByteBuffer buffer) {\n\t\tByteBuffer copy = buffer.duplicate();\n\t\tbyte[] bytes = new byte[copy.remaining()];\n\t\tcopy.get(bytes);\n\t\treturn new String(bytes, StandardCharsets.UTF_8);\n\t}", "public static String bufferToString(Buffer buffer) {\n return buffer.readString(Charset.defaultCharset());\n }", "public static String getString(ByteBuffer buffer,String charsetName) throws UnsupportedEncodingException {\n\t\tString retString = new String(buffer.array());\n\t\tretString = retString.trim();\n\t\treturn retString;\n\t}", "private static Buffer toBytes(String str) {\n try {\n return new Buffer(str.getBytes(\"UTF-8\"));\n } catch(java.io.UnsupportedEncodingException e) {\n throw new RuntimeException(\"UTF-8 not supported.\", e);\n }\n }", "abstract public Buffer createBufferFromString(String data);", "@Nonnull\n public String toBuf() {\n Buf buf = new Buf();\n Error.throwIfNeeded(jniToBuf(buf, getRawPointer()));\n return buf.getString().orElse(\"\");\n }", "private String readString(ByteBuffer buf, int size) {\n byte[] bytes = new byte[size];\n\n buf.get(bytes);\n\n String str = new String(bytes);\n\n knownStrs.putIfAbsent(str.hashCode(), str);\n\n if (forwardRead != null && forwardRead.hash == str.hashCode())\n forwardRead.found = true;\n\n return str;\n }", "public native String stringFromJNI(ByteBuffer buffer);", "private String getDataFromBuffer(){\r\n int bufferDataSize = mBufferData.size();\r\n StringBuilder temp = new StringBuilder();\r\n \r\n for (int i = 0; i < bufferDataSize; i++) {\r\n temp.append(mBufferData.remove());\r\n }\r\n return temp.toString();\r\n }", "private String popString() {\n String result = new String(bytes, 0, len, StandardCharsets.UTF_8);\n len = 0;\n return result;\n }", "CharArrayBuffer getBuffer()\n ;", "byte [] getBuffer ();", "@Override\n\tpublic String memUTF8String(DirectBuffer buffer, int length) {\n\t\tif (length == -1)\n\t\t\tthrow new IllegalArgumentException(\"Illegal length\");\n\t\ttry {\n\t\t\treturn UTF8_DECODER.decode(NioByteBufferWrapper.wrap(buffer, length)).toString();\n\t\t} catch (CharacterCodingException e) {\n\t\t\treturn CHARACTER_CODING_EXCEPTION;\n\t\t}\n\t}", "private void writeString( ByteBuffer byteBuffer, String string, int len )\n {\n if ( null == string )\n {\n string = \"\";\n }\n\n try\n {\n byte[] sbytes = string.getBytes( \"ASCII\" );\n\n // writeBytes will automatically zero-pad and thus terminate the\n // string.\n writeBytes( byteBuffer, sbytes, len );\n }\n catch ( UnsupportedEncodingException e )\n {\n // should not happen\n throw new RuntimeException( I18n.err( I18n.ERR_635 ), e );\n }\n }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n for(TypeOfStream stype: TypeOfStream.values()) {\n InputStream stream = getInputStream(stype, TypeOfContent.BYTE_10, cs_UTF_8);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs_UTF_8.newDecoder(), 10);\n instance.setMaxBufferSize(5);\n String expResult = TypeOfContent.BYTE_10.getContent();\n String result = instance.toString();\n assertEquals(expResult, result);\n }\n }", "private static String bytes2String(byte[] bytes) {\n StringBuffer stringBuffer = new StringBuffer();\n for (int i = 0; i < bytes.length; i++) {\n stringBuffer.append((char) bytes[i]);\n }\n return stringBuffer.toString();\n }", "String readString();", "private static String decodeStringFromBuffer(StringBuffer buf)\n {\n String returnValue = null;\n\n if (buf != null)\n {\n StringBuffer decodedBuffer = new StringBuffer();\n char[] pair = new char[2];\n\n // get the char equivelant of each number pair + 32\n for (int numberPair = 0; numberPair < buf.length() - 1;\n numberPair += 2)\n {\n buf.getChars(numberPair, numberPair + 2, pair, 0);\n int ascii;\n\n try\n {\n ascii = Integer.valueOf(new String(pair)).intValue() + 32;\n }\n catch (NumberFormatException e)\n {\n return null;\n }\n decodedBuffer.append((char) ascii);\n }\n returnValue = decodedBuffer.toString();\n }\n return returnValue;\n }", "@Benchmark\n public String bytesToStringOkio() {\n return BenchmarkUtils.decodeUtf8(decodeArray);\n }", "@java.lang.Override\n public java.lang.String getB() {\n java.lang.Object ref = b_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n b_ = s;\n return s;\n }\n }", "private static byte[] getBytes(String string) {\n log.log(Level.FINEST, String.format(\"%d %s\", string.length(), string));\n return string.getBytes();\n }", "private synchronized String readString(int len) throws IOException {\n\t\tread(bytes, len);\n\t\treturn readString(bytes, 0, len);\n\t}", "public static String deserializeString(ByteBuffer bb) {\n int length = bb.getInt();\n byte[] bytes = new byte[length];\n for (int i = 0; i < length; i++){\n bytes[i] = bb.get();\n }\n return new String(bytes);\n }", "int retrieveString(byte s[]);", "public BEROctetString(byte[] string)\n {\n this(string, DEFAULT_CHUNK_SIZE);\n }", "public String decode(ByteBuffer buffer) {\n\t\tCharBuffer charBuffer = charset.decode(buffer);\n\t\treturn charBuffer.toString();\n\t}", "public java.lang.String getB() {\n java.lang.Object ref = b_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n b_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\t\tpublic byte[] convert(String s) {\n\t\t\treturn s.getBytes();\n\t\t}", "private String encodeBytesFromBuffer(int howMany) {\n String result;\n\n if (innerStreamHasMoreData) {\n howMany = howMany - howMany % 3;\n }\n\n if (howMany == 0) {\n return \"\";\n }\n\n byte[] encodeBuffer = new byte[howMany];\n System.arraycopy(buffer, 0, encodeBuffer, 0, howMany);\n result = Base64.encodeToString(encodeBuffer);\n\n bytesInBuffer -= howMany;\n if (bytesInBuffer != 0) {\n System.arraycopy(buffer, howMany, buffer, 0, bytesInBuffer);\n }\n\n return result;\n }", "public static String readString(ChannelBuffer buffer, int length)\n\t{\n\t\tChannelBuffer stringBuffer = buffer.readSlice(length);\n\t\tString str = null;\n\t\ttry\n\t\t{\n\t\t\tstr = STRING_DECODER.decode(stringBuffer);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tLOG.error(\"Error occurred while trying to read string from buffer: {}\",e);\n\t\t}\n\t\treturn str;\n//\t\tchar[] chars = new char[length];\n//\t\tfor (int i = 0; i < length; i++)\n//\t\t{\n//\t\t\tchars[i] = buffer.readChar();\n//\t\t}\n//\t\treturn new String(chars);\n\t\t\n\t}", "public String readString() {\n byte[] byteForStream = new byte[1024];\n String message = \"\";\n\n mListener.onCarRunning();\n\n\n int bytes;\n\n while (true) {\n try {\n bytes = mInputStream.read(byteForStream);\n message = new String(byteForStream, 0, bytes);\n Log.d(TAG, \" Read from inputstream \" + message);\n\n } catch (IOException e) {\n Log.e(TAG, \" error reading from inputstream \" + e.getMessage());\n break;\n }\n }\n return message;\n }", "public char[] getResultBuffer() { return b; }", "private String longStrBufToString() {\n if (longStrBufPending != '\\u0000') {\n appendLongStrBuf(longStrBufPending);\n }\n return new String(longStrBuf, 0, longStrBufLen);\n }", "public String peekString(Charset charset) {\n if (charset == null)\n charset = Charsets.UTF_8;\n StringBuilder builder = new StringBuilder();\n for (ByteBuffer bb : mBuffers) {\n byte[] bytes;\n int offset;\n int length;\n if (bb.isDirect()) {\n bytes = new byte[bb.remaining()];\n offset = 0;\n length = bb.remaining();\n bb.get(bytes);\n } else {\n bytes = bb.array();\n offset = bb.arrayOffset() + bb.position();\n length = bb.remaining();\n }\n builder.append(new String(bytes, offset, length, charset));\n }\n return builder.toString();\n }", "synchronized boolean createFromString (String buffer) {\n m_buffer = buffer;\n m_pos = 0;\n m_len = buffer.length ();\n return m_newData = parse ();\n }", "public static String toString(byte[] buf) {\r\n if (buf == null) {\r\n return \"null\";\r\n }\r\n return toString(buf, 0, buf.length);\r\n }", "@Override\n\tpublic String toString()\n\t{\n\t\treturn new String(bytes);\n\t}", "public String toString() {\n\t\treturn BlobUtil.string(buffer, offset, size);\n\t}", "private void loadBuffer(ByteBuffer buffer) {\n byteBuffer = buffer.get();\n }", "private void serializeString(final String string, final StringBuffer buffer)\n {\n String decoded = Unserializer.decode(string, charset);\n\n buffer.append(\"s:\");\n buffer.append(decoded.length());\n buffer.append(\":\\\"\");\n buffer.append(string);\n buffer.append(\"\\\";\");\n }", "public static String m24634a(Context context, byte[] bArr, String str) {\n byte[] b = m24637b(context, bArr, str);\n if (b == null) {\n return null;\n }\n try {\n return new String(b, \"UTF-8\");\n } catch (UnsupportedEncodingException unused) {\n return null;\n }\n }", "public static String bytesToString(byte[] b) {\n\t\tString s=new String(b);\n\t\treturn s.trim();\n\t}", "private String readVarchar() throws IOException {\r\n // First int tells us the length of the string\r\n int n = getReader().read();\r\n\r\n // Read n bytes into the buffer\r\n getReader().read(mBuffer, 0, n);\r\n\r\n // Create string from buffer\r\n String s = new String(mBuffer, 0, n, StandardCharsets.UTF_8);\r\n\r\n return s;\r\n }", "static String createString(byte b[]) {\n\treturn StringConverter.byteToHex(b);\n }", "ByteBuffer getStringTable(){\n return ByteBuffer.wrap(super.buf, 0, super.count);\n }", "public String getString_data() { \n char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,60)];\n int i;\n for (i = 0; i < carr.length; i++) {\n if ((char)getElement_data(i) == (char)0) break;\n carr[i] = (char)getElement_data(i);\n }\n return new String(carr,0,i);\n }", "public static String readString(Value value) {\n return SafeEncoder.encode((byte[]) value.get());\n }", "private static byte[] string2Bytes(final String string) {\n if (string == null) return null;\n return string.getBytes();\n }", "private ByteBuffer encode(String str) {\n ByteBuffer bb = null;\n CharsetEncoder isoencoder = UTF8.newEncoder();\n try {\n bb = isoencoder.encode(CharBuffer.wrap(str));\n } catch (CharacterCodingException e) {\n log.error(e);\n }\n return bb;\n }", "private String bytesToString(byte[] someBytes) {\n String retStr = \"\";\n\n for (int i = 0; i < someBytes.length; ++i) {\n retStr += \" \" + someBytes[i];\n }\n\n return retStr;\n }", "public String bufferToString() {\n\t\tStringBuffer buf = new StringBuffer();\n\n\t\tfor (int i = 0; i < actualsizeinwords; i++) {\n\t\t\tbuf.append(\"\" + i + \": \");\n\t\t\tbuf.append(longToBitString(this.buffer[i]));\n\t\t\tbuf.append('\\n');\n\t\t}\n\n\t\treturn buf.toString();\n\t}", "public static ChannelBuffer writeString(String msg) {\n\t\tChannelBuffer buffer = null;\n\t\ttry\n\t\t{\n\t\t\tChannelBuffer stringBuffer = STRING_ENCODER.encode(msg);\n\t\t\tif(null != stringBuffer){\n\t\t\t\tint length = stringBuffer.readableBytes();\n\t\t\t\tChannelBuffer lengthBuffer = ChannelBuffers.buffer(2);\n\t\t\t\tlengthBuffer.writeShort(length);\n\t\t\t\tbuffer = ChannelBuffers.wrappedBuffer(lengthBuffer,stringBuffer);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tLOG.error(\"Error occurred while trying to write string to buffer: {}\",e);\n\t\t}\n\t\treturn buffer;\n\t}", "private String getDataFromBuffer(int end){\r\n StringBuilder temp = new StringBuilder();\r\n \r\n for (int i = 0; i < end; i++) {\r\n temp.append(mBufferData.remove());\r\n }\r\n return temp.toString();\r\n }", "private String read() {\n\n String s = \"\";\n\n try {\n // Check if there are bytes available\n if (inStream.available() > 0) {\n\n // Read bytes into a buffer\n byte[] inBuffer = new byte[1024];\n int bytesRead = inStream.read(inBuffer);\n\n // Convert read bytes into a string\n s = new String(inBuffer, \"ASCII\");\n s = s.substring(0, bytesRead);\n }\n\n } catch (Exception e) {\n Log.e(TAG, \"Read failed!\", e);\n }\n\n return s;\n }", "public String getData() {\n \n String str = new String();\n int aux;\n\n for(int i = 0; i < this.buffer.size(); i++) {\n for(int k = 0; k < this.buffer.get(i).size(); k++) {\n aux = this.buffer.get(i).get(k);\n str = str + Character.toString((char)aux);\n }\n str = str + \"\\n\";\n }\n return str;\n }", "public String toString() \r\n {\r\n \treturn new String(buf, 0, count);\r\n }", "public interface Buffer {\r\n\tpublic void add(String s);\r\n\tpublic String retrieve();\r\n}", "@Override\n public String toString() {\n byte[] buffer = toBuffer();\n return (buffer == null) ? null : new String(buffer, StandardCharsets.UTF_8);\n }", "@java.lang.Override\n public java.lang.String getObject() {\n java.lang.Object ref = object_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n object_ = s;\n return s;\n }\n }", "static ByteString toBytes(String str) {\n return ByteString.copyFrom(str.getBytes(Internal.UTF_8));\n }", "private String allocateString(final char charBuffer[], final int length) {\n //\n // We try to cache short strings\n if(length < 16) {\n //\n // building a simple hash with the characters from charBuffer\n int h = charBuffer[0] + 31;\n for(int i = 1 ; i < length; i++)\n h = h * 31 + charBuffer[i];\n //\n // calculate index within hashtable\n final int hashIndex = h & (_stringCache.length - 1);\n //\n // try to read cached string \n String cachedString = _stringCache[hashIndex];\n //\n // Found a cached string with correct length?\n if(cachedString != null && cachedString.length() == length) {\n int i = length - 1;\n //\n // Compare starting from the end\n while(i >= 0) {\n if(charBuffer[i] != cachedString.charAt(i))\n break;\n \n --i;\n }\n //\n // if both are equal we can return the cached instance of this string\n if(i < 0) \n return cachedString;\n } \n // \n // Write a new string to cache. overwrite any previous value\n cachedString = new String(charBuffer, 0, length);\n _stringCache[hashIndex] = cachedString;\n \n return cachedString;\n } \n \n return new String(charBuffer, 0, length);\n }", "private String m35639a(byte[] bArr, int i, int i2) {\n try {\n return new String(bArr, i, i2, \"UTF-8\");\n } catch (Exception unused) {\n return \"\";\n }\n }", "static String readString() throws IOException{\n return bufferedReader.readLine();\n }", "public com.google.protobuf.ByteString\n getToBytes() {\n Object ref = to_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n to_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "String asString();", "public String readUtf16String(ByteBuffer byteBuffer) {\n try {\n return new String(NIOUtils.toArray(byteBuffer), \"utf-16\");\n } catch (UnsupportedEncodingException unused) {\n return null;\n }\n }", "static String loadStream(InputStream in) throws IOException { \n\t\tint ptr = 0; \n\t\tin = new BufferedInputStream(in); \n\t\tStringBuffer buffer = new StringBuffer(); \n\t\twhile( (ptr = in.read()) != -1 ) { \n\t\t\tbuffer.append((char)ptr); \n\t\t} \n\t\treturn buffer.toString(); \n\t}", "public String readUTF() throws IOException;", "public String readString() {\n final int BUF_SIZE = 100;\n byte[] byteDest = new byte[BUF_SIZE];\n String ret = \"\";\n int num = BUF_SIZE;\n try {\n while (!ret.contains(\"\\r\")) {\n if ((num = in.read(byteDest)) > 0) {\n ret += new String(byteDest, 0, num);\n }\n }\n } catch (IOException e) {\n print(\"Error reading String from \" + portName);\n }\n print(\"Read :\" + ret + \":\");\n return ret;\n }", "public java.lang.String getData() {\n java.lang.Object ref = data_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n data_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public final String recvString() {\n try {\n // Receive a byte buffer\n final byte[] buffer = recvBytes(4096);\n // Check the buffer content\n if (buffer != null) {\n // Construct a message\n final String message = new String(buffer, 0, buffer.length,\n \"UTF-8\");\n // Print some information\n System.out.println(\"Message received: \" + message);\n // And return message\n return message;\n }\n } catch (final UnsupportedEncodingException exc) {\n // Print some information\n System.out.println(\"Message not received\");\n }\n return null;\n }", "private String readFixedString(int size, DataInput in) throws IOException\n { \n var b = new StringBuilder(size);\n int i = 0;\n var done = false;\n while (!done && i < size)\n { \n char ch = in.readChar();\n i++;\n if (ch == 0) {\n done = true;\n }\n else {\n b.append(ch);\n }\n }\n \n in.skipBytes(2 * (size - i));\n return b.toString();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getBBytes() {\n java.lang.Object ref = b_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n b_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public boolean genStringAsByteArray();", "private String convertStreamToString(InputStream is) throws IOException {\r\n\t\tint bufSize = 8 * 1024;\r\n\t\tif (is != null) {\r\n\t\t\tWriter writer = new StringWriter();\r\n\r\n\t\t\tchar[] buffer = new char[bufSize];\r\n\t\t\ttry {\r\n\t\t\t\tInputStreamReader ireader = new InputStreamReader(is, \"UTF-8\");\r\n\t\t\t\tReader reader = new BufferedReader(ireader, bufSize);\r\n\t\t\t\tint n;\r\n\t\t\t\twhile ((n = reader.read(buffer)) != -1) {\r\n\t\t\t\t\twriter.write(buffer, 0, n);\r\n\t\t\t\t}\r\n\t\t\t\treader.close();\r\n\t\t\t\tireader.close();\r\n\t\t\t\treturn writer.toString();\r\n\t\t\t} catch (OutOfMemoryError ex) {\r\n\t\t\t\tLog.e(\"b2evo_android\", \"Convert Stream: (out of memory)\");\r\n\t\t\t\twriter.close();\r\n\t\t\t\twriter = null;\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"\";\r\n\t\t\t} finally {\r\n\t\t\t\tis.close();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "com.google.protobuf.ByteString\n getFromBytes();", "com.google.protobuf.ByteString\n getFromBytes();", "public Object getContent() {\n/* 112 */ return this.buf;\n/* */ }", "private boolean compareBytes(byte [] buffer, int offset, String str) {\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tif ( ((byte) (str.charAt(i))) != buffer[i + offset]) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public final void setBufferString(final byte[] buffer, final String str, final int i) {\r\n\r\n byte[] tmpBuffer;\r\n\r\n tmpBuffer = str.getBytes();\r\n\r\n for (int c = 0; c < tmpBuffer.length; c++) {\r\n buffer[i + c] = tmpBuffer[c];\r\n }\r\n }", "private static String getString(Reader reader) {\n StringBuffer buf = new StringBuffer();\n char[] buffer = new char[1024];\n int count;\n try {\n while ((count = reader.read(buffer)) != -1) {\n buf.append(buffer, 0, count);\n }\n } catch (IOException e) {\n return null;\n }\n return buf.toString();\n }", "private byte[] getUTF8Bytes(String input) {\n\t\treturn input.getBytes(StandardCharsets.UTF_8);\n\t}", "public java.lang.String getObject() {\n java.lang.Object ref = object_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n object_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String readString(int start, int len)\n {\n char[] val = new char[len];\n int end = start + len;\n\n int idx = 0;\n for(int i = start; i < end; i++)\n val[idx++] = (char)buffer[i];\n\n return new String(val);\n }", "private static String toString (byte[] ba) {\r\n return toString(ba, 0, ba.length);\r\n }", "public String readString() throws IOException {\n return WritableUtils.readString(in);\n }", "@Override\n\tpublic String store(byte[] data)\n\t{\n\t\treturn null;\n\t}", "private String getFileContents ()\n {\n final String s = m_buffers.values ()//\n .stream ()//\n .flatMap (List::stream)//\n .collect (Collectors.joining ());\n\n return s;\n }", "String read();", "String read();", "public static byte[] stringToBytes(String str) {\n\t\tif (str==null)\n\t\t\treturn null;\n\t\tif (str.charAt(str.length()-1)!='\\0') str+='\\0';\n\t\treturn str.getBytes();\n\t}", "private byte[] toBytes(String obj){\n return Base64.getDecoder().decode(obj);\n }", "public String byteToChar(byte b[], String encoding);", "public String toString()\n\t{\n\t\treturn (new String(wLocalBuffer)) ;\n\t}", "static String loadStream(InputStream in) throws IOException {\n int ptr = 0;\n in = new BufferedInputStream(in);\n StringBuffer buffer = new StringBuffer();\n while( (ptr = in.read()) != -1 ) {\n buffer.append((char)ptr);\n }\n return buffer.toString();\n }", "public static Symbol string()\r\n\t{\r\n\t\tString str_text = buffer.toString();\r\n\t\tToken token = new Token(fname, str_text, str_linepos, str_charpos,\r\n\t\t\t\tstr_colpos);\r\n\t\treturn new Symbol(sym.STRING, str_linepos, str_colpos, token);\r\n\t}", "@Override\r\n\tpublic byte[] getBytes() {\n\t\treturn buffer.array();\r\n\t}", "private CharSequence decode(ByteBuffer buf) {\n CharBuffer isodcb = null;\n CharsetDecoder isodecoder = UTF8.newDecoder();\n try {\n isodcb = isodecoder.decode(buf);\n } catch (CharacterCodingException e) {\n log.error(e);\n }\n return (CharSequence) isodcb;\n }", "protected String encode(AsciiValueEncoder enc)\n {\n // note: nothing in buffer, can't flush (thus no need to call to check)\n int last = enc.encodeMore(mBuffer, 0, mBuffer.length);\n if (enc.isCompleted()) { // fitted in completely?\n return new String(mBuffer, 0, last);\n }\n // !!! TODO: with Java 5, use StringBuilder instead\n StringBuffer sb = new StringBuffer(mBuffer.length << 1);\n sb.append(mBuffer, 0, last);\n do {\n last = enc.encodeMore(mBuffer, 0, mBuffer.length);\n sb.append(mBuffer, 0, last);\n } while (!enc.isCompleted());\n return sb.toString();\n }", "public com.google.protobuf.ByteString\n getToBytes() {\n Object ref = to_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n to_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }" ]
[ "0.7302743", "0.72454077", "0.6916419", "0.6841923", "0.6794645", "0.6788641", "0.6625988", "0.66085553", "0.65887535", "0.64180833", "0.6414958", "0.63883424", "0.62111676", "0.61849266", "0.6182348", "0.61478317", "0.6137075", "0.60270375", "0.6009653", "0.6003671", "0.60031456", "0.59773695", "0.5959683", "0.59577614", "0.59495777", "0.59458524", "0.5943467", "0.59108394", "0.59095085", "0.5888382", "0.5836087", "0.58146334", "0.5808434", "0.5800926", "0.57933456", "0.5782369", "0.5778035", "0.57777107", "0.57766134", "0.5769202", "0.57631963", "0.5756845", "0.57490534", "0.57473356", "0.5734648", "0.5731428", "0.5718338", "0.5692966", "0.5683515", "0.5671157", "0.5667235", "0.56509423", "0.5649202", "0.5646394", "0.56265426", "0.56138176", "0.56134963", "0.5601247", "0.55989003", "0.55977035", "0.55930644", "0.5584067", "0.5580282", "0.55777836", "0.5562935", "0.55572337", "0.55520177", "0.5550392", "0.5543519", "0.5538448", "0.55371046", "0.55314624", "0.5518903", "0.551685", "0.5498444", "0.5494051", "0.54935473", "0.54935473", "0.5489979", "0.54786485", "0.54727316", "0.546935", "0.54682624", "0.5466674", "0.5461509", "0.54612154", "0.545988", "0.5457441", "0.54573774", "0.5455615", "0.5455615", "0.5451794", "0.5448174", "0.5447589", "0.54469806", "0.54468554", "0.54415053", "0.54404664", "0.54398566", "0.5438993", "0.543375" ]
0.0
-1
Note: we get a byte buffer in lieu of a string; this handles converting the byte buffer into a string for storage.
@SuppressWarnings("unchecked") public void objectAddValue(LinkedList<String> keyList, Object obj, String str, Object value) throws IOException { if (value instanceof JSONParseEngine.ByteBuffer) { value = value.toString(); } ((HashMap) obj).put(str, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String strBufToString() {\n return new String(strBuf, 0, strBufLen);\n }", "private String asString(ByteBuffer buffer) {\n\t\tByteBuffer copy = buffer.duplicate();\n\t\tbyte[] bytes = new byte[copy.remaining()];\n\t\tcopy.get(bytes);\n\t\treturn new String(bytes, StandardCharsets.UTF_8);\n\t}", "public static String bufferToString(Buffer buffer) {\n return buffer.readString(Charset.defaultCharset());\n }", "public static String getString(ByteBuffer buffer,String charsetName) throws UnsupportedEncodingException {\n\t\tString retString = new String(buffer.array());\n\t\tretString = retString.trim();\n\t\treturn retString;\n\t}", "private static Buffer toBytes(String str) {\n try {\n return new Buffer(str.getBytes(\"UTF-8\"));\n } catch(java.io.UnsupportedEncodingException e) {\n throw new RuntimeException(\"UTF-8 not supported.\", e);\n }\n }", "abstract public Buffer createBufferFromString(String data);", "@Nonnull\n public String toBuf() {\n Buf buf = new Buf();\n Error.throwIfNeeded(jniToBuf(buf, getRawPointer()));\n return buf.getString().orElse(\"\");\n }", "private String readString(ByteBuffer buf, int size) {\n byte[] bytes = new byte[size];\n\n buf.get(bytes);\n\n String str = new String(bytes);\n\n knownStrs.putIfAbsent(str.hashCode(), str);\n\n if (forwardRead != null && forwardRead.hash == str.hashCode())\n forwardRead.found = true;\n\n return str;\n }", "public native String stringFromJNI(ByteBuffer buffer);", "private String getDataFromBuffer(){\r\n int bufferDataSize = mBufferData.size();\r\n StringBuilder temp = new StringBuilder();\r\n \r\n for (int i = 0; i < bufferDataSize; i++) {\r\n temp.append(mBufferData.remove());\r\n }\r\n return temp.toString();\r\n }", "private String popString() {\n String result = new String(bytes, 0, len, StandardCharsets.UTF_8);\n len = 0;\n return result;\n }", "CharArrayBuffer getBuffer()\n ;", "byte [] getBuffer ();", "@Override\n\tpublic String memUTF8String(DirectBuffer buffer, int length) {\n\t\tif (length == -1)\n\t\t\tthrow new IllegalArgumentException(\"Illegal length\");\n\t\ttry {\n\t\t\treturn UTF8_DECODER.decode(NioByteBufferWrapper.wrap(buffer, length)).toString();\n\t\t} catch (CharacterCodingException e) {\n\t\t\treturn CHARACTER_CODING_EXCEPTION;\n\t\t}\n\t}", "private void writeString( ByteBuffer byteBuffer, String string, int len )\n {\n if ( null == string )\n {\n string = \"\";\n }\n\n try\n {\n byte[] sbytes = string.getBytes( \"ASCII\" );\n\n // writeBytes will automatically zero-pad and thus terminate the\n // string.\n writeBytes( byteBuffer, sbytes, len );\n }\n catch ( UnsupportedEncodingException e )\n {\n // should not happen\n throw new RuntimeException( I18n.err( I18n.ERR_635 ), e );\n }\n }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n for(TypeOfStream stype: TypeOfStream.values()) {\n InputStream stream = getInputStream(stype, TypeOfContent.BYTE_10, cs_UTF_8);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs_UTF_8.newDecoder(), 10);\n instance.setMaxBufferSize(5);\n String expResult = TypeOfContent.BYTE_10.getContent();\n String result = instance.toString();\n assertEquals(expResult, result);\n }\n }", "private static String bytes2String(byte[] bytes) {\n StringBuffer stringBuffer = new StringBuffer();\n for (int i = 0; i < bytes.length; i++) {\n stringBuffer.append((char) bytes[i]);\n }\n return stringBuffer.toString();\n }", "String readString();", "private static String decodeStringFromBuffer(StringBuffer buf)\n {\n String returnValue = null;\n\n if (buf != null)\n {\n StringBuffer decodedBuffer = new StringBuffer();\n char[] pair = new char[2];\n\n // get the char equivelant of each number pair + 32\n for (int numberPair = 0; numberPair < buf.length() - 1;\n numberPair += 2)\n {\n buf.getChars(numberPair, numberPair + 2, pair, 0);\n int ascii;\n\n try\n {\n ascii = Integer.valueOf(new String(pair)).intValue() + 32;\n }\n catch (NumberFormatException e)\n {\n return null;\n }\n decodedBuffer.append((char) ascii);\n }\n returnValue = decodedBuffer.toString();\n }\n return returnValue;\n }", "@Benchmark\n public String bytesToStringOkio() {\n return BenchmarkUtils.decodeUtf8(decodeArray);\n }", "@java.lang.Override\n public java.lang.String getB() {\n java.lang.Object ref = b_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n b_ = s;\n return s;\n }\n }", "private static byte[] getBytes(String string) {\n log.log(Level.FINEST, String.format(\"%d %s\", string.length(), string));\n return string.getBytes();\n }", "private synchronized String readString(int len) throws IOException {\n\t\tread(bytes, len);\n\t\treturn readString(bytes, 0, len);\n\t}", "public static String deserializeString(ByteBuffer bb) {\n int length = bb.getInt();\n byte[] bytes = new byte[length];\n for (int i = 0; i < length; i++){\n bytes[i] = bb.get();\n }\n return new String(bytes);\n }", "int retrieveString(byte s[]);", "public BEROctetString(byte[] string)\n {\n this(string, DEFAULT_CHUNK_SIZE);\n }", "public String decode(ByteBuffer buffer) {\n\t\tCharBuffer charBuffer = charset.decode(buffer);\n\t\treturn charBuffer.toString();\n\t}", "public java.lang.String getB() {\n java.lang.Object ref = b_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n b_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\t\tpublic byte[] convert(String s) {\n\t\t\treturn s.getBytes();\n\t\t}", "private String encodeBytesFromBuffer(int howMany) {\n String result;\n\n if (innerStreamHasMoreData) {\n howMany = howMany - howMany % 3;\n }\n\n if (howMany == 0) {\n return \"\";\n }\n\n byte[] encodeBuffer = new byte[howMany];\n System.arraycopy(buffer, 0, encodeBuffer, 0, howMany);\n result = Base64.encodeToString(encodeBuffer);\n\n bytesInBuffer -= howMany;\n if (bytesInBuffer != 0) {\n System.arraycopy(buffer, howMany, buffer, 0, bytesInBuffer);\n }\n\n return result;\n }", "public static String readString(ChannelBuffer buffer, int length)\n\t{\n\t\tChannelBuffer stringBuffer = buffer.readSlice(length);\n\t\tString str = null;\n\t\ttry\n\t\t{\n\t\t\tstr = STRING_DECODER.decode(stringBuffer);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tLOG.error(\"Error occurred while trying to read string from buffer: {}\",e);\n\t\t}\n\t\treturn str;\n//\t\tchar[] chars = new char[length];\n//\t\tfor (int i = 0; i < length; i++)\n//\t\t{\n//\t\t\tchars[i] = buffer.readChar();\n//\t\t}\n//\t\treturn new String(chars);\n\t\t\n\t}", "public String readString() {\n byte[] byteForStream = new byte[1024];\n String message = \"\";\n\n mListener.onCarRunning();\n\n\n int bytes;\n\n while (true) {\n try {\n bytes = mInputStream.read(byteForStream);\n message = new String(byteForStream, 0, bytes);\n Log.d(TAG, \" Read from inputstream \" + message);\n\n } catch (IOException e) {\n Log.e(TAG, \" error reading from inputstream \" + e.getMessage());\n break;\n }\n }\n return message;\n }", "public char[] getResultBuffer() { return b; }", "private String longStrBufToString() {\n if (longStrBufPending != '\\u0000') {\n appendLongStrBuf(longStrBufPending);\n }\n return new String(longStrBuf, 0, longStrBufLen);\n }", "public String peekString(Charset charset) {\n if (charset == null)\n charset = Charsets.UTF_8;\n StringBuilder builder = new StringBuilder();\n for (ByteBuffer bb : mBuffers) {\n byte[] bytes;\n int offset;\n int length;\n if (bb.isDirect()) {\n bytes = new byte[bb.remaining()];\n offset = 0;\n length = bb.remaining();\n bb.get(bytes);\n } else {\n bytes = bb.array();\n offset = bb.arrayOffset() + bb.position();\n length = bb.remaining();\n }\n builder.append(new String(bytes, offset, length, charset));\n }\n return builder.toString();\n }", "synchronized boolean createFromString (String buffer) {\n m_buffer = buffer;\n m_pos = 0;\n m_len = buffer.length ();\n return m_newData = parse ();\n }", "public static String toString(byte[] buf) {\r\n if (buf == null) {\r\n return \"null\";\r\n }\r\n return toString(buf, 0, buf.length);\r\n }", "@Override\n\tpublic String toString()\n\t{\n\t\treturn new String(bytes);\n\t}", "public String toString() {\n\t\treturn BlobUtil.string(buffer, offset, size);\n\t}", "private void loadBuffer(ByteBuffer buffer) {\n byteBuffer = buffer.get();\n }", "private void serializeString(final String string, final StringBuffer buffer)\n {\n String decoded = Unserializer.decode(string, charset);\n\n buffer.append(\"s:\");\n buffer.append(decoded.length());\n buffer.append(\":\\\"\");\n buffer.append(string);\n buffer.append(\"\\\";\");\n }", "public static String m24634a(Context context, byte[] bArr, String str) {\n byte[] b = m24637b(context, bArr, str);\n if (b == null) {\n return null;\n }\n try {\n return new String(b, \"UTF-8\");\n } catch (UnsupportedEncodingException unused) {\n return null;\n }\n }", "public static String bytesToString(byte[] b) {\n\t\tString s=new String(b);\n\t\treturn s.trim();\n\t}", "private String readVarchar() throws IOException {\r\n // First int tells us the length of the string\r\n int n = getReader().read();\r\n\r\n // Read n bytes into the buffer\r\n getReader().read(mBuffer, 0, n);\r\n\r\n // Create string from buffer\r\n String s = new String(mBuffer, 0, n, StandardCharsets.UTF_8);\r\n\r\n return s;\r\n }", "static String createString(byte b[]) {\n\treturn StringConverter.byteToHex(b);\n }", "ByteBuffer getStringTable(){\n return ByteBuffer.wrap(super.buf, 0, super.count);\n }", "public String getString_data() { \n char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,60)];\n int i;\n for (i = 0; i < carr.length; i++) {\n if ((char)getElement_data(i) == (char)0) break;\n carr[i] = (char)getElement_data(i);\n }\n return new String(carr,0,i);\n }", "public static String readString(Value value) {\n return SafeEncoder.encode((byte[]) value.get());\n }", "private static byte[] string2Bytes(final String string) {\n if (string == null) return null;\n return string.getBytes();\n }", "private ByteBuffer encode(String str) {\n ByteBuffer bb = null;\n CharsetEncoder isoencoder = UTF8.newEncoder();\n try {\n bb = isoencoder.encode(CharBuffer.wrap(str));\n } catch (CharacterCodingException e) {\n log.error(e);\n }\n return bb;\n }", "private String bytesToString(byte[] someBytes) {\n String retStr = \"\";\n\n for (int i = 0; i < someBytes.length; ++i) {\n retStr += \" \" + someBytes[i];\n }\n\n return retStr;\n }", "public String bufferToString() {\n\t\tStringBuffer buf = new StringBuffer();\n\n\t\tfor (int i = 0; i < actualsizeinwords; i++) {\n\t\t\tbuf.append(\"\" + i + \": \");\n\t\t\tbuf.append(longToBitString(this.buffer[i]));\n\t\t\tbuf.append('\\n');\n\t\t}\n\n\t\treturn buf.toString();\n\t}", "public static ChannelBuffer writeString(String msg) {\n\t\tChannelBuffer buffer = null;\n\t\ttry\n\t\t{\n\t\t\tChannelBuffer stringBuffer = STRING_ENCODER.encode(msg);\n\t\t\tif(null != stringBuffer){\n\t\t\t\tint length = stringBuffer.readableBytes();\n\t\t\t\tChannelBuffer lengthBuffer = ChannelBuffers.buffer(2);\n\t\t\t\tlengthBuffer.writeShort(length);\n\t\t\t\tbuffer = ChannelBuffers.wrappedBuffer(lengthBuffer,stringBuffer);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tLOG.error(\"Error occurred while trying to write string to buffer: {}\",e);\n\t\t}\n\t\treturn buffer;\n\t}", "private String getDataFromBuffer(int end){\r\n StringBuilder temp = new StringBuilder();\r\n \r\n for (int i = 0; i < end; i++) {\r\n temp.append(mBufferData.remove());\r\n }\r\n return temp.toString();\r\n }", "private String read() {\n\n String s = \"\";\n\n try {\n // Check if there are bytes available\n if (inStream.available() > 0) {\n\n // Read bytes into a buffer\n byte[] inBuffer = new byte[1024];\n int bytesRead = inStream.read(inBuffer);\n\n // Convert read bytes into a string\n s = new String(inBuffer, \"ASCII\");\n s = s.substring(0, bytesRead);\n }\n\n } catch (Exception e) {\n Log.e(TAG, \"Read failed!\", e);\n }\n\n return s;\n }", "public String getData() {\n \n String str = new String();\n int aux;\n\n for(int i = 0; i < this.buffer.size(); i++) {\n for(int k = 0; k < this.buffer.get(i).size(); k++) {\n aux = this.buffer.get(i).get(k);\n str = str + Character.toString((char)aux);\n }\n str = str + \"\\n\";\n }\n return str;\n }", "public String toString() \r\n {\r\n \treturn new String(buf, 0, count);\r\n }", "public interface Buffer {\r\n\tpublic void add(String s);\r\n\tpublic String retrieve();\r\n}", "@Override\n public String toString() {\n byte[] buffer = toBuffer();\n return (buffer == null) ? null : new String(buffer, StandardCharsets.UTF_8);\n }", "@java.lang.Override\n public java.lang.String getObject() {\n java.lang.Object ref = object_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n object_ = s;\n return s;\n }\n }", "static ByteString toBytes(String str) {\n return ByteString.copyFrom(str.getBytes(Internal.UTF_8));\n }", "private String allocateString(final char charBuffer[], final int length) {\n //\n // We try to cache short strings\n if(length < 16) {\n //\n // building a simple hash with the characters from charBuffer\n int h = charBuffer[0] + 31;\n for(int i = 1 ; i < length; i++)\n h = h * 31 + charBuffer[i];\n //\n // calculate index within hashtable\n final int hashIndex = h & (_stringCache.length - 1);\n //\n // try to read cached string \n String cachedString = _stringCache[hashIndex];\n //\n // Found a cached string with correct length?\n if(cachedString != null && cachedString.length() == length) {\n int i = length - 1;\n //\n // Compare starting from the end\n while(i >= 0) {\n if(charBuffer[i] != cachedString.charAt(i))\n break;\n \n --i;\n }\n //\n // if both are equal we can return the cached instance of this string\n if(i < 0) \n return cachedString;\n } \n // \n // Write a new string to cache. overwrite any previous value\n cachedString = new String(charBuffer, 0, length);\n _stringCache[hashIndex] = cachedString;\n \n return cachedString;\n } \n \n return new String(charBuffer, 0, length);\n }", "private String m35639a(byte[] bArr, int i, int i2) {\n try {\n return new String(bArr, i, i2, \"UTF-8\");\n } catch (Exception unused) {\n return \"\";\n }\n }", "static String readString() throws IOException{\n return bufferedReader.readLine();\n }", "public com.google.protobuf.ByteString\n getToBytes() {\n Object ref = to_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n to_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "String asString();", "public String readUtf16String(ByteBuffer byteBuffer) {\n try {\n return new String(NIOUtils.toArray(byteBuffer), \"utf-16\");\n } catch (UnsupportedEncodingException unused) {\n return null;\n }\n }", "static String loadStream(InputStream in) throws IOException { \n\t\tint ptr = 0; \n\t\tin = new BufferedInputStream(in); \n\t\tStringBuffer buffer = new StringBuffer(); \n\t\twhile( (ptr = in.read()) != -1 ) { \n\t\t\tbuffer.append((char)ptr); \n\t\t} \n\t\treturn buffer.toString(); \n\t}", "public String readUTF() throws IOException;", "public String readString() {\n final int BUF_SIZE = 100;\n byte[] byteDest = new byte[BUF_SIZE];\n String ret = \"\";\n int num = BUF_SIZE;\n try {\n while (!ret.contains(\"\\r\")) {\n if ((num = in.read(byteDest)) > 0) {\n ret += new String(byteDest, 0, num);\n }\n }\n } catch (IOException e) {\n print(\"Error reading String from \" + portName);\n }\n print(\"Read :\" + ret + \":\");\n return ret;\n }", "public java.lang.String getData() {\n java.lang.Object ref = data_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n data_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public final String recvString() {\n try {\n // Receive a byte buffer\n final byte[] buffer = recvBytes(4096);\n // Check the buffer content\n if (buffer != null) {\n // Construct a message\n final String message = new String(buffer, 0, buffer.length,\n \"UTF-8\");\n // Print some information\n System.out.println(\"Message received: \" + message);\n // And return message\n return message;\n }\n } catch (final UnsupportedEncodingException exc) {\n // Print some information\n System.out.println(\"Message not received\");\n }\n return null;\n }", "private String readFixedString(int size, DataInput in) throws IOException\n { \n var b = new StringBuilder(size);\n int i = 0;\n var done = false;\n while (!done && i < size)\n { \n char ch = in.readChar();\n i++;\n if (ch == 0) {\n done = true;\n }\n else {\n b.append(ch);\n }\n }\n \n in.skipBytes(2 * (size - i));\n return b.toString();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getBBytes() {\n java.lang.Object ref = b_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n b_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public boolean genStringAsByteArray();", "private String convertStreamToString(InputStream is) throws IOException {\r\n\t\tint bufSize = 8 * 1024;\r\n\t\tif (is != null) {\r\n\t\t\tWriter writer = new StringWriter();\r\n\r\n\t\t\tchar[] buffer = new char[bufSize];\r\n\t\t\ttry {\r\n\t\t\t\tInputStreamReader ireader = new InputStreamReader(is, \"UTF-8\");\r\n\t\t\t\tReader reader = new BufferedReader(ireader, bufSize);\r\n\t\t\t\tint n;\r\n\t\t\t\twhile ((n = reader.read(buffer)) != -1) {\r\n\t\t\t\t\twriter.write(buffer, 0, n);\r\n\t\t\t\t}\r\n\t\t\t\treader.close();\r\n\t\t\t\tireader.close();\r\n\t\t\t\treturn writer.toString();\r\n\t\t\t} catch (OutOfMemoryError ex) {\r\n\t\t\t\tLog.e(\"b2evo_android\", \"Convert Stream: (out of memory)\");\r\n\t\t\t\twriter.close();\r\n\t\t\t\twriter = null;\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"\";\r\n\t\t\t} finally {\r\n\t\t\t\tis.close();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "com.google.protobuf.ByteString\n getFromBytes();", "com.google.protobuf.ByteString\n getFromBytes();", "public Object getContent() {\n/* 112 */ return this.buf;\n/* */ }", "private boolean compareBytes(byte [] buffer, int offset, String str) {\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tif ( ((byte) (str.charAt(i))) != buffer[i + offset]) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public final void setBufferString(final byte[] buffer, final String str, final int i) {\r\n\r\n byte[] tmpBuffer;\r\n\r\n tmpBuffer = str.getBytes();\r\n\r\n for (int c = 0; c < tmpBuffer.length; c++) {\r\n buffer[i + c] = tmpBuffer[c];\r\n }\r\n }", "private static String getString(Reader reader) {\n StringBuffer buf = new StringBuffer();\n char[] buffer = new char[1024];\n int count;\n try {\n while ((count = reader.read(buffer)) != -1) {\n buf.append(buffer, 0, count);\n }\n } catch (IOException e) {\n return null;\n }\n return buf.toString();\n }", "private byte[] getUTF8Bytes(String input) {\n\t\treturn input.getBytes(StandardCharsets.UTF_8);\n\t}", "public java.lang.String getObject() {\n java.lang.Object ref = object_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n object_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String readString(int start, int len)\n {\n char[] val = new char[len];\n int end = start + len;\n\n int idx = 0;\n for(int i = start; i < end; i++)\n val[idx++] = (char)buffer[i];\n\n return new String(val);\n }", "private static String toString (byte[] ba) {\r\n return toString(ba, 0, ba.length);\r\n }", "public String readString() throws IOException {\n return WritableUtils.readString(in);\n }", "@Override\n\tpublic String store(byte[] data)\n\t{\n\t\treturn null;\n\t}", "private String getFileContents ()\n {\n final String s = m_buffers.values ()//\n .stream ()//\n .flatMap (List::stream)//\n .collect (Collectors.joining ());\n\n return s;\n }", "String read();", "String read();", "public static byte[] stringToBytes(String str) {\n\t\tif (str==null)\n\t\t\treturn null;\n\t\tif (str.charAt(str.length()-1)!='\\0') str+='\\0';\n\t\treturn str.getBytes();\n\t}", "private byte[] toBytes(String obj){\n return Base64.getDecoder().decode(obj);\n }", "public String byteToChar(byte b[], String encoding);", "public String toString()\n\t{\n\t\treturn (new String(wLocalBuffer)) ;\n\t}", "static String loadStream(InputStream in) throws IOException {\n int ptr = 0;\n in = new BufferedInputStream(in);\n StringBuffer buffer = new StringBuffer();\n while( (ptr = in.read()) != -1 ) {\n buffer.append((char)ptr);\n }\n return buffer.toString();\n }", "public static Symbol string()\r\n\t{\r\n\t\tString str_text = buffer.toString();\r\n\t\tToken token = new Token(fname, str_text, str_linepos, str_charpos,\r\n\t\t\t\tstr_colpos);\r\n\t\treturn new Symbol(sym.STRING, str_linepos, str_colpos, token);\r\n\t}", "@Override\r\n\tpublic byte[] getBytes() {\n\t\treturn buffer.array();\r\n\t}", "private CharSequence decode(ByteBuffer buf) {\n CharBuffer isodcb = null;\n CharsetDecoder isodecoder = UTF8.newDecoder();\n try {\n isodcb = isodecoder.decode(buf);\n } catch (CharacterCodingException e) {\n log.error(e);\n }\n return (CharSequence) isodcb;\n }", "protected String encode(AsciiValueEncoder enc)\n {\n // note: nothing in buffer, can't flush (thus no need to call to check)\n int last = enc.encodeMore(mBuffer, 0, mBuffer.length);\n if (enc.isCompleted()) { // fitted in completely?\n return new String(mBuffer, 0, last);\n }\n // !!! TODO: with Java 5, use StringBuilder instead\n StringBuffer sb = new StringBuffer(mBuffer.length << 1);\n sb.append(mBuffer, 0, last);\n do {\n last = enc.encodeMore(mBuffer, 0, mBuffer.length);\n sb.append(mBuffer, 0, last);\n } while (!enc.isCompleted());\n return sb.toString();\n }", "public com.google.protobuf.ByteString\n getToBytes() {\n Object ref = to_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n to_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }" ]
[ "0.7302743", "0.72454077", "0.6916419", "0.6841923", "0.6794645", "0.6788641", "0.6625988", "0.66085553", "0.65887535", "0.64180833", "0.6414958", "0.63883424", "0.62111676", "0.61849266", "0.6182348", "0.61478317", "0.6137075", "0.60270375", "0.6009653", "0.6003671", "0.60031456", "0.59773695", "0.5959683", "0.59577614", "0.59495777", "0.59458524", "0.5943467", "0.59108394", "0.59095085", "0.5888382", "0.5836087", "0.58146334", "0.5808434", "0.5800926", "0.57933456", "0.5782369", "0.5778035", "0.57777107", "0.57766134", "0.5769202", "0.57631963", "0.5756845", "0.57490534", "0.57473356", "0.5734648", "0.5731428", "0.5718338", "0.5692966", "0.5683515", "0.5671157", "0.5667235", "0.56509423", "0.5649202", "0.5646394", "0.56265426", "0.56138176", "0.56134963", "0.5601247", "0.55989003", "0.55977035", "0.55930644", "0.5584067", "0.5580282", "0.55777836", "0.5562935", "0.55572337", "0.55520177", "0.5550392", "0.5543519", "0.5538448", "0.55371046", "0.55314624", "0.5518903", "0.551685", "0.5498444", "0.5494051", "0.54935473", "0.54935473", "0.5489979", "0.54786485", "0.54727316", "0.546935", "0.54682624", "0.5466674", "0.5461509", "0.54612154", "0.545988", "0.5457441", "0.54573774", "0.5455615", "0.5455615", "0.5451794", "0.5448174", "0.5447589", "0.54469806", "0.54468554", "0.54415053", "0.54404664", "0.54398566", "0.5438993", "0.543375" ]
0.0
-1
onPose() is called whenever the Myo detects that the person wearing it has changed their pose, for example, making a fist, or not making a fist anymore.
@Override public void onPose(Myo myo, long timestamp, Pose pose) { if (unlocked) { if (pose.equals(Pose.FINGERS_SPREAD) == true) { Intent i = new Intent("com.android.music.musicservicecommand"); i.putExtra("command", "togglepause"); sendBroadcast(i); extendLock(); } else if (pose.equals(Pose.WAVE_IN) == true) { Intent i = new Intent("com.android.music.musicservicecommand"); i.putExtra("command", "previous"); sendBroadcast(i); extendLock(); } else if (pose.equals(Pose.WAVE_OUT) == true) { Intent i = new Intent("com.android.music.musicservicecommand"); i.putExtra("command", "next"); sendBroadcast(i); extendLock(); } } else if (!unlocked && !unlocked1 && pose.equals(Pose.THUMB_TO_PINKY)) { unlocked1 = true; } else if (!unlocked && unlocked1) { if (pose.equals(Pose.FIST)) { unlocked = true; myo.vibrate(Myo.VibrationType.SHORT); handler.postDelayed(lockMyo, 2000); } else if(!pose.equals(Pose.REST)) { unlocked1 = false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onPoseAvailable(TangoPoseData pose) {\n }", "public void receivedPoseFromTracker(Pose pose) {}", "private void onPoseUpdate(TangoPoseData pose) {\n StringBuilder stringBuilder = new StringBuilder();\n\n float translation[] = pose.getTranslationAsFloats();\n\n float newPositionX = translation[0];\n float newPositionY = translation[1];\n float newPositionZ = translation[2];\n\n float deltaX = newPositionX - lastPositionX;\n float deltaY = newPositionY - lastPositionY;\n float deltaZ = newPositionZ - lastPositionZ;\n\n lastPositionX = newPositionX;\n lastPositionY = newPositionY;\n lastPositionZ = newPositionZ;\n\n stringBuilder.append(\"Position: \" +\n lastPositionX + \", \" + lastPositionY + \", \" + lastPositionZ);\n\n float orientation[] = pose.getRotationAsFloats();\n stringBuilder.append(\". Orientation: \" +\n orientation[0] + \", \" + orientation[1] + \", \" +\n orientation[2] + \", \" + orientation[3]);\n\n Log.i(TAG, stringBuilder.toString());\n\n updateHumanTokenPosition(deltaX, deltaY, deltaZ);\n }", "@Override\n\t\tpublic void onPose(Myo myo, long timestamp, Pose pose) {\n\t\t\t// Handle the cases of the Pose.Type enumeration, and change the\n\t\t\t// text of the text view\n\n\t\t\t// based on the pose we receive.\n\t\t\tswitch (pose.getType()) {\n\t\t\tcase NONE:\n\t\t\t\t// mTextView.setText(getString(R.string.hello_world));\n\t\t\t\tbreak;\n\t\t\tcase FIST:\n\t\t\t\t// mTextView.setText(getString(R.string.myosdk__pose_fist));\n\n\t\t\t\tbreak;\n\t\t\tcase WAVE_IN:\n\t\t\t\t// mTextView.setText(getString(R.string.myosdk__pose_wavein));\n\t\t\t\tbreak;\n\t\t\tcase WAVE_OUT:\n\t\t\t\t// mTextView.setText(getString(R.string.myosdk__pose_waveout));\n\t\t\t\tbreak;\n\t\t\tcase FINGERS_SPREAD:\n\t\t\t\t// mTextView.setText(getString(R.string.myosdk__pose_fingersspread));\n\t\t\t\tif (ride)\n\t\t\t\t\tstop();\n\t\t\t\telse\n\t\t\t\t\tstart();\n\t\t\t\tbreak;\n\t\t\tcase TWIST_IN:\n\t\t\t\t// mTextView.setText(getString(R.string.myosdk__pose_twistin));\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "@Override\n public void onPose(Myo myo, long timestamp, Pose pose) {\n // Handle the cases of the Pose enumeration, and change the text of the text view\n // based on the pose we receive.\n switch (pose) {\n case UNKNOWN:\n break;\n case REST:\n case DOUBLE_TAP:\n break;\n case FIST:\n if(FLAG==true)\n {\n sendSMS(getReplyNumber(),getFistT());\n FLAG=false;\n }\n break;\n case WAVE_IN:\n if(FLAG==true)\n {\n sendSMS(getReplyNumber(),getMLT());\n FLAG=false;\n }\n //mTextView.setText(getString(R.string.pose_wavein));\n break;\n case WAVE_OUT:\n if(FLAG==true)\n {\n sendSMS(getReplyNumber(),getMRT());\n FLAG=false;\n }\n //mTextView.setText(getStrisdfng(R.string.pose_waveout));\n break;\n case FINGERS_SPREAD:\n if(FLAG==true)\n {\n sendSMS(getReplyNumber(),getSpreadT());\n FLAG=false;\n }\n //mTextView.setText(getString(R.string.pose_fingersspread));\n break;\n }\n\n if (pose != Pose.UNKNOWN && pose != Pose.REST) {\n // Tell the Myo to stay unlocked until told otherwise. We do that here so you can\n // hold the poses without the Myo becoming locked.\n myo.unlock(Myo.UnlockType.HOLD);\n\n // Notify the Myo that the pose has resulted in an action, in this case changing\n // the text on the screen. The Myo will vibrate.\n myo.notifyUserAction();\n } else {\n // Tell the Myo to stay unlocked only for a short period. This allows the Myo to\n // stay unlocked while poses are being performed, but lock after inactivity.\n myo.unlock(Myo.UnlockType.TIMED);\n }\n }", "@Override\n public void receivedPose(UtmPose pose) {\n synchronized(_poseListeners) {\n if (_poseListeners.isEmpty()) return;\n }\n \n try {\n // Construct message\n Response resp = new Response(UdpConstants.NO_TICKET, DUMMY_ADDRESS);\n resp.stream.writeUTF(UdpConstants.COMMAND.CMD_SEND_POSE.str);\n UdpConstants.writePose(resp.stream, pose);\n \n // Send to all listeners\n synchronized(_poseListeners) {\n _udpServer.bcast(resp, _poseListeners.keySet());\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to serialize pose\");\n }\n }", "void setPose(IPose2D newPose);", "private synchronized void updatePose(Move event) {\n\t\tfloat angle = event.getAngleTurned() - angle0;\n\t\tfloat distance = event.getDistanceTraveled() - distance0;\n\t\tdouble dx = 0, dy = 0;\n\t\tdouble headingRad = (Math.toRadians(heading));\n\n\t\tif (event.getMoveType() == Move.MoveType.TRAVEL\n\t\t\t\t|| Math.abs(angle) < 0.2f) {\n\t\t\tdx = (distance) * (float) Math.cos(headingRad);\n\t\t\tdy = (distance) * (float) Math.sin(headingRad);\n\t\t} else if (event.getMoveType() == Move.MoveType.ARC) {\n\t\t\tdouble turnRad = Math.toRadians(angle);\n\t\t\tdouble radius = distance / turnRad;\n\t\t\tdy = radius\n\t\t\t\t\t* (Math.cos(headingRad) - Math.cos(headingRad + turnRad));\n\t\t\tdx = radius\n\t\t\t\t\t* (Math.sin(headingRad + turnRad) - Math.sin(headingRad));\n\t\t}\n\t\tx += dx;\n\t\ty += dy;\n\t\theading = normalize(heading + angle); // keep angle between -180 and 180\n\t\tangle0 = event.getAngleTurned();\n\t\tdistance0 = event.getDistanceTraveled();\n\t\tcurrent = !event.isMoving();\n\t}", "public void resetPose() {\n }", "public void reach(Pose pose) throws ManipulatorException;", "public void setPoseID(int i) { poseID = i;}", "public void paintPose(Graphics2D g2d, Pose pose) {\r\n\t\tEllipse2D c = new Ellipse2D.Float(getX(pose.getX() - ROBOT_SIZE/2), getY(pose.getY() + ROBOT_SIZE/2), getDistance(ROBOT_SIZE), getDistance(ROBOT_SIZE));\r\n\t\tLine rl = getArrowLine(pose);\r\n\t\tLine2D l2d = new Line2D.Float(rl.x1, rl.y1, rl.x2, rl.y2);\r\n\t\tg2d.draw(l2d);\r\n\t\tg2d.fill(c);\r\n\t}", "private void logPose(TangoPoseData pose) {\n StringBuilder stringBuilder = new StringBuilder();\n\n float translation[] = pose.getTranslationAsFloats();\n stringBuilder.append(\"Position: \" +\n translation[0] + \", \" + translation[1] + \", \" + translation[2]);\n\n float orientation[] = pose.getRotationAsFloats();\n stringBuilder.append(\". Orientation: \" +\n orientation[0] + \", \" + orientation[1] + \", \" +\n orientation[2] + \", \" + orientation[3]);\n\n Log.i(TAG, stringBuilder.toString());\n }", "public String getDesiredPose() {\n\t\treturn desiredPose;\n\t}", "public int getPoseID(){ return poseID;}", "public ContinuousOdometryPoseProvider(MoveProvider mp) {\n\t\tmp.addMoveListener(this);\n\t\tm_lastUpdate = System.currentTimeMillis();\n\t}", "public int getPoseDuration(){ return poseDuration;}", "public String getCurrentPoseName() {return currentPoseName;}", "public void requestMovePoseUp()\r\n {\r\n \tAnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n \tAnimatedSpriteEditorGUI gui = singleton.getGUI(); \r\n \t \r\n boolean continueToMove = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToMove = promptToSave();\r\n }\r\n if(continueToMove)\r\n {\r\n \tposeIO.movePose(poseID, 0);\r\n \tsingleton.getFileManager().reloadSpriteType();\r\n \tsingleton.getGUI().updatePoseList();\r\n \tJOptionPane.showMessageDialog(\r\n gui,\r\n POSE_MOVED_TEXT,\r\n POSE_MOVED_TITLE_TEXT,\r\n JOptionPane.INFORMATION_MESSAGE);\r\n } \r\n }", "public void requestNewPose()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToMakeNew = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE WITH A CANCEL\r\n continueToMakeNew = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO MAKE A NEW POSE\r\n if (continueToMakeNew)\r\n {\r\n // GO AHEAD AND PROCEED MAKING A NEW POSE\r\n continueToMakeNew = promptForNew();\r\n\r\n if (continueToMakeNew)\r\n {\r\n // NOW THAT WE'VE SAVED, LET'S MAKE SURE WE'RE IN THE RIGHT MODE\r\n \tAnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n \t\r\n PoseurStateManager poseurStateManager = singleton.getStateManager().getPoseurStateManager();\r\n \r\n PoseList pl = singleton.getSpriteType().getAnimations().get(singleton.getAnimationState());\r\n pl.addPose(poseID, poseDuration);\r\n poseurStateManager.setState(PoseurState.SELECT_SHAPE_STATE);\r\n \t\tsingleton.getStateManager().setState(EditorState.POSEUR_STATE);\r\n }\r\n }\r\n }", "public synchronized Pose getPose() {\n\n\t\tif (m_mover != null) {\n\t\t\tlong currentTime = System.currentTimeMillis();\n\t\t\tif (currentTime - m_lastUpdate > m_updateDelay) {\n\t\t\t\tupdatePose(m_mover.getMovement());\n\t\t\t\tm_lastUpdate = currentTime;\n\t\t\t}\n\t\t}\n\t\treturn new Pose(x, y, heading);\n\t}", "protected final void viewChanged()\n {\n synchronized (this)\n {\n resetProjectionMatrixClipped();\n resetModelViewMatrix();\n resetClipPlanes();\n notifyViewChanged(ViewChangeSupport.ViewChangeType.VIEW_CHANGE);\n if (getPreferences() != null)\n {\n getPreferences().putJAXBObject(POSITION_PREF_KEY, getPosition().clone(), true, this);\n }\n }\n }", "public abstract void setPoseSolver(PoseSolver poseSolver);", "protected void onMove() {\r\n }", "public void requestSavePose() \r\n {\r\n \r\n \t// DON'T ASK, JUST SAVE\r\n boolean savedSuccessfully = poseIO.savePose(currentFile, false);\r\n if (savedSuccessfully)\r\n {\r\n \tposeIO.savePoseImage(currentPoseName, poseID);\r\n // MARK IT AS SAVED\r\n saved = true;\r\n \r\n // AND REFRESH THE GUI\r\n AnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor(); \r\n \r\n PoseurStateManager poseurStateManager = singleton.getStateManager().getPoseurStateManager();\r\n poseurStateManager.clearSelectShape();\r\n poseurStateManager.setState(PoseurState.SELECT_SHAPE_STATE);\r\n \r\n }\r\n }", "public void copyPose(Pose raw) {\n pose = raw;\n }", "public void updateRenderCameraPose(TangoPoseData cameraPose) {\n float[] rotation = cameraPose.getRotationAsFloats();\n float[] translation = cameraPose.getTranslationAsFloats();\n Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]);\n // Conjugating the Quaternion is need because Rajawali uses left handed convention for\n // quaternions.\n getCurrentCamera().setRotation(quaternion.conjugate());\n getCurrentCamera().setPosition(translation[0], translation[1], translation[2]);\n }", "protected void updatePosition() {\n\t\tif(motion == null) {\n\t\t\tmotion = new Motion3D(player, true);\n\t\t} else motion.update(player, true);\n\t\t\n\t\tmotion.applyToEntity(this);\n\t\tthis.rotationPitch = player.rotationPitch;\n\t\tthis.rotationYaw = player.rotationYaw;\n\t}", "public void score() {\n\t\tif (Integer.parseInt(px.getPosition()) != Integer.parseInt(getCurrentPositionX()))\n\t\t{\n\t\t\tpx.addObserver(Obsx);\n\t\t\tpx.setPosition(getCurrentPositionX());\n\t\t}\n\t\tif (Integer.parseInt(py.getPosition()) != Integer.parseInt(getCurrentPositionY()))\n\t\t{\n\t\t\tpy.addObserver(Obsy);\n\t\t\tpy.setPosition(getCurrentPositionY());\n\t\t}\n\t}", "void onMove();", "public interface PositionListener {\n void onPositionChanged(PointF point);\n}", "public us.ihmc.euclid.geometry.Pose3D getPose()\n {\n return pose_;\n }", "public interface CrimeObserver {\n void onCrimeChange(int position);\n}", "void playerPositionChanged(Player player);", "@Override\n\tvoid update(){\n\n\t\t\tif(Frogger.flag==1){\n\t\t\t\tif(orientation == Orientation.UP) y -= step;\n\t\t\t\telse if (orientation == Orientation.DOWN) y += step;\n\t\t\t\telse if (orientation == Orientation.RIGHT) x += step;\n\t\t\t\telse if (orientation == Orientation.LEFT) x -= step;\n\t\t}\n\t\tsetChanged();\n\t\tnotifyObservers();\n\t}", "public void onPositionChanged() {\n\n currentLat = location.getLatitude();\n currentLng = location.getLongitude();\n\n }", "public void onPositionChanged() {\n\n currentLat = location.getLatitude();\n currentLng = location.getLongitude();\n\n }", "public void setFiringPose(float chargePercent) {\n setPose(0.5f + chargePercent, -1, 0.5f + chargePercent, -1, 0.5f + chargePercent, -1);\n }", "@Override\n public void onMove(float x, float y) {\n }", "void addPaddleContactObserver(PaddleContactObserver obs);", "protected void probePositionChanged(RealTuple position) {\n try {\n loadProfile(position);\n } catch (Exception exc) {\n logException(\"probePositionChanged\", exc);\n }\n\n }", "@Override\n public void onCameraMoveStarted(int reason) {}", "@Override\n public void onMapViewCenterPointMoved(MapView arg0, MapPoint arg1) {\n\n }", "@Override\n public void simpleUpdate(float tpf) {\n listener.setLocation(cam.getLocation());\n listener.setRotation(cam.getRotation());\n }", "public boolean createPose(Poses pose) {\n\t\tif (!pose.getGraphic().equals(\"\") && !pose.getText().equals(\"\") && !pose.getTitle().equals(\"\")) { \n\t\t\tthis.openDataBase();\n\t\t\tContentValues values = new ContentValues();\n\t\t\tvalues.put(DataBaseHelper.COLUMN_GRAPHIC, pose.getGraphic());\n\t\t\tvalues.put(DataBaseHelper.COLUMN_TEXT, pose.getText());\n\t\t\tvalues.put(DataBaseHelper.COLUMN_TITLE, pose.getTitle());\n\t\t\tvalues.put(DataBaseHelper.COLUMN_DIFFICULTY, pose.getDifficulty());\n\t\t\tvalues.put(DataBaseHelper.COLUMN_SKIP, pose.getSkip());\n\t\t\ttry { \n\t\t\t\tlong insertId = myDataBase.insert(DataBaseHelper.TABLE_POSES, null,values);\n\t\t\t\tpose.setId(insertId);\n\t\t\t\tthis.close();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch (SQLException sqle) {\n\t\t\t\tLog.d(\"Database Error\", \"Error inserting Pose into database\");\n\t\t\t\tLog.d(\"SQL Exception\", sqle.toString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tLog.d(\"Exception\", e.toString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse { \n\t\t\tLog.d(\"Insert Pose Error\", \"Pose does not have all information\");\n\t\t\treturn false;\n\t\t\t\n\t\t}\t\n\t\t\n\t}", "default void onMoveMade(ScotlandYardView view, Move move) {}", "@Override\r\n\tpublic void notifyObservers (Object o){\r\n\t\tIterator <NavigationObserver> navOb = this.navega.iterator();\r\n\t\twhile ( navOb.hasNext()){\r\n\t\t\tnavOb.next().placeHasChanged((PlaceInfo) o);\r\n\t\t}\r\n\t}", "public void setNeutralPose() {\n setPose(0.5f, -1, 0.5f, -1, 0.5f, -1);\n this.boltSize = 0;\n }", "void onIdentityMove(int fromPosition, int toPosition);", "@Override\r\n\tprotected void onMove() {\n\t\t\r\n\t}", "public void requestMovePoseDown()\r\n {\r\n \tAnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n \tAnimatedSpriteEditorGUI gui = singleton.getGUI(); \r\n \t \r\n boolean continueToMove = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToMove = promptToSave();\r\n }\r\n if(continueToMove)\r\n {\r\n \tposeIO.movePose(poseID, 1);\r\n \tsingleton.getFileManager().reloadSpriteType();\r\n \tgui.updatePoseList();\r\n \tJOptionPane.showMessageDialog(\r\n gui,\r\n POSE_MOVED_TEXT,\r\n POSE_MOVED_TITLE_TEXT,\r\n JOptionPane.INFORMATION_MESSAGE);\r\n } \r\n else\r\n {\r\n \tJOptionPane.showMessageDialog(\r\n gui,\r\n POSE_MOVE_ERROR_TEXT,\r\n POSE_MOVE_ERROR_TITLE_TEXT,\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public void onTrackedHand(SimpleOpenNI curKinect, int handId, PVector pos){\n kinect.convertRealWorldToProjective(pos,pos);\n\n if( gesture.getHands().containsKey(handId) ){\n //insert point\n gesture.getHand(handId).savePoint(pos);\n\n }\n}", "public abstract void positionChanged(PositionChangedEvent event);", "@Override\n public void onCameraNotify(int notify) {\n }", "@Override\n public void mouseDragged(MouseEvent e) \n {\n Poseur singleton = Poseur.getPoseur();\n PoseurStateManager poseurStateManager = singleton.getStateManager();\n poseurStateManager.processMouseDragged(e.getX(), e.getY());\n }", "protected void notifyParentOfPositionChange()\n {\n rotatedCorners = null;\n ShapeView view = getParentView();\n \n if (view != null)\n {\n view.onPositionChanged(this);\n }\n }", "public void onFingerUp(String idSensor) // evento que se genera al levantar el dedo del lector\n{\n objpantprincipal.repintarp();\n if (conectado == true)\n identificarPersona();\n}", "@Override\n public void onCrimeUpdated(Crime crime) {\n }", "@Listen\r\n public void onPacket(PacketEvent e) {\r\n\r\n if (e.getType().equalsIgnoreCase(Packet.Client.POSITION)) {\r\n if ((System.currentTimeMillis() - e.getUser().getCombatData().getLastUseEntityPacket()) < 1000L\r\n && Math.abs(e.getTo().getPitch() - e.getFrom().getPitch()) > 0.01) {\r\n double yaw = e.getUser().getMovementData().getTo().getYaw();\r\n double sensitivity = e.getUser().getMiscData().getClientSensitivity();\r\n\r\n float f = (float) (sensitivity * 0.6F + 0.2F);\r\n float gcd = f * f * f * 1.2F;\r\n\r\n yaw = -yaw % gcd;\r\n\r\n double real = Math.abs(e.getUser().getMovementData().getTo().getYaw());\r\n\r\n if (real == e.getUser().getCheckData().lastAimMDiff && yaw == e.getUser().getCheckData().lastAimMDiff2) {\r\n\r\n if ((System.currentTimeMillis() - e.getUser().getCheckData().lastAimMPossibleLag) < 1500L) {\r\n e.getUser().getCheckData().aimMVerbose++;\r\n } else {\r\n if (e.getUser().getCheckData().aimMVerbose > 0 && (System.currentTimeMillis() - e.getUser().getCheckData().lastAimMPossibleLag) > 1000l)\r\n e.getUser().getCheckData().aimMVerbose--;\r\n }\r\n\r\n e.getUser().getCheckData().lastAimMPossibleLag = System.currentTimeMillis();\r\n\r\n if (e.getUser().getCheckData().aimMVerbose > 2) {\r\n flag(e.getUser(), \"verbose=\"+e.getUser().getCheckData().aimMVerbose, \"spoof=\"+yaw, \"real=\"+real);\r\n }\r\n } else {\r\n if (e.getUser().getCheckData().aimMVerbose > 0 && TimeUtils.secondsFromLong(e.getUser().getCheckData().lastAimMPossibleLag) > 2L) {\r\n e.getUser().getCheckData().aimMVerbose--;\r\n }\r\n }\r\n\r\n e.getUser().getCheckData().lastAimMDiff = real;\r\n e.getUser().getCheckData().lastAimMDiff2 = yaw;\r\n\r\n }\r\n }\r\n }", "void updatePercepts() {\n clearPercepts();\n \n Location r1Loc = model.getAgPos(0);\n //Location r2Loc = model.getAgPos(1);\n \n Literal pos1 = Literal.parseLiteral(\"pos(r1,\" + r1Loc.x + \",\" + r1Loc.y + \")\");\n // Literal pos2 = Literal.parseLiteral(\"pos(r2,\" + r2Loc.x + \",\" + r2Loc.y + \")\");\n\n addPercept(pos1);\n //addPercept(pos2);\n \n if (model.hasObject(Const.ObstacleCode, r1Loc)) {\n addPercept(Const.v1);\n }\n// if (model.hasObject(Const.ObstacleCode, r2Loc)) {\n// addPercept(Const.v2);\n// }\n }", "@Override\n public void onPourMilkRaised() {\n }", "public Pose2d getPose() {\n return m_odometry.getPoseMeters();\n }", "@Override\n public void onCameraMoveStarted(int i) {\n\n }", "@Override\n\tpublic void changeMapPointer(ImageView posView) {\n\t\tif (room.equals(properties.getRoomFromProperties().get(1))) {\n\t\t\tposView.relocate(789, 272);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(2))) {\n\t\t\tposView.relocate(788, 185);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(3))) {\n\t\t\tposView.relocate(880.0, 281);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(4))) {\n\t\t\tposView.relocate(867.0, 200);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(5))) {\n\t\t\tposView.relocate(880.0, 64.0);\n\n\t\t} else {\n\t\t\tposView.relocate(788.0, 60.0);\n\t\t}\n\t}", "@Override\n\tpublic void onLocationChanged(Location location) \n\t{\n\t\tif (!coordinataDaGps)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tdouble lat = location.getLatitude();\n\t\tdouble longitude = location.getLongitude();\n\t\t\n\t\tPunto3D punto = new Punto3D(longitude, lat, 0);\n\t\tinput.setPunto(punto);\n\t}", "@Override\n\tpublic boolean notifyOfCamera(double x, double z) {\n\t\treturn true;\n\t}", "@Override\n public void onPlaceSelected(Place place) {\n Log.i(TAG, \"Place: \" + place.getName() + \", \" + place.getId());\n\n move=place.getLatLng();\n moveCamera(move,15f);\n }", "@Override\n\tpublic void onNewFrame(HeadTransform transform) {\n\t\tglUseProgram(programPointer);\n\t\t\n\t\t// Find the pointers\n\t\tviewProjectionPointer = glGetUniformLocation(programPointer, \"u_MVP\");\n\t\tlightPosPointer = glGetUniformLocation(programPointer, \"u_LightPos\");\n\t\tviewPointer = glGetUniformLocation(programPointer, \"u_MVMatrix\");\n\t\tmodelPointer = glGetUniformLocation(programPointer, \"u_Model\");\n\t\t\n\t\t// Slowly rotate each of the cubes\n\t\tfor(Cube cube : cubes){\n\t\t\tcube.rotate(TIME_DELTA, 0.5f, 0.5f, 1.0f);\n\t\t}\n\t\t\n\t\t// Update the camera\n\t\tcamera.pointAt(0f, 0f, CAMERA_Z, 0f, 0f, 0f, 0f, 1f, 0f);\n\t\tcamera.setHeadCorrection(transform);\n\t\t\n\t\tcheckGLError(\"onNewFrame\");\n\t}", "public void onMapCenterChange(NMapView arg0, NGeoPoint arg1) {\n\n }", "@Override\r\n\tpublic void onOrientationChanged(float azimuth, float pitch, float roll) {\n\r\n\t}", "public interface PIdroneListener {\n\n void onGPSdata(LatLng location);\n void onConnectionLost();\n\n}", "void onOrientationChanged(float azimuth, float pitch, float roll);", "protected void onSavePerson(Person person) {\n boolean isNew = false;\n if (person.getId() == null) {\n isNew = true;\n }\n\n try {\n personManager.save(person);\n } catch (Exception e) {\n e.printStackTrace();\n log.error(\"Error saving person: \" + e.getMessage());\n }\n\n String message = getLocalizer().getString(\"person.updated\", this);\n if (isNew) {\n message = getLocalizer().getString(\"person.added\", this);\n }\n getSession().info(message);\n if (isNew) {\n FeedbackPanel feedback = (FeedbackPanel) responsePage.get(\"feedback\");\n feedback.setVisible(true);\n feedback.setEscapeModelStrings(true);\n throw new RestartResponseAtInterceptPageException(responsePage);\n } else {\n FeedbackPanel feedback = (FeedbackPanel) this.get(\"feedback\");\n feedback.setVisible(true);\n feedback.setEscapeModelStrings(true);\n }\n }", "void onActivate(Long personId) {\n\t\t_personId = personId;\n\t}", "@Override\n public void onMove(boolean absolute) {\n \n }", "@Override\n public void onArrivedWayPoint(int arg0) {\n\n }", "@Override\n\tpublic void onNewFrame(HeadTransform headTransform) {\n\t}", "void onMoveTaken(Piece captured);", "@Override\n\tpublic void pong() {\n\t\t//shouldnt't ever be ponged, just here because pretty interface\n\t}", "public void onPositionChanged() {\n\n latPeriodic = location.getLatitude();\n lonperiodic = location.getLongitude();\n\n }", "@Override\n\tpublic void update() {\n\t\tage++;\n\t\tpoints = Globals.points;\n\t}", "@Override\n\tpublic void moveCamera() {\n\n\t}", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer1 has received update!\");\r\n\t}", "public void updateFrontPhotoflipMode() {\n if (isCameraFrontFacing()) {\n this.mCameraSettings.setMirrorSelfieOn(Keys.isMirrorSelfieOn(this.mAppController.getSettingsManager()));\n }\n }", "public void notifyObservers()\n\t{\n\t\tsetChanged();\n\t\tnotifyObservers(new GameWorldProxy(this));\n\t}", "public void onSwapPosition() {\n\n\t}", "@Override\n\tpublic void onArrivedWayPoint(int arg0) {\n\n\t}", "public void onCamera();", "@Override\n\tpublic void onLocationChange(AMapNaviLocation arg0) {\n\n\t}", "void pharmacyListener(){\n \n }", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer3 has received update!\");\r\n\t}", "@Override\n\tpublic void act(float delta) {\n\t\tsuper.act(delta);\n\t\t\n\t\tif(PWM.instance().pointIsInObstacle(this.getX(), this.getY())){\n\t\t\tif(!PWM.instance().pointIsInObstacle(this.getX(), lastPos.y)){\n\t\t\t\tthis.setPosition(this.getX(), lastPos.y);\n\t\t\t}else if(!PWM.instance().pointIsInObstacle(lastPos.x, this.getY())){\n\t\t\t\tthis.setPosition(lastPos.x, this.getY());\n\t\t\t}else{\n\t\t\t\tthis.setPosition(lastPos.x, lastPos.y);\n\t\t\t}\n\t\t\t\n\t\t\tthis.lastPos.x = this.getX();\n\t\t\tthis.lastPos.y = this.getY();\n\t\t\t\n\t\t}\t\t\t\t\n\t\t\n\t\tmainCameraFollowHero();\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic void onLocationChange(AMapNaviLocation arg0) {\n\r\n\t}", "public void onSensorChanged(SensorEvent event) {\n\t\tif(event.sensor.getType() == Sensor.TYPE_PROXIMITY){\n\t\tproxview.setText(\"\\n\\n\"+\"PROXIMITY\"+\"\\n\"+String.valueOf(event.values[0]));\n\t\t\n\t\t\n\t\t}\n\t\tif(event.sensor.getType() == Sensor.TYPE_ACCELEROMETER){\n\t\t\t\n\t\taccview.setText(\"ACCELEROMETER\"+\"\\n\"+\"X: \"+event.values[0]+\"\\nY: \"+event.values[1]+\"\\nZ: \"+event.values[2]);\n\t\t\n\t\tdouble p = event.values[0];\n\t\tif(p<0.0)\n\t\t{mp.pause();}\n\t\telse{\n\t\t\tif(mp.isPlaying())\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{mp.start();}\n\t\t}\n\t\t\n\t}\n\t\tif(event.sensor.getType() == Sensor.TYPE_LIGHT){\n\t\t\t\n\t\t\tliview.setText(\"LIGHT\"+\"\\n\"+String.valueOf(event.values[0]));\n\t\t\t\n\t\t}\n}", "public void onDrawFrame(GL10 unused) {\n\n \tGLES20.glClearColor(0.5f,0.5f,0.5f,0.5f);\n GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);\n \n GLES20.glEnable(GLES20.GL_DEPTH_TEST);\n\n \t//GLES20.glCullFace(GLES20.GL_BACK);\n\n /* Update MVP matrix */\n\n mat4 mvp = mProj\n \t.mul(mat4.translation(0.0f, 0.0f, -5.0f))\n \t.mul(mat4.rotateY(-mAngleX))\n \t.mul(mat4.rotateX(mAngleY));\n \t\n \n // Add program to OpenGL environment\n GLES20.glUseProgram(mProgram);\n \n /* Set model view projection matrix */\n GLES20.glUniformMatrix4fv(muMVPHandle, 1, false, mvp.f(), 0);\n \n /*\n * Now we're ready to draw some 3D objects\n */\n mCube.draw(maPositionHandle, maColorHandle);\n }", "public void onMove(float x, float y, float pressure) {\n/* 135 */ this.mTouchEventSubject.onNext(new InkEvent(InkEventType.ON_TOUCH_MOVE, x, y, this.mIsPressureSensitive ? pressure : 1.0F));\n/* */ }", "private void changeCameraPosition() {\n yPosition = mPerspectiveCamera.position.y;\n if (isMovingUp) {\n yPosition += 0.1;\n if (yPosition > 20)\n isMovingUp = false;\n } else {\n yPosition -= 0.1;\n if (yPosition < 1)\n isMovingUp = true;\n }\n\n mPerspectiveCamera.position.set(xPosition, yPosition, zPosition);\n mPerspectiveCamera.update();\n }", "@Override\n\tpublic void onLocationChanged(android.location.Location arg0) {\n\t\t\n\t}", "public void onePointVisitor(View view) {\r\n visitorScore += 1;\r\n displayVisitorScore(visitorScore);\r\n }", "@Override\n public void onLocationChanged(Location location) {\n LatLng posicio = new LatLng(location.getLatitude(),location.getLongitude());\n //Afegir la camera amb el punt generat abans i un nivell de zoom\n CameraUpdate camera = CameraUpdateFactory.newLatLngZoom(posicio,13);\n //Desplacem la camera al nou punt\n mMap.moveCamera(camera);\n posicioActual = posicio;\n\n }" ]
[ "0.76332337", "0.75944674", "0.7466876", "0.70273864", "0.69203", "0.6818527", "0.667261", "0.665456", "0.62980247", "0.590667", "0.5887168", "0.58654916", "0.5798072", "0.57868475", "0.5737225", "0.5670567", "0.5630951", "0.55978286", "0.55270714", "0.54375386", "0.5396947", "0.53955096", "0.5394922", "0.5384471", "0.5359765", "0.53546363", "0.5308142", "0.5296904", "0.5270993", "0.5257222", "0.51769805", "0.517345", "0.5164025", "0.51497525", "0.5143857", "0.51326704", "0.51326704", "0.5127293", "0.51116276", "0.50998217", "0.5098079", "0.5097885", "0.5077597", "0.5058331", "0.5047324", "0.503112", "0.5008818", "0.5008654", "0.5007216", "0.49953318", "0.49896932", "0.49833345", "0.49751005", "0.4973282", "0.49685162", "0.4965271", "0.49607947", "0.49549192", "0.49333823", "0.49310395", "0.49267647", "0.49243847", "0.49147734", "0.4894704", "0.4882016", "0.48812672", "0.48804387", "0.48720586", "0.48466572", "0.4832624", "0.4831366", "0.482657", "0.4817251", "0.47910824", "0.4781661", "0.47809997", "0.4780459", "0.4776926", "0.4775386", "0.4763358", "0.47613853", "0.47583005", "0.47539854", "0.47508907", "0.47446185", "0.4744106", "0.47413754", "0.47400296", "0.4739373", "0.4731962", "0.4729554", "0.4729314", "0.47255054", "0.47179395", "0.47138992", "0.471206", "0.47086978", "0.47080812", "0.47039047", "0.47033533" ]
0.67605305
6
text = (TextView) findViewById(R.id.text);
public void onCreateActivity(){ list_v = (ListView) findViewById(R.id.list_v); appInst = (App) getApplicationContext(); // File dir = new File(appInst.MUSIC_PATH); // String[] files = dir.list(); String textSt = ""; // for(String file : files){ // textSt += (file+"\r\n"); // } // text.setText(textSt); // text.setText(appInst.MUSIC_PATH); // text.setText(FileUtils.walk(appInst.MUSIC_PATH)); // getContentResolver().query(appInst.MUSIC_PATH, projection, selection, selectionArgs, sortOrder) String[] proj = new String[] { MediaStore.Audio.Media._ID, MediaStore.Audio.Media.DATA, MediaStore.Audio.Media.DISPLAY_NAME, MediaStore.Audio.Media.DURATION, MediaStore.Audio.Media.ALBUM_ID }; // Log.i(">>uri",Uri.fromParts("content", appInst.MUSIC_PATH, null).toString()); // Log.i(">>uri",Uri.parse(appInst.MUSIC_PATH).toString()); // String where = MediaStore.Audio.Media.MIME_TYPE + "= 'audio/mpeg'" + " AND "+ // MediaStore.Audio.Artists._ID +" IN (" + // "SELECT "+MediaStore.Audio.Media.ARTIST_ID+" FROM AUDIO "+ // "WHERE "+MediaStore.Audio.Media.DATA +" LIKE ?" + // ")"; String where = MediaStore.Audio.Media.MIME_TYPE + "= 'audio/mpeg'" + " AND " + MediaStore.Audio.Media.DATA + " LIKE ?"; String[] whereArgs = new String[]{appInst.MUSIC_PATH + "%"}; Cursor curs = appInst.getContentResolver().query( MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, // MediaStore.Audio.Artists.EXTERNAL_CONTENT_URI, // Uri.parse(appInst.MUSIC_PATH), // Uri.fromParts("content", appInst.MUSIC_PATH, null), proj, // null, // MediaStore.Audio.Media.MIME_TYPE + "= 'audio/mpeg'", where, whereArgs, MediaStore.Audio.Media._ID); final List<Song> songs = new ArrayList<>(); if (curs == null) { Toast.makeText(getApplicationContext(), "query failed, handle error", Toast.LENGTH_LONG).show(); // Log.e("Cursor", "query failed, handle error"); } else if (!curs.moveToFirst()) { Toast.makeText(getApplicationContext(), "no media on the device", Toast.LENGTH_LONG).show(); // Log.e("Cursor", "no media on the device"); } else { do { // long id = curs.getLong(0); // String data = curs.getString(1); // String name = curs.getString(2); // String duration = curs.getString(3); // textSt += Long.toString(id)+";"+data+";"+name+";"+duration+"\r\n\r\n"; Song s = new Song(curs.getLong(0),curs.getString(1),curs.getString(2),curs.getString(3),curs.getLong(4)); songs.add(s); Log.i("song"+s.getId(),"data:"+s.getData()+";name:"+s.getName()+";duration:"+s.getDuration()); }while(curs.moveToNext()); } Log.i("info","size:"+songs.size()); // text.setText(textSt); // final AdapterPlaylistItem adapter = new AdapterPlaylistItem(this, R.layout.adapter_song, songs); final AdapterPlaylistItem adapter = new AdapterPlaylistItem(this, R.layout.adapter_song, songs); list_v.setAdapter(adapter); list_v.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, final View view, final int position, long id) { // Song s = songs.get(position); // Toast.makeText(appInst, // "Click ListItem path " + s.getData()+"; duration:"+s.getDuration(), Toast.LENGTH_LONG) // .show(); final Song item = (Song)parent.getItemAtPosition(position); view.animate() .setDuration(2000) .alpha(0) .withEndAction(new Runnable() { @Override public void run() { songs.remove(position); adapter.notifyDataSetChanged(); view.setAlpha(1); } }); Integer.parseInt("adb"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_main);\n b1 = (Button) findViewById(R.id.button);\n b1.setOnClickListener(this);\n t = (TextView) findViewById(R.id.textView);\n\n\n\n\n}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main); // Carga los componentes definidos en el xml activity_main\n\n TextView texto = (TextView) findViewById(R.id.idTexto); // Instanciamos el componente de tipo TextView buscandolo por el id definido en el xml activity_main\n // texto.setText(\"Hola!\");\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_myo_control);\n textRcvData = (TextView) findViewById(R.id.textReceiveData);\n isTextRcvData = true;\n }", "public void TextView_Config(){\n textviewBaro=(TextView) findViewById(R.id.textviewGravity);\n textviewAcceleration=(TextView) findViewById(R.id.textviewAcceleration);\n textviewGyro=(TextView) findViewById(R.id.textviewGyro);\n display=(TextView)findViewById(R.id.textView1);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n setText();\n }", "@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setText(\"Android is AWESOME!!\");\n }", "@Override\n // onCreate() method is used to inflate the layout, which means to set the content view of the screen to the XML layout\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // Points to the XML file with the layout information\n setContentView(R.layout.activity_main);\n // Correlate the TextView parameter 'mShowCount' to the TextView in 'activity_main.xml'\n mShowCount = (TextView) findViewById(R.id.show_count);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_ps);\n txtRadio = (TextView) findViewById(R.id.txtRadio);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n Log.d(TAG,\"onCreate\");\n setContentView(R.layout.main);\n app = (SignalFinderApp) getApplication();\n mainText = (TextView) findViewById(R.id.main_text);\n }", "abstract TextView getTextView();", "public TextView getTextView() {\n\n return (TextView) findViewById(R.id.sendToLogin);\n }", "public void onClick(View view) {\n // this is from the activity main\n TextView tv = (TextView) findViewById(R.id.tv1);\n EditText et = (EditText) findViewById(R.id.et1);\n\n }", "@Override \n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.article_reader_layout, container, false);\n textView = (TextView)view.findViewById(R.id.text) ;\n return view;\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.demo1);\n TextView text = (TextView)findViewById(R.id.lib_head_title);\n text.setText(\"Demo3\");\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n tvAnimate = findViewById(R.id.tvAnimate);\n tvTranslation = findViewById(R.id.tvTranslation);\n\n }", "private void setupTextView() {\n painterTextViewMoves = findViewById(R.id.painterTextView1);\n painterTextViewTime = findViewById(R.id.painterTextView2);\n painterTextViewPoints = findViewById(R.id.painterTextView3);\n painterTextViewInstructions = findViewById(R.id.painterInstructionsView);\n }", "public void setTitleFromActivityLabel (int textViewId)\n{\n TextView tv = (TextView) findViewById (textViewId);\n if (tv != null) tv.setText (getTitle ());\n}", "private void findViewById(){\n\t mDeleteBtn = (Button) findViewById(R.id.poster_delete_btn);\n\t mClearBtn = (Button) findViewById(R.id.poster_clear_btn);\n\t posterGridView = (GridView) findViewById(R.id.file_list_view);\n\t noPoster = (TextView)findViewById(R.id.no_poster);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.text_main1);\n \n view = (MTextView2) findViewById(R.id.textview);\n view.setText(getAssetsString(this,\"1.txt\"));\n view.setMovementMethod(ScrollingMovementMethod.getInstance());\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n tvTask1 = (TextView) findViewById(R.id.tvTask1);\n tvTask1.setText(\"Task1\");\n tvTask2 = (TextView) findViewById(R.id.tvTask2);\n tvTask2.setText(\"Task2\");\n tvTask3 = (TextView) findViewById(R.id.tvTask3);\n tvTask3.setText(\"Task3\");\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_story);\n\n // Get the intent that was given from last activity\n Intent intent = getIntent();\n String receivedText = intent.getStringExtra(\"text\");\n\n // Set the given text in the textview\n TextView textView = findViewById(R.id.textView5);\n textView.setText(receivedText);\n }", "private void setInfo(String info) {\n// TextView textView = (TextView) findViewById(R.id.info);\n// textView.setText(info);\n }", "private void display() {\n TextView textview = (TextView) findViewById(R.id.textView);\n EditText editText = (EditText) findViewById(R.id.editNumber) ;\n textview.setText(\"TEXT\");\n editText.setText(\"\");\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.orderlist);\n init();\n textView.setOnClickListener(this);\n\n }", "@Override\r\n\tprotected void findViewById() {\n\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_text, container, false);\n Button btn =view.findViewById(R.id.btn);\n final EditText edit = view.findViewById(R.id.edit);\n\n btn.setOnClickListener(new Button.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n String strEdit = edit.getText().toString();\n Toast.makeText(getContext(), strEdit, Toast.LENGTH_SHORT).show();\n }\n });\n return view;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n //show UI, R =resource, layout = folder\n setContentView(R.layout.activity_main);\n textViewMessage = findViewById(R.id.textViewMessage);\n }", "@Override\n\tprotected void findViewById() {\n\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View myView = inflater.inflate(R.layout.fragment_challenges_screen, container, false);\n testView = (TextView) myView.findViewById(R.id.testtext);\n\n\n return inflater.inflate(R.layout.fragment_challenges_screen, container, false);\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_one,container,false);\n view.findViewById(R.id.lay1);\n TxtViw1=(TextView)view.findViewById(R.id.lay1);\n String string=\"The director has put a lot of efforts in giving Baadshaho a period film look\" +\n \"The vehicles and props have been designed as per the need of the narration.\" +\n \"However, it is yet to be seen whether Baadshaho works as a complete package or not.\";\n TxtViw1.setText(string);\n return view;\n }", "public void getViews() {\n cameraButton = (ImageButton) findViewById(R.id.cameraButton);\n galleryButton = (ImageButton)findViewById(R.id.galleryButton);\n tagText = (TextView) findViewById(R.id.tag_text);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) { \t\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n btnRegister = (Button)findViewById(R.id.btnRegister);\n btnRegister.setOnClickListener(btnRegisterOnClick);\n btnUnregister = (Button)findViewById(R.id.btnUnregister);\n btnUnregister.setOnClickListener(btnUnregisterOnClick);\n txtMsg = (TextView)findViewById(R.id.txtMsg); \n }", "@Override\r\n\tprotected void findViewById() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void findViewById() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void findViewById() {\n\t\t\r\n\t}", "@Override\n public void onCreate(final Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n setTitle(R.string.title);\n\n countdown = new TextViewCountdown(R.id.countdown, this);\n texts.add(new TextViewState(R.id.qYesterday, this));\n texts.add(new TextViewState(R.id.qToday, this));\n texts.add(new TextViewState(R.id.qWay, this));\n\n findViewById(R.id.reset).setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(final View v) {\n resetApp();\n }\n });\n\n findViewById(R.id.go).setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(final View v) {\n final TextViewState text = getActiveQuestion();\n resetApp();\n\n if (null != text) { // stand up est en cours\n // Log.i(TAG, \"click-text \" + text.getTextView().toString());\n int idx = texts.indexOf(text);\n idx++; // go to next\n if (idx == texts.size()) {\n // Log.i(TAG, \"click-return\");\n return;\n }\n if (idx < texts.size()) {\n // Log.i(TAG, \"click-set textstart\");\n textStart = texts.get(idx);\n }\n }\n\n // Log.i(TAG, \"click-schedule texttask\");\n textTask = getTextTask();\n textTimer.schedule(textTask, 0, CYCLE_TEST);\n\n }\n });\n\n }", "@Override\r\n\tpublic void setupView() {\n\t\ttv = (TextView) findViewById(R.id.mjson_layout_text);\r\n\t}", "@Override\n public void onCancelled(DatabaseError error) {\n setContentView(R.layout.activity_needs);\n TextView textView = (TextView) findViewById(R.id.textView1);\n textView.setText(\"Failed to read value\");\n\n }", "TextView getDescriptionView();", "private TextView getTextView(String content) {\n TextView textView = new TextView(this.getContext());\n textView.setEms(30);\n textView.setTextColor(getResources().getColor(R.color.ldstools_black));\n if(content != null && !content.isEmpty()) {\n textView.setText(content);\n }\n return textView;\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n TextView tv = (TextView) findViewById(R.id.text);\n Gson gson = new Gson();\n String jsonString = gson.toJson(STRINGS);\n tv.setText(jsonString);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n init();\n updateUI();\n/*\n mButton = findViewById(R.id.button);\n mTextView = findViewById(R.id.textview);\n cursor = getContentResolver().query(CONTENT_URI,null,null, null,null);\n cursor.moveToFirst();\n mTextView.setText(cursor.getString(cursor.getColumnIndex(\"name\")));\n //mTextView.setText(note.getName());\n mButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (cursor.moveToNext()){\n mTextView.setText(cursor.getString(cursor.getColumnIndex(\"name\")));\n }\n }\n });*/\n }", "@Override\n public void onClick(View v) {\n TextView activityText = getActivity().findViewById(R.id.text_view_activity);\n if (activityText == null) {\n Log.i(MainActivity.TAG, \"TextView in activity not found\");\n } else {\n activityText.setText(\"got from down fragment\");\n Log.i(MainActivity.TAG, \"TextView in activity edited successfully\");\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_take_manual_attendance);\n\n _id = findViewById(R.id.enter_id);\n _name = findViewById(R.id.enter_name);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n TextView bauhs = null;\n\n setFont(bauhs, \"fonts/handsean.ttf\", R.id.textView);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.my_tours);\n\t\t\n\t\ttv=(TextView) findViewById(R.id.mytoursmaintv);\n\t}", "public void updateText(String s){\n TextView articleText = (TextView) findViewById(R.id.article_text);\n articleText.setText(s);\n }", "public TextView getTextView(String text,int textsize){\n TextView textView=new TextView(context);\n textView.setTextColor(Color.parseColor(\"#000000\"));\n textView.setTextSize(textsize);\n textView.setGravity(Gravity.CENTER);\n textView.setText(text);\n textView.setLayoutParams(layoutParams);\n return textView;\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.second);\n\t\tbt1=(Button)findViewById(R.id.second_bt1);\n\t\ttv=(TextView)findViewById(R.id.tv);\n\t\tIntent intent=getIntent();\n\t\tBundle bundle=intent.getExtras();\n\t\tString text=bundle.getString(\"str\");\n\t\ttv.setText(text);\n\t\tbt1.setOnClickListener(listener);\n\t\t\n\t}", "private void assignViews() {\n mTextView = (TextView) findViewById(R.id.textViewForEnterEmail);\n mEdTxtEmail = (EditText) findViewById(R.id.edTxtEmailInForgotPass);\n mButton = (Button) findViewById(R.id.btnSubmit);\n }", "@Override\r\n public Object getItem(int position) {\r\n return mTextViews.get(position);\r\n }", "@Override\n \tpublic void onCreate(Bundle savedInstanceState)\n \t{\n \t\tsuper.onCreate(savedInstanceState);\n \t\tsetContentView(R.layout.main);\n \n \t\tmainLayout = findViewById (R.id.mainLayout);\n \t\tresistor = (Resistor)findViewById (R.id.resistor);\n \t\tresistanceView = (TextView)findViewById (R.id.resistanceView);\n \n \t\tmainLayout.setBackgroundDrawable (resistor.getBackground ());\n \t\tresistanceView.setBackgroundDrawable (resistor.getBackground ());\n \t\tresistanceView.setText (resistor.getResistance ().toString ());\n \t}", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\r\n\t\t\r\n//\t\tTextView textView;// = (TextView) context.getResources().findView\r\n\r\n\t}", "private void setText(View view, String text) {\n\t\t((TextView) view.findViewById(android.R.id.text1)).setText(text);\n\t}", "@Override\n protected void initView() {\n pushTxt = (TextView) findViewById(R.id.push_txt);\n pushActivity = (TextView)findViewById(R.id.push_activity);\n pushArticle = (TextView)findViewById(R.id.push_article);\n pushProduce = (TextView)findViewById(R.id.push_produce);\n\n\n pushTxt.setOnClickListener(this);\n pushActivity.setOnClickListener(this);\n pushArticle.setOnClickListener(this);\n pushProduce.setOnClickListener(this);\n }", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.alarm12);\n\n anglelimitshared = getSharedPreferences(\"Mydata\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = anglelimitshared.edit();\n temp = anglelimitshared.getInt(\"angle_limit\", 0);\n text = (TextView) findViewById(R.id.disp_text);\n text.setText(String.valueOf(temp));\n\n\n }", "@Override\n\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n relink();\n\n\n // Example of a call to a native method\n TextView tv = (TextView) findViewById(R.id.sample_text);\n tv.setText(stringFromJNI());\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n // LOAD PREFERENCES\n new ThemeColors(getApplicationContext());\n setTheme(ThemeColors.MENU_THEME_ID);\n\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n RelativeLayout currentLayout = findViewById(R.id.main_layout);\n currentLayout.setBackgroundColor(ThemeColors.BACKGROUND_COLOR_INT);\n\n // code I can probably get rid of if I was use kotlin\n complimentButton = findViewById(R.id.speakButton);\n subtitleText = findViewById(R.id.mainSubtitleText);\n titleText = findViewById(R.id.mainTitleText);\n\n // INITIALIZE TEXT TO SPEECH\n textToSpeech=new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {\n @Override\n public void onInit(int status) {\n if(status != TextToSpeech.ERROR) {\n textToSpeech.setLanguage(Locale.getDefault());\n }\n }\n });\n\n // OUR LOYAL BUTTON\n loadCompliments();\n\n complimentButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n subtitleText.setVisibility(View.INVISIBLE);\n titleText.setVisibility(View.INVISIBLE);\n\n String toSpeak = getCompliment();\n showToast(toSpeak,toSpeak.split(\"\\\\s+\").length);\n textToSpeech.speak(toSpeak, TextToSpeech.QUEUE_FLUSH, null);\n }\n });\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n findViewById(R.id.makebtn).setOnClickListener(this);\n findViewById(R.id.textbtn).setOnClickListener(this);\n findViewById(R.id.viewbtn).setOnClickListener(this);\n }", "void getUIControls()\n {\n title = (TextView) findViewById(R.id.reviewTitleTextView);\n date = (TextView) findViewById(R.id.dateTextView);\n author = (TextView) findViewById(R.id.authorTextView);\n message = (TextView) findViewById(R.id.messageTextView);\n reviewerCountry = (TextView) findViewById(R.id.reviewerCountryTextView);\n authorRate = (RatingBar) findViewById(R.id.authorRateRatingBar);\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_main);\r\n\t\t\r\n\t\ttextTargetUri = (TextView) findViewById(R.id.targeturi);\r\n\t\ttargetImage = (ImageView) findViewById(R.id.targetimage);\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.teacher3);\r\n\t\tfindView();\r\n\t}", "public void findViews() {\n titleTextView = findViewById(R.id.song_title_text_view);\n artistTextView = findViewById(R.id.song_artist_text_view);\n albumCoverImg = findViewById(R.id.album_cover_img);\n albumTextView = findViewById(R.id.album_text_view);\n playButton = findViewById(R.id.play_button);\n nextButton = findViewById(R.id.next_button);\n backButton = findViewById(R.id.back_button);\n shuffleButton = findViewById(R.id.shuffle_button);\n repeatButton = findViewById(R.id.repeat_button);\n }", "TextView getTagView();", "@Override\n\tprotected void init() {\n\t\ttv1 = (TextView) findViewById(R.id.text1);\n\t\ttv2 = (TextView) findViewById(R.id.text2);\n\t\tbt1 = (Button) findViewById(R.id.button1);\n\t\tbt2 = (Button) findViewById(R.id.button2);\n\t\timg1 = (ImageView) findViewById(R.id.imageView1);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_pres, container, false);\n mTextView = (TextView) view.findViewById(R.id.fragment_pres_txt);\n String textPres = \"<p>\" +\n \"Travaillant depuis 2010 au sein du groupe BNP Paribas, je dispose d'appétences pour la technique et l'informatique bancaire. \\n\" +\n \"Je suis actuellement un programme de formation visant à devenir de développeur - concepteur dans des technologies Open au sein de BNP Paribas.\\n\" +\n \"C'est grâce à ce programme que j'ai mis en application les compétences acquises pour décliner mon CV sous la forme d'un site Web et d'une application Android.\\n\" +\n \"</p>\";\n// String html = \"<p>Test de code HTML avec un <a href='http://www.throrinstudio.com'>lien</a>. <b>Et un texte en gras</b></p>\";\n mTextView.setText(Html.fromHtml(textPres));\n/* mTextView.setText(\"Travaillant depuis 2010 au sein du groupe BNP Paribas, \" +\n \"je dispose d'appétences pour la technique et l'informatique bancaire.\\n\" +\n \"Je suis actuellement un programme de formation visant à devenir de développeur - concepteur dans des technologies Open au sein de BNP Paribas.\\n\" +\n \"C'est grâce à ce programme que j'ai mis en application les compétences acquises pour décliner mon CV sous la forme d'une application Android\");\n*/\n\n\n return view;\n }", "interface View extends BaseView {\n void onTextLoaded(String text);\n }", "public String getText(){\n return input.getText().toString();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_intro_fragment1,container,false);\n //text = (TextView)v.findViewById(R.id.text);\n\n //Typeface tf = Typeface.createFromAsset(getActivity().getAssets(),\"fonts/raleway.ttf\");\n //text.setTypeface(tf);\n\n return v;\n }", "private void initializeVariables() {\n\t\ttvTimeShow= (TextView) findViewById(R.id.tvTimeTracker);\r\n\t}", "void noDataFoundTextView();", "@Override\n public void onCreate(final Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n //Teurastetaan otsikkopalkki pois:\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n //Teurastetaan status-palkki pois (full screen):\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n final View v = getLayoutInflater().inflate(R.layout.credits, null);\n v.setKeepScreenOn(true);\n setContentView(v); \n res=this.getResources();\n managing = (TextView) findViewById(R.id.managing);\n contentdevelopment = (TextView) findViewById(R.id.contentdevelopment);\n programming = (TextView) findViewById(R.id.programming);\n\n \n managing.setText(Html.fromHtml(\"<b>\" + res.getString(R.string.cr_managing)+\"</b><br/>Myriam Munezero<br/>Balozi Kirongo<br/>Sari Pitkänen\"));\n\n contentdevelopment.setText(Html.fromHtml(\"<b>\" + res.getString(R.string.cr_contentdevelopment)+\"</b>\" +\n \t\t\"<br/>Mwasambo Benjamin<br/>Haraka Joseph<br/>Virginia Nyawira<br/>Swapprinah Imbosa\"));\n contentdevelopment.setTextColor(Color.BLACK);\n\n programming.setText(Html.fromHtml(\"<b>\"+res.getString(R.string.cr_programming)+\"</b><br/>Moses Shitote<br/>Duncan Kiplangat<br/>Peter Waweru\"));\n\n }", "protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n try {\n\n Button button=(Button)findViewById(R.id.button_1);\n button.setOnClickListener(new MyButtonListener());\n String input=\"input:?\";\n TextView note=(TextView)findViewById(R.id.text_main);\n note.setText(input);\n\n\n Log.d(\"MainActivity\", \"onCreate: executive\");\n }catch(Exception e)\n {\n Log.d(\"exception\",e.getMessage());\n }\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n mButton1 =(Button) findViewById(R.id.myButton1);\n mTextView1 = (TextView) findViewById(R.id.myTextView1);\n mButton1.setOnClickListener(myShowProgressBar);\n }", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n tv_slider_icon = (TextView) findViewById(R.id.slider_icon);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.tabslayout);\n\t\tTextView txt=(TextView)findViewById(R.id.tabtext);\n\t\ttxt.setText(\"Rewards\");\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t super.onCreate(savedInstanceState);\n\t setContentView(R.layout.activity_main);\n\t \n\t TextView textv = (TextView) findViewById(R.id.textView1);\n\t textv.setShadowLayer(1, 3, 3, Color.GRAY);\n\t \n\t btnActButtons = (Button) findViewById(R.id.button_buttons);\n\t btnActButtons.setOnClickListener(this);\n\t \n\t btnActMCU = (Button) findViewById(R.id.button_mcu);\n\t btnActMCU.setOnClickListener(this);\n\t \n\t btnActAbout = (Button) findViewById(R.id.button_about);\n\t btnActAbout.setOnClickListener(this);\n\t}", "TextView getTitleView();", "public void updateTextView(final String text)\n\t{\n\t\tmHandler.post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tt.setText(text);\n\t\t\t}\n\t\t});\n\t}", "public void initTextViewDebug( View view, int id ) {\n\t\tmTextViewDebug = (TextView) view.findViewById( id );\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.player);\r\n\t\tIntent intent= getIntent();\r\n\t\tmp3Info=(Mp3Info) intent.getSerializableExtra(\"mp3Info\");\r\n\t\tbeginButton=(ImageButton) findViewById(R.id.begin);\r\n\t\tpauseButton=(ImageButton) findViewById(R.id.pause);\r\n\t\tstopButton=(ImageButton) findViewById(R.id.stop);\r\n\t\ttalk=(TextView) findViewById(R.id.talk);\r\n\t\tshowtalk=(TextView) findViewById(R.id.showtalk);\r\n\t\t\r\n\t\tpre=(ImageButton) findViewById(R.id.imageButtonpre);\r\n\t\tdanqu=(ImageButton) findViewById(R.id.imageButtondanqu);\r\n\t\tnext=(ImageButton) findViewById(R.id.imageButtonnext);\r\n\t\t\r\n\t\tlrcText=(TextView) findViewById(R.id.lrcText);\r\n\t\tOnClickListener listener=new Listener();\r\n\t\tbeginButton.setOnClickListener(listener);\r\n\t\tpauseButton.setOnClickListener(listener);\r\n\t\tstopButton.setOnClickListener(listener);\r\n\t\tpre.setOnClickListener(listener);\r\n\t\tdanqu.setOnClickListener(listener);\r\n\t\tnext.setOnClickListener(listener);\r\n\t\t\r\n\t\tfindtalk ft=new findtalk();\r\n\t\tft.execute();\r\n\t}", "public void clickFunction(View view){\n Toast.makeText(MainActivity.this, \"Hi there!\", Toast.LENGTH_LONG).show();\n\n // here we've created a variable \"myTextField\" of type \"EditText\" which collect the data from the ID i.e \"myTextField\" and convert the view ID into EditText type and stores into the variable.\n EditText myTextField = (EditText) findViewById(R.id.myTextField);\n\n // here the Log.i function is used to show the info to the logcat terminal which required two fields i.e Tag & the data to show (here the data is taken from the myTextField variable created above.\n Log.i(\"Info\",myTextField.getText().toString());\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n }", "@Override\n public void initView() throws Exception {\n mGrowSeedlingsTimeTextView = (TextView) findViewById(R.id.GrowSeedlingsTime_TextView);\n mGrowSeedlingsTimeRecyclerView = (RecyclerView) findViewById(R.id.GrowSeedlingsTime_RecyclerView);\n }", "private void setup() {\n\t\tcanWrite = (TextView)findViewById(R.id.tvCanWrite);\n\t\tcanRead = (TextView)findViewById(R.id.tvCanRead);\n\t\t\n\t\t\n\t}", "@OnClick(R.id.tv_guankan)\n public void guankan() {\n\n }", "void displayScore(){\n\t\tTextView yourScore = (TextView) findViewById (R.id.yourscore); \n String currentScoreText;\n currentScoreText = Integer.toString(currentScore);\n\t\tyourScore.setText(currentScoreText);\n\t\t\n\t}", "@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n // EditText etFoo = (EditText) view.findViewById(R.id.etFoo);\n }", "public void setarText() {\n txdata2 = (TextView) findViewById(R.id.txdata2);\n txdata1 = (TextView) findViewById(R.id.txdata3);\n txCpf = (TextView) findViewById(R.id.cpf1);\n txRenda = (TextView) findViewById(R.id.renda1);\n txCpf.setText(cpf3);\n txRenda.setText(renda.toString());\n txdata1.setText(data);\n txdata2.setText(data2);\n\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n TextView tv = new TextView(this);\n tv.setText(\"请在拨号键盘输入*#*#0123#*#*, 你会有发现哦~\");\n tv.setTextSize(30);\n setContentView(tv);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n //setContentView(R.layout.main);\n }", "@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.brwn));\n }", "@Override\n public int getCount() {\n return texts.length;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n arms = findViewById(R.id.arms);\n mustache = findViewById(R.id.mustache);\n nose = findViewById(R.id.nose);\n shoes = findViewById(R.id.shoes);\n glasses = findViewById(R.id.glasses);\n eyes = findViewById(R.id.eyes);\n hat = findViewById(R.id.hat);\n ears = findViewById(R.id.ears);\n mouth = findViewById(R.id.mouth);\n eyebrows = findViewById(R.id.eyebrows);\n }", "@Override\nprotected void onCreate(Bundle savedInstanceState) {\n\tsuper.onCreate(savedInstanceState);\n\tsetContentView(R.layout.seton);\n}", "public void MonitorTextView()\n {\n TextView textview = (TextView) findViewById(R.id.textViewDelayLength);\n textview.setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View v) {\n EditText editText = (EditText) findViewById(R.id.editTextMessageDelay);\n SeekBar seek = (SeekBar) findViewById(R.id.seekBarMessageDelay);\n if (editText.getVisibility() == View.GONE)\n {\n editText.setVisibility(View.VISIBLE);\n seek.setVisibility(View.GONE);\n }\n else if (editText.getVisibility() == View.VISIBLE)\n {\n editText.setVisibility(View.GONE);\n seek.setVisibility(View.VISIBLE);\n }\n }\n });\n }", "@Override\r\n public void onCreate(Bundle savedInstanceState)\r\n {\r\n super.onCreate(savedInstanceState);\r\n // load the layout\r\n setContentView(R.layout.sms_message); \r\n\r\n // make message text field object\r\n msgTextField = (EditText) findViewById(R.id.msgTextField);\r\n msgTextField.setText(\"[email protected]\");\r\n // make send button object\r\n sendButton = (Button) findViewById(R.id.sendButton);\r\n // make phone number field object\r\n phoneTextField = (EditText) findViewById(R.id.phoneTextField);\r\n\r\n }" ]
[ "0.7251946", "0.7021982", "0.6717823", "0.67075706", "0.66877", "0.6678282", "0.66360766", "0.6607353", "0.6577668", "0.6468034", "0.6466622", "0.6455375", "0.64239573", "0.63834184", "0.6376837", "0.63498306", "0.6299514", "0.6293157", "0.62622213", "0.6232205", "0.6218329", "0.62173027", "0.62064844", "0.6198848", "0.6197586", "0.6153975", "0.6136699", "0.6132214", "0.6112554", "0.6107866", "0.60981506", "0.6061512", "0.60590625", "0.60590625", "0.60590625", "0.6048045", "0.60473824", "0.5999217", "0.5993245", "0.59822595", "0.5961504", "0.59466845", "0.5941742", "0.59244096", "0.59237057", "0.5923485", "0.590558", "0.5904456", "0.5903699", "0.59011275", "0.5879433", "0.58746433", "0.58723927", "0.5856642", "0.58556867", "0.58379734", "0.5828615", "0.58217955", "0.5804149", "0.57970774", "0.57862324", "0.5784076", "0.5782237", "0.57812536", "0.5775832", "0.57676256", "0.5744078", "0.5741913", "0.5727137", "0.57157934", "0.57123506", "0.5705525", "0.5699831", "0.5694349", "0.56943303", "0.56888586", "0.56727743", "0.56691927", "0.5665576", "0.5664306", "0.5651673", "0.56483805", "0.5642286", "0.5635749", "0.5635658", "0.5635658", "0.5635658", "0.5614185", "0.56068736", "0.56044495", "0.56044024", "0.5601232", "0.5600267", "0.5595451", "0.55940187", "0.5593085", "0.55922174", "0.55739784", "0.55736256", "0.55526775", "0.55517095" ]
0.0
-1
Song s = songs.get(position); Toast.makeText(appInst, "Click ListItem path " + s.getData()+"; duration:"+s.getDuration(), Toast.LENGTH_LONG) .show();
@Override public void onItemClick(AdapterView<?> parent, final View view, final int position, long id) { final Song item = (Song)parent.getItemAtPosition(position); view.animate() .setDuration(2000) .alpha(0) .withEndAction(new Runnable() { @Override public void run() { songs.remove(position); adapter.notifyDataSetChanged(); view.setAlpha(1); } }); Integer.parseInt("adb"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String data=listView.getItemAtPosition(position).toString();\n String buffer[]=data.split(\":\");\n String buffer2[]=buffer[1].split(\"\\n\");\n String songName=buffer2[0];\n\n Toast.makeText(view.getContext(),songName,Toast.LENGTH_LONG).show();\n\n //send the song name to music actvity\n Intent intent=new Intent(view.getContext(),Play.class);\n intent.putExtra(\"SongName\",songName);\n startActivity(intent);\n }", "void DisplayMusic(){\n\n listView=(ListView)findViewById(R.id.allsongs_list_View);\n MusicLocation musicLocation=new MusicLocation();\n arrayList = musicLocation.getAllMusic(this,0);\n adapter=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,arrayList);\n listView.setAdapter(adapter);\n\n\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n //slice the song name\n String data=listView.getItemAtPosition(position).toString();\n String buffer[]=data.split(\":\");\n String buffer2[]=buffer[1].split(\"\\n\");\n String songName=buffer2[0];\n\n Toast.makeText(view.getContext(),songName,Toast.LENGTH_LONG).show();\n\n //send the song name to music actvity\n Intent intent=new Intent(view.getContext(),Play.class);\n intent.putExtra(\"SongName\",songName);\n startActivity(intent);\n }\n });\n\n\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n HashMap<String, Object> m = (HashMap<String, Object>) adapter.getItem(i);\n String musicName = (String) m.get(\"filename\");\n try {\n serviceBinder.startPlay(workDir + musicName);\n } catch (Exception e) {\n Log.e(\"Error\", \"Exception = \" + e);\n }\n serviceBinder.setPlayingFlag();\n serviceBinder.setCurPlaying(musicName, i);\n tvCurPlay.setText(\"正在播放:\" + musicName);\n tvEndTime.setText(secToTime(serviceBinder.trackDuration() / 1000));\n sbProgress.setMax(serviceBinder.trackDuration());\n sbProgress.setProgress(0);\n curPlayingId = serviceBinder.getCurPlayingId();\n bPlay.setBackgroundResource(R.mipmap.stop);\n adapter.notifyDataSetChanged();\n }", "@Override\n public void onStart() {\n super.onStart();\n\n getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> av, View v, int pos,\n long id) {\n // TODO Auto-generated method stub\n\n Toast.makeText(getActivity(), data.get(pos).get(\"Player\"), Toast.LENGTH_SHORT).show();\n\n }\n });\n\n\n }", "@Override\n public void onItemClick(AdapterView<?> a, View v, int position, long id) {\n Toast.makeText(getApplicationContext(), \"Selected :\" + \" \" + listData.get(position), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onItemClick(AdapterView<?> av, View v, int pos,\n long id)\n {\n Toast.makeText(getActivity(), data.get(pos).get(\"Player\"), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemClick(AdapterView<?> av, View v, int pos,\n long id) {\n\n Toast.makeText(getActivity(), data.get(pos).get(\"Player\"), Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n Log.e(\"song_url\",songs.get(i).getSong());\n mCallBack.songselected(songs, i);\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n Toast.makeText(getActivity(), \"You Clicked \"+position+\" item. Wait For Coming Functions\",\n Toast.LENGTH_LONG).show();\n }", "@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\tToast.makeText(getBaseContext(), list.get(arg2),\n\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t}", "@Override\n protected void onListItemClick(ListView l, View v, int position, long id) {\n AudioServiceController asc = AudioServiceController.getInstance();\n asc.stop();\n\n Media item = (Media) getListAdapter().getItem(position);\n Intent intent = new Intent(this, VideoPlayerActivity.class);\n intent.putExtra(\"filePath\", item.getPath());\n startActivity(intent);\n super.onListItemClick(l, v, position, id);\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\tString text = listview.getItemAtPosition(position)+\"\";\n\t\t\n\t\tToast.makeText(context, \"position=\"+position+\" text=\"+text, Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void onListItemClick(ListView l, View v, int position, long id) {\n super.onListItemClick(l, v, position, id);\n l.getItemAtPosition(position);\n// Intent testintent = new Intent(this.getActivity(),MusicPlay.class);\n// startActivity(testintent);\n\n//\n// new AlertDialog.Builder(this.getActivity()).setTitle(\"我的listview\").setMessage(\"介绍...\")\n// .setPositiveButton(\"确定\", new DialogInterface.OnClickListener() {\n// @Override\n// public void onClick(DialogInterface dialog, int which) {\n// }}).show();\n }", "@Override\r\n public void onClick(View view) {\r\n Toast.makeText(context, \"satu\" +list_data.get(getAdapterPosition()), Toast.LENGTH_SHORT).show();\r\n\r\n }", "@Override\n public void onItemClick(AdapterView<?> av, View v, int pos,\n long id) {\n Toast.makeText(getActivity(), data.get(pos).get(\"Desc\"), Toast.LENGTH_SHORT).show();\n Intent i = new Intent(getActivity(), DetailActivity.class);\n i.putExtra(\"Play\",data.get(pos).get(\"Desc\"));\n i.putExtra(\"Detail\",data.get(pos).get(\"Player\"));\n i.putExtra(\"Category\",\"Diversity\");\n i.putExtra(\"Img\",data.get(pos).get(\"Imagemain\"));\n startActivity(i);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n if (position==0){\n mp= MediaPlayer.create(MainActivity.this,R.raw.mandi);\n mp.start();\n Toast.makeText(MainActivity.this,\"Saya Ingin Mandi\",Toast.LENGTH_SHORT).show();\n } else if (position==1){\n mp= MediaPlayer.create(MainActivity.this,R.raw.toilet);\n mp.start();\n } else {\n Toast.makeText(MainActivity.this,\"Saya Ingin ke Toilet\",Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n int itemPosition = position;\n\n // ListView Clicked item value\n String itemValue = (String) listView.getItemAtPosition(position);\n\n // Show Alert\n Toast.makeText(getApplicationContext(),\n \"Position :\" + itemPosition + \" ListItem : \" + itemValue, Toast.LENGTH_LONG)\n .show();\n\n }", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view,\r\n int position, long id) {\n int itemPosition = position;\r\n\r\n // ListView Clicked item value\r\n String itemValue = (String) listView.getItemAtPosition(position);\r\n\r\n // Show Alert\r\n Toast.makeText(getApplicationContext(),\r\n \"Position :\"+itemPosition+\" ListItem : \" +itemValue , Toast.LENGTH_LONG)\r\n .show();\r\n\r\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n int itemPosition = position;\n\n // ListView Clicked item value\n String itemValue = (String) listView.getItemAtPosition(position);\n\n // Show Alert\n Toast.makeText(getApplicationContext(), \"Position :\" + itemPosition + \" ListItem : \" + itemValue , Toast.LENGTH_LONG).show();\n }", "@Override\n\tprotected void onListItemClick(ListView l, View v, int position, long id) {\n\t\tToast.makeText(this, String.format(\"Clicked on item #%d with text %s\",\n\t\t\tposition, mAdapter.getItem(position)), Toast.LENGTH_SHORT).show();\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tToast.makeText(getActivity(), listAdapter.getItem(position), Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n // Create a new intent to open the {@link TracksActivity}\n Intent nowPlayingIntent = new Intent(TracksActivity.this, NowPlayingActivity.class);\n MusicsElement element = (MusicsElement) arg0.getItemAtPosition(position);\n nowPlayingIntent.putExtra(\"element\", element.getmSongName());\n nowPlayingIntent.putExtra(\"musicElement\", element);\n // Start the new activity\n startActivity(nowPlayingIntent);\n }", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view,\r\n int position, long id) {\n int itemPosition = position;\r\n\r\n // ListView Clicked item value\r\n String itemValue = (String) listView.getItemAtPosition(position);\r\n\r\n // Show Alert\r\n Toast.makeText(getApplicationContext(),\r\n \"Position :\"+itemPosition+\" ListItem : \" +itemValue , Toast.LENGTH_LONG)\r\n .show();\r\n }", "@Override\n public void onPermissionGranted(PermissionGrantedResponse permissionGrantedResponse) {\n\n String[] songNames = songDB.keySet().toArray(new String[songDB.keySet().size()]);\n\n Log.d(\"krishlog\", \"onPermissionGranted: \" + songNames[1]);\n\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(MainActivity.this, android.R.layout.simple_list_item_1, songNames);\n listView.setAdapter(adapter);\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent intent = new Intent(MainActivity.this, PlaySong.class);\n String currentSong = listView.getItemAtPosition(position).toString();\n Log.d(\"krishlog\", \"onItemClick: the position is \" + position);\n intent.putExtra(\"songDB\", songDB);\n intent.putExtra(\"songKey\", currentSong);\n intent.putExtra(\"songNames\", songNames);\n intent.putExtra(\"position\", position);\n\n startActivity(intent);\n }\n });\n }", "@Override\r\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\r\n\t\t\tlong id) {\n\t\tplayMusic(MPService.MusicPlayer);\r\n\t\tMPService.SongPosition = position;\r\n\t\tMPService.isLoadImg = true;\r\n\t\tadapter.notifyDataSetChanged();\r\n\t}", "@Override\n public void onItemClick(View view, int position) {\n // TODO Auto-generated method stub\n if (Constants.isNetworkOnline(HomeActivity.this)) {\n if (position >= JustForUTrackLst.size()) {\n position = position % JustForUTrackLst.size();\n }\n // audioRelative.setVisibility(View.VISIBLE);\n StopService();\n if (HomeActivity.ListTrackadAdaptor != null) {\n HomeActivity.selectessong = -1;\n HomeActivity.selecttopsong = -1;\n HomeActivity.ListTrackadAdaptor.notifyDataSetInvalidated();\n }\n if (HomeActivity.topTwentyAdaptor != null) {\n HomeActivity.selectessong = -1;\n HomeActivity.selecttopsong = -1;\n\n HomeActivity.topTwentyAdaptor.notifyDataSetInvalidated();\n }\n PlayerConstants.SONGS_LIST = JustForUTrackLst;\n\n Log.e(\"list clicked \", \"here\");\n // streamService = new Intent(MainActivity.this,\n // StreamService.class);\n // startService(streamService);\n startwhellprogress();\n audioRelative.setEnabled(false);\n\n // intiPlayer(mtrackList.get(position).getTrackPath(),false);\n Log.e(\"list clicked \", \"here\");\n trackid = JustForUTrackLst.get(position).getTrackId();\n favo = JustForUTrackLst.get(position).getIsFavourite();\n if (favo.equalsIgnoreCase(\"true\")) {\n // change icon\n // make button disabled\n Like.setVisibility(View.GONE);\n\n dislike.setVisibility(View.VISIBLE);\n }\n\n if (favo.equalsIgnoreCase(\"false\")) {\n dislike.setVisibility(View.GONE);\n\n Like.setVisibility(View.VISIBLE);\n // make button enable\n\n }\n // linearplayer.setVisibility(View.VISIBLE);\n PlayerConstants.SONG_PAUSED = false;\n PlayerConstants.SONG_NUMBER = position;\n boolean isServiceRunning = UtilFunctions.isServiceRunning(SongService.class.getName(),\n getApplicationContext());\n if (!isServiceRunning) {\n Intent i = new Intent(getApplicationContext(), SongService.class);\n startService(i);\n // progBar.setVisibility(View.GONE);\n\n } else {\n PlayerConstants.SONG_CHANGE_HANDLER\n .sendMessage(PlayerConstants.SONG_CHANGE_HANDLER.obtainMessage());\n }\n\n changeUI();\n\n Log.d(\"TAG\", \"TAG Tapped INOUT(OUT)\");\n\n } else {\n Toast.makeText(HomeActivity.this, getResources().getString(R.string.gnrl_internet_error),\n Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int pos, long id) {\n Intent intent = new Intent(getApplicationContext(), Detail.class);\n // intent.putExtra(\"i\",listAlarm.i);\n startActivity(intent);\n\n\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View v, int position, long id) {\n intent.putExtra(\"path_MP\",mangaList.get(position).path);\n intent.putExtra(\"imagaUrl_MP\",mangaList.get(position).imageUrl);\n intent.putExtra(\"name_MP\",mangaList.get(position).name);\n startActivity(intent);\n }", "@Override\n public void onItemClick(View view, int position) {\n if (HomeActivity.ListTrackadAdaptor != null) {\n HomeActivity.selectessong = -1;\n HomeActivity.selecttopsong = -1;\n HomeActivity.ListTrackadAdaptor.notifyDataSetInvalidated();\n }\n if (HomeActivity.topTwentyAdaptor != null) {\n HomeActivity.selectessong = -1;\n HomeActivity.selecttopsong = -1;\n\n HomeActivity.topTwentyAdaptor.notifyDataSetInvalidated();\n }\n if (position >= mPlaylistObjects.size()) {\n position = position % mPlaylistObjects.size();\n }\n Intent albumIntent = new Intent(HomeActivity.this, AlbumTabsActivity.class);\n albumIntent.putExtra(\"album\", mPlaylistObjects.get(position));\n startActivity(albumIntent);\n\n }", "@Override\n public void onItemClicked(RecyclerView recyclerView, int position, View v) {\n Toast.makeText(getApplicationContext(), znamkyItemList.get(position).popis, Toast.LENGTH_LONG).show();\n\n }", "@Override\n protected void onListItemClick(ListView l, View v, int position, long id)\n {\n String selection = l.getItemAtPosition(position).toString();\n Toast.makeText(this, selection, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onListItemClicked(int position) {\n\n }", "@Override\n public void onStart() {\n super.onStart();\n getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> av, View v, int pos,\n long id) {\n\n // TODO Auto-generated method stub\n Toast.makeText(getActivity(), data.get(pos).get(\"Desc\"), Toast.LENGTH_SHORT).show();\n Intent i = new Intent(getActivity(), DetailActivity.class);\n i.putExtra(\"Play\",data.get(pos).get(\"Desc\"));\n i.putExtra(\"Detail\",data.get(pos).get(\"Player\"));\n i.putExtra(\"Category\",\"Diversity\");\n i.putExtra(\"Img\",data.get(pos).get(\"Imagemain\"));\n startActivity(i);\n }\n });\n }", "@Override \n protected void onListItemClick(ListView l, View v, int position, long id) {\n mPath = filePaths.get(position);\n }", "@Override\n public void onListItemClick(ListView l, View v, int position, long id) {\n Log.i(\"LoaderCustom\", \"Item clicked: \" + id);\n }", "@Override\n public void onListItemClick(ListView l, View v, int position, long id) {\n super.onListItemClick(l, v, position, id);\n SkillModel md = (SkillModel) l.getAdapter().getItem(position);\n //SkillModel md = ((pro_adapter)getListAdapter()).getItem(position);\n String pos = Integer.toString(position);\n Log.d(\"click\", pos);\n com.itemSelected(md.id);\n\n\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Toast.makeText(Cardio.this,cardios.get(position).getTitle(), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n \tSystem.out.println(\"ss1ss\");\n //Toast.makeText(ListViewActivity.this, title[mPosition], Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n mLastItemPositionInt = getAdapterPosition();\n\n// mSongDetailItemImageButton.setOnClickListener(new View.OnClickListener() {\n// @Override\n// public void onClick(View v) {\n// PopupMenu popupMenu = new PopupMenu(mainActivity.getApplicationContext(), v);\n// popupMenu.inflate(R.menu.menu_favorite_song_item);\n// popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n// @Override\n// public boolean onMenuItemClick(MenuItem item) {\n// if(mListFavoriteSongAdapter.get(mLastItemPositionInt).isFavoriteSong()){\n//\n// }\n// switch (item.getItemId()) {\n// case R.id.remove_favorite_song_item:\n// deleteSongFromDataBase(mLastItemPositionInt);\n// }\n// return false;\n// }\n// });\n// popupMenu.show();\n// }\n// });\n\n //Theo chieu doc => Show small playing area\n if (v.getResources().getConfiguration().orientation != Configuration.ORIENTATION_LANDSCAPE) {\n// //Get position of item\n// mLastItemPositionInt = getAdapterPosition();\n\n mainActivity.getmMediaService().setListSongService(mListFavoriteSongAdapter);\n\n //play Media\n mainActivity.getmMediaService().playMedia(mListFavoriteSongAdapter.get(mLastItemPositionInt));\n\n //Add Current Song to Database\n// addSongToDataBase(mainActivity.getmMediaService().getmMediaPosition());\n\n //Delete Current Song from Database\n// deleteSongFromDataBase(mLastItemPositionInt);\n\n //UpDate data on View\n notifyDataSetChanged();\n //Show small playing area\n mainActivity.getmFavoriteSongFragment().showSmallPlayingArea();\n //Update UI in AllSongFragment\n mainActivity.getmFavoriteSongFragment().upDateSmallPlayingRelativeLayout();\n } else { //Theo chieu ngang => khong hien thi small playing area\n mLastItemPositionInt = getAdapterPosition();\n mainActivity.getmMediaService().playMedia(mListFavoriteSongAdapter.get(mLastItemPositionInt));\n notifyDataSetChanged();\n }\n }", "void onListFragmentInteraction(AudioItem item);", "@Override\r\n\tpublic void onSongListDeleteClick(View v) {\n\t\tint position = (Integer) ((ImageView)v).getTag();\r\n\t\tMPService.SongList.remove(position);\r\n\t\tadapter.notifyDataSetChanged();\r\n\t\ttv_songlist.setText(\"播放列表(\" + MPService.SongList.size() + \")\" );\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n Intent i = new Intent(getActivity(), MediaDetailActivity.class);\n Media media = lectures.get(position);\n i.putExtra(\"url\", media.getUrl());\n i.putExtra(\"type\", media.type);\n i.putExtra(\"author\", media.author);\n i.putExtra(\"author_image_url\", media.getImageUrl());\n i.putExtra(\"name\", media.getName());\n startActivity(i);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String songName = songsInAlbum.get(position).getmSongTitle();\n\n //get name of artist that was clicked\n String artistName = songsInAlbum.get(position).getmArtist();\n\n // get Id of image view containing correct album cover\n int albumCoverId = songsInAlbum.get(position).getmAlbumCover();\n\n //Create explicit Intent to navigate to Now Playing Activity\n //Pass this string with the intent to ensure correct song list is opened in new Activity\n Intent nowPlayingIntent = new Intent(CurrentAlbumActivity.this, NowPlayingActivity.class);\n nowPlayingIntent.putExtra(Constants.SONG_TITLE, songName);\n nowPlayingIntent.putExtra(Constants.ARTIST, artistName);\n nowPlayingIntent.putExtra(Constants.ALBUM_COVER_ID, albumCoverId);\n startActivity(nowPlayingIntent);\n\n }", "@Override\n public void onItemClick(View view, int position) {\n if (Constants.isNetworkOnline(HomeActivity.this)) {\n if (position >= NewmtrackList.size()) {\n position = position % NewmtrackList.size();\n }\n\n // audioRelative.setVisibility(View.VISIBLE);\n StopService();\n PlayerConstants.SONGS_LIST = NewmtrackList;\n Log.e(\"list clicked \", \"here\");\n // streamService = new Intent(MainActivity.this,\n // StreamService.class);\n // startService(streamService);\n startwhellprogress();\n audioRelative.setEnabled(false);\n\n // intiPlayer(mtrackList.get(position).getTrackPath(),false);\n Log.e(\"list clicked \", \"here\");\n trackid = NewmtrackList.get(position).getTrackId();\n favo = NewmtrackList.get(position).getIsFavourite();\n if (favo.equalsIgnoreCase(\"true\")) {\n // change icon\n // make button disabled\n Like.setVisibility(View.GONE);\n\n dislike.setVisibility(View.VISIBLE);\n }\n\n if (favo.equalsIgnoreCase(\"false\")) {\n dislike.setVisibility(View.GONE);\n\n Like.setVisibility(View.VISIBLE);\n // make button enable\n\n }\n // linearplayer.setVisibility(View.VISIBLE);\n PlayerConstants.SONG_PAUSED = false;\n PlayerConstants.SONG_NUMBER = position;\n boolean isServiceRunning = UtilFunctions.isServiceRunning(SongService.class.getName(),\n getApplicationContext());\n if (!isServiceRunning) {\n Intent i = new Intent(getApplicationContext(), SongService.class);\n startService(i);\n // progBar.setVisibility(View.GONE);\n\n } else {\n PlayerConstants.SONG_CHANGE_HANDLER\n .sendMessage(PlayerConstants.SONG_CHANGE_HANDLER.obtainMessage());\n }\n\n changeUI();\n\n\n Log.d(\"TAG\", \"TAG Tapped INOUT(OUT)\");\n\n } else {\n\n Toast.makeText(HomeActivity.this, getResources().getString(R.string.gnrl_internet_error),\n Toast.LENGTH_LONG).show();\n }\n }", "public void onListItemClick(ListView list, View v, int position, long id)\n {\n Intent intent = new Intent(MainActivity.this, EventActivities.class);\n intent.putExtra(\"c\", position);\n startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://www.youtube.com/watch?v=\"+tmp.get(position).key)));\n\n\n\n }", "public void onCreateActivity(){\n\t\tlist_v = (ListView) findViewById(R.id.list_v);\n\t\tappInst = (App) getApplicationContext();\n// File dir = new File(appInst.MUSIC_PATH);\n// String[] files = dir.list();\n\t\tString textSt = \"\";\n// for(String file : files){\n// \ttextSt += (file+\"\\r\\n\");\n// }\n// text.setText(textSt);\n// text.setText(appInst.MUSIC_PATH);\n// text.setText(FileUtils.walk(appInst.MUSIC_PATH));\n// getContentResolver().query(appInst.MUSIC_PATH, projection, selection, selectionArgs, sortOrder)\n\t\tString[] proj = new String[] {\n\t\t\t\tMediaStore.Audio.Media._ID,\n\t\t\t\tMediaStore.Audio.Media.DATA,\n\t\t\t\tMediaStore.Audio.Media.DISPLAY_NAME,\n\t\t\t\tMediaStore.Audio.Media.DURATION,\n\t\t\t\tMediaStore.Audio.Media.ALBUM_ID\n\n\t\t};\n// Log.i(\">>uri\",Uri.fromParts(\"content\", appInst.MUSIC_PATH, null).toString());\n// Log.i(\">>uri\",Uri.parse(appInst.MUSIC_PATH).toString());\n// String where = MediaStore.Audio.Media.MIME_TYPE + \"= 'audio/mpeg'\" + \" AND \"+\n// \t\tMediaStore.Audio.Artists._ID +\" IN (\" +\n// \t\t\t\t\"SELECT \"+MediaStore.Audio.Media.ARTIST_ID+\" FROM AUDIO \"+\n// \t\t\t\t\"WHERE \"+MediaStore.Audio.Media.DATA +\" LIKE ?\" +\n// \t\t\")\";\n\t\tString where = MediaStore.Audio.Media.MIME_TYPE + \"= 'audio/mpeg'\" + \" AND \" +\n\t\t\t\tMediaStore.Audio.Media.DATA + \" LIKE ?\";\n\t\tString[] whereArgs = new String[]{appInst.MUSIC_PATH + \"%\"};\n\t\tCursor curs = appInst.getContentResolver().query(\n\t\t\t\tMediaStore.Audio.Media.EXTERNAL_CONTENT_URI,\n// \t\tMediaStore.Audio.Artists.EXTERNAL_CONTENT_URI,\n// \t\tUri.parse(appInst.MUSIC_PATH),\n// \t\tUri.fromParts(\"content\", appInst.MUSIC_PATH, null),\n\t\t\t\tproj,\n// \t\tnull,\n// MediaStore.Audio.Media.MIME_TYPE + \"= 'audio/mpeg'\",\n\t\t\t\twhere,\n\t\t\t\twhereArgs,\n\t\t\t\tMediaStore.Audio.Media._ID);\n\t\tfinal List<Song> songs = new ArrayList<>();\n\t\tif (curs == null) {\n\t\t\tToast.makeText(getApplicationContext(), \"query failed, handle error\", Toast.LENGTH_LONG).show();\n// Log.e(\"Cursor\", \"query failed, handle error\");\n\t\t} else if (!curs.moveToFirst()) {\n\t\t\tToast.makeText(getApplicationContext(), \"no media on the device\", Toast.LENGTH_LONG).show();\n// \tLog.e(\"Cursor\", \"no media on the device\");\n\t\t} else {\n\t\t\tdo {\n// \t\tlong id = curs.getLong(0);\n// \t\tString data = curs.getString(1);\n// \t\tString name = curs.getString(2);\n// \t\tString duration = curs.getString(3);\n// \t\ttextSt += Long.toString(id)+\";\"+data+\";\"+name+\";\"+duration+\"\\r\\n\\r\\n\";\n\t\t\t\tSong s = new Song(curs.getLong(0),curs.getString(1),curs.getString(2),curs.getString(3),curs.getLong(4));\n\t\t\t\tsongs.add(s);\n\t\t\t\tLog.i(\"song\"+s.getId(),\"data:\"+s.getData()+\";name:\"+s.getName()+\";duration:\"+s.getDuration());\n\t\t\t}while(curs.moveToNext());\n\t\t}\n\n\t\tLog.i(\"info\",\"size:\"+songs.size());\n\n\n// text.setText(textSt);\n// final AdapterPlaylistItem adapter = new AdapterPlaylistItem(this, R.layout.adapter_song, songs);\n\t\tfinal AdapterPlaylistItem adapter = new AdapterPlaylistItem(this, R.layout.adapter_song, songs);\n\t\tlist_v.setAdapter(adapter);\n\t\tlist_v.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, final View view, final int position, long id) {\n//\t\t\t\tSong s = songs.get(position);\n//\t\t\t\tToast.makeText(appInst,\n//\t\t\t\t\t \"Click ListItem path \" + s.getData()+\"; duration:\"+s.getDuration(), Toast.LENGTH_LONG)\n//\t\t\t\t\t .show();\n\t\t\t\tfinal Song item = (Song)parent.getItemAtPosition(position);\n\t\t\t\tview.animate()\n\t\t\t\t\t\t.setDuration(2000)\n\t\t\t\t\t\t.alpha(0)\n\t\t\t\t\t\t.withEndAction(new Runnable() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tsongs.remove(position);\n\t\t\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\t\t\tview.setAlpha(1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\tInteger.parseInt(\"adb\");\n\t\t\t}\n\n\t\t});\n\t}", "public void onListItemClick( ListView l, View v, int position, long id )\n {\n }", "private void giveFeedbackonitemClick() {\n ListView list = (ListView)findViewById(R.id.listView_data);\n //setting onclick listener to listen if any row is clicked\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n TextView tv = (TextView) view;\n String message = \"You clicked \"+ position + \"which is \" + tv.getText().toString();\n Toast.makeText(MainActivity.this,message, Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tString text=listview.getItemAtPosition(position)+\"\";\n\t\tToast tipsToast=Toast.makeText(this, \"position+\"+position+\"text=\"+text, Toast.LENGTH_SHORT);\n\t\ttipsToast.show();\n\t}", "@Override\n public void onItemLongClick(View view, int position) {\n\n }", "@Override\n public void onListItemClick(ListView l, View v, int position, long id) {\n super.onListItemClick(l, v, position, id);\n\n Artist selectedArtist = artists.get(position);\n String name = selectedArtist.artistName;\n String genre = selectedArtist.artistGenre;\n String label = selectedArtist.artistLabel;\n String city = selectedArtist.artistCity;\n String state = selectedArtist.artistState;\n\n mListener.displayArtist(name, genre, label, city, state);\n\n\n\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\trootnow = filelist.get(arg2);\n\t\t\t\tlistView.setAdapter((new ArrayAdapter<String>(context,\n\t\t\t\t\t\tandroid.R.layout.simple_list_item_1,\n\t\t\t\t\t\tgetItemStrings(rootnow))));\n\t\t\t\ttextView.setText(rootnow.getPath());\n\t\t\t}", "@Override\n public void onLongItemClick(View view, int position) {\n }", "@Override\n public void onItemClick(View view, int position) {\n if (Constants.isNetworkOnline(HomeActivity.this)) {\n if (position >= mtrackList.size()) {\n position = position % mtrackList.size();\n }\n // audioRelative.setVisibility(View.VISIBLE);\n StopService();\n PlayerConstants.SONGS_LIST = mtrackList;\n\n Log.e(\"list clicked \", \"here\");\n // streamService = new Intent(MainActivity.this,\n // StreamService.class);\n // startService(streamService);\n startwhellprogress();\n audioRelative.setEnabled(false);\n\n // intiPlayer(mtrackList.get(position).getTrackPath(),false);\n Log.e(\"list clicked \", \"here\");\n trackid = mtrackList.get(position).getTrackId();\n favo = mtrackList.get(position).getIsFavourite();\n if (favo.equalsIgnoreCase(\"true\")) {\n // change icon\n // make button disabled\n Like.setVisibility(View.GONE);\n\n dislike.setVisibility(View.VISIBLE);\n }\n\n if (favo.equalsIgnoreCase(\"false\")) {\n dislike.setVisibility(View.GONE);\n\n Like.setVisibility(View.VISIBLE);\n // make button enable\n\n }\n // linearplayer.setVisibility(View.VISIBLE);\n PlayerConstants.SONG_PAUSED = false;\n PlayerConstants.SONG_NUMBER = position;\n boolean isServiceRunning = UtilFunctions.isServiceRunning(SongService.class.getName(),\n getApplicationContext());\n if (!isServiceRunning) {\n Intent i = new Intent(getApplicationContext(), SongService.class);\n startService(i);\n // progBar.setVisibility(View.GONE);\n\n } else {\n PlayerConstants.SONG_CHANGE_HANDLER\n .sendMessage(PlayerConstants.SONG_CHANGE_HANDLER.obtainMessage());\n }\n\n changeUI();\n\n\n Log.d(\"TAG\", \"TAG Tapped INOUT(OUT)\");\n\n } else {\n Toast.makeText(HomeActivity.this, getResources().getString(R.string.gnrl_internet_error),\n Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l)\n {\n\n Toast.makeText(this, \"Tide Height: \" + tideItems.get(i).getPredInCm() + \" cm\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }", "public void onItemClick(AdapterView parent, View v, int position, long id) {\n Track t = results.get(position);\n Log.d(\"Track: \", t.uri);\n bowen.com.spotify_app.Track.addTrack(t, getApplicationContext(), new VolleyCallback() {\n @Override\n public void onSuccess(ArrayList<String> result) {\n Log.d(\"Response\", \"\");\n }\n });\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Album album = albumsList.get(position);\n Intent intent = new Intent(getApplicationContext(), PhotosActivity.class);\n intent.putExtra(\"album_id\", album.getId());\n intent.putExtra(\"album_name\", album.getName());\n startActivity(intent);\n }", "@Override\n public void run() {\n thisListView.setAdapter(thisAdapter);\n\n\n thisListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n Patient currentPatient = patientList.get(position);\n\n //Log.d(\"clicker: \", patientList.get(position).getCondition().toString());\n\n\n //thisIntent = new Intent(StaffActivity.this, SinglePatientView.class);\n //thisIntent.putExtra(\"patientName\", currentPatient.getpName());\n //thisIntent.putExtra(\"patientConditions\", currentPatient.getCondition().toString());\n //startActivity(thisIntent);\n\n }\n\n });\n\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View v, int position,\n\t\t\t\t\tlong id) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tTextView item_text = (TextView) v.findViewById(R.id.item_text);\n\t\t\t TextView item_infos = (TextView) v.findViewById(R.id.item_infos);\n\t\t\t \n\t\t\t Intent nextScreen = new Intent(getApplicationContext(), SongView.class);\n\t\t\t\t \n //Sending data to another Activity\n nextScreen.putExtra(\"item_text\", item_text.getText().toString());\n nextScreen.putExtra(\"item_infos\", item_infos.getText().toString());\n nextScreen.putExtra(\"item_link\", songsList.get(position).get(KEY_LINK).toString());\n \n startActivity(nextScreen);\n\t\t\t}", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view,\r\n int position, long id) {\n String Slecteditem = itemname[+position];\r\n Toast.makeText(getApplicationContext(), Slecteditem, Toast.LENGTH_SHORT).show();\r\n startActivity(new Intent(unlogin.this, product.class));\r\n }", "@Override\n public void onItemClick(View view, int position) {\n Toast.makeText(getContext(), \"You clicked \" + adapter.getItem(position) + \" on row number \" + position, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Toast.makeText(this, \"ITEM CLICKED\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t \t public void onItemClick(AdapterView<?> arg0, View arg1,int position, long arg3) {\n\t\t \t \n\t\t \t Toast.makeText(getApplicationContext(), \"Clicked at Position\"+position, Toast.LENGTH_SHORT).show();\n\t\t \t }", "public void onItemClick(AdapterView<?> parent, View view,\n \t\t\t\t int position, long id) {\n \t\t\t\t\t String text = (String) fileNames.get(position);\n \t\t\t\t\t Intent intent = new Intent(); \n \t\t\t\t\t intent.setAction(android.content.Intent.ACTION_VIEW); \n \t\t\t\t\t File file = new File(getExternalFilesDir(null) + \"/\" + codeLearnLessons.getItemAtPosition(position).toString()); \n \t\t\t\t\t intent.setDataAndType(Uri.fromFile(file), \"audio/*\"); \n \t\t\t\t\t startActivity(intent); \n \t\t\t\t }", "@Override\n public void onItemClick(AdapterView parent, View view, int position, long id) {\n String nombre = listadoArchivos.get(position).getTitulo();\n\n //extraigo del nombre la parte de la extension (3gp o mp4)\n int inicio = nombre.indexOf(\".\");\n int fin = nombre.indexOf(\"\", inicio);\n String extension = (nombre.substring(inicio + 1));\n\n if (extension.equals(\"3gp\")) {\n Intent intent = new Intent(getContext(), AudioPlayerActivity.class);\n intent.putExtra(\"titulo\", nombre);\n startActivity(intent);\n } else {\n Intent intent = new Intent(getContext(), VideoPlayerActivity.class);\n intent.putExtra(\"titulo\", nombre);\n startActivity(intent);\n }\n\n\n }", "public boolean onItemLongClick(AdapterView<?> arg0, View v,\n int index, long arg3) {\n\n String str=listview.getItemAtPosition(index).toString();\n Toast.makeText(applicationContext, \"Added to Cart: \" +str, Toast.LENGTH_LONG).show();\n checkout_arrayList.add(str);\n // Log.d(\"long click : \" +str);\n return true;\n }", "@Override\n\tprotected void onListItemClick(ListView l, View v, int position, long id) {\n\t\tString selection = l.getItemAtPosition(position).toString();\n\t\tToast.makeText(this, selection, Toast.LENGTH_LONG).show();\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String showid = ((TextView) view.findViewById(R.id.search_show_id)).getText().toString();\n Log.d(\"Show\", showid + \"\");\n new getShowInfoTask().execute(showid);\n }", "@Override\r\n public void onListItemClick(ListView l, View v, int position, long id) {\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tIntent intent = new Intent(folderActivity.this, MyDialogFragment.class);\n\t\tArrayList<SongInfo> item = listMap.get(list.get(position));\n\t\tintent.putExtra(\"abcd\",item);\n\t\tstartActivity(intent);\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\tString lastItem;\n\t\t\t\t\tStreamer s;\n\t\t\t\t\tif(intit == false){\n\t\t\t\t\t\turl2 = url + files[arg2];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif(intit == false){\n\t\t\t\t\t\t\treFiles = getList(url2);\n\t\t\t\t\t\t\tintit = true;\n\t\t\t\t\t\t\ttext1.setText(url2);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tpost = reFiles.get(arg2);\n\t\t\t\t\t\t\tlastItem = post.substring(post.length()-1, post.length());\n\t\t\t\t\t\t\t//Selected Item Check that Directory or File\n\t\t\t\t\t\t\tLog.i(\"Check List\" , url2 + \" : \" + post + \" : \" + lastItem);\n\t\t\t\t\t\t\tif(lastItem.equals(\"/\")) {\n\t\t\t\t\t\t\t\turl2 = url2 + post;\n\t\t\t\t\t\t\t\ttext1.setText(url2);\n\t\t\t\t\t\t\t\treFiles = getList(url2);\n\t\t\t\t\t\t\t}else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tToast.makeText(ListFiles.this, \"Selected Item : \" + url2+ \"/\" + post, Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ts = Streamer.getInstance();\n\t\t\t\t\t\t\t\tSmbFile file = new SmbFile(url2+ \"/\" + post, new NtlmPasswordAuthentication(null, user, pass));\n\t\t\t\t\t\t\t\ts.setStreamSrc(file, null);//the second argument can be a list of subtitle files\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tUri uri = Uri.parse(Streamer.URL + Uri.fromFile(new File(Uri.parse(url2+ \"/\" + post).getPath())).getEncodedPath());\n\t\t\t\t\t\t\t\tIntent i = new Intent(context, VideoActivity.class);\n\t\t\t\t\t\t\t\ti.setDataAndType(uri, \"video/*\");\n\t\t\t\t\t\t\t\ti.putExtra(\"smburl\", url2+\"/\"+post);\n\t\t\t\t\t\t\t\tBundle extra = new Bundle();\n\t\t\t\t\t\t\t\textra.putParcelable(\"uri\", uri);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ti.putExtras(extra);\n\t\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Log.i(\"FileList : onItemClick \", reFiles.get(arg2));\n\t\t\t\t\t\tlv.setAdapter(new ArrayAdapter<String>(ListFiles.this, android.R.layout.simple_list_item_1, reFiles ));\n\t\t\t\t\t\t//Press Back Button and return value 2\n\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n protected void onListItemClick(ListView listView, View view, int position, long id) {\n Intent intent = new Intent(MedicalTestListActivity.this, mSamples[position].getActivityClass());\n intent.putExtra(\"medical_test\", mSamples[position].getTitle());\n intent.putExtra(\"patient_name\", patient.getName());\n startActivity(intent);\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position,\n long id) {\n Toast.makeText(getApplicationContext(), actorsList.get(position).getName(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1,\n int position, long arg3) {\n Toast.makeText(getApplicationContext(), strs[location][position], Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n Movie movie = mMoviesAdapter.getData().get(position);\n Intent intent = new Intent(getActivity(), MovieDetailsActivity.class)\n .putExtra(getString(R.string.movie_object_intent), movie);\n startActivity(intent);\n }", "@Override\n public void onItemLongClick(int position, View v) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tint itemPosition = position;\n\n\t\t\t\t// ListView Clicked item value\n\t\t\t\tString itemValue = (String) listView\n\t\t\t\t\t\t.getItemAtPosition(position);\n\t\t\t\t\n\t\t\t\ttestando(itemValue);\n\n\t\t\t\t// Show Alert\n\t\t\t\t/*Toast.makeText(\n\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\"Position :\" + itemPosition + \" ListItem : \"\n\t\t\t\t\t\t\t\t+ itemValue, Toast.LENGTH_LONG).show();*/\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t}", "public void onClick(View v) {\n Intent intentMenu = new Intent(getActivity(), PlaylistActivity.class);\n startActivity(intentMenu);\n PlaylistActivity.isConsumer = true;\n PlaylistActivity.isAdmin = false;\n MusicService.PlaylistName = (String) top.getText();\n top.postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(\"onConnect\");\n intent.putExtra(\"Device\", device);\n LocalBroadcastManager.getInstance(getActivity()).sendBroadcast(intent);\n }\n }, 1000); //adding one sec delay\n }", "@Override\n public void onItemLongClick(View view, int position) {\n }", "@Override\n public void onItemClick(View view, int position) {\n try {\n\n getItemInfo(view, position);\n\n } catch (Exception e) {\n\n }\n// String details=menuItems.get(position).getF1();\n// if(details!= null)\n// updateItemsDetails(details,view,position);\n\n\n }", "public void listener (){\n //Find the view which shows the ListView\n ListView elements = (ListView) findViewById(R.id.list);\n\n // Set a click listener on that View\n elements.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n // The code in this method will be executed when the numbers View is clicked on.\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n // Create a new intent to open the {@link TracksActivity}\n Intent nowPlayingIntent = new Intent(TracksActivity.this, NowPlayingActivity.class);\n MusicsElement element = (MusicsElement) arg0.getItemAtPosition(position);\n nowPlayingIntent.putExtra(\"element\", element.getmSongName());\n nowPlayingIntent.putExtra(\"musicElement\", element);\n // Start the new activity\n startActivity(nowPlayingIntent);\n }\n });\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(RecycleTestActivity.this, pos + \"\", Toast.LENGTH_SHORT)\n .show();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,int position, long id) {\n if(position == 0) {\n //code specific to first list item\n Toast.makeText(getApplicationContext(),\"Place Your First Option Code\",Toast.LENGTH_SHORT).show();\n }\n\n else if(position == 1) {\n //code specific to 2nd list item\n Toast.makeText(getApplicationContext(),\"Place Your Second Option Code\",Toast.LENGTH_SHORT).show();\n }\n\n else if(position == 2) {\n\n Toast.makeText(getApplicationContext(),\"Place Your Third Option Code\",Toast.LENGTH_SHORT).show();\n }\n else if(position == 3) {\n\n Toast.makeText(getApplicationContext(),\"Place Your Forth Option Code\",Toast.LENGTH_SHORT).show();\n }\n else if(position == 4) {\n\n Toast.makeText(getApplicationContext(),\"Place Your Fifth Option Code\",Toast.LENGTH_SHORT).show();\n }\n\n }", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\r\n Words word = wordList.get(position);\r\n //Using log statements to print the current state of an object to the logs\r\n Log.v(\"NumbersActivity\", \"Current word: \" + word);\r\n\r\n\r\n //Release the media player if it currently exits without playing to completion\r\n // because we are about to play a different sound file\r\n releaseMediaPlayer();\r\n\r\n\r\n //Request Audio Focus\r\n int result = mAudioManager.requestAudioFocus(mOnAudioFocusChangeListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);\r\n if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\r\n //We have audio focus now\r\n\r\n\r\n mMediaPlayer = MediaPlayer.create(getActivity(), word.getmAudioResourceId());\r\n mMediaPlayer.start();\r\n\r\n //Set up a listener on the media player, so that we can stop and release the media player once the\r\n //sounds has finished playing.\r\n mMediaPlayer.setOnCompletionListener(mCompletionListener);\r\n\r\n }\r\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n sessionType = (String)lv.getItemAtPosition(position);\n\n }", "@Override\n public void onListItemClick(ListView l, View v, int position, long id) {\n \tsuper.onListItemClick(l, v, position, id);\n \tLog.i(TAG, \"Position: \" + position);\n \t/*String item = (String) getListAdapter().getItem(position);\n \tnew AlertDialog.Builder(this)\n \t .setTitle(\"Test\")\n \t .setMessage(item)\n \t .setPositiveButton(\"OK\",\n \t new DialogInterface.OnClickListener() {\n \t public void onClick(DialogInterface dialog, int which) {}}\n \t )\n \t .show();\n \t\n Toast.makeText(this, item + \" selected\", Toast.LENGTH_LONG).show();*/\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(context, \"You Clicked \" + result[position], Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(context, \"You Clicked \" + titles.get(position), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n System.out.println(\"JE SUIS VRAIMENT A L'ECOLE JUSQU'A PRESENT, MOI MEME JE NE COMPRENDS PAS\");\n //for (Risque r: mRisqueArrayList)\n //{\n if (position == 0)\n {\n Toast.makeText(SignalActivity.this, mRisqueArrayList.get(position).getCaracterisation(), Toast.LENGTH_SHORT).show();\n }\n //}\n }", "@Override\r\n\tprotected void onListItemClick(ListView l, View v, int position, long id) {\n\t\tsuper.onListItemClick(l, v, position, id);\r\n\t\tAsyncImageAdapter aa = (AsyncImageAdapter) l.getAdapter();\r\n\t\tString ss = (String) aa.getItem(position).toString();\r\n\t\tUserApp.showMessage(this, ss);\r\n\t}", "@Override\r\n public void onItemClick(AdapterView<?> arg0, View arg1, int nSelectIndex, long arg3) {\n\r\n LocalDefines.B_INTENT_ACTIVITY = true; // add by mai 2015-5-15\r\n if (arg0.getId() == R.id.lvPlayer_back) {\r\n\r\n if (nSelectIndex >= 0 && nSelectIndex < LocalDefines._severInfoListData.size()) {\r\n\r\n LocalDefines._PlaybackListviewSelectedPosition = nSelectIndex;\r\n DeviceInfo info = LocalDefines._severInfoListData.get(LocalDefines._PlaybackListviewSelectedPosition);\r\n if (info != null && textViewDevice != null) {\r\n boolean isZh = LocalDefines.isZh(getActivity());\r\n if (isZh) {\r\n// if (HomePageActivity.AppMode == 1) {\r\n//\r\n// if (info.getnProductId() > 0) {\r\n// } else if (info.getnProductId() == 0) {\r\n// isSearchCloudRec = false;\r\n// tvTFVideo.setTextColor(getResources().getColor(R.color.font_color_sky_blue2));\r\n// tvCloudVideo.setTextColor(getResources().getColor(R.color.font_color_gray));\r\n// } else {\r\n// isSearchCloudRec = false;\r\n// tvTFVideo.setTextColor(getResources().getColor(R.color.font_color_sky_blue2));\r\n// tvCloudVideo.setTextColor(getResources().getColor(R.color.font_color_gray));\r\n// }\r\n//\r\n// } else {\r\n// }\r\n }\r\n if (Functions.isNVRDevice(\"\" + info.getnDevID())) {\r\n llChannel.setVisibility(View.VISIBLE);\r\n } else {\r\n llChannel.setVisibility(View.GONE);\r\n }\r\n deviceInfo = info;\r\n if (info.getStrName() != null && info.getStrName().length() > 0) {\r\n textViewDevice.setText(info.getStrName());\r\n } else {\r\n textViewDevice.setText(\"\" + info.getnDevID());\r\n }\r\n bSearchType = true;\r\n ivPlayerBackType.setImageResource(R.drawable.play_back_video_back_2);\r\n\r\n btnListVisible.setVisibility(View.VISIBLE);\r\n\r\n popupListView.dismiss();\r\n }\r\n\r\n }\r\n\r\n } else if (arg0.getId() == R.id.recfile_list) {\r\n if (nSelectIndex >= 0 && nSelectIndex < fileList.size()) {\r\n\r\n if (mRecFileDownloader != null && mRecFileDownloader.isDownloading()) {\r\n // 锟斤拷锟斤拷锟斤拷锟斤拷锟截碉拷录锟斤拷锟侥硷拷\r\n Toast.makeText(getActivity(), getString(R.string.str_rec_file_cancle2), Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n if (!isCloudFileList) {\r\n // Log.i(\"TAG\", \"本地录像\");\r\n if (fileList != null && fileList.size() > 0) {\r\n SaveRecFileListToDatabase();\r\n }\r\n LocalDefines.listMapPlayerBackFile = fileList;\r\n StartPlayFile(nSelectIndex);\r\n\r\n } else {\r\n // Log.i(\"TAG\", \"云录像\");\r\n if (fileList != null && fileList.size() > 0) {\r\n SaveRecFileListToDatabase();\r\n }\r\n LocalDefines.cloudRecordFileList = fileList;\r\n if (mRecFileDownloader != null && mRecFileDownloader.isDownloading()) {\r\n // 锟斤拷锟斤拷锟斤拷锟斤拷锟截碉拷录锟斤拷锟侥硷拷\r\n Toast.makeText(getActivity(), getString(R.string.str_rec_file_cancle2), Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n startPlayCloudRecordFile(nSelectIndex);\r\n }\r\n\r\n }\r\n }\r\n\r\n }", "@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n final VodMedia item = getItem(position);\n\n ViewHolder holder;\n if (convertView == null) {\n convertView = View.inflate(context, R.layout.item_singer_song, null);\n holder = new ViewHolder(convertView);\n convertView.setTag(holder);\n } else {\n holder = (ViewHolder) convertView.getTag();\n }\n String Userpic, name, singerName;//歌曲地址,歌曲名,歌手名\n if (item != null) {\n// Userpic = item.getImgAlbumUrl();\n Userpic = null;\n ImageLoader.getImageViewLoad(holder.showimager, Userpic, R.drawable.tv_mv);\n name = item.getSongName();\n singerName = item.getSinger();\n songId = item.getSongbm();\n// musicType = item.getType();\n musicType = \"video\";\n\n try {\n double filesize = FileUtil.getFileOrFilesSize(item.getPath(), 3);\n java.text.DecimalFormat df = new java.text.DecimalFormat(\"#.#\");\n// holder.file_size.setText(\"(\" + df.format(filesize) + \"M)\");\n String size = df.format(filesize);\n if (size != null && !size.equals(\"\") && !size.equals(\"0\")) {\n holder.sizeTv.setText(\"(\" + size + \"M)\");\n } else {\n holder.sizeTv.setText(R.string.fileSize);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n if (name != null) {\n holder.tvSong.setText(name);\n }\n if (singerName != null) {\n holder.tvSinger.setText(singerName);\n }\n// if (\"video\".equals(songList.get(position).getType())) {\n holder.tag.setText(R.string.ktv_tag);\n// }else {\n// holder.tag.setText(R.string.mp3_tag);\n// }\n try {\n int num = Integer.parseInt(item.getCloudPlay(), 0);\n SongDataNumb.shownum2view(num, holder.playedNum);//点播量\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n// int statue = isDownloadList.get(position);\n//\n// isDownloadList.put(position, statue);\n holder.showimager.setOnClickListener(new OnClickListener() {// home_choose_song1/听歌\n\n @Override\n public void onClick(View arg0) {\n excuterQXRItem(1, position, songList);\n\n }\n });\n// holder.playedNum.setText(item.getName());//收听量\n// try {\n// SongDataNumb.shownum2view(Integer.parseInt(item.getName()), holder.playedNum);//收听数 tv_listen_count\n// }catch (Exception e){\n// e.printStackTrace();\n// }\n holder.statueTv.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (isDownloadList.get(position) == 3) {//练歌\n excuterQXRItem(2, position, songList);\n } else if (isDownloadList.get(position) == 1) {//取消等待\n excuterQXRItem(5, position, songList);\n } else {//下载\n excuterQXRItem(3, position, songList);\n }\n }\n });\n holder.flikerProgressBar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n excuterQXRItem(4, position, null);\n }\n });\n return convertView;\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n\t\tToast.makeText(this, \"Selected=\"+data[position], Toast.LENGTH_SHORT).show();\n\t}", "public void onItemClick(View view, int position) {\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n Log.i(\"Tag\", myfamily.get(position));\n\n Toast.makeText(MainActivity.this, \"Hello \"+myfamily.get(position), Toast.LENGTH_SHORT).show();\n }", "public void onItemClick(AdapterView<?> parent, View view, int position, long id){\n Aliment al= (Aliment) parent.getItemAtPosition(position);\r\n Toast.makeText(getApplicationContext(),\r\n \"Nom aliment : \"+al.getNom(), Toast.LENGTH_LONG).show();\r\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n Log.d(\"url-clicked\",fileu.get(position));\n // mediaPlayer.setDataSource(fileu.get(position));\n Intent i= new Intent(homepage.this,Playeractivity.class);//create an isntent for the player activity class\n i.putExtra(\"FILE_URL\",user.Lecture);//pass the lecture url to the next activity\n startActivity(i);//start the new activity\n //Intent i = new Intent(getActivity(), DiscussAddValu.class);\n // startActivity(i);\n }" ]
[ "0.7334269", "0.71548617", "0.7037446", "0.7028574", "0.7022507", "0.7009855", "0.7003436", "0.69829774", "0.69224155", "0.68708146", "0.6839841", "0.68082345", "0.67803735", "0.67229444", "0.6688203", "0.66670036", "0.6662048", "0.66324747", "0.66291887", "0.6595715", "0.6586887", "0.65855736", "0.657996", "0.656153", "0.65396607", "0.6529254", "0.6519089", "0.65043485", "0.6489306", "0.64874965", "0.6480633", "0.6479775", "0.6473714", "0.6472268", "0.6451634", "0.64196485", "0.6414972", "0.6407541", "0.64056045", "0.6385878", "0.6380885", "0.637342", "0.6358812", "0.63539326", "0.6349614", "0.6313755", "0.6313443", "0.631318", "0.6308052", "0.63041556", "0.6298187", "0.6288342", "0.62825024", "0.6281039", "0.62679386", "0.6266971", "0.626416", "0.62545866", "0.6254438", "0.6233269", "0.6226586", "0.62260693", "0.62107253", "0.62029237", "0.6201364", "0.6200667", "0.6193454", "0.61866635", "0.6179093", "0.6177911", "0.61742604", "0.61715615", "0.61705357", "0.6163676", "0.6163257", "0.6161555", "0.61609495", "0.6152049", "0.61507165", "0.6148952", "0.61447006", "0.61321104", "0.6131576", "0.61303204", "0.61163217", "0.61051005", "0.60963047", "0.60958385", "0.60936666", "0.6092798", "0.6084126", "0.6083027", "0.60800624", "0.6064607", "0.6063819", "0.6061635", "0.60599715", "0.6057653", "0.60535544", "0.6052633" ]
0.63653636
42
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView bauhs = null; setFont(bauhs, "fonts/handsean.ttf", R.id.textView); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "protected void onCreate() {\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n public void onCreate() {\n initData();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onActivityCreated---------\");\n\t\tinitData(savedInstanceState);\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}", "protected void onFirstTimeLaunched() {\n }", "@Override\n public void onActivityCreated(@Nullable Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n initData(savedInstanceState);\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n public void onCreate() {\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}", "@Override\n public void onCreate() {\n\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitViewPager();\r\n\t\t\r\n\t\tinitView();\r\n\r\n\t\tinitCursor();\r\n\t\t\r\n\t\tinithuanxin(savedInstanceState);\r\n\t\r\n \r\n\t}", "public void onCreate() {\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.caifushi_record);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitview();\n\t\tMyApplication.getInstance().addActivity(this);\n\t\t\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_recent_activity);\n\t\tsetTitleFromActivityLabel(R.id.title_text);\n\t\tsetupStartUp();\n\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }", "@Override\n public void onCreate()\n {\n\n\n }", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.act_myinfo);\n\t\tinitView();\n\t\tinitEvents();\n\n\t}", "public void onCreate();", "public void onCreate();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.auth_activity);\n connectVariablesToViews();\n listenToFields();\n WorkSpace.authorizationCompleted = false;\n }", "@Override\n public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tDisplayMetrics dm = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(dm);\n\n\t\tintScreenX = dm.widthPixels;\n\t\tintScreenY = dm.heightPixels;\n\t\tscreenRect = new Rect(0, 0, intScreenX, intScreenY);\n\n\t\thideTheWindowTitle();\n\n\t\tSampleView view = new SampleView(this);\n\t\tsetContentView(view);\n\n\t\tsetupRecord();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo();\n\t\t} else {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo();\n\t\t}\n\t\tBaseApplication.totalList.add(this);\n\t}", "@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\t\n\t\tappManager = AppManager.getAppManager();\n\t\tappManager.addActivity(this);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.listexcursionscreen);\n\n ActionsDelegator.getInstance().synchronizeActionsWithServer(this);\n runId = PropertiesAdapter.getInstance(this).getCurrentRunId();\n\n RunDelegator.getInstance().loadRun(this, runId);\n ResponseDelegator.getInstance().synchronizeResponsesWithServer(this, runId);\n\n }", "@Override\n\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}", "@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAppManager.getInstance().addActivity(this);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n\tpublic void onCreate() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate();\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.add_daily_task);\n init_database();\n init_view();\n init_click();\n init_data();\n init_picker();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t\n\t\tactivity = (MainActivity)getActivity(); \n\t\t\n\t\tactivity.setContListener(this);\n\t\t\n\t\tif(MODE == Const.MODE_DEFAULT){\n\t\t\tinitializeInfoForm();\n\t\t}else{\n\t\t\tinitializeAddEditForm();\t\t\t\n\t\t}\n\t\t\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tinitView();\n\n\t\tinitData();\n\n\t\tinitEvent();\n\n\t\tinitAnimation();\n\n\t\tshowUp();\n\t}", "@Override\n public void onCreate() {\n Thread.setDefaultUncaughtExceptionHandler(new TryMe());\n\n super.onCreate();\n\n // Write the content of the current application\n context = getApplicationContext();\n display = context.getResources().getDisplayMetrics();\n\n\n // Initializing DB\n App.databaseManager.initial(App.context);\n\n // Initialize user secret\n App.accountModule.initial();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }" ]
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879", "0.74805456", "0.7475343", "0.7469598", "0.7469598", "0.7455178", "0.743656", "0.74256307", "0.7422192", "0.73934627", "0.7370002", "0.73569906", "0.73569906", "0.7353011", "0.7347353", "0.7347353", "0.7333878", "0.7311508", "0.72663945", "0.72612154", "0.7252271", "0.72419256", "0.72131634", "0.71865886", "0.718271", "0.71728176", "0.7168954", "0.7166841", "0.71481615", "0.7141478", "0.7132933", "0.71174103", "0.7097966", "0.70979583", "0.7093163", "0.7093163", "0.7085773", "0.7075851", "0.7073558", "0.70698684", "0.7049258", "0.704046", "0.70370424", "0.7013127", "0.7005552", "0.7004414", "0.7004136", "0.69996923", "0.6995201", "0.69904065", "0.6988358", "0.69834954", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69783133", "0.6977392", "0.69668365", "0.69660246", "0.69651115", "0.6962911", "0.696241", "0.6961096", "0.69608897", "0.6947069", "0.6940148", "0.69358927", "0.6933102", "0.6927288", "0.69265485", "0.69247025" ]
0.0
-1
/ This is the entrance of the program. It takes 3 input arguments: path to the data file path to the sample file the name of the sample file If the size of input arguments is not as predicted, it will use the default paths Then it will do the following things: packs the arguments calls the MapReader to read files calls the Comparer to generate compare results(a similarity matrix) calls the GridView to present results in the GUI
public static void main(String[] args) throws IOException { String data_path; String sample_path; String sample_name; if(args.length != 3){ data_path = "data/TestData.blf"; sample_path = "samples/SlimeTorpedo.blf"; sample_name = "SlimeTorpedo"; } else{ data_path = args[0]; sample_path = args[1]; sample_name = args[2]; } compare(data_path, sample_path, sample_name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void getInputFileData(){\n\t\t\t\n\t\t\t// editable fields\n\t\t\t\n\t\t\tString directDistanceFile = \"../data/direct_distance_1.txt\";\n\t\t\tString graphInputFile = \"../data/graph_input_1.txt\";\n\t\t\t\n\t\t\t\n\t\t\t// end of editable fields\n\t\t\t\n\t\t\t\n\t\t\tFile file1 = new File(directDistanceFile);\n\t\t\tFile file2 = new File(graphInputFile);\n\t\t\tfiles.add(file1);\n\t\t\tfiles.add(file2);\n\t\t\t\n\t\t\t/*// Directory where data files are\n\t\t\tPath dataPath = Paths.get(\"../data\");\n\t\t\t\n\t\t\tString path = dataPath.toAbsolutePath().toString();\n\t\t\t\n\t\t\tFile dir = new File (path);\n\t\t\t\t\t\n\t\t\tif (dir.listFiles() == null){\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"WARNING: No files found.\");\n\n\t\t\t} else if (dir.listFiles() != null && dir.listFiles().length == 2) {\n\t\t\n\t\t\t\tfor (File file : dir.listFiles()){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfiles.add(file.getName());\n\t\t\t\t\t} catch(Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"WARNING: Data folder may only contain two files: direct_distance and\"\n\t\t\t\t\t\t+ \" graph_input. Please modify contents accordingly before proceeding for alorithm to execute.\");\n\t\t\t\t\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\tfor (File file: files){\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// store direct distances in a hashmap\n\t\t\t\t\tif (file.toString().contains(\"distance\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//FileReader fileReader = new FileReader(dataPath.toString() + \"/\" + file);\n\t\t\t\t\t\tFileReader fileReader = new FileReader(file);\n\t\t\t\t BufferedReader reader = new BufferedReader(fileReader);\n\t\t\t\t String line = null;\n\t\t\t\t \n\t\t\t\t while ((line = reader.readLine()) != null) {\n\t\t\t\t \t\n\t\t\t\t \tStringBuilder num = new StringBuilder();\n\t\t\t\t \tStringBuilder str = new StringBuilder();\n\t\t\t\t \n\t\t\t\t \tfor(char c : line.toCharArray()){\n\t\t\t\t \t\t//find the distance\n\t\t\t\t if(Character.isDigit(c)){\n\t\t\t\t num.append(c);\n\t\t\t\t } \n\t\t\t\t //find the associated letter\n\t\t\t\t else if(Character.isLetter(c)){\n\t\t\t\t str.append(c); \n\t\t\t\t }\n\t\t\t\t \t}\n\t\t\t\t \t\n\t\t\t\t \t// add values into hashmap\n\t\t\t\t \tdistance.put(str.toString(), Integer.parseInt(num.toString()));\n\t\t\t\t \t\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t reader.close(); // close the reader\n\t\t\t\t\t\t\n\t\t\t\t\t\t//System.out.println(distance);\n\t\t\t\t \n\t\t\t\t } \n\t\t\t\t\t\n\t\t\t\t\t// store inputs in a \n\t\t\t\t\telse if (file.toString().contains(\"input\")){\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//FileReader fileReader = new FileReader(dataPath.toString() + \"/\" + file);\n\t\t\t\t\t\tFileReader fileReader = new FileReader(file);\n\t\t\t\t BufferedReader reader = new BufferedReader(fileReader);\n\t\t\t\t \n\t\t\t\t String line = null;\n\t\t\t\t \n\t\t\t\t int x=0; // keeps track of line to add\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t while ((line = reader.readLine()) != null) {\n\t\t\t\t \tString[] values = line.split(\"\\\\s+\");\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t if (matrix == null) {\n\t\t\t\t \t\t //instantiate matrix\n\t\t\t\t matrix = new String[widthOfArray = values.length]\n\t\t\t\t \t\t \t\t\t[lenghtOfArray = values.length];\n\t\t\t\t }\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t// add values into the matrix\n\t\t\t\t \tfor (int i=0; i < values.length; i++){\n\t\t\t\t \t\t\n\t\t\t\t \t\tmatrix[i][x] = values[i];\n\t\t\t\t \t\t\n\t\t\t\t \t}\n\t\t\t\t \t\n\t\t\t\t \tx++; // next line\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t reader.close(); // close the reader\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Store input combinations in a hashmap\n\t\t\t\t\tint y=1; \n\t\t\t\t\twhile (y < lenghtOfArray){\n\t\t\t\t\t\t\n\t\t\t\t\t\tinputNodes.add(matrix[0][y]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int i=1; i < widthOfArray; i++){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tStringBuilder str = new StringBuilder();\n\t\t\t\t\t\t\tstr.append(matrix[0][y]);\n\t\t\t\t\t\t\tstr.append(matrix[i][0]);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint inputValue = Integer.parseInt(matrix[i][y]);\n\n\t\t\t\t\t\t\tif (inputValue > 0){\n\t\t\t\t\t\t\t\tinputMap.put(str.toString(), inputValue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ty++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"WARNING: Please check: \"+ file.toString() + \". It was not found.\");\n\t\t\t\t} \n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "static public void main(String[] args) throws IOException{\n\t\tString sample = \"h19x24\";\n\t\tString parentFolder = \"/media/kyowon/Data1/Dropbox/fCLIP/new24/\";\t\t\n\t\tString bedFileName = \"/media/kyowon/Data1/fCLIP/samples/sample3/bed/\" + sample + \".sorted.bed\";\n\t\tString dbFasta = \"/media/kyowon/Data1/RPF_Project/genomes/hg19.fa\";\n\t\tString parameterFileName = \"/media/kyowon/Data1/fCLIP/samples/sample3/bed/\" + sample + \".sorted.param\";\n\t\t\n\t\tString trainOutFileName = parentFolder + sample + \".train.csv\";\n\t\tString arffTrainOutFileName = parentFolder + sample + \".train.arff\";\n\t\t\n\t\tString cisOutFileName = parentFolder + sample + \".csv\";\n\t\tString transOutFileNameM = parentFolder + sample + \".pair.M.csv\";\n\t\tString transOutFileNameU = parentFolder + sample + \".pair.U.csv\";\n\t\tString transControlOutFileNameM = parentFolder + sample + \".pair.M.AntiSense.csv\";\n\t\tString transControlOutFileNameU = parentFolder + sample + \".pair.U.AntiSense.csv\";\n\t\tString rmskBed = \"/media/kyowon/Data1/fCLIP/Data/cat.rmsk.bed\";\n\t\tString siControlBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siControl_R1_Aligned_Sorted.bed\";\n\t\tString siKDDroshaBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siDrosha_R1_Aligned_Sorted.bed\";\n\t\tString siKDDicerBed = \"/media/kyowon/Data1/fCLIP/RNAseq/siDicer_R1_Aligned_Sorted.bed\";\n\t\t\n\t\tString cisBed5pFileName = cisOutFileName + \".5p.bed\";\n\t\tString cisBed3pFileName = cisOutFileName + \".3p.bed\";\n\t\t\n\t\tdouble unpairedScoreThreshold = 0.25; \n\t\tdouble pairedScoreThreshold = unpairedScoreThreshold/5;\n\t//\tdouble motifScoreThreshold = 0.15;\n\t\t\n\t\tint num3pPaired = 10;\n\t\tint num5pPaired = 20;\n\t\t\n\t\tString filteredTransOutFileName = transOutFileNameM + \".filtered.csv\";\n\t\t\n\t\tint blatHitThreshold = 100000000;\n\t\tint transPairSeqLength = FCLIP_Scorer.getFlankingNTNumber() *2 + 80;\n\t\t\n\t\tZeroBasedFastaParser fastaParser = new ZeroBasedFastaParser(dbFasta);\n\t\tMirGff3FileParser mirParser = new MirGff3FileParser(\"/media/kyowon/Data1/fCLIP/genomes/hsa_hg19.gff3\");\n\t\tAnnotationFileParser annotationParser = new AnnotationFileParser(\"/media/kyowon/Data1/fCLIP/genomes/hg19.refFlat.txt\");\n\t\tFCLIP_ScorerTrainer.train(parameterFileName, bedFileName, mirParser, annotationParser);\n\t\t\n\t\ttrain(trainOutFileName, arffTrainOutFileName, bedFileName, fastaParser, annotationParser, mirParser, parameterFileName, unpairedScoreThreshold, pairedScoreThreshold);\n\t\trunCis(cisOutFileName, arffTrainOutFileName, bedFileName, fastaParser, annotationParser, mirParser, parameterFileName, unpairedScoreThreshold, pairedScoreThreshold);\n\n\t\tScoredPositionOutputParser.generateBedFromCsv(cisOutFileName, cisBed5pFileName, cisBed3pFileName, false); // for fold change..\n\t//\tScoredPositionOutputParser.generateFastaForMotif(cisOutFileName, cisOutFileName + \".5p.motif.fa\", cisOutFileName + \".3p.motif.fa\",cisOutFileName + \".motif.m\", \"M\");\n\t\t\n\t\trunTrans(transOutFileNameM, transOutFileNameU, cisOutFileName, arffTrainOutFileName, blatHitThreshold, transPairSeqLength, false);\n\t\tCheckRepeat.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tCheckRepeat.generate(cisOutFileName, transOutFileNameU, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(transOutFileNameM, transOutFileNameM + \".5p.motif.fa\", transOutFileNameM + \".3p.motif.fa\");\n\t\t//GenerateCircosLinkFiles.run(transOutFileNameM + \".rmsk.csv\", transOutFileNameM + \".link.txt\");\n\t//\tCheckCoverage.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t///\tCheckCoverage.generate(cisOutFileName, transOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\trunTrans(transControlOutFileNameM, transControlOutFileNameU, cisOutFileName, arffTrainOutFileName, blatHitThreshold, transPairSeqLength, true);\t\t\n\t\tCheckRepeat.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tCheckRepeat.generate(cisOutFileName, transControlOutFileNameU, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(transControlOutFileNameM, transControlOutFileNameM + \".5p.motif.fa\", transControlOutFileNameM + \".3p.motif.fa\");\n\t//\tGenerateCircosLinkFiles.run(transControlOutFileNameM + \".rmsk.csv\", transControlOutFileNameM + \".link.txt\");\n\t\t//CheckCoverage.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t//\tCheckCoverage.generate(cisOutFileName, transControlOutFileNameM, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\tfilterTransPairs(transOutFileNameM, filteredTransOutFileName, num3pPaired, num5pPaired);\n\t\tCheckRepeat.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, rmskBed);\n\t\tScoredPairOutputParser.generateFastaForMotif(filteredTransOutFileName, filteredTransOutFileName + \".5p.motif.fa\", filteredTransOutFileName + \".3p.motif.fa\");\n\t\t//GenerateCircosLinkFiles.run(filteredTransOutFileName + \".rmsk.csv\", filteredTransOutFileName + \".link.txt\");\n\t///\tCheckCoverage.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, siKDDroshaBed, siControlBed);\n\t//\tCheckCoverage.generate(cisOutFileName, filteredTransOutFileName, cisBed5pFileName, cisBed3pFileName, siKDDicerBed, siControlBed);\n\t\t\n\t\t\n\t\t// generate background for drosha and dicer..\n\t\t\n\t\t\n\t\t// motif different conditioin?? \n\t\t\n\t\t\t\t\n\t\t//GenerateDepthsForEncodeDataSets.generate(outFileName, outFileName + \".encode.csv\", annotationParser);\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n basePath = MatcherTest.class.getClassLoader().getResource(\"\").getPath() + \"/\";\n\n String russianPath = basePath + \"russianArticlesTokenizedShort-2.txt\";\n String ruOriginalPath = basePath + \"newRussianArticles.json\";\n String englishPath = basePath + \"englishArticlesTokenized.txt\";\n String enOriginalPath = basePath + \"englishArticles.txt\";\n\n String titleExpert = basePath + \"titleExpert.json\";\n String expertPath = basePath + \"matchExpert.json\";\n String articlePath = basePath + \"testMatchRussian3.json\";\n\n getRussianTokenized(russianPath);\n getRussianOriginal(ruOriginalPath);\n getEnglishTokenized(englishPath);\n getEnglishOriginal(enOriginalPath);\n// matchTitles(titleExpert);\n// matchArticles(articlePath);\n// matchTest(expertPath, articlePath);\n matchArticlesRussian(articlePath);\n ArticleClass.PlayMusic();\n }", "public static void main(String[] args) throws IOException {\n\t\tsetup();\r\n\r\n\t\t// invoke method to sort (external multiway)\r\n\t\tsortInputExternalMerge();\r\n\r\n\t\t// invoke method to sort (external multiway)\r\n\t\t//sortInputBuiltIn();\r\n\r\n\t\t// visualize results\r\n\t\tmonitor.render(new SimpleTextRenderer());\r\n\r\n\t\t// shutdown measurement framework\r\n\t\ttearDown();\r\n\t}", "public static void main(String[] args) throws Exception {\n // TODO Auto-generated method stub\n if (args.length != 3) {\n System.err.println(\"Enter valid number of arguments <Inputdirectory> <Outputlocation>\");\n System.exit(0);\n }\n ToolRunner.run(new Configuration(), new MovieLensTopMovies(), args);\n }", "public static void main(String[] args) {\n\t\tCalculatorFacade cFacade = new CalculatorFacade();\r\n\t\ttry {\r\n\r\n\t\t\tcFacade.doProcessData(Constants.FILE_NAME, args[2], args[4],\r\n\t\t\t\t\targs[6], args[8]);\r\n\t\t} catch (FileReadException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tcatch (ArrayIndexOutOfBoundsException e) {\r\n\t\t\tSystem.out\r\n\t\t\t.println(\"**************** Invalid Input **********************\");\r\n\t\t\tSystem.out\r\n\t\t\t.println(\"****************GroupByColumn=Rating CalculationColumns= WTX | SUM : SOX | AVG**********************\");\r\n\t\t\tSystem.out\r\n\t\t\t.println(\"****************Giving Default Input**********************\");\r\n\t\t\ttry {\r\n\t\t\t\t//cFacade.doProcessData(Constants.FILE_NAME, \"WTX\", \"SUM\", \"SOX\",\t\"AVG\");\r\n\t\t\t\tcFacade.doProcessData(Constants.FILE_NAME, \"WTX\", Constants.SUM, \"SOX\", Constants.AVG);\r\n\t\t\t} catch (FileReadException e1) {\r\n\t\t\t\tSystem.out\r\n\t\t\t\t.println(\"****************Something Went Wrong with Input file**********************\");\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args)\n\t{\n\t\t// Input validation\n\t\tif(args.length < 3)\n\t\t{\n\t\t\tSystem.out.println(\"Error - Wrong input parameters\");\n\t\t\tSystem.out.println(\"Usage:\");\n\t\t\tSystem.out.println(\" in - Input file name\");\n\t\t\tSystem.out.println(\" ob - Output file name for best solution\");\n\t\t\tSystem.out.println(\" ow - Output file name for worst solution\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\t// Argument extraction\n\t\tString inputFile = args[0];\n\t\tString outputFileBest = args[1];\n\t\tString outputFileWorst = args[2];\n\t\t\n\t\tDataSource sourceInput = null;\n\t\t\n\t\ttry \n\t\t{\n\t\t\t// Load the analysis data\n\t\t\tsourceInput = new DataSource(inputFile);\n\t\t\tInstances inputData = sourceInput.getDataSet();\n\t\t\tif (inputData.classIndex() == -1)\n\t\t\t\tinputData.setClassIndex(inputData.numAttributes() - 1);\n\t\t\t\n\t\t\t// Use the best method\n\t\t\tanalyzeData(inputData, BestClassifier, outputFileBest);\n\t\t\t\n\t\t\t// Use the worst method\n\t\t\tanalyzeData(inputData, WorstClassifier, outputFileWorst);\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public static void main(String[] args) throws InputMismatchException, FileNotFoundException \r\n\t{\t\t\r\n\t\t// \r\n\t\t// Conducts multiple sorting rounds. In each round, performs the following: \r\n\t\t// \r\n\t\t// a) If asked to sort random points, calls generateRandomPoints() to initialize an array \r\n\t\t// of random points. \r\n\t\t// b) Reassigns to elements in the array sorters[] (declared below) the references to the \r\n\t\t// four newly created objects of SelectionSort, InsertionSort, MergeSort and QuickSort. \r\n\t\t// c) Based on the input point order, carries out the four sorting algorithms in one for \r\n\t\t// loop that iterates over the array sorters[], to sort the randomly generated points\r\n\t\t// or points from an input file. \r\n\t\t// d) Meanwhile, prints out the table of runtime statistics.\r\n\t\t// \r\n\t\t// A sample scenario is given in Section 2 of the project description. \r\n\t\t// \t\r\n\t\tint round = 0;\r\n\t\tboolean end = false;\r\n\t\twhile(end == false)\r\n\t\t\t{\r\n\t\t\t\tround++;\t\r\n\t\t\t\tstartRound(round, end);\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Within a sorting round, have each sorter object call the sort and draw() methods\r\n\t\t// in the AbstractSorter class. You can visualize the result of each sort. (Windows \r\n\t\t// have to be closed manually before rerun.) Also, print out the statistics table \r\n\t\t// (cf. Section 2). \r\n\t\t\r\n\t}", "public static void main( String[] args ) {\n\n infile = \"/home/daniele/Jgrassworkspace/trentino/provaPitfiller/cell/testDem\";\n\n // outfile = \"/home/moovida/grass/grassdb/flangitest/prova/cell/writetest\";\n\n // to test with svnrepo dataset uncomment the following and supply the\n // root folder\n // String jaiTestFolder =\n // \"/home/moovida/rcpdevelopment/WORKSPACES/eclipseGanimede/jai_tests/\";\n // infile = jaiTestFolder + File.separator + \"spearfish/PERMANENT/cell/elevation.dem\";\n // outfile = jaiTestFolder + File.separator + \"spearfish/PERMANENT/cell/writetest\";\n new DisplayImage(infile);\n }", "public static void main(String argv[]) {\n String infile = DATA_FILE;\n String label = \"name\";\n\n if ( argv.length > 1 ) {\n infile = argv[0];\n label = argv[1];\n }\n\n UILib.setAlloyLookAndFeel();\n\n JFrame frame = new JFrame(\"NCMS - Routing Topology\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setContentPane(demo(infile, label));\n\n frame.pack();\n frame.setVisible(true);\n }", "public static void main(String[] args) throws Exception {\n\t\t\n\t\tString magType = \"\";\n\t\tString resultsType = \"\";\n\t\tString timeZone = \"\";\n\t\tString pathToDataFile = \"\";\n\t\tString pathToResultsFile = \"\";\n\t\t\t\n\t\tString path = args[0];\n\t\t\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(path);\n\t\t\tScanner sc = new Scanner(fr);\n\t\t\t\n\t\t\tmagType = sc.nextLine();\n\t\t\tresultsType = sc.nextLine();\n\t\t\ttimeZone = sc.nextLine();\n\t\t\tpathToDataFile = sc.nextLine();\n\t\t\tpathToResultsFile = sc.nextLine();\n\t\t\t\n\t\t\tsc.close();\n\t\t\tfr.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\t\n\t\t// choose between different types of magnetometer\n\t\tswitch(magType) { \n\t\tcase \"-pa\": // Pos1-aero\n\t\t\tPOSaero pa = new POSaero(timeZone);\n\t\t\tpa.getDataFromFile(pathToDataFile);\n\t\t\tpa.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\t\n\t\t\tbreak;\n\t\tcase \"-pg\": // MMPOS \n\t\t\tMMPOS pg = new MMPOS(timeZone);\n\t\t\tpg.getDataFromFile(pathToDataFile);\n\t\t\tpg.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tcase \"-m\": // Minimag\n\t\t\tMinimag m = new Minimag(timeZone);\n\t\t\tm.getDataFromFile(pathToDataFile);\n\t\t\tm.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tcase \"-g\": // GEM\n\t\t\tGEM g = new GEM(timeZone);\n\t\t\tg.getDataFromFile(pathToDataFile);\n\t\t\tg.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tcase \"-mq\": // quantum (MVS)\n\t\t\tMVS mvs = new MVS(timeZone);\n\t\t\tmvs.getDataFromFile(pathToDataFile);\n\t\t\tmvs.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tcase \"-gs\": // Geoscan\n\t\t\tGeoscan gs = new Geoscan(timeZone);\n\t\t\tgs.getDataFromFile(pathToDataFile);\n\t\t\tgs.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Wrong type of magnetometer\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\n if (args.length < 2 || args.length > 3) {\n System.out.println(\"Usage: BuildDemoData <dir> <file> [<jenaflag>]\");\n System.out.println(\"where <dir> is the output directory\");\n System.out.println(\"where <file> is a properties file\");\n System.out.println(\"where <jenaflag> is any value\");\n System.exit(0);\n }\n\n Properties dataProps = new Properties();\n\n try {\n File props = new File(args[1]);\n FileInputStream fis = new FileInputStream(props);\n dataProps.load((InputStream) fis);\n } catch (Exception e) {\n System.err.println(e.toString());\n e.printStackTrace();\n }\n\n \tModel model = ModelFactory.createDefaultModel();\n try {\n model = getModelFromFiles(dataProps);\n } catch (Exception e) {\n System.err.println(e.toString());\n e.printStackTrace();\n }\n \n System.out.println(\"Writing no inferencing model...\");\n writeModel(model, args[0] + \"simileDemoNoInference.rdf\");\n System.out.println(\"Uninferenced model contains \" + model.size() + \" statements\");\n\n System.out.println(\"Inferencing...\"); \t\n if (args.length == 2) {\n Reasoner reasoner = new SimileReasoner();\n writeModel(reasoner.process(model), args[0] + \"simileDemoMappingInference.rdf\");\n } else {\n Reasoner reasoner = new JenaReasoner();\n writeModel(reasoner.process(model), args[0] + \"simileDemoJenaInference.rdf\");\n }\n \n System.out.println(\"Inferenced model contains \" + model.size() + \" statements\");\n }", "public static void main(String[] args) throws IOException {\n if(args.length == 0) {\r\n System.out.println(\"Proper Usage is: java inputfile.txt outputfile.txt\");\r\n System.exit(0);\r\n }\r\n\r\n //Assign agruments\r\n String inputfile=args[0];\r\n String outputfile=args[1];\r\n\r\n //Verify inputfile size is not empty\r\n if (getFileSize(inputfile)<0) {\r\n System.out.println(\"Source input filesize is empty: \");\r\n System.exit(0);\r\n }\r\n\r\n List<String> rowsInputFile = new ArrayList<String>();\r\n rowsInputFile=retrieveAllRows(inputfile);\r\n\r\n ArrayList<Integer> errorList = new ArrayList<>();\r\n ArrayList<ParseString> validRowList = new ArrayList<ParseString>();\r\n\r\n\r\n //evaluateRows=evaluateRows(rowsInputFile);\r\n\r\n //errorList =\r\n //validRowList=\r\n\r\n for (int i = 0; i < rowsInputFile.size(); i++) {\r\n\r\n String pattern = \"\\\\d{3} \\\\d{3} \\\\d{4}\";\r\n String inputString = rowsInputFile.get(i);\r\n Pattern r = Pattern.compile(pattern);\r\n Matcher m = r.matcher(inputString);\r\n\r\n if (m.find()) { //Match\r\n validRowList.add(new ParseString(rowsInputFile.get(i), true));\r\n out.println(inputString);\r\n } else { //No Match\r\n out.println(inputString);\r\n int actualline = i + 1;\r\n errorList.add(actualline);\r\n }\r\n }\r\n\r\n sortJsonArray(validRowList);\r\n\r\n JsonObject json = new JsonObject();\r\n loadValidDataJson(json,validRowList);\r\n loadErrorDataJson(json,errorList);\r\n\r\n createJsonFile(json);\r\n\r\n }", "public static void main(String[] args) {\n\t\tLinkedList<String> listData1 = new LinkedList<>();\n\t\tLinkedList<String> listData2 = new LinkedList<>();\n\n\t\topenTextFile();\n\n\t\tSystem.out.println(\"Read data from file 1\");\n\t\tlistData1 = readData(in1);\n\t\tSystem.out.println(\"Read data from file 2\");\n\t\tlistData2 = readData(in2);\n\n\t\tcheckDataMatch(listData1, listData2);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tfileName = args[0];\n\t\t//set up file name for the data:\n\t\ttry {\n\t\t\treader = new Scanner(new File(args[1]));\n\t\t\t\n\t\t\t//create a new program, then parse, print, and execute:\n\t\t\tProgram p = new Program();\n\t\t\tp.parse();\n\t\t\tp.print();\n\t\t\tSystem.out.println(\"---PROGRAM OUTPUT---\");\n\t\t\tp.execute();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"ERROR reading data file \" + args[1]);\n\t\t\te.printStackTrace();\n\t\t} finally{\n\t\t\treader.close();\n\t\t}\n\t}", "public static void main(String[] args) {\n String path = System.getProperty(\"user.dir\")+\"\\\\src\\\\test\\\\java\\\\FileHandling\\\\Data.xlsx\";\n //Xls_Reader xls = new Xls_Reader(path);\n\n // counting rows\n\n //counting cols\n\n //reading\n\n //writing\n\n }", "public static void main(String[] args) throws IOException {\n // enables dynamic data-loading for file-based sorting\n GlobalConfig.getInstance().setInMemoryObjectThreshold(1000000);\n\n\t\t// instantiates the CSV data source for reading records\n // \"cddb\" is the source identifier\n CSVSource dataSource = new CSVSource(\"febrl\", new File(\"febrl.csv\"));\n System.err.println(\" Entrada:\" + dataSource.getExtractedRecordCount());\n\n dataSource.enableHeader();\n\n // uses the id attribute for the object id - this call is optional, if no id attribute is set, DuDe will generate its own object ids\n dataSource.addIdAttributes(\"id\");\n\n\t\t//instantiates the CSV data source for reading the goldstandard\n // \"goldstandard\" is the goldstandard identifier\n CSVSource goldstandardSource = new CSVSource(\"goldstandard\", new File(\"gold_febrl.csv\"));\n goldstandardSource.enableHeader();\n\n\t\t// instantiate the gold standard\n // \"cddb\" is the source identifier\n GoldStandard goldStandard = new GoldStandard(goldstandardSource);\n goldStandard.setFirstElementsObjectIdAttributes(\"febrl1_id\");\n goldStandard.setSecondElementsObjectIdAttributes(\"febrl2_id\");\n goldStandard.setSourceIdLiteral(\"febrl\");\n \n\n \nAlgorithm algorithm = new NaiveDuplicateDetection();\n //Algorithm algorithm = new SortedNeighborhoodMethod(sortingKey, 20);\n \n\n\t\t// instantiates the naive duplicate detection algorithm\n //Algorithm algorithm = new NaiveDuplicateDetection();\n //algorithm.enableInMemoryProcessing();\n // adds the \"data\" to the algorithm\n algorithm.addDataSource(dataSource);\n\n\t\t// instantiates the similarity function\n // checks the Levenshtein distance of the CD titles\n SimilarityFunction similarityFunction = new LevenshteinDistanceFunction(\"rec2_id\");\n //LevenshteinDistanceFunction similarityFunction = new LevenshteinDistanceFunction(\"artist\");\n\n\t\t// writes the duplicate pairs onto the console by using the Json syntax\n //DuDeOutput output = new JsonOutput(System.out);\n\t\t// instantiate statistic component to calculate key figures\n // like runtime, number of comparisons, precision and recall\n StatisticComponent statistic = new StatisticComponent(goldStandard, algorithm);\n\n\t\t// the actual computation starts\n // the algorithm returns each generated pair step-by-step\n statistic.setStartTime();\n long start = System.currentTimeMillis();\n\n for (DuDeObjectPair pair : algorithm) {\n final double similarity = similarityFunction.getSimilarity(pair);\n if (similarity ==1) {\n\t\t\t\t// if it is a duplicate - print it and add it to the\n // statistic component as duplicate\n //output.write(pair);\n //System.out.println();\n System.err.println(\" SAida ++++++++++++++++++++++++++++++=\" + pair.getFirstElementObjectData().toString());\n statistic.addDuplicate(pair);\n } else {\n\t\t\t\t// if it is not a duplicate, add it to the statistic\n // component as non-duplicate\n // System.out.println(\" &&&&&&\");\n\n statistic.addNonDuplicate(pair);\n }\n }\n statistic.setEndTime();\n \n\n // Write statistics\n StatisticOutput statisticOutput = new SimpleStatisticOutput(System.out, statistic);\n statisticOutput.writeStatistics();\n System.out.println(\"Experiment finished.\" + (System.currentTimeMillis() - start) + \" ms\");\n \n\n // clean up\n dataSource.cleanUp();\n //goldStandard.close();\n }", "public static void main(String[] args) throws IOException {\n\t\tfileDatabase = new FileData<String, FileObject>();\n\t\tboolean exit = false;\n\n\t\t//Create Scanner for user input\n\t\tScanner input = new Scanner(System.in);\n\t\tScanner read = new Scanner(System.in);\n\n\t\t//Loop to get user input while exit boolean is false\n\t\tdo {\n\t\t\tSystem.out.println(\"Enter: \\n\"\n\t\t\t\t\t+ \"1 to load files\\n\"\n\t\t\t\t\t+ \"2 to do a single file search with matching word count preference\\n\"\n\t\t\t\t\t+ \"3 to do a multiple file search with matching word count preference\\n\"\n\t\t\t\t\t+ \"4 to do a single file search with matching sentence preference\\n\"\n\t\t\t\t\t+ \"5 to do a multiple file search with matching sentence preference\\n\"\n\t\t\t\t\t+ \"6 to exit\");\n\n\t\t\t//Get User Decision\n\t\t\tint decision = input.nextInt();\n\n\t\t\t//Initialize variables \n\t\t\tString[] keyWords;\n\t\t\tFileObject bestFile;\n\t\t\tString userInput;\n\t\t\tLinkedList<Entry<FileObject, Integer>> sortedList;\n\t\t\tIterator<Entry<FileObject, Integer>> it;\n\t\t\tlong startTime, endTime,duration;\n\t\t\t\n\t\t\t//Switch statement based on user input\n\t\t\tswitch(decision){\n\n\t\t\t//LOADING FILES\n\t\t\tcase 1: \n\t\t\t\t//Get Input for files to load\n\t\t\t\tSystem.out.println(\"Specify files to load or enter 'exit' to quit: \");\n\t\t\t\tSystem.out.print(\"Load: \");\n\n\t\t\t\tString[] files = read.nextLine().split(\" \");\n\t\t\t\tif(files[0] == \"exit\"){\n\t\t\t\t\texit = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//startTime = System.nanoTime();\n\t\t\t\t//Load the files\n\t\t\t\tloadFiles(files);\n\n\t\t\t\t//endTime = System.nanoTime();\n\n\t\t\t\t//duration = (endTime - startTime)/1000000; //divide by 1000000 to get milliseconds\n\t\t\t\t//System.out.println(\"Execution took: \" + duration + \" milliseconds\");\n\t\t\t\tbreak;\n\n\t\t\t\t//SINGLE FILE SEARCH (Word Count Preference)\n\t\t\tcase 2: \n\t\t\t\t//Get input for search\n\t\t\t\tSystem.out.println(\"Enter search or enter 'exit' to quit: \");\n\t\t\t\tuserInput = read.nextLine();\n\t\t\t\tif(userInput == \"exit\")\n\t\t\t\t\texit = true;\n\n\t\t\t\tkeyWords = userInput.split(\" \");\n\n\t\t\t\t//Find the file best matching the keyWords\n\t\t\t\t\n\t\t\t\t//startTime = System.nanoTime();\n\t\t\t\t\n\t\t\t\tbestFile = fileDatabase.bestMatchedWC(keyWords);\n\t\t\t\t\n\t\t\t\t//endTime = System.nanoTime();\n\n\t\t\t\t//duration = (endTime - startTime); //divide by 1000000 to get milliseconds\n\t\t\t\t//System.out.println(\"Execution took: \" + duration + \" milliseconds\");\n\n\t\t\t\tif(bestFile == null)\n\t\t\t\t\tSystem.out.println(\"No File Contains Those Keywords\");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"The file best matching your search is: \" + bestFile.getFileName());\n\t\t\t\tbreak;\n\n\t\t\t\t//MULTIPLE FILE SEARCH (Word Count Preference)\n\t\t\tcase 3: \n\t\t\t\t//Get input for search\n\t\t\t\tSystem.out.println(\"Enter search or enter 'exit' to quit: \");\n\t\t\t\tuserInput = read.nextLine();\n\t\t\t\tif(userInput == \"exit\")\n\t\t\t\t\texit = true;\n\n\t\t\t\tkeyWords = userInput.split(\" \");\n\n\t\t\t\t//Find the file best matching the keyWords\n\t\t\t\t//startTime = System.nanoTime();\n\t\t\t\tsortedList = fileDatabase.bestMatchedMultipleWC(keyWords);\n\t\t\t\t\n\t\t\t\t//endTime = System.nanoTime();\n\n\t\t\t\t//duration = (endTime - startTime); //divide by 1000000 to get milliseconds\n\t\t\t\t//System.out.println(\"Execution took: \" + duration + \" milliseconds\");\n\n\t\t\t\tSystem.out.println(\"Files matching your search by word count (in order) are: \\n\");\n\t\t\t\tit = sortedList.iterator();\n\t\t\t\twhile(it.hasNext())\n\t\t\t\t\tSystem.out.println(it.next().getKey().getFileName() + \"\\n\");\n\n\t\t\t\t//System.out.println(sortedList.toString());\n\n\t\t\t\tbreak;\n\n\t\t\t\t//SINGLE FILE SEARCH (Sentence Preference)\n\t\t\tcase 4: \n\t\t\t\t//Get input for search\n\t\t\t\tSystem.out.println(\"Enter search or enter 'exit' to quit: \");\n\t\t\t\tuserInput = read.nextLine();\n\t\t\t\tif(userInput == \"exit\")\n\t\t\t\t\texit = true;\n\n\t\t\t\tkeyWords = userInput.split(\" \");\n\n\t\t\t\t//Find the file best matching the keyWords\n\t\t\t\t//startTime = System.nanoTime();\n\t\t\t\tbestFile = fileDatabase.bestMatchedS(keyWords);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//endTime = System.nanoTime();\n\n\t\t\t\t//duration = (endTime - startTime)/1000000; //divide by 1000000 to get milliseconds\n\t\t\t\t//System.out.println(\"Execution took: \" + duration + \" milliseconds\");\n\n\t\t\t\tif(bestFile == null)\n\t\t\t\t\tSystem.out.println(\"No File Contains Those Keywords\");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"The file best matching your search is: \" + bestFile.getFileName());\n\t\t\t\tbreak;\n\n\t\t\t\t//MULTIPLE FILE SEARCH (Sentence Preference)\n\t\t\tcase 5: \n\t\t\t\t//Get input for search\n\t\t\t\tSystem.out.println(\"Enter search or enter 'exit' to quit: \");\n\t\t\t\tuserInput = read.nextLine();\n\t\t\t\tif(userInput == \"exit\")\n\t\t\t\t\texit = true;\n\n\t\t\t\tkeyWords = userInput.split(\" \");\n\n\t\t\t\t//Find the file best matching the keyWords\n\t\t\t\t//startTime = System.nanoTime();\n\t\t\t\tsortedList = fileDatabase.bestMatchedMultipleS(keyWords);\n\t\t\t\t\n\t\t\t\t//endTime = System.nanoTime();\n\n\t\t\t\t//duration = (endTime - startTime)/1000000; //divide by 1000000 to get milliseconds\n\t\t\t\t//System.out.println(\"Execution took: \" + duration + \" milliseconds\");\n\n\t\t\t\tSystem.out.println(\"Files matching your search by sentence (in order) are: \\n\");\n\t\t\t\tit = sortedList.iterator();\n\t\t\t\twhile(it.hasNext())\n\t\t\t\t\tSystem.out.println(it.next().getKey().getFileName() + \"\\n\");\n\t\t\t\tbreak;\n\n\t\t\tcase 6:\n\t\t\t\texit = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while(!exit);\n\n\t\tSystem.exit(0);\n\t}", "public static void main(String args[]) {\n CsvGrader mycg = new CsvGrader();\n //\tmycg.generateGradeDistCutTime(\"answers.csv\",\"answers.properties\",\"questionLocations.txt\",\"Event1Data\",60);\n //mycg.generateTrajectoryDistances(\"Event1Data60.csv\", \"questionLocations.txt\", \"distanceArea\", 60);\n //mycg.generateTrajectoryDistancesAndTime(\"Event1Data60.csv\", \"questionLocations.txt\", \"SURFACE\", 60);\n //int dbin = 20;\n //int tbin = 1800;\n //mycg.generateSurfacePercentages(\"SURFACE.csv\",\"s\"+dbin+\"x\"+tbin+\"\",dbin,tbin);\n //mycg.generateTrajectorySpeeds(\"Event1Data60.csv\", \"trajspeeds\");\n\n //mycg.generateAverageSpeeds(\"trajectory_points.csv\",\"averageSpeeds\");\n //mycg.generateTimeOfFirstQuestion(\"Event1Data60.csv\",\"firstQuestionTimes\");\n //mycg.generateRadarData(\"Event1Data60.csv\",\"trajectory_points.csv\",\"questionLocations.txt\",\"radarData\",60,1.92,2500);\n //mycg.generateAverageDistanceTraveledPerQuestion(\"Event1Data60.csv\",\"trajectory_points.csv\",\"AverageDistanceTraveledPerQuestion3\",1377334800000l);\n //mycg.printNumberOfTeamTypes(\"Event1Data60.csv\", \"trajectory_points.csv\", 1.92, 2500);\n //mycg.printNumberOfAnswerTypes(\"Event1Data60.csv\", \"trajectory_points.csv\",\"questionLocations.txt\",60, 1.92, 2500);\n /*for(int i= 1; i < 5; i++) {\n mycg.generateTrajectoryDistancesAndTimeForAnswerType(\"Event1Data60.csv\", \"questionLocations.txt\", \"scatter\", 60, i);\n }*/\n }", "public static void main(String[] args) throws IOException {\n\n if(args.length == 2) {\n readInputDataFromCSV(args[0]);\n winningNumber = args[1];\n File currentDirectoryOfCSVFile = new File(args[0]); // take the path, where .csv file with input data is\n findLongCommSubs();\n formResultLongCommSubs();\n multipleSortOfFinalPlayerList();\n generateCsvFileWithFinalData(currentDirectoryOfCSVFile);\n } else{\n System.out.println(\"Not valid enter! Enter two variables (path to .csv file and the winning number)!\");\n }\n }", "public static void main(String[] args) throws IOException, Exception, ExecutionException {\n\t\tString UniqueKmerPath = args[0];\n\t\tString WindowSize = args[1];\n\t\tString FastqFilePath = args[2];\n\t\tString ReadWritePath = args[3];\n\t\t//Loading file.\n\t\tint SizeOfFastqFile = CommonClass.getFileLines(FastqFilePath) / 4;\n\t\tString FastqArray[] = new String[SizeOfFastqFile];\n\t\tint RealSizeFastqArray = CommonClass.FastqToArray(FastqFilePath, FastqArray);\n\t\tSystem.out.println(\"RealSizeFastaArray:\" + RealSizeFastqArray);\n\t\t//Array.\n\t\tint SizeOfHash_A = CommonClass.getFileLines(UniqueKmerPath + \"KmerSet_A.fa\") + 100000;\n\t\tString KmerHashTable_A[][] = new String[SizeOfHash_A][2];\n\t\tint SizeOfHash_T = CommonClass.getFileLines(UniqueKmerPath + \"KmerSet_T.fa\") + 100000;\n\t\tString KmerHashTable_T[][] = new String[SizeOfHash_T][2];\n\t\tint SizeOfHash_G = CommonClass.getFileLines(UniqueKmerPath + \"KmerSet_G.fa\") + 100000;\n\t\tString KmerHashTable_G[][] = new String[SizeOfHash_G][2];\n\t\tint SizeOfHash_C = CommonClass.getFileLines(UniqueKmerPath + \"KmerSet_C.fa\") + 100000;\n\t\tString KmerHashTable_C[][] = new String[SizeOfHash_C][2];\n\t\t//initialization\n\t\tfor (int t = 0; t < SizeOfHash_A; t++) {\n\t\t\tKmerHashTable_A[t][0] = null;\n\t\t\tKmerHashTable_A[t][1] = null;\n\t\t}\n\t\tfor (int t = 0; t < SizeOfHash_T; t++) {\n\t\t\tKmerHashTable_T[t][0] = null;\n\t\t\tKmerHashTable_T[t][1] = null;\n\t\t}\n\t\tfor (int t = 0; t < SizeOfHash_G; t++) {\n\t\t\tKmerHashTable_G[t][0] = null;\n\t\t\tKmerHashTable_G[t][1] = null;\n\t\t}\n\t\tfor (int t = 0; t < SizeOfHash_C; t++) {\n\t\t\tKmerHashTable_C[t][0] = null;\n\t\t\tKmerHashTable_C[t][1] = null;\n\t\t}\n\t\tCommonClass.KmerFileToHash(UniqueKmerPath + \"KmerSet_A.fa\", KmerHashTable_A, SizeOfHash_A);\n\t\tCommonClass.KmerFileToHash(UniqueKmerPath + \"KmerSet_T.fa\", KmerHashTable_T, SizeOfHash_T);\n\t\tCommonClass.KmerFileToHash(UniqueKmerPath + \"KmerSet_G.fa\", KmerHashTable_G, SizeOfHash_G);\n\t\tCommonClass.KmerFileToHash(UniqueKmerPath + \"KmerSet_C.fa\", KmerHashTable_C, SizeOfHash_C);\n\t\t//Multiple Threads.\n\t\tExecutorService pool_1 = Executors.newFixedThreadPool(48);\n\t\tint scount = RealSizeFastqArray;\n\t\tint SplitSize = RealSizeFastqArray / 48;\n\t\tint windowSize = Integer.parseInt(WindowSize);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_1 = new RemoveTechSeqByMultipleThreads(0, windowSize, scount, FastqArray, SplitSize, 0,\n\t\t\t\tSplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T, KmerHashTable_G,\n\t\t\t\tSizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_2 = new RemoveTechSeqByMultipleThreads(1, windowSize, scount, FastqArray, SplitSize, SplitSize,\n\t\t\t\t2 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T, KmerHashTable_G,\n\t\t\t\tSizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_3 = new RemoveTechSeqByMultipleThreads(2, windowSize, scount, FastqArray, SplitSize, 2 * SplitSize,\n\t\t\t\t3 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T, KmerHashTable_G,\n\t\t\t\tSizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_4 = new RemoveTechSeqByMultipleThreads(3, windowSize, scount, FastqArray, SplitSize, 3 * SplitSize,\n\t\t\t\t4 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T, KmerHashTable_G,\n\t\t\t\tSizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_5 = new RemoveTechSeqByMultipleThreads(4, windowSize, scount, FastqArray, SplitSize, 4 * SplitSize,\n\t\t\t\t5 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T, KmerHashTable_G,\n\t\t\t\tSizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_6 = new RemoveTechSeqByMultipleThreads(5, windowSize, scount, FastqArray, SplitSize, 5 * SplitSize,\n\t\t\t\t6 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T, KmerHashTable_G,\n\t\t\t\tSizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_7 = new RemoveTechSeqByMultipleThreads(6, windowSize, scount, FastqArray, SplitSize, 6 * SplitSize,\n\t\t\t\t7 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T, KmerHashTable_G,\n\t\t\t\tSizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_8 = new RemoveTechSeqByMultipleThreads(7, windowSize, scount, FastqArray, SplitSize, 7 * SplitSize,\n\t\t\t\t8 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T, KmerHashTable_G,\n\t\t\t\tSizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_9 = new RemoveTechSeqByMultipleThreads(8, windowSize, scount, FastqArray, SplitSize, 8 * SplitSize,\n\t\t\t\t9 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T, KmerHashTable_G,\n\t\t\t\tSizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_10 = new RemoveTechSeqByMultipleThreads(9, windowSize, scount, FastqArray, SplitSize, 9 * SplitSize,\n\t\t\t\t10 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T, KmerHashTable_G,\n\t\t\t\tSizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_11 = new RemoveTechSeqByMultipleThreads(10, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t10 * SplitSize, 11 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_12 = new RemoveTechSeqByMultipleThreads(11, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t11 * SplitSize, 12 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_13 = new RemoveTechSeqByMultipleThreads(12, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t12 * SplitSize, 13 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_14 = new RemoveTechSeqByMultipleThreads(13, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t13 * SplitSize, 14 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_15 = new RemoveTechSeqByMultipleThreads(14, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t14 * SplitSize, 15 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_16 = new RemoveTechSeqByMultipleThreads(15, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t15 * SplitSize, 16 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_17 = new RemoveTechSeqByMultipleThreads(16, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t16 * SplitSize, 17 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_18 = new RemoveTechSeqByMultipleThreads(17, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t17 * SplitSize, 18 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_19 = new RemoveTechSeqByMultipleThreads(18, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t18 * SplitSize, 19 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_20 = new RemoveTechSeqByMultipleThreads(19, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t19 * SplitSize, 20 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_21 = new RemoveTechSeqByMultipleThreads(20, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t20 * SplitSize, 21 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_22 = new RemoveTechSeqByMultipleThreads(21, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t21 * SplitSize, 22 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_23 = new RemoveTechSeqByMultipleThreads(22, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t22 * SplitSize, 23 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_24 = new RemoveTechSeqByMultipleThreads(23, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t23 * SplitSize, 24 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_25 = new RemoveTechSeqByMultipleThreads(24, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t24 * SplitSize, 25 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_26 = new RemoveTechSeqByMultipleThreads(25, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t25 * SplitSize, 26 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_27 = new RemoveTechSeqByMultipleThreads(26, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t26 * SplitSize, 27 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_28 = new RemoveTechSeqByMultipleThreads(27, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t27 * SplitSize, 28 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_29 = new RemoveTechSeqByMultipleThreads(28, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t28 * SplitSize, 29 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_30 = new RemoveTechSeqByMultipleThreads(29, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t29 * SplitSize, 30 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_31 = new RemoveTechSeqByMultipleThreads(30, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t30 * SplitSize, 31 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_32 = new RemoveTechSeqByMultipleThreads(31, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t31 * SplitSize, 32 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_33 = new RemoveTechSeqByMultipleThreads(32, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t32 * SplitSize, 33 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_34 = new RemoveTechSeqByMultipleThreads(33, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t33 * SplitSize, 34 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_35 = new RemoveTechSeqByMultipleThreads(34, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t34 * SplitSize, 35 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_36 = new RemoveTechSeqByMultipleThreads(35, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t35 * SplitSize, 36 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_37 = new RemoveTechSeqByMultipleThreads(36, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t36 * SplitSize, 37 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_38 = new RemoveTechSeqByMultipleThreads(37, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t37 * SplitSize, 38 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_39 = new RemoveTechSeqByMultipleThreads(38, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t38 * SplitSize, 39 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_40 = new RemoveTechSeqByMultipleThreads(39, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t39 * SplitSize, 40 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_41 = new RemoveTechSeqByMultipleThreads(40, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t40 * SplitSize, 41 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_42 = new RemoveTechSeqByMultipleThreads(41, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t41 * SplitSize, 42 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_43 = new RemoveTechSeqByMultipleThreads(42, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t42 * SplitSize, 43 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_44 = new RemoveTechSeqByMultipleThreads(43, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t43 * SplitSize, 44 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_45 = new RemoveTechSeqByMultipleThreads(44, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t44 * SplitSize, 45 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_46 = new RemoveTechSeqByMultipleThreads(45, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t45 * SplitSize, 46 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_47 = new RemoveTechSeqByMultipleThreads(46, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t46 * SplitSize, 47 * SplitSize - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tCallable c1_48 = new RemoveTechSeqByMultipleThreads(47, windowSize, scount, FastqArray, SplitSize,\n\t\t\t\t47 * SplitSize, scount - 1, KmerHashTable_A, SizeOfHash_A, KmerHashTable_T, SizeOfHash_T,\n\t\t\t\tKmerHashTable_G, SizeOfHash_G, KmerHashTable_C, SizeOfHash_C);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_1 = pool_1.submit(c1_1);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_2 = pool_1.submit(c1_2);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_3 = pool_1.submit(c1_3);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_4 = pool_1.submit(c1_4);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_5 = pool_1.submit(c1_5);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_6 = pool_1.submit(c1_6);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_7 = pool_1.submit(c1_7);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_8 = pool_1.submit(c1_8);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_9 = pool_1.submit(c1_9);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_10 = pool_1.submit(c1_10);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_11 = pool_1.submit(c1_11);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_12 = pool_1.submit(c1_12);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_13 = pool_1.submit(c1_13);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_14 = pool_1.submit(c1_14);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_15 = pool_1.submit(c1_15);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_16 = pool_1.submit(c1_16);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_17 = pool_1.submit(c1_17);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_18 = pool_1.submit(c1_18);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_19 = pool_1.submit(c1_19);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_20 = pool_1.submit(c1_20);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_21 = pool_1.submit(c1_21);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_22 = pool_1.submit(c1_22);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_23 = pool_1.submit(c1_23);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_24 = pool_1.submit(c1_24);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_25 = pool_1.submit(c1_25);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_26 = pool_1.submit(c1_26);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_27 = pool_1.submit(c1_27);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_28 = pool_1.submit(c1_28);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_29 = pool_1.submit(c1_29);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_30 = pool_1.submit(c1_30);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_31 = pool_1.submit(c1_31);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_32 = pool_1.submit(c1_32);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_33 = pool_1.submit(c1_33);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_34 = pool_1.submit(c1_34);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_35 = pool_1.submit(c1_35);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_36 = pool_1.submit(c1_36);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_37 = pool_1.submit(c1_37);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_38 = pool_1.submit(c1_38);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_39 = pool_1.submit(c1_39);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_40 = pool_1.submit(c1_40);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_41 = pool_1.submit(c1_41);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_42 = pool_1.submit(c1_42);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_43 = pool_1.submit(c1_43);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_44 = pool_1.submit(c1_44);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_45 = pool_1.submit(c1_45);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_46 = pool_1.submit(c1_46);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_47 = pool_1.submit(c1_47);\n\t\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tFuture f1_48 = pool_1.submit(c1_48);\n\t\t//Future\n\t\tif (f1_1.get().toString() != null) {\n\t\t\tSystem.out.println(f1_1.get().toString());\n\t\t}\n\t\tif (f1_2.get().toString() != null) {\n\t\t\tSystem.out.println(f1_2.get().toString());\n\t\t}\n\t\tif (f1_3.get().toString() != null) {\n\t\t\tSystem.out.println(f1_3.get().toString());\n\t\t}\n\t\tif (f1_4.get().toString() != null) {\n\t\t\tSystem.out.println(f1_4.get().toString());\n\t\t}\n\t\tif (f1_5.get().toString() != null) {\n\t\t\tSystem.out.println(f1_5.get().toString());\n\t\t}\n\t\tif (f1_6.get().toString() != null) {\n\t\t\tSystem.out.println(f1_6.get().toString());\n\t\t}\n\t\tif (f1_7.get().toString() != null) {\n\t\t\tSystem.out.println(f1_7.get().toString());\n\t\t}\n\t\tif (f1_8.get().toString() != null) {\n\t\t\tSystem.out.println(f1_8.get().toString());\n\t\t}\n\t\tif (f1_9.get().toString() != null) {\n\t\t\tSystem.out.println(f1_9.get().toString());\n\t\t}\n\t\tif (f1_10.get().toString() != null) {\n\t\t\tSystem.out.println(f1_10.get().toString());\n\t\t}\n\t\tif (f1_11.get().toString() != null) {\n\t\t\tSystem.out.println(f1_11.get().toString());\n\t\t}\n\t\tif (f1_12.get().toString() != null) {\n\t\t\tSystem.out.println(f1_12.get().toString());\n\t\t}\n\t\tif (f1_13.get().toString() != null) {\n\t\t\tSystem.out.println(f1_13.get().toString());\n\t\t}\n\t\tif (f1_14.get().toString() != null) {\n\t\t\tSystem.out.println(f1_14.get().toString());\n\t\t}\n\t\tif (f1_15.get().toString() != null) {\n\t\t\tSystem.out.println(f1_15.get().toString());\n\t\t}\n\t\tif (f1_16.get().toString() != null) {\n\t\t\tSystem.out.println(f1_16.get().toString());\n\t\t}\n\t\tif (f1_17.get().toString() != null) {\n\t\t\tSystem.out.println(f1_17.get().toString());\n\t\t}\n\t\tif (f1_18.get().toString() != null) {\n\t\t\tSystem.out.println(f1_18.get().toString());\n\t\t}\n\t\tif (f1_19.get().toString() != null) {\n\t\t\tSystem.out.println(f1_19.get().toString());\n\t\t}\n\t\tif (f1_20.get().toString() != null) {\n\t\t\tSystem.out.println(f1_20.get().toString());\n\t\t}\n\t\tif (f1_21.get().toString() != null) {\n\t\t\tSystem.out.println(f1_21.get().toString());\n\t\t}\n\t\tif (f1_22.get().toString() != null) {\n\t\t\tSystem.out.println(f1_22.get().toString());\n\t\t}\n\t\tif (f1_23.get().toString() != null) {\n\t\t\tSystem.out.println(f1_23.get().toString());\n\t\t}\n\t\tif (f1_24.get().toString() != null) {\n\t\t\tSystem.out.println(f1_24.get().toString());\n\t\t}\n\t\tif (f1_25.get().toString() != null) {\n\t\t\tSystem.out.println(f1_25.get().toString());\n\t\t}\n\t\tif (f1_26.get().toString() != null) {\n\t\t\tSystem.out.println(f1_26.get().toString());\n\t\t}\n\t\tif (f1_27.get().toString() != null) {\n\t\t\tSystem.out.println(f1_27.get().toString());\n\t\t}\n\t\tif (f1_28.get().toString() != null) {\n\t\t\tSystem.out.println(f1_28.get().toString());\n\t\t}\n\t\tif (f1_29.get().toString() != null) {\n\t\t\tSystem.out.println(f1_29.get().toString());\n\t\t}\n\t\tif (f1_30.get().toString() != null) {\n\t\t\tSystem.out.println(f1_30.get().toString());\n\t\t}\n\t\tif (f1_31.get().toString() != null) {\n\t\t\tSystem.out.println(f1_31.get().toString());\n\t\t}\n\t\tif (f1_32.get().toString() != null) {\n\t\t\tSystem.out.println(f1_32.get().toString());\n\t\t}\n\t\tif (f1_33.get().toString() != null) {\n\t\t\tSystem.out.println(f1_33.get().toString());\n\t\t}\n\t\tif (f1_34.get().toString() != null) {\n\t\t\tSystem.out.println(f1_34.get().toString());\n\t\t}\n\t\tif (f1_35.get().toString() != null) {\n\t\t\tSystem.out.println(f1_35.get().toString());\n\t\t}\n\t\tif (f1_36.get().toString() != null) {\n\t\t\tSystem.out.println(f1_36.get().toString());\n\t\t}\n\t\tif (f1_37.get().toString() != null) {\n\t\t\tSystem.out.println(f1_37.get().toString());\n\t\t}\n\t\tif (f1_38.get().toString() != null) {\n\t\t\tSystem.out.println(f1_38.get().toString());\n\t\t}\n\t\tif (f1_39.get().toString() != null) {\n\t\t\tSystem.out.println(f1_39.get().toString());\n\t\t}\n\t\tif (f1_40.get().toString() != null) {\n\t\t\tSystem.out.println(f1_40.get().toString());\n\t\t}\n\t\tif (f1_41.get().toString() != null) {\n\t\t\tSystem.out.println(f1_41.get().toString());\n\t\t}\n\t\tif (f1_42.get().toString() != null) {\n\t\t\tSystem.out.println(f1_42.get().toString());\n\t\t}\n\t\tif (f1_43.get().toString() != null) {\n\t\t\tSystem.out.println(f1_43.get().toString());\n\t\t}\n\t\tif (f1_44.get().toString() != null) {\n\t\t\tSystem.out.println(f1_44.get().toString());\n\t\t}\n\t\tif (f1_45.get().toString() != null) {\n\t\t\tSystem.out.println(f1_45.get().toString());\n\t\t}\n\t\tif (f1_46.get().toString() != null) {\n\t\t\tSystem.out.println(f1_46.get().toString());\n\t\t}\n\t\tif (f1_47.get().toString() != null) {\n\t\t\tSystem.out.println(f1_47.get().toString());\n\t\t}\n\t\tif (f1_48.get().toString() != null) {\n\t\t\tSystem.out.println(f1_48.get().toString());\n\t\t}\n\t\tSystem.out.println(\"Classification completed!\");\n\t\t//Write.\n\t\tint Lines = 0;\n\t\tfor (int v = 0; v < RealSizeFastqArray; v++) {\n\t\t\tFileWriter writer = new FileWriter(ReadWritePath, true);\n\t\t\twriter.write(\">\" + (Lines++) + \"\\n\" + FastqArray[v] + \"\\n\");\n\t\t\twriter.close();\n\t\t}\n\t\t//shutdown pool.\n\t\tFastqArray = null;\n\t\tKmerHashTable_A = null;\n\t\tKmerHashTable_T = null;\n\t\tKmerHashTable_G = null;\n\t\tKmerHashTable_C = null;\n\t\tpool_1.shutdown();\n\t}", "public static void main(String[] args) {\n try{\n File fileConfigPath;\n if(args.length==0) {\n fileConfigPath = new File(DEFAULT_CONFIG_FILE_PATH);\n }else{\n fileConfigPath = new File(args[0]);\n }\n FileReader fileReader=new FileReader(fileConfigPath);\n BufferedReader bufferedReader=new BufferedReader(fileReader);\n ArrayList<String> Contents = new ArrayList<>();\n String lineData;\n while((lineData=bufferedReader.readLine())!=null){\n Contents.add(lineData);\n }\n fileReader.close();\n runComparator(Contents.get(0),Contents.get(1),Contents.get(2));\n }catch(IOException e) {\n StatusLogger.addRecordWarningExec(e.getMessage());\n }\n }", "private void cli (String[] args)\n {\n if (args.length != 2) {\n System.out.println(\"Usage: <analyzer> input-file output-file\");\n return;\n }\n dataFilename = args[1];\n super.cli(args[0], this);\n }", "public static void main(String argv[]) throws FileNotFoundException {\n ClassLoader classLoader = MainJava.class.getClassLoader();\n\n InputStream is = new FileInputStream(classLoader.getResource(\"file/input.txt\").getFile());\n\n EngineImplementation myEngineImplementation = new EngineImplementation();\n\n //Create object of SparkDistributor\n SparkDistributor mySparkDistributor = new SparkDistributor();\n\n myDataConsumer DataConsumer = new myDataConsumer();\n\n mySparkDistributor.setDataConsumer(DataConsumer);\n\n myEngineImplementation.setModelByInputFileStream(is);\n\n myEngineImplementation.process(mySparkDistributor);\n\n }", "public static void main(String[] args) {\n\t\t//Variables\n\t\tint chunkSize = Integer.parseInt(args[1]);\n\t\tint numThreads = Integer.parseInt(args[2]);\n\t\tBufferedReader br = null;\n\t\tReadFromFile rf = new ReadFromFile();\n\t\tArrayList<String> filesInFolder = inputValidation(args);\n\n\t\t//Delete the output folder if it exists\n\t\tFile dirName = new File(\"output\");\n\t\tFile[] files = dirName.listFiles();\n\n\t\t//check if output/ already exists. If exists check for files and delete them\n\t\ttry {\n\t\t\tif (dirName.isDirectory()) {\n\t\t\t\t//Check if files are in folder that need to be deleted\n\t\t\t\tif (files != null) {\n\t\t\t\t\t//delete files in folder\n\t\t\t\t\tfor (File f : files) {\n\t\t\t\t\t\tf.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Delete the directory before before starting new run of program\n\t\t\t\tdirName.delete();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Cannot delete output directory, please try again!\");\n\t\t\tSystem.exit(2);\n\t\t}\n\n\t\t//for loop to open and read each individual file\n\t\tfor (String file : filesInFolder) {\n\t\t\ttry {\n\n\t\t\t\tFileReader reader = new FileReader(directoryName + \"\\\\\" + file);\n\t\t\t\tbr = new BufferedReader(reader);\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\trf.readFromFile(chunkSize, br, numThreads, file);\n\n\t\t}\n\n\t\t//Call getResults method to start process of combining chunk files\n\t\tgetResults();\n\t\t//Call writeResults method to write results file\n\t\twriteResults();\n\n\t\t//close any streams\n\t\ttry {\n\t\t\tbr.close();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"br did not close!\");\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString MUMmerFile = args[0];\n\t\tString ErrorEPGAcontigFile = args[1];\n\t\tString ErrorFreeEPGAcontigFile = args[2];\n\t\tString SPAdescontigFile = args[3];\n\t\tString DataName = args[4];\n\t\tString FinalEPGAcontigPath = args[5];\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile = CommonClass.getFileLines(MUMmerFile);\n\t\tString MUMerArray[] = new String[SizeOfMUMmerFile];\n\t\tint RealSizeMUMmer = CommonClass.FileToArray(MUMmerFile, MUMerArray);\n\t\tSystem.out.println(\"The real size of MUMmer is:\" + RealSizeMUMmer);\n\t\t//Load EPGA.\n\t\tint SizeOfErrorEPGAFile = CommonClass.getFileLines(ErrorEPGAcontigFile);\n\t\tString ErrorEPGAcontigArray[] = new String[SizeOfErrorEPGAFile];\n\t\tint RealSizeErrorEPGAcontig = CommonClass.FastaToArray(ErrorEPGAcontigFile, ErrorEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error EPGA assembly is:\" + RealSizeErrorEPGAcontig);\n\t\t//Load EPGA.\n\t\tint SizeOfErrorFreeEPGAFile = CommonClass.getFileLines(ErrorFreeEPGAcontigFile);\n\t\tString ErrorFreeEPGAcontigArray[] = new String[SizeOfErrorFreeEPGAFile];\n\t\tint RealSizeErrorFreeEPGAcontig = CommonClass.FastaToArray(ErrorFreeEPGAcontigFile, ErrorFreeEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error Free EPGA assembly is:\" + RealSizeErrorFreeEPGAcontig);\n\t\t//Load SPAdes.\n\t\tint SizeOfSPAdesFile = CommonClass.getFileLines(SPAdescontigFile);\n\t\tString SPAdescontigArray[] = new String[SizeOfSPAdesFile];\n\t\tint RealSizeSPAdescontig = CommonClass.FastaToArray(SPAdescontigFile, SPAdescontigArray);\n\t\tSystem.out.println(\"The real size of SPAdes assembly is:\" + RealSizeSPAdescontig);\n\t\t//Process.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor (int w = 4; w < RealSizeMUMmer; w++) {\n\t\t\tif (MUMerArray[w].charAt(0) != '#') {\n\t\t\t\tint CountSave = 0;\n\t\t\t\tString SaveTempArray[] = new String[RealSizeMUMmer];\n\t\t\t\tString[] SplitLine1 = MUMerArray[w].split(\"\\t|\\\\s+\");\n\t\t\t\tSaveTempArray[CountSave++] = MUMerArray[w];\n\t\t\t\tMUMerArray[w] = \"#\" + MUMerArray[w];\n\t\t\t\tfor (int e = w + 1; e < RealSizeMUMmer; e++) {\n\t\t\t\t\tif (MUMerArray[e].charAt(0) != '#') {\n\t\t\t\t\t\tString[] SplitLine2 = MUMerArray[e].split(\"\\t|\\\\s+\");\n\t\t\t\t\t\tif (SplitLine1[11].equals(SplitLine2[11])) {\n\t\t\t\t\t\t\tSaveTempArray[CountSave++] = MUMerArray[e];\n\t\t\t\t\t\t\tMUMerArray[e] = \"#\" + MUMerArray[e];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Mark read.\n\t\t\t\tfor (int r = 0; r < CountSave; r++) {\n\t\t\t\t\tString[] SplitLine31 = SaveTempArray[r].split(\"\\t|\\\\s+\");\n\t\t\t\t\tString[] SplitLine41 = SplitLine31[12].split(\"_\");\n\t\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine41[1]);\n\t\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tint CountCorrEPGA=0;\n\t\tString CorrEPGAContigArray[]=new String[2*(RealSizeErrorFreeEPGAcontig+RealSizeSPAdescontig)];\n\t\tint EPId = 0;\n\t\tfor (int w = 0; w < RealSizeErrorFreeEPGAcontig; w++) {\n CorrEPGAContigArray[CountCorrEPGA++]=ErrorFreeEPGAcontigArray[w];\n\t\t}\n\t\tIterator<Integer> it = hashSet.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tint EPGAIndex = it.next();\n CorrEPGAContigArray[CountCorrEPGA++]=SPAdescontigArray[EPGAIndex];\n\t\t}\n\t\t//Sort process.\n\t\tString exch=\"\";\n\t\tfor(int w=0;w<CountCorrEPGA;w++)\n\t\t{\n\t\t\tfor(int h=w+1;h<CountCorrEPGA;h++)\n\t\t\t{\n\t\t\t\tif(CorrEPGAContigArray[w].length()<CorrEPGAContigArray[h].length())\n\t\t\t\t{\n\t\t\t\t\texch=CorrEPGAContigArray[w];\n\t\t\t\t\tCorrEPGAContigArray[w]=CorrEPGAContigArray[h];\n\t\t\t\t\tCorrEPGAContigArray[h]=exch;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Delete duplicate records.\n\t\tfor(int w=0;w<CountCorrEPGA;w++)\n\t\t{\n\t\t\tfor(int h=w+1;h<CountCorrEPGA;h++)\n\t\t\t{\n\t\t \tif(CorrEPGAContigArray[w].equals(CorrEPGAContigArray[h])||CorrEPGAContigArray[w].equals(CommonClass.reverse(CorrEPGAContigArray[h])))\n\t\t\t\t{\n\t\t\t\t\tCorrEPGAContigArray[h]=\"%\"+CorrEPGAContigArray[h];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int j=0;j<CountCorrEPGA;j++)\n\t\t{\n\t\t\tif(CorrEPGAContigArray[j].charAt(0)!='%')\n\t\t\t{\n\t\t\t\t FileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/CorrEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\t writer.write(\">\" + (EPId++) + \"\\n\" + CorrEPGAContigArray[j] + \"\\n\");\n\t\t\t writer.close();\n\t\t\t}\n\t\t}\n\t\t//Free.\n\t\tMUMerArray=null;\n\t\tErrorEPGAcontigArray=null;\n\t\tErrorFreeEPGAcontigArray=null;\n\t\tSPAdescontigArray=null;\n\t\tCorrEPGAContigArray=null;\n\t}", "public static void main(String[] args) {\n\n\t\tBufferedReader br=null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(args[0]));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"The specified file \" + args[0] + \"was not found\");\n\t\t\te1.printStackTrace();\n\t\t}\n String line = \"\";\n //HashMap<String, Integer> wordmap = new HashMap<String, Integer>();\n\t\tInteger totalCount = 0;\n try {\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t totalCount++;\n\t\t\t}\n br.close();\n br = new BufferedReader(new FileReader(args[0]));\n Double multiplier = Math.log (1/totalCount.doubleValue());\n FileWriter fstream = new FileWriter(\"juice_inter_\" + args[1], true);\n\t\t\tBufferedWriter output = new BufferedWriter(fstream);\n while ((line = br.readLine()) != null) {\n\t\t\t String[] values = line.split(\":\")[1].split(\",\");\n\t\t\t String fileName = values[0];\n\t\t\t String tf_string = values[1];\n\t\t\t Double tf = Double.parseDouble(tf_string);\n\t\t\t Double result = tf * multiplier;\n\t\t\t output.write( line.split(\":\")[0]+ \" , \" + fileName + \" : \" + result + \"\\n\");\n\t\t\t \n\t\t\t}\n output.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\r\n \r\n\t\tchar runType = '\\u0000';\r\n\t\ttry {\r\n\t\t\tif( args.length <= 2){\r\n\t\t\t\trunType = 'R'; //default recursive calculation by Laplacian method\r\n\t\t\t}else{\r\n\t\t\t\trunType = args[2].charAt(0); //choice of the caller: Laplacian or iterative Gaussian\r\n\t\t\t}\r\n\t\t\tfileReader(args[0], args[1], runType);\r\n\t\t\tSystem.out.println(\"Processing Completed. Please Check the output file \" + args[1]);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(e.toString());\r\n\t\t\tSystem.out.println(\"Please specify valid file names as arguments\");\r\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\r\n\t\t\tSystem.out.println(\"Please enter the input file and the output file as \" + \"the two arguments\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) throws IOException {\n Main test = new Main();\n File dir=new File(\"/home/victor/Desktop/icampus/corrected\");\n String a[]=dir.list();\n// Arrays.sort(a, String.CASE_INSENSITIVE_ORDER);\n int i;\n UploadMySQL q = new UploadMySQL();\n for( i=0;i<a.length;i++)\n {\n\t\ttest.setInputFile(\"/home/victor/Desktop/icampus/corrected/\"+a[i]);\n System.out.println(\"file no \"+ i + \"is\"+a[i]+\"\\n\");\n\t\ttest.read(q);\n }\n System.out.println(\"Total number of files processed is \"+i);\n q=null;\n\n }", "public static void main(String[] args) {\n\tFile inputFile = new File(\".//src//inputs.txt\");\n\ttry {\n\tscanner = new Scanner(inputFile);\n\t} catch (FileNotFoundException e) {\n\tSystem.out.println(\"inputs.txt file not found\");\n\te.printStackTrace();\n\t}\n\t// Read Matrices from inputs.txt file\n\tSystem.out.println(\"Reading data from inputs.txt file placed in src directory(package)\");\n\t// Read first matrix\n\t// Read the number of rows\n\tint rows, columns;\n\trows = scanner.nextInt();\n\t// Read the number of columns\n\tcolumns = scanner.nextInt();\n\t// Read first Matrix\n\tint[][] a = readMatrix(rows, columns);\n\t// Read the second matrix\n\trows = scanner.nextInt();\n\t// Read the number of columns\n\tcolumns = scanner.nextInt();\n\t// Read first Matrix\n\tint[][] b = readMatrix(rows, columns);\n\n\t// Read the third matrix\n\trows = scanner.nextInt();\n\t// Read the number of columns\n\tcolumns = scanner.nextInt();\n\t// Read first Matrix\n\tint[][] c = readMatrix(rows, columns);\n\t// Generate a forth matrix with random number generator\n\tint[][] d = generateMatrix(rows, columns);\n\t// Print input Matrices\n\tSystem.out.println();\n\tSystem.out.println(\" ******* Matrix A *******\");\n\tprintMatrix(a);\n\tSystem.out.println();\n\tSystem.out.println(\" ******* Matrix B *******\");\n\tprintMatrix(b);\n\tSystem.out.println();\n\tSystem.out.println(\" ******* Matrix C *******\");\n\tprintMatrix(c);\n\tSystem.out.println();\n\tSystem.out.println(\" ******* Matrix D *******\");\n\tprintMatrix(d);\n\tSystem.out.println();\n\tSystem.out.println(\" ******* Transpose C *******\");\n\tprintMatrix(transpose (c));\n\tSystem.out.println();\n\tSystem.out.println(\" ******** A + B ********\");\n\tprintMatrix(add (a,b));\n\tSystem.out.println();\n\tSystem.out.println(\" ******** A * B ******** \");\n\tprintMatrix(multiply(a,b));\n\tSystem.out.println();\n\tSystem.out.println(\" ******** A - B ******** \");\n\tprintMatrix(subtract(a,b));\n\tSystem.out.println();\n\tSystem.out.println(\" ***** (A + B) - TransposeOf(C) ***** \");\n\tprintMatrix(subtract(add(a,b),transpose(c)));\n\tSystem.out.println();\n\tSystem.out.println(\" ***** ((A + B) - TransposeOf(C)) * A ***** \");\n\tprintMatrix(multiply(subtract(add(a,b),transpose(c)),a));\n\tSystem.out.println();\n\tSystem.out.println(\" ***** (((A + B) - TransposeOf(C)) * A) + D ***** \");\n\tprintMatrix(add(multiply(subtract(add(a,b),transpose(c)),a),d));\n\tSystem.out.println();\n\tSystem.out.println(\"***** Minimum Element in (((A + B) - TransposeOf(C)) * A) + D *****\");\n\tSystem.out.println(\"Minimum Element =\"+minOfElements(add(multiply(subtract(add(a,b),transpose(c)),a),d)));\n\tSystem.out.println();\n\tSystem.out.println(\"***** Sum of Elements in (((A + B) - TransposeOf(C)) * A) + D *****\");\n\tSystem.out.println(\"Sum of elements = \"+sumOfElements(add(multiply(subtract(add(a,b),transpose(c)),a),d)));\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString groundTruthPath = \"C:/Users/15T-J000/Desktop/Malware_Classes_Ground_Truth.csv\";\n\t\tString resultPath = \"C:/Users/15T-J000/Desktop/sysnumresult.csv\";\n\t\tString outPath = \"C:/Users/15T-J000/Desktop/correction.csv\";\n\t\t\n\t\tint[] eachResult = {16, 17}; // Don't count index and name column (-2)\n\t\t\n\t\tMapping mapping = new Mapping();\n\t\tmapping.read(groundTruthPath, resultPath);\n\t\tmapping.compare(outPath, 17);\n\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tFileManager csv=new FileManager();\n\t\t\n\t\tcsv.readListOfFiles();\n\t\tcsv.readFile();\n\t\t\n\t\t//csv.tk.displayTokens();\n\t\t//csv.it.displayHashMap();\n\t\tcsv.writeTokensToFile(csv.tk.tokensMap);\n\t\tcsv.matcher.longestSequence(csv.it);\t//csv.it.intTokenList was supposed to be passed but since I need csv.it object in caller so im passing it\n\t\tcsv.matcher.displaySubsequences(csv.it);\n\t\tcsv.writeMatchesToFile(csv.matcher.resultMap,csv.it);\n\t System.out.println(\"\\nProgram Ends \");\n\t \t \n\t}", "public static void main(String[] args) throws Exception {\n DataSet houseVotes = DataParser.parseData(HouseVotes.filename, HouseVotes.columnNames, HouseVotes.dataTypes, HouseVotes.ignoreColumns, HouseVotes.classColumn, HouseVotes.discretizeColumns);\n DataSet breastCancer = DataParser.parseData(BreastCancer.filename, BreastCancer.columnNames, BreastCancer.dataTypes, BreastCancer.ignoreColumns, BreastCancer.classColumn, HouseVotes.discretizeColumns);\n DataSet glass = DataParser.parseData(Glass.filename, Glass.columnNames, Glass.dataTypes, Glass.ignoreColumns, Glass.classColumn, Glass.discretizeColumns);\n DataSet iris = DataParser.parseData(Iris.filename, Iris.columnNames, Iris.dataTypes, Iris.ignoreColumns, Iris.classColumn, Iris.discretizeColumns);\n DataSet soybean = DataParser.parseData(Soybean.filename, Soybean.columnNames, Soybean.dataTypes, Soybean.ignoreColumns, Soybean.classColumn, Soybean.discretizeColumns);\n \n /*\n * The contents of the DataSet are not always random.\n * You can shuffle them using Collections.shuffle()\n */\n \n Collections.shuffle(houseVotes);\n Collections.shuffle(breastCancer);\n Collections.shuffle(glass);\n Collections.shuffle(iris);\n Collections.shuffle(soybean);\n /*\n * Lastly, you want to split the data into a regular dataset and a testing set.\n * DataSet has a function for this, since it gets a little weird.\n * This grabs 10% of the data in the dataset and sets pulls it out to make the testing set.\n * This also means that the remaining 90% in DataSet can serve as our training set.\n */\n\n DataSet houseVotesTestingSet = houseVotes.getTestingSet(.1);\n DataSet breastCancerTestingSet = breastCancer.getTestingSet(.1);\n DataSet glassTestingSet = glass.getTestingSet(.1);\n DataSet irisTestingSet = iris.getTestingSet(.1);\n DataSet soybeanTestingSet = soybean.getTestingSet(.1);\n \n //KNN\n //House Votes\n System.out.println(HouseVotes.class.getSimpleName());\n KNN knn = new KNN(houseVotes, houseVotesTestingSet, HouseVotes.classColumn, 3);\n String[] knnHouseVotes = new String[houseVotesTestingSet.size()];\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n knnHouseVotes[i] = knn.classify(houseVotesTestingSet.get(i));\n }\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n if(knnHouseVotes[i].equals(houseVotesTestingSet.get(i)[HouseVotes.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnHouseVotes[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnHouseVotes[i] + \", actually \" + houseVotesTestingSet.get(i)[HouseVotes.classColumn].value() + \")\");\n }\n }\n \n //Breast Cancer\n System.out.println(BreastCancer.class.getSimpleName());\n knn = new KNN(breastCancer, breastCancerTestingSet, BreastCancer.classColumn, 3);\n String[] knnBreastCancer = new String[breastCancerTestingSet.size()];\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n knnBreastCancer[i] = knn.classify(breastCancerTestingSet.get(i));\n }\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n if(knnBreastCancer[i].equals(breastCancerTestingSet.get(i)[BreastCancer.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnBreastCancer[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnBreastCancer[i] + \", actually \" + breastCancerTestingSet.get(i)[BreastCancer.classColumn].value() + \")\");\n }\n }\n \n //Glass\n System.out.println(Glass.class.getSimpleName());\n knn = new KNN(glass, glassTestingSet, Glass.classColumn, 3);\n String[] knnGlass = new String[glassTestingSet.size()];\n for(int i = 0; i < glassTestingSet.size(); i++) {\n knnGlass[i] = knn.classify(glassTestingSet.get(i));\n }\n for(int i = 0; i < glassTestingSet.size(); i++) {\n if(knnGlass[i].equals(glassTestingSet.get(i)[Glass.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnGlass[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnGlass[i] + \", actually \" + glassTestingSet.get(i)[Glass.classColumn].value() + \")\");\n }\n }\n \n //Iris\n System.out.println(Iris.class.getSimpleName());\n knn = new KNN(iris, irisTestingSet, Iris.classColumn, 3);\n String[] knnIris = new String[irisTestingSet.size()];\n for(int i = 0; i < irisTestingSet.size(); i++) {\n knnIris[i] = knn.classify(irisTestingSet.get(i));\n }\n for(int i = 0; i < irisTestingSet.size(); i++) {\n if(knnIris[i].equals(irisTestingSet.get(i)[Iris.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnIris[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnIris[i] + \", actually \" + irisTestingSet.get(i)[Iris.classColumn].value() + \")\");\n }\n }\n \n //Soybean\n System.out.println(Soybean.class.getSimpleName());\n knn = new KNN(soybean, soybeanTestingSet, Soybean.classColumn, 3);\n String[] knnSoybean = new String[soybeanTestingSet.size()];\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n knnSoybean[i] = knn.classify(soybeanTestingSet.get(i));\n }\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n if(knnSoybean[i].equals(soybeanTestingSet.get(i)[Soybean.classColumn].value())) {\n System.out.println(\"KNN: Correct (\" + knnSoybean[i] + \")\");\n } else {\n System.out.println(\"KNN: Incorrect (\" + knnSoybean[i] + \", actually \" + soybeanTestingSet.get(i)[Soybean.classColumn].value() + \")\");\n }\n }\n \n \n /*\n * Lets setup ID3:\n * DataSet, TestSet, column with the class categorization. (republican, democrat in this case)\n */\n\n System.out.println(HouseVotes.class.getSimpleName());\n ID3 id3 = new ID3(houseVotes, houseVotesTestingSet, HouseVotes.classColumn);\n String[] id3HouseVotes = new String[houseVotesTestingSet.size()];\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n id3HouseVotes[i] = id3.classify(houseVotesTestingSet.get(i));\n }\n for(int i = 0; i < houseVotesTestingSet.size(); i++) {\n if(id3HouseVotes[i].equals(houseVotesTestingSet.get(i)[HouseVotes.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3HouseVotes[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3HouseVotes[i] + \", actually \" + houseVotesTestingSet.get(i)[HouseVotes.classColumn].value() + \")\");\n }\n }\n\n System.out.println(BreastCancer.class.getSimpleName());\n id3 = new ID3(breastCancer, breastCancerTestingSet, BreastCancer.classColumn);\n String[] id3BreastCancer = new String[breastCancerTestingSet.size()];\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n id3BreastCancer[i] = id3.classify(breastCancerTestingSet.get(i));\n }\n for(int i = 0; i < breastCancerTestingSet.size(); i++) {\n if(id3BreastCancer[i].equals(breastCancerTestingSet.get(i)[BreastCancer.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3BreastCancer[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3BreastCancer[i] + \", actually \" + breastCancerTestingSet.get(i)[BreastCancer.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Glass.class.getSimpleName());\n id3 = new ID3(glass, glassTestingSet, Glass.classColumn);\n String[] id3Glass = new String[glassTestingSet.size()];\n for(int i = 0; i < glassTestingSet.size(); i++) {\n id3Glass[i] = id3.classify(glassTestingSet.get(i));\n }\n for(int i = 0; i < glassTestingSet.size(); i++) {\n if(id3Glass[i].equals(glassTestingSet.get(i)[Glass.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Glass[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Glass[i] + \", actually \" + glassTestingSet.get(i)[Glass.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Iris.class.getSimpleName());\n id3 = new ID3(iris, irisTestingSet, Iris.classColumn);\n String[] id3Iris = new String[irisTestingSet.size()];\n for(int i = 0; i < irisTestingSet.size(); i++) {\n id3Iris[i] = id3.classify(irisTestingSet.get(i));\n }\n for(int i = 0; i < irisTestingSet.size(); i++) {\n if(id3Iris[i].equals(irisTestingSet.get(i)[Iris.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Iris[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Iris[i] + \", actually \" + irisTestingSet.get(i)[Iris.classColumn].value() + \")\");\n }\n }\n\n System.out.println(Soybean.class.getSimpleName());\n id3 = new ID3(soybean, soybeanTestingSet, Soybean.classColumn);\n String[] id3Soybean = new String[soybeanTestingSet.size()];\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n id3Soybean[i] = id3.classify(soybeanTestingSet.get(i));\n }\n for(int i = 0; i < soybeanTestingSet.size(); i++) {\n if(id3Soybean[i].equals(soybeanTestingSet.get(i)[Soybean.classColumn].value())) {\n System.out.println(\"ID3: Correct (\" + id3Soybean[i] + \")\");\n } else {\n System.out.println(\"ID3: Incorrect (\" + id3Soybean[i] + \", actually \" + soybeanTestingSet.get(i)[Soybean.classColumn].value() + \")\");\n }\n }\n }", "public static void main(String[] args) {\n\t\tMap a = preProcess(\"D:\\\\CS17Fall\\\\Machine Learning\\\\Assignment\\\\Assignment3\\\\iris.data\", \"D:\\\\CS17Fall\\\\Machine Learning\\\\Assignment\\\\Assignment3\\\\iris_processed.data\");\n\t}", "public static void main(String[] args) {\n\t\tTestingPerformanceCalculator obj= new TestingPerformanceCalculator(\"./data/gitInfoNew.txt\", \"data/Results/FinalResultSidTest1.txt\");\n\t\t//Read Gold set\n\t\tobj.goldStMap=obj.LoadGoldSet();\n\t\t//MiscUtility.showResult(10, obj.goldStMap);\n\t\t//Resd output file/ test result file\n\t\tobj.finalResult=obj.LoadTestingResult();\n\t\t//MiscUtility.showResult(20, obj.finalResult);\n\t\t\n\t\t\n\t\t//Create a ranked list\n\t\t//obj.produceRankedResult(10);\n\t\tArrayList<String> rankedFinalTestingResult=obj.produceRankedResult(10);\n\t\tContentWriter.writeContent(\"./data/testing1RankedResult.txt\", rankedFinalTestingResult);\n\t\t//call another class BLPerformanceCalc to compute\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tList<List<String>> gridData = ReadOutputFileData.readAeroData();\n\t\tGridDataUtil.printPointList(GridDataUtil.getMatrix(gridData));\n\t}", "public static void main(String[] args) {\n try {\n convert(\"d:\\\\MLDATA\\\\adult.data\", \"d:\\\\MLDATA\\\\adult_standard.csv\", \"[ \\t]*,[ \\t]*\");\n convert(\"d:\\\\MLDATA\\\\adult.test\", \"d:\\\\MLDATA\\\\adult_standard_test.csv\", \"[ \\t]*,[ \\t]*\");\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws IOException {\n\n //Reload indexes from file-system into memory as map data structure.\n System.out.println(\"Loading indexes in memory\");\n File file = new File(directoryPath + \"index.txt\");\n SearchQueries searchQueries = new SearchQueries();\n searchQueries.reLoadIndexesFromFileToIndexMap(file);\n\n System.out.println(\"Enter search query string\");\n Scanner scanner = new Scanner(System.in);\n String searchString = scanner.nextLine();\n\n System.out.println(\"Searching for matching documents...\");\n searchQueries.parseQueryStringAndSearch(searchString);\n\n searchQueries.printingSearchResults();\n\n\n }", "private void inputHandle(String[] arguments) {\n\t\tif (arguments.length != 1)\n\t\t\tSystem.err.println(\"There needs to be one argument:\\n\"\n\t\t\t\t\t+ \"directory of training data set, and test file name.\");\n\t\telse {\t\t\t\n\t\t\tinputTestFile = arguments[0];\n\t\t}\n\t}", "public static void main(String args[]){\n\t\t//parameters that can be modified\n\t\tint topicNum=100;\n\t\tString sourceID=\"1864252027/\";\n\t\tint subnetworkSize=1100;\n\t\tString dir=\"sampleTest/\"+sourceID+subnetworkSize+\"/\";\n\t\tString fileName=\"ldaInput.txt\";\n\t\tint iterationNum=1000;\n\t\t\n\t\t//read training data from file\n\t\tSystem.out.println(\"loading files\");\n\t\tGraph network=GraphOperator.getFromFile(dir+\"sample.network\");\n\t\tHashMap<String,Message>trainingStatusMap=MessageListOperator.readMessageFromFile(dir+\"trainingSet.status\");\n\t\tHashMap<String,Message>commentMap=MessageListOperator.readMessageFromFile(dir+\"samplePreDoc.comment\");\n\t\t\n\t\tDocumentAssign.relateMessageToNetwork(network,trainingStatusMap,commentMap);\n\t\tDocumentAssign.optimizedAssign(network,dir,fileName);\n\t\t\n\t\tSystem.out.println(\"Training\");\t\n\t\t//training with Optimized assignment\n\t\tLDA_InfluMax.estimationFromScratch(50/((double)topicNum),0.01,topicNum,\n\t\t\t\titerationNum,iterationNum/2,dir,fileName,50);\n\t}", "public static void main(String[] args) {\n\n String incorrectArgs = \"Please provide a single argument to this program, the path to the data file.\";\n\n if (args.length != 1) {\n abnormalTermination(incorrectArgs);\n }\n\n String path = args[0];\n try {\n String[] gridData = GridGameUtils.readData(new FileInputStream(path));\n System.out.println(GridGameUtils.countX(gridData));\n } catch (FileNotFoundException e) {\n abnormalTermination(path + \" is not a valid file.\" + incorrectArgs);\n }\n }", "public static void main(String[] args) {\r\n System.out.println(\"Starting\");\r\n try {\r\n File fastq = new File(\"data/HW4.fastq\");\r\n if (!fastq.exists()) {\r\n System.out.println(\"Can't find input file \" + fastq.getAbsolutePath());\r\n System.exit(1);\r\n }\r\n File fasta = new File(\"data/HW4.fasta\");\r\n FileConverter converter = new FileConverter(fastq, fasta);\r\n converter.convert();\r\n } catch (IOException x) {\r\n System.out.println(x.getMessage());\r\n }\r\n System.out.println(\"Done\");\r\n }", "public static void main(String[] args) {\n String filename = args[0];\n In in = new In(filename);\n\n StdDraw.enableDoubleBuffering();\n\n // initialize the two data structures with point from standard input\n PointSET brute = new PointSET();\n KdTree kdtree = new KdTree();\n Point2D p = null;\n while (!in.isEmpty()) {\n double x = in.readDouble();\n double y = in.readDouble();\n p = new Point2D(x, y);\n kdtree.insert(p);\n }\n System.out.print(kdtree.contains(p));\n \n \n }", "public static void main(String[] args)\n throws CmdLineExceptions, FileNotFoundException {\n CommandLineProcessor clp = new CommandLineProcessor(args);\n HashMap<String, ArrayList<String>> allTasks = clp.argumentSeparator(); // package neatly all flags and args into a list of HashMap\n\n Model digitalEntryDatabase = new Model(allTasks.get(CSV_ARG).get(INPUT_FILE_INDEX)); // create data model\n Controller program = new Controller(digitalEntryDatabase, allTasks); // ingest package\n\n program.executeTask(); // execute all tasks, modify data model, write to backup CSV\n Map<Integer, DigitalEntry> toDisplay = program.display(); // output final TreeMap, primary key is ID\n\n View finalView = new View(toDisplay); // Front end focus, still render on errors\n finalView.printAllEntries();\n }", "public static void main(String[] args)\r\n {\n \tString inputPath = \"Dataset\";\r\n String indexPath = \"Index\";\r\n Boolean flag = Indexing.indexing(inputPath, indexPath);\r\n \r\n if (flag == false) {\r\n \tString message = \"There was not possible to index any file.\\n\"\r\n \t + \"Please create a folder Dataset in the same path as the jar file \\n\";\r\n \tJOptionPane.showMessageDialog(new JFrame(), message, \"Indexing Error\",\r\n \t JOptionPane.ERROR_MESSAGE);\r\n }else {\r\n \tJFrame frame = new JFrame();\r\n\r\n frame.setSize(1000,900);\r\n\r\n frame.setTitle(\"Search Engine - The Strings\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLayout(new BorderLayout());\r\n frame.getContentPane().setBackground(Color.decode(\"#FFFFFF\"));\r\n\r\n JTextField searchField = new JTextField();\r\n searchField.setBounds(58, 22, 608, 20);\r\n frame.getContentPane().add(searchField);\r\n searchField.setColumns(10);\r\n\r\n \r\n \r\n JPanel panel = new JPanel();\r\n panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\r\n panel.setAutoscrolls(true);\r\n panel.setOpaque(false);\r\n frame.add(panel,BorderLayout.NORTH);\r\n\r\n JScrollPane scrollPane = new JScrollPane(panel);\r\n scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\r\n scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\r\n scrollPane.setBounds(20, 50, 900, 600);\r\n //scrollPane.setOpaque(false);\r\n scrollPane.setBackground(Color.WHITE);\r\n\r\n JPanel contentPane = new JPanel(null);\r\n contentPane.setPreferredSize(new Dimension(1000, 900));\r\n contentPane.add(scrollPane);\r\n contentPane.setOpaque(false);\r\n \r\n JButton searchButton = new JButton(\"Search\");\r\n searchButton.setBounds(695, 21, 89, 23);\r\n frame.getContentPane().add(searchButton);\r\n searchButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent arg0) {\r\n \tString queryInput = searchField.getText();\r\n\t dictionary = null;\r\n\t try {\r\n\t dictionary = SearchIndex.searching(indexPath, queryInput);\r\n\t } catch (Exception e) {\r\n\t // TODO Auto-generated catch block\r\n\t e.printStackTrace();\r\n\t }\r\n\t panel.removeAll();\r\n\t panel.revalidate();\r\n\t panel.repaint();\r\n\t if (dictionary.isEmpty()) {\r\n\t \tJLabel labelError = new JLabel(\"There are no results that match your search\");\r\n\t \tpanel.add(labelError);\r\n\t }\r\n\t \r\n\t for (ArrayList<String> val : dictionary.values()) {\r\n\t \tJPanel generalPanel = new JPanel();\r\n\t \tgeneralPanel.setOpaque(false);\r\n\t \tgeneralPanel.setLayout(new FlowLayout());\r\n\t JLabel label = new JLabel();\r\n\t if(val.get(5) == \"\") {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlabel = new JLabel();\r\n\t\t\t\t\t\t\tlabel.setText(\"--No Image--\");\r\n\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t try {\r\n\t\t\t BufferedImage image = ImageIO.read(new File(val.get(5)));\r\n\t\t\t Image newimg = image.getScaledInstance(60, 60, java.awt.Image.SCALE_SMOOTH); // scale it the smooth way \r\n\t\t\t\t\t\t\t\t\tlabel = new JLabel(new ImageIcon(newimg));\r\n\t\t\t }catch(Exception e) {\r\n\r\n\t\t\t }\r\n\t\t\t\t\t\t}\r\n\t \r\n\t \r\n\t JLabel rankLbl = new JLabel(\"Rank:\");\r\n\t //rankLbl.setFont(rankLbl.getFont().deriveFont(rankLbl.getFont().getStyle() & ~Font.BOLD));\r\n\t JLabel rankValue = new JLabel(val.get(0));\r\n\t rankValue.setFont(rankValue.getFont().deriveFont(rankValue.getFont().getStyle() & ~Font.BOLD));\r\n\t JLabel nameLbl = new JLabel(\"Name:\");\r\n\t JLabel nameValue = new JLabel(val.get(1));\r\n\t nameValue.setFont(nameValue.getFont().deriveFont(nameValue.getFont().getStyle() & ~Font.BOLD));\r\n\t JLabel scoreLbl = new JLabel(\"Score:\");\r\n\t JLabel scoreValue = new JLabel(val.get(3));\r\n\t scoreValue.setFont(scoreValue.getFont().deriveFont(scoreValue.getFont().getStyle() & ~Font.BOLD));\r\n\t JLabel lastModifiedLbl = new JLabel(\"Last Modified:\");\r\n\t JLabel lastModifiedValue = new JLabel(val.get(2));\r\n\t lastModifiedValue.setFont(lastModifiedValue.getFont().deriveFont(lastModifiedValue.getFont().getStyle() & ~Font.BOLD));\r\n\t JLabel highltedTxtLbl = new JLabel(\"Text:\");\r\n\t JEditorPane editorPane = new JEditorPane();\r\n\t editorPane.setContentType(\"text/html\");\r\n\t String htmlTxt = \"<html>\"+val.get(4)+\"</html>\";\r\n\t editorPane.setText(htmlTxt);\r\n\t \r\n\t \r\n\t \r\n\t JPanel ssp1 = new JPanel();\r\n //ssp1.setLayout(new FlowLayout());\r\n ssp1.setBackground(Color.WHITE);\r\n ssp1.setPreferredSize(new Dimension(panel.getWidth(), 170));\r\n GroupLayout layout = new GroupLayout(ssp1);\r\n ssp1.setLayout(layout);\r\n\t layout.setAutoCreateGaps(false);\r\n\t layout.setAutoCreateContainerGaps(true);\r\n\r\n \r\n layout.setHorizontalGroup(\r\n\t \t\tlayout.createSequentialGroup()\r\n\t \t\t\t .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\r\n\t \t \t\t .addComponent(rankLbl)\r\n\t \t \t\t .addComponent(label)\r\n\t \t\t\t\t\t )\t \r\n\t \t\t\t .addComponent(rankValue)\r\n\t \t\t .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\r\n\t \t\t .addComponent(nameLbl)\r\n\t \t\t .addComponent(scoreLbl)\r\n\t \t\t .addComponent(lastModifiedLbl)\r\n\t \t\t .addComponent(highltedTxtLbl))\r\n\t \t\t .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) \r\n \t\t \t\t .addComponent(nameValue)\r\n \t\t \t\t .addComponent(scoreValue)\r\n \t\t \t\t .addComponent(lastModifiedValue)\r\n \t\t \t\t .addComponent(editorPane))\r\n\t \t\t);\r\n\t layout.setVerticalGroup(\r\n\t \t\t layout.createSequentialGroup()\r\n\t \t\t .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\r\n\t \t\t .addComponent(rankLbl)\r\n\t \t\t .addComponent(rankValue))\r\n\t \t\t .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\r\n\t \t\t .addComponent(label)\r\n\t \t\t .addGroup(layout.createSequentialGroup()\r\n\t \t\t \t\t .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\r\n\t \t \t\t \t\t .addComponent(nameLbl)\r\n\t \t \t \t\t .addComponent(nameValue))\r\n\t \t\t \t\t .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\r\n\t \t \t\t \t\t .addComponent(scoreLbl)\r\n\t \t \t\t \t\t .addComponent(scoreValue))\r\n\t \t \t\t .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\r\n\t \t \t\t \t\t .addComponent(lastModifiedLbl)\r\n\t \t \t\t \t\t .addComponent(lastModifiedValue))\r\n\t \t \t\t .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\r\n\t \t \t\t \t\t .addComponent(highltedTxtLbl)\r\n\t \t \t\t \t\t .addComponent(editorPane))\r\n\t \t\t \t\t )\r\n\t \t\t )\r\n\t );\r\n\r\n \r\n\r\n generalPanel.add(ssp1);\r\n panel.add(generalPanel); \r\n\t \r\n\t }\r\n\t \r\n \t\r\n \t\r\n \tframe.add(contentPane, BorderLayout.CENTER);\r\n frame.pack();\r\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n frame.setVisible(true);\r\n }\r\n \r\n \r\n });\r\n\r\n \r\n\r\n JButton clearButton = new JButton(\"Clear\");\r\n\t clearButton.addActionListener(new ActionListener() {\r\n\t public void actionPerformed(ActionEvent arg0) {\r\n\t searchField.setText(\"\");\r\n\t panel.removeAll();\r\n\t panel.revalidate();\r\n\t panel.repaint();\r\n\t }\r\n\t });\r\n\t clearButton.setBounds(817, 21, 89, 23);\r\n\t frame.getContentPane().add(clearButton); \r\n\t \r\n\t \r\n frame.add(contentPane, BorderLayout.CENTER);\r\n frame.pack();\r\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n frame.setVisible(true);\r\n }\r\n \r\n }", "public static void main(String[] args) throws IOException {\n\t\tString MUMmerFile = args[0];\n\t\tString ErrorFreeEPGAcontigFile = args[1];\n\t\tString SPAdescontigFile = args[2];\n\t\tString DataName = args[3];\n\t\tString FinalEPGAcontigPath = args[4];\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile = CommonClass.getFileLines(MUMmerFile);\n\t\tString MUMerArray[] = new String[SizeOfMUMmerFile];\n\t\tint RealSizeMUMmer = CommonClass.FileToArray(MUMmerFile, MUMerArray);\n\t\tSystem.out.println(\"The real size of MUMmer is:\" + RealSizeMUMmer);\n\t\t//Load Error Free EPGA.\n\t\tint SizeOfErrorFreeEPGAFile = CommonClass.getFileLines(ErrorFreeEPGAcontigFile);\n\t\tString ErrorFreeEPGAcontigArray[] = new String[SizeOfErrorFreeEPGAFile];\n\t\tint RealSizeErrorFreeEPGAcontig = CommonClass.FastaToArray(ErrorFreeEPGAcontigFile, ErrorFreeEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error Free EPGA assembly is:\" + RealSizeErrorFreeEPGAcontig);\n\t\t//Load SPAdes.\n\t\tint SizeOfSPAdesFile = CommonClass.getFileLines(SPAdescontigFile);\n\t\tString SPAdescontigArray[] = new String[SizeOfSPAdesFile];\n\t\tint RealSizeSPAdescontig = CommonClass.FastaToArray(SPAdescontigFile, SPAdescontigArray);\n\t\tSystem.out.println(\"The real size of SPAdes assembly is:\" + RealSizeSPAdescontig);\n\t\t//Process.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor (int w = 4; w < RealSizeMUMmer; w++) \n\t\t{\n\t\t\tString[] SplitLine1 = MUMerArray[w].split(\"\\t|\\\\s+\");\n\t\t\tif(SplitLine1.length==14 && (SplitLine1[13].equals(\"[CONTAINS]\") || SplitLine1[13].equals(\"[BEGIN]\") || SplitLine1[13].equals(\"[END]\")))\n\t\t\t{\n\t\t\t\tString[] SplitLine2 = SplitLine1[11].split(\"_\");\n\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine2[1]);\n\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t\tint EPGA_id = Integer.parseInt(SplitLine1[12]);\n\t\t\t\tSystem.out.println(\"SplitLine1[13]:\"+SplitLine1[13]+\"\\t\"+\"Spades:\"+SPAdes_id+\"\\t\"+\"epga:\"+EPGA_id);\n\t\t\t\tErrorFreeEPGAcontigArray[EPGA_id]=\"#\"+ErrorFreeEPGAcontigArray[EPGA_id];\t\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tfor (int w = 0; w < RealSizeErrorFreeEPGAcontig; w++) \n\t\t{\n\t\t\tif(ErrorFreeEPGAcontigArray[w].charAt(0)!='#')\n\t\t\t{\n\t\t\t\tFileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/ReplaceEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\t\twriter.write(\">\" + (w) + \"\\n\" + ErrorFreeEPGAcontigArray[w] + \"\\n\");\n\t\t\t\twriter.close();\n\t\t\t}\n\t\t}\n\t\tIterator<Integer> it = hashSet.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tint SPAdesIndex = it.next();\n\t\t\tFileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/ReplaceEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\twriter.write(\">Add:\" + (SPAdesIndex) + \"\\n\" + SPAdescontigArray[SPAdesIndex] + \"\\n\");\n\t\t\twriter.close();\n\t\t}\n\t\t//Free.\n\t\tMUMerArray=null;\n\t\tErrorFreeEPGAcontigArray=null;\n\t\tSPAdescontigArray=null;\n\t}", "private static void processArguments(String[] args) {\r\n if (args.length < 2) {\r\n IO.displayGUI(args.length + \" arguments provided.\\nPlease provide input and output files through the GUI.\");\r\n IO.chooseFiles(); // choose files with GUI\r\n } else {\r\n // Open file streams\r\n IO.openStream(args[0], args[1]);\r\n }\r\n }", "public static void main(String[] args) throws IOException {\n\t\tString short_1_A_Path = args[0];\n\t\tString short_1_B_Path = args[1];\n\t\tString OutPutPath = args[2];\n\t\tString DataSetName = args[3];\n\t\ttry {\n\t\t\tint Num=0;\n\t\t\tString readtemp1=\"\";\n\t\t\tString readtemp2=\"\";\n\t\t\tint Short1_NumLeft=0;\n\t\t\tint Short1_NumRight=0;\n\t\t\tString encoding = \"utf-8\";\n\t\t\tFile file1 = new File(short_1_A_Path);\n\t\t\tFile file2 = new File(short_1_B_Path);\n\t\t\tif (file1.exists()&&file2.exists()) {\n\t\t\t\tInputStreamReader read1 = new InputStreamReader(new FileInputStream(file1), encoding);\n\t\t\t\tInputStreamReader read2 = new InputStreamReader(new FileInputStream(file2), encoding);\n\t\t\t\tBufferedReader bufferedReader1 = new BufferedReader(read1);\n\t\t\t\tBufferedReader bufferedReader2 = new BufferedReader(read2);\n\t\t\t\twhile ((bufferedReader1.readLine())!=null && (bufferedReader2.readLine())!= null)\n\t\t\t\t{\n\t\t\t\t\t//The second line.\n readtemp1=bufferedReader1.readLine();\n readtemp2=bufferedReader2.readLine();\t\t\t\t\t\t\n\t\t\t\t //Write left.\n\t\t\t\t\tFileWriter writer1 = new FileWriter(OutPutPath + DataSetName+\".left.fasta\",true);\n\t\t\t\t\twriter1.write(\">\"+(Short1_NumLeft++)+\"\\n\"+readtemp1+\"\\n\");\n\t\t\t\t\twriter1.close();\n\t\t\t\t\t//Write right.\t\n\t\t\t\t\tFileWriter writer2 = new FileWriter(OutPutPath + DataSetName+\".right.fasta\",true);\n\t\t\t\t\twriter2.write(\">\"+(Short1_NumRight++)+\"\\n\"+readtemp2+\"\\n\");\n\t\t\t\t\twriter2.close();\n\t\t\t\t\t//Write all.\t\n\t\t\t\t\tFileWriter writer3 = new FileWriter(OutPutPath + DataSetName+\".fasta\", true);\n\t\t\t\t\twriter3.write(\">\"+(Num)+\"\\n\"+readtemp1 +\"\\n\"+\">\"+(Num)+\"\\n\"+readtemp2+\"\\n\");\n\t\t\t\t\twriter3.close();\n\t\t\t\t\t//The third line.\n\t\t\t\t\tbufferedReader1.readLine();\n\t\t\t\t\tbufferedReader2.readLine();\n\t\t\t\t //The fourth line.\n\t\t\t\t\tbufferedReader1.readLine();\n\t\t\t\t\tbufferedReader2.readLine();\n\t\t\t\t}\n\t\t\t\tbufferedReader1.close();\n\t\t\t\tbufferedReader2.close();\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\tSystem.out.println(\"File is not exist!\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error liaoxingyu\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(final String... args) throws Exception {\n\n // create the ImageJ application context with all available services\n final ImageJ ij = new ImageJ();\n Prefs.blackBackground = true;\n ij.command().run(MapOrganelle.class, true);\n\n boolean runTest1 = false;\n boolean runTest2 = false;\n\n if ( runTest1 || runTest2 ) {\n\n //String testInDir = \"/data1/FMP_Docs/Projects/orgaPosJ_ME/Plugin_InputTest/\";\n String testInDir = \"/home/schmiedc/Desktop/Test/test_tif/input/\";\n //String testInDir = \"/data1/FMP_Docs/Projects/orgaPosJ_ME/TestDataSet_2ndChannel/\";\n String testOutDir = \"/home/schmiedc/Desktop/Test/test_tif/output/\";\n //int channelNumber = 4;\n String fileEnding = \".tif\";\n //String fileEnding = \".nd2\";\n String settings = \"/home/schmiedc/Desktop/Test/test_tif/input/2020-10-09T121957-settings.xml\";\n\n if ( runTest1 ) {\n\n FileList getFileList = new FileList(fileEnding);\n ArrayList<String> fileList = getFileList.getFileMultiSeriesList(testInDir);\n\n for (String file : fileList) {\n System.out.println(file);\n }\n\n ArrayList<String> fileListTest = new ArrayList<>(fileList.subList(0, 1));\n\n IJ.log(\"Run test 1\");\n //PreviewGui guiTest = new PreviewGui(testInDir, testOutDir, fileListTest, fileEnding, 3, 0.157);\n //guiTest.setUpGui();\n\n IJ.log(\"Test 1 done\");\n\n } else {\n IJ.log(\"Run test 2\");\n InputGuiFiji guiTest = new InputGuiFiji(testInDir, testOutDir, fileEnding, settings);\n guiTest.createWindow();\n\n //BatchProcessor processBatch = new BatchProcessor(testInDir, testOutDir, fileListTest, fileEnding, channelNumber);\n //processBatch.processImage();\n\n }\n\n }\n }", "public static void main(String args[]) throws FileNotFoundException {\n\t\tSampling sampleCondition1 = new Sampling(\"src/tests/R2.txt\", \"src/tests/S2.txt\", 1, 1, \"4\", \"4\");\n\t\tSampling sampleCondition2 = new Sampling(\"src/tests/R2.txt\", \"src/tests/S2.txt\", 1, 1, \"4\", \"4\");\n\t\t\n\t\t\n\t\tSelectivityCalculator xo1 = new SelectivityCalculator();\n\t\tSelectivityCalculator xo2 = new SelectivityCalculator();\n\t\t\n\t\txo1.Calculator(sampleCondition1.SampleS);\n\t\txo2.Calculator(sampleCondition2.SampleS);\n\t\t\n\t\tdouble res1 = xo1.selectivityCalculator(sampleCondition1.SampleR, sampleCondition1.SampleS, 1);\n\t\tdouble res2 = xo2.selectivityCalculator(sampleCondition2.SampleR, sampleCondition2.SampleS, 2);\n\t\t\n\t\tSystem.out.println(res1);\n\t\tSystem.out.println(res2);\n//\t\tSystem.out.println(sample.SampleR.size());\n//\t\tSystem.out.println(value.size());\n//\t\tSystem.out.println(value.toString());\n\t}", "public static void main(String[] args) {\n DatabaseCommunicator test = new DatabaseCommunicator();\n// HashMap<String,LabTest> methods = test.getMethods();\n// System.out.println(methods.get(\"mingi labTest\").getMatrix());\n LabTest labTest = new LabTest();\n ArrayList testData = test.fileReader();\n DatabaseCommunicator.testSendingToDatabase(test, labTest, testData);\n }", "public static void main(String arg[]) {\n\t\tRebuildDatabaseFromInstanceFiles ourselves = new RebuildDatabaseFromInstanceFiles();\n\t\tif (arg.length >= 3) {\n\t\t\tString databaseModelClassName = arg[0];\n\t\t\tString databaseFileName = arg[1];\n\t\t\n\t\t\tif (databaseModelClassName.indexOf('.') == -1) {\t\t\t\t\t// not already fully qualified\n\t\t\t\tdatabaseModelClassName=\"com.pixelmed.database.\"+databaseModelClassName;\n\t\t\t}\n//System.err.println(\"Class name = \"+databaseModelClassName);\t// no need to use SLF4J since command line utility/test\n\n\t\t\t//DatabaseInformationModel databaseInformationModel = new PatientStudySeriesConcatenationInstanceModel(makePathToFileInUsersHomeDirectory(dataBaseFileName));\n\t\t\tDatabaseInformationModel databaseInformationModel = null;\n\t\t\ttry {\n\t\t\t\tClass classToUse = Thread.currentThread().getContextClassLoader().loadClass(databaseModelClassName);\n\t\t\t\tClass[] parameterTypes = { databaseFileName.getClass() };\n\t\t\t\tConstructor constructorToUse = classToUse.getConstructor(parameterTypes);\n\t\t\t\tObject[] args = { databaseFileName };\n\t\t\t\tdatabaseInformationModel = (DatabaseInformationModel)(constructorToUse.newInstance(args));\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tslf4jlogger.error(\"\",e);\t// use SLF4J since may be invoked from script\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\n\t\t\tlong startOfRebuild=System.currentTimeMillis();\n\t\t\tfilesProcessed=0;\n\t\t\tint i = 2;\t\t// start with 3rd argument\n\t\t\twhile (i<arg.length) {\n\t\t\t\tString name = arg[i++];\n\t\t\t\tFile file = new File(name);\n\t\t\t\tprocessFileOrDirectory(databaseInformationModel,file);\n\t\t\t}\n\t\t\tlong durationOfRebuild = System.currentTimeMillis() - startOfRebuild;\n\t\t\tdouble rate = ((double)filesProcessed)/(((double)durationOfRebuild)/1000);\n\t\t\tslf4jlogger.info(\"Processed {} files in {} ms, {} files/s\",filesProcessed,durationOfRebuild,rate);\t// use SLF4J since may be invoked from script\n\t\t\t\n\t\t\tdatabaseInformationModel.close();\t// this is really important ... will not persist everything unless we do this\n\t\t}\n\t\telse {\n\t\t\tSystem.err.println(\"Usage: java com.pixelmed.database.RebuildDatabaseFromInstanceFiles databaseModelClassName databaseFileName path(s)\");\n\t\t}\n\t}", "public static void main(String[] args)\r\n {\r\n final Map<String, List<String>> sessionsFromCustomer = new HashMap<>();\r\n Map<String, List<View>> viewsFromSessions = new HashMap<>();\r\n Map<String, List<Buy>> buysFromSessions = new HashMap<>();\r\n\r\n\r\n /* create additional data structures to hold relevant information */\r\n /* they will most likely be maps to important data in the logs */\r\n\r\n final String filename = getFilename(args);\r\n\r\n try\r\n {\r\n populateDataStructures(filename, sessionsFromCustomer,\r\n viewsFromSessions,\r\n buysFromSessions\r\n );\r\n printStatistics(\r\n sessionsFromCustomer,\r\n viewsFromSessions,\r\n buysFromSessions\r\n );\r\n }\r\n catch (FileNotFoundException e)\r\n {\r\n System.err.println(e.getMessage());\r\n }\r\n\r\n //printOutExample(sessionsFromCustomer, viewsFromSessions, buysFromSessions);\r\n }", "public static void main(String[] args) throws IOException, Exception {\n\t\t// sanity checks\n\t\tint i = 0;\n\t\tLOG.log(Level.INFO, \"argument length=\" + args.length);\n\t\tfor (String arg : args) LOG.log(Level.INFO, \"args[\" + i++ + \"]:\" + arg);\n\n\t\t// set up options parser\n\t\tOptions options = new Options();\n\n\t\tOption input = new Option(\"i\", \"input\", true, \"input folder\");\n\t\tinput.setRequired(true);\n\t\toptions.addOption(input);\n\n\t\tOption output = new Option(\"o\", \"output\", true, \"output folder\");\n\t\toutput.setRequired(true);\n\t\toptions.addOption(output);\n\t\t\n\t\tOption useMetadata = new Option(\"useMeta\", \"useMetadata\", true, \"Convert metadata to tiled tiff.\");\n\t\tuseMetadata.setRequired(false);\n\t\toptions.addOption(useMetadata);\n\n\t\t// parse the options\n\t\tCommandLineParser parser = new DefaultParser();\n\t\tHelpFormatter formatter = new HelpFormatter();\n\t\tCommandLine cmd;\n\n\t\ttry {\n\t\t\tcmd = parser.parse(options, args);\n\t\t} catch (ParseException e) {\n\t\t\tLOG.log(Level.SEVERE,e.getMessage());\n\t\t\tformatter.printHelp(\"utility-name\", options);\n\n\t\t\tSystem.exit(1);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tboolean useMeta;\n\t\tif (cmd.getOptionValue(\"useMetadata\")==null) {\n\t\t\tuseMeta = false;\n\t\t} else {\n\t\t\tuseMeta = Boolean.valueOf(cmd.getOptionValue(\"useMetadata\"));\n\t\t}\n\n\t\tString inputFileDir = cmd.getOptionValue(\"input\");\n\t\tif (useMeta) {\n\t\t\tinputFileDir = inputFileDir.replace(\"/images\", \"/metadata_files\");\n\t\t}\n\t\tString outputFileDir = cmd.getOptionValue(\"output\");\n\n\t\tLOG.log(Level.INFO, \"inputFileDir=\" + inputFileDir);\n\t\tLOG.log(Level.INFO, \"outputFileDir=\" + outputFileDir);\n\n\t\tint tileSizeXPix = 1024;\n\t\tint tileSizeYPix = 1024;\n\n\t\tFile inputFolder = new File (inputFileDir);\n\t\tFile outputFolder = new File (outputFileDir);\n\n\t\tLOG.log(Level.INFO, \"tileSizeXPix=\" + tileSizeXPix);\n\t\tLOG.log(Level.INFO, \"tileSizeYPix=\" + tileSizeYPix);\n\t\t\n File[] images = inputFolder.listFiles(new FilenameFilter() {\n \tString[] suffixes = (new ImageReader()).getSuffixes();\n \t\n\t\t\tpublic boolean accept(File dir, String name) {\n\t\t\t\tfor (String ftype : suffixes) {\n\t\t\t\t\tif (name.toLowerCase().endsWith(\"csv\") || \n\t\t\t\t\t\t\tname.toLowerCase().endsWith(\"txt\") || \n\t\t\t\t\t\t\tname.toLowerCase().endsWith(\"xlsx\") ||\n\t\t\t\t\t\t\tname.toLowerCase().endsWith(\"xls\")) {\n\t\t\t\t\t\tLOG.log(Level.INFO, \"File will not be converted to tiled tiff: \" + name);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif (name.toLowerCase().endsWith(ftype.toLowerCase())) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tLOG.log(Level.INFO, \"File is not supported by Bioformats and will be skipped: \" + name);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n if (images == null) {\n \tthrow new NullPointerException(\"Input folder is empty\");\n }\n\n boolean created = outputFolder.mkdirs();\n if (!created && !outputFolder.exists()) {\n throw new IOException(\"Can not create folder \" + outputFolder);\n }\n\t\t\n\t\tLOG.log(Level.INFO, \"Starting tile tiff converter!!\");\n\t\t\n\t\tfor (File image : images) {\n\t\t\t\n\t\t\tThread thread = new Thread() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tString outFile = outputFileDir.concat(File.separator).concat(FilenameUtils.getBaseName(image.getName())).concat(\".ome.tif\");\n\t\t\t\t\t\n\t\t\t\t\tTiledOmeTiffConverter tiledReadWriter = new TiledOmeTiffConverter(image.getAbsolutePath(), outFile, tileSizeXPix, tileSizeYPix);\n\t\t\t\t\t\n\t\t\t\t\t// initialize the files\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttiledReadWriter.run();\n\t\t\t\t\t} catch (FormatException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (DependencyException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (ServiceException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tthread.start();\n\t\t}\n\n\t\tint exitVal = 0;\n\t\tString err = \"\";\n\t\t\n\t\tif (exitVal != 0){\n\t\t\tthrow new RuntimeException(err);\n\t\t}\n\t\tLOG.info(\"The end of tile tiff conversion!!\"); \n\t}", "public static void main(String args[]) throws IOException {\r\n\t\t\r\n\r\n// /**Any -> TXT **/\r\n//\t\t\r\n//\t\tgetTXTfromAny(\"./images/DJI_0707.txt\");\r\n//\t\tgetTXTfromAny(\"./images/DJI_0708.txt\");\r\n//\t\tgetTXTfromAny(\"./images/DJI_0709.txt\");\r\n//\t\tgetTXTfromAny(\"./images/DJI_0710.txt\");\r\n//\t\tgetTXTfromAny(\"./images/DJI_0711.txt\");\r\n//\t\tgetTXTfromAny(\"./images/DJI_0712.txt\");\r\n\t\t\r\n\t\t/**Any -> BMP **/\r\n//\t\tgetBMPfromAny(\"./images/DJI_0707.JPG\");\r\n//\t\tgetBMPfromAny(\"./images/DJI_0708.JPG\");\r\n//\t\tgetBMPfromAny(\"./images/DJI_0709.JPG\");\r\n//\t\tgetBMPfromAny(\"./images/DJI_0710.JPG\");\r\n//\t\tgetBMPfromAny(\"./images/DJI_0711.JPG\");\r\n//\t\tgetBMPfromAny(\"./images/DJI_0712.JPG\");\r\n\t\t\r\n//\t\t/**Any -> JPG **/\r\n\t\tgetJPGfromAny(\"./images/DJI_0707.txt\");\r\n\t\tgetJPGfromAny(\"./images/DJI_0708.txt\");\r\n\t\tgetJPGfromAny(\"./images/DJI_0709.txt\");\r\n\t\tgetJPGfromAny(\"./images/DJI_0710.txt\");\r\n\t\tgetJPGfromAny(\"./images/DJI_0711.txt\");\r\n\t\tgetJPGfromAny(\"./images/DJI_0712.txt\");\r\n\r\n\t}", "public static void main(String[] args){\n\t\tString[] model = readFile(args[0]);\n\t\tString[] data = readFile(args[1]);\n\t\t\n\t\t//create graphs\n\t\tgraph datag = new graph(data);\n\t\tgraph modelg = new graph(model);\n\t\t\n\t\t//search and output isomorphisms\n\t\tTuple[] h = new Tuple[modelg.V.length]; \n \t\tsearch(modelg, datag, h);\n\t}", "public static void main(String[] args) {\n String dataset = args[1];\n if(args[0].equals(\"nb\")) {\n if (args.length > 2) {\n boolean cf = Boolean.parseBoolean(args[2]);\n int ngram = Integer.parseInt(args[3]);\n if(dataset.equals(\"small\"))\n naiveBayes(cf, ngram);\n else {\n indexFileRead_TREC(cf, ngram);\n //testNewNaiveBayes(cf, ngram);\n //naiveBayesClassifier(cf, ngram);\n }\n\n }else {\n if(dataset.equals(\"small\"))\n naiveBayes(false, 0);\n else {\n indexFileRead_TREC(false, 0);\n //testNewNaiveBayes(false, 0);\n //naiveBayesClassifier(false, 0);\n }\n }\n }else if(args[0].equals(\"svm\")) {\n if (args.length > 2) {\n boolean rp = Boolean.parseBoolean(args[2]);\n int size = Integer.parseInt(args[3]);\n svm_test(rp, size);\n } else\n svm_test(false, 0);\n }\n //indexFileRead_LBJ();\n\t}", "public static void main (String[] args) throws IOException {\n File inFile = new File(\"/Users/kbye10/Documents/CS 250 test files/sample1.data\");\r\n FileInputStream inStream = new FileInputStream(inFile);\r\n\r\n //set up an array to read data in\r\n int fileSize = (int)inFile.length();\r\n byte[] byteArray = new byte[fileSize];\r\n\r\n //read data in and display them\r\n inStream.read(byteArray);\r\n for (int i = 0; i < fileSize; i++) {\r\n System.out.println(byteArray[i]);\r\n }\r\n\r\n inStream.close();\r\n }", "public static void main( String[] args ) throws Exception\r\n\t{\r\n\t\torig_pixels = new int[WIDTH][HEIGHT];\r\n\t\tpixels = new int[WIDTH][HEIGHT];\r\n\t\t\r\n\t\tScanner in = new Scanner( System.in );\r\n\t\t\r\n\t\tSystem.out.println( \"Enter a file name: \");\r\n\t\tString file = in.nextLine();\r\n\t\tin.close();\r\n\t\t\r\n\t\treadFile( file );\r\n\t\t\r\n\t\tfor ( int i = 0; i < WIDTH; i++ ){\r\n\t\t\tfor ( int j = 0; j < HEIGHT; j++ ){\r\n\t\t\t\tpixels[i][j] = orig_pixels[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Testing Methods\r\n\t\t\r\n\t\t\t\tmeDian(pixels);\r\n\t\t\t\taverage(pixels);\r\n\t\t\t\twriteFileForAverage( \"testA.pgm\" );\r\n\t\t\t\twriteFileForMedian(\"testM.pgm\");\r\n\t\t\t}", "public static void main(final String[] args) {\n \tString enginePath = engines[8];\n\t\tEngineParameter eparams = new EngineParameter(enginePath);\n\n\t\tString url = \"http://files.grouplens.org/datasets/movielens/ml-1m.zip\";\n String folder = \"src/resources/main/data/ml-1m\";\n String modelPath = \"src/resources/main/crossValid/ml-1m/model/\";\n String recPath = \"src/resources/main/crossValid/ml-1m/recommendations/\";\n String dataFile = eparams.getDataSouceParams().getSourceLocation().get(0);\n int nFolds = N_FOLDS;\n \t\t\n System.out.println(\"Preparing splits...\");\n prepareSplits(url, nFolds, dataFile, folder, modelPath);\n \n System.out.println(\"Gathering recomendations...\");\n //recommend(nFolds, modelPath, recPath); // RiVal's original step.\n //orbsRecommend(nFolds, eparams, modelPath); // Based on RiVal' step\n mixedRecommend(nFolds, eparams, modelPath); // Mixed step\n \n //System.out.println(\"Preparing strategy...\");\n // the strategy files are (currently) being ignored\n //prepareStrategy(nFolds, modelPath, recPath, modelPath);\n\n System.out.println(\"Evaluating...\");\n evaluate(nFolds, modelPath, recPath);\n }", "public static void main(String[] args) {\n\n\t\tString urlClassification = \"http://www.hep.ucl.ac.uk/undergrad/0056/exam-data/2018-19/classification.txt\";\n\t\tString urlExpert = \"http://www.hep.ucl.ac.uk/undergrad/0056/exam-data/2018-19/expert.txt\";\n\t\tString urlLocations = \"http://www.hep.ucl.ac.uk/undergrad/0056/exam-data/2018-19/locations.txt\";\n\n\t\tArrayList<ImageData> classification = ImageData.classificationFromURL(urlClassification);\n\t\tArrayList<ImageData> expert = ImageData.expertFromURL(urlExpert);\n\t\tArrayList<ImageData> locations = ImageData.locationsFromURL(urlLocations);\n\t\t\n\t\t// For part 2. we need to print the number of images\n\t\t// This will be the length of expert list\n\n\t\tSystem.out.println(expert.size());\n\t\t\n\t\t// For part 3. we need to print the number of images classified by at least 1\n\t\t// volunteer. We will utilise the properties of Sets in java.\n\t\t\n\t\tHashSet<Integer> idsClassifiedByOne = new HashSet<Integer>();\n\t\tfor (ImageData image : classification) {\n\t\t\tidsClassifiedByOne.add(image.getIdentifier());\n\t\t}\n\t\tSystem.out.println(idsClassifiedByOne.size());\n\t\t\n\t\t// For part 4. we need to print details of the images classified by at least 10\n\t\t// volunteers. \n\t\t\n\t\tArrayList<ImageData> atLeast10Vols = new ArrayList<ImageData>();\n\t\tatLeast10Vols = ImageData.atLeast10(classification);\n\t\t\n\t\t// Must merge the information from classification, locations and expert lists\n\t\tArrayList<ImageData> atLeast10CompleteList = new ArrayList<ImageData>();\n\t\tatLeast10CompleteList = ImageData.collectAll(atLeast10Vols, expert, locations);\n\t\tArrayList<ImageData> clean10CompleteList = ImageData.clean(atLeast10CompleteList);\n\t\t\n\t\t// Printing out the data\n\t\t\n\t\tSystem.out.println(clean10CompleteList);\n\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tLoadDataStore storeData = new LoadDataStore();\r\n\t\tDataAnalytics aData;\r\n\t\tMarketData[] md;\r\n\t\t\r\n\t\tSystem.out.println(\"Sourcing Data....\");\r\n\t\tstoreData.sourceData(args);\t\t//Read the Data into our application.\r\n\r\n\t\t/*Get the MarketData Array -- Pass it to DataAnalytics */\r\n\t\t\r\n\t\tmd=storeData.getMarketData();\r\n\t\tSystem.out.println(\"Market Data is Loaded....\");\t\r\n\t\t\r\n\t\t/*Start Analyzing the data*/\r\n\t\taData=new DataAnalytics(md);\t//Use the Constructor to pass in the data\r\n\t\tSystem.out.println(\"Analytical Engine Up ....\");\r\n\t\t\r\n\t\t\r\n\t\t//Lets bring up the GUI\r\n\t\tUISetup uiset = new UISetup(aData);\r\n\t\tSystem.out.println(\"User Inferace Up...\");\r\n\t\tSystem.out.println(\"System is Ready!\");\r\n\t}", "public static void main(String args[]) throws Exception {\n\t\t createFile();\n\n\t\t // retrieve an instance of H4File\n\t\t FileFormat fileFormat = FileFormat.getFileFormat(FileFormat.FILE_TYPE_HDF4);\n\n\t\t if (fileFormat == null) {\n\t\t System.err.println(\"Cannot find HDF4 FileFormat. (Sandbox)\");\n\t\t return;\n\t\t }\n\n\t\t // open the file with read and write access\n\t\t ///FileFormat testFile = fileFormat.open(fname, FileFormat.WRITE);\n\t\t @SuppressWarnings(\"deprecation\")\n\t\t\t\tFileFormat testFile = fileFormat.open(fname, FileFormat.WRITE);\n\n\t\t if (testFile == null) {\n\t\t System.err.println(\"Failed to open file: \" + fname);\n\t\t return; \n\t\t }\n\n\t\t // open the file and retrieve the file structure\n\t\t testFile.open();\n\t\t Group root = (Group) ((javax.swing.tree.DefaultMutableTreeNode) testFile.getRootNode()).getUserObject();\n\n\t\t // retrieve athe dataset \"2D 32-bit integer 20x10\"\n\t\t Dataset dataset = (Dataset) root.getMemberList().get(0);\n\t\t dataset.hasAttribute();\n\t\t int[] dataRead = (int[]) dataset.read();\n\n\t\t // print out the data values\n\t\t System.out.println(\"\\n\\nOriginal Data Values\");\n\t\t for (int i = 0; i < 20; i++) {\n\t\t System.out.print(\"\\n\" + dataRead[i * 10]);\n\t\t for (int j = 1; j < 10; j++) {\n\t\t System.out.print(\", \" + dataRead[i * 10 + j]);\n\t\t }\n\t\t }\n\n\t\t // change data value and write it to file.\n\t\t for (int i = 0; i < 20; i++) {\n\t\t for (int j = 0; j < 10; j++) {\n\t\t dataRead[i * 10 + j]++;\n\t\t }\n\t\t }\n\t\t dataset.write(dataRead);\n\n\t\t // clearn and reload the data value\n\t\t int[] dataModified = (int[]) dataset.read();\n\n\t\t // print out the modified data values\n\t\t System.out.println(\"\\n\\nModified Data Values\");\n\t\t for (int i = 0; i < 20; i++) {\n\t\t System.out.print(\"\\n\" + dataModified[i * 10]);\n\t\t for (int j = 1; j < 10; j++) {\n\t\t System.out.print(\", \" + dataModified[i * 10 + j]);\n\t\t }\n\t\t }\n\n\t\t // close file resource\n\t\t testFile.close();\n\t\t }", "public static void main(String[] args) throws IOException {\n if (args.length != 1) {\n System.out.println(\"Usage: FuzzySearchMain <entities file>\");\n System.exit(1);\n }\n String fileName = args[0];\n\n System.out.print(\"Reading strings and building index...\");\n\n // Build q-gram index.\n QGramIndex qgi = new QGramIndex(3);\n qgi.buildFromFile(fileName);\n\n System.out.print(\" done.\\n\");\n Scanner sc = new Scanner(System.in);\n ArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>();\n while (true) {\n System.out.println(\" \\n Please enter an input: \");\n String s = sc.nextLine();\n long time1 = System.nanoTime();\n s = QGramIndex.normalizeString(s);\n result = qgi.findMatches(s, s.length() / 4);\n result = qgi.sortResult(result);\n System.out.print(\"#PED = \" + qgi.noPED + \" \");\n System.out.println(\"#RES = \" + result.size());\n for (int i = 0; i < Math.min(5, result.size()); i++) {\n System.out.println(qgi.originalWords.get(result.get(i).get(0)) \n + \" \" + result.get(i).get(1) + \" \"\n + result.get(i).get(2));\n }\n long time2 = System.nanoTime();\n long timediff = (time2 - time1) / 1000000;\n System.out.println(\"Time taken is: \" + timediff + \"ms\");\n }\n }", "public static void main(String[] args) {\n\t\tDataScanner scanner = new DataScanner();\n\t\tlong time = System.currentTimeMillis();\n\t\tscanner.scan(originalDataset, chunkSize);\n\t\t\n\t\t//2) Here the scan process finishes. In this point we want to persist the characterization of this\n\t\t//dataset in a sharable data structure.\n\t\tDatasetCharacterization characterization = scanner.finishScanAndBuildCharacterization();\n\t\tcharacterization.save(datasetPath + \"docs\");\n\t\t\n\t\t//3) In this point, we load the dataset characterization just created to show how characterization can be loaded\n\t\t//and shared among users.\n\t\tDatasetCharacterization newCharacterization = new DatasetCharacterization();\n\t\tnewCharacterization.load(datasetPath + \"docs\");\n\t\tSystem.out.println(\"Scanning time: \" + (System.currentTimeMillis()-time)/1000.0);\t\t\n\t}", "public static void main(String[] args) {\n\n try {\n FastScanner scanner = new FastScanner(Files.newInputStream(Paths.get(\"./sample/5_3_edit_distance.in\")));\n String s1 = scanner.next();\n String s2 = scanner.next();\n\n System.out.println(dpEditDistanceTwoString(s1, s2, s1.length(), s2.length()));\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\n\t\tSystem.out.println(\"Inputfile: \");\n\t\tScanner sc = new Scanner(System.in);\n System.out.println(\"Printing the file passed in:\");\n String inputfile = \"\";\n while(sc.hasNextLine()){\n \tinputfile = sc.nextLine();\n \tbreak;\n }\n System.out.println(\"Reading from: \" + inputfile);\n \n try {\n String fromfile = FileUtils.readFileToString( new File(\"C:\\\\Users\\\\fille\\\\Documents\\\\firstobj.obj\"));\n\n\t\tWavefontConverter conv = new WavefontConverter();\n\t\tconv.ToVertics(fromfile);\n\t\tArrayList<float[]>vertics = conv.meshes; \n\t\tArrayList<short[]> indices = conv.indices;\n\t\twriteToBinary(conv.mesh2,conv.by,\"test\");\n\t\treadfile();\n\t//\tToJavaclass(vertics,indices,\"Monkey\");\n\t\t\n }catch(Exception e) {\n \te.printStackTrace();\n }\n\t\t//conv.ToVertics(Files)\n\t}", "public static void main(String args[]){\n\t\tString indexLocation = \"H:\\\\ukbench\\\\training2\\\\\";\r\n\t\tString searchLocation = \"H:\\\\ukbench\\\\query\\\\\";\r\n\t\t\r\n//\t\tint[] testSizes = {2000};\r\n//\t\tint[] numTreesTests = {3,4,5,6,7,8,9,10};\r\n//\t\tint[] examineTopNResultsTests = {5,10,20};\r\n\t\tint[] testSizes = {10200};\r\n\t\tint[] numTreesTests = {1};//3,4,5,10};\r\n\t\tint[] examineTopNResultsTests = {5,20};\r\n\t\tfor ( int testSize : testSizes ){\r\n\t\t\tfor ( int numTrees : numTreesTests ){\r\n\t\t\t\tfor ( int numResults : examineTopNResultsTests ){\r\n\t\t\t\t\tSystem.out.println(testSize + \", \" + numTrees + \", \" + numResults);\r\n\t\t\t\t\tMultiIndexFinder finder = new MultiIndexFinder(indexLocation,numTrees,testSize/4);\r\n\t\t\t\t\t\r\n\t\t\t\t\tList<FileFilter> filters = new ArrayList<FileFilter>();\r\n\t\t\t\t\tfilters.add(new FileFilter(\".*\\\\.jpg\"));\r\n\t\t\t\t\tFileFinder ffinder = new FileFinder(searchLocation,filters);\r\n\t\t\t\t\tList<File> files = ffinder.getFiles();\r\n\t\t\t\t\tint numRight = 0;\r\n\t\t\t\t\tint numWrong = 0;\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor ( File file : files ){\r\n\t\t\t\t\t\tString foundFile = finder.findBestMatch(file.getAbsolutePath(),numResults);\r\n\t\t\t\t\t\t//System.out.println(\"for \" + file.getAbsolutePath() + \", found \" + foundFile);\r\n\t\t\t\t\t\tif ( !\"\".equals(foundFile) && IndexFinder.isCorrectFile(file.getAbsolutePath(),foundFile) ){\r\n\t\t\t\t\t\t\tnumRight++;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnumWrong++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\tif ( count >= (testSize *3)/4 ) break;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(numRight/(float)(numRight+numWrong));\r\n\t\t\t\t\tSystem.gc();\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tFileHelper.createFile();\n\t\tFileHelper.writeToFile();\n\t\tFileHelper.readFromFile();\n\n\t}", "public static void main(String[] args) throws IOException {\n map.put(\"paper\", new double[]{1, 0, 0});\n map.put(\"rock\", new double[]{0, 1, 0});\n map.put(\"scissors\", new double[]{0, 0, 1});\n reverseMap.put(0, \"paper\");\n reverseMap.put(1, \"rock\");\n reverseMap.put(2, \"scissors\");\n\n PictureAccessor.TrainingData trainingData = pictureAccessor.getTrainingData(trainingFolder, numberOfPixels, numberOfOutputs, map, width, height);\n NeuralNetwork neuralNetwork = new NeuralNetwork();\n BasicNetwork basicNetwork = neuralNetwork.trainSystem(trainingData.input, trainingData.output, numberOfPixels, numberOfOutputs);\n compute(basicNetwork);\n }", "public static void main(String[] args) throws FileNotFoundException {\n Lab4 lab4 = new Lab4();\n lab4.printInfo();\n lab4.sortFileToScreen();\n lab4.goodbye();\n }", "public static void main(String[] args) throws JsonGenerationException, JsonMappingException, IOException{\n\t\tDictionary root = new Dictionary();\n\t\tparse Parse = new parse();\n long begin = System.currentTimeMillis();\n //String fileName = args[0];\n //String examine = args[1];\n Parse.parseFILE(\"word_tagged.txt\", root);\n long end = System.currentTimeMillis();\n System.out.println(\"insertion time elapse: \" + (double)(end-begin)/1000);\n \n \n /***********************Read data from phrase check dataset**************************/\n \n\t\tBigram n = new Bigram(Parse.parseFILE(\"Grammar.txt\"));\n\t n.train();\n\t ObjectMapper phrase = new ObjectMapper();\n\t String PhraseJson = phrase.writeValueAsString(n);\n\t phrase.writeValue(new File(\"Phrase.json\"), n);\n\t \n\t /***********************Read data from grammar rule dataset**************************/\n\t BuildRule rule = new BuildRule(Parse.parseFILE(\"Grammar.txt\"), 3, root);\n\t rule.train();\n\t \n\t System.out.println(rule.testing);\n\t ConvertToJson con = new ConvertToJson(rule);\n\t ObjectMapper mapper = new ObjectMapper();\n\t String ruleJson = mapper.writeValueAsString(rule);\n\t\tmapper.writeValue(new File(\"GrammarRule.json\"), rule);\n /***************************Begin to check*************************************/\n\t}", "public static void main(String[] args) throws IOException{\n\r\n\t\tjava.io.FileReader fr = new FileReader(args[0]);\r\n\t\tBufferedReader reader = new BufferedReader(fr);\r\n\t\tString method = \"arg1\";\r\n\t\tString method2 = \"arg2\";\r\n\t\t\r\n\t\t//read method\r\n\t\tif(args.length >2){\r\n\t\t\tmethod = args[1];\r\n\t\t\tmethod2 = args[2];\r\n\t\t}\r\n\t\telse if(args.length == 2){\r\n\t\t\tmethod = args[1];\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"No Arguments\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\t//read first and second line\r\n\t\t//store the map size and start/end point\r\n\t\tString line1;\r\n\t\tint[] sizeOfMap = new int[2];\r\n\t\tint[] startPoint = new int[2];\r\n\t\tint[] endPoint = new int[2];\r\n\t\t\r\n\t\t//read rest data and store in matrix\r\n\t\tfor(int i = 0; i < 3; i++)\r\n\t\t{\r\n\t\t\tif((line1 = reader.readLine()) != null)\r\n\t\t\t{\r\n\t\t\t\tfor(int j = 0; j < 2; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tString[] part = line1.split(\"\\\\s\");\r\n\t\t\t\t\tInteger intReader = Integer.valueOf(part[j]);\r\n\t\t\t\t\tif(i == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsizeOfMap[j] = intReader;//store integers into list\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(i == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tstartPoint[j] = intReader;//store integers into list\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(i == 2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tendPoint[j] = intReader;//store integers into list\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//print pre-setting\r\n\t\t//System.out.println(sizeOfMap[0]+\" \"+sizeOfMap[1]);\r\n\t\t//System.out.println(startPoint[0]+\" \"+startPoint[1]);\r\n\t\t//System.out.println(endPoint[0]+\" \"+endPoint[1]);\r\n\r\n\t\t\r\n\t\t//create a map of nodes\r\n\t\tmapNode[][] nodes = new mapNode[sizeOfMap[1]][sizeOfMap[0]];\r\n\t\t\r\n\t\t//read map information\r\n\t\tint x_index = 0;\r\n\t\tint y_index = 0;\r\n\t\twhile((line1 = reader.readLine()) != null){\r\n\t\t\t//setup index\r\n\t\t\tString[] part2 = line1.split(\"\\\\s\");\r\n\t\t\tfor(int i = 0; i< sizeOfMap[1];i++)\r\n\t\t\t{\r\n\t\t\t\tmapNode tempNode = new mapNode();\r\n\t\t\t\tif(part2[i].equals(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\ttempNode.setNoGoZone(true);\r\n\t\t\t\t\ttempNode.setElevation(999999999);//set elevation to infinite\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tInteger intReader = Integer.valueOf(part2[i]);//reader all integer\r\n\t\t\t\t\ttempNode.setRoad(true);\r\n\t\t\t\t\ttempNode.setElevation(intReader);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//store the position of each node \r\n\t\t\t\tVector<int[]> initialPath = new Vector<int[]>();\r\n\t\t\t\tint [] initialPosition = new int[2];\r\n\t\t\t\tinitialPosition[0] = i;\r\n\t\t\t\tinitialPosition[1] = y_index;\r\n\t\t\t\tinitialPath.add(initialPosition);\r\n\t\t\t\ttempNode.setTotPath(initialPath);\r\n\t\t\t\tnodes[i][y_index] = tempNode;\r\n\t\t\t}\r\n\t\t\ty_index++;\r\n\t\t}\r\n\t\treader.close();\r\n\t\tfr.close();\r\n\t\t\t\r\n\t\t// connect each node (Using Linked List to connect the\r\n\t\t// the top, bottom, left and right nodes of current node\r\n\t\tfor (int i = 0; i < sizeOfMap[1]; i++) {\r\n\t\t\tfor (int j = 0; j < sizeOfMap[0]; j++) {\r\n\t\t\t\t// connect the top left node\r\n\t\t\t\tif (i == 0 && j == 0) {\r\n\t\t\t\t\tnodes[i][j].topNode = null;// top node does not exist\r\n\t\t\t\t\tnodes[i][j].bottomNode = nodes[i][j + 1];// connect bottom\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// node to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current node\r\n\t\t\t\t\tnodes[i][j].leftNode = null;// left node does not exist\r\n\t\t\t\t\tnodes[i][j].rightNode = nodes[i + 1][j];// connect right\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// node to current\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// node\r\n\t\t\t\t}\r\n\t\t\t\t// connect the bottom left node\r\n\t\t\t\telse if (i == 0 && j == sizeOfMap[0] - 1) {\r\n\t\t\t\t\tnodes[i][j].topNode = nodes[i][j - 1];\r\n\t\t\t\t\tnodes[i][j].bottomNode = null;\r\n\t\t\t\t\tnodes[i][j].leftNode = null;\r\n\t\t\t\t\tnodes[i][j].rightNode = nodes[i + 1][j];\r\n\t\t\t\t}\r\n\t\t\t\t// connect the top right node\r\n\t\t\t\telse if (i == sizeOfMap[1] - 1 && j == 0) {\r\n\t\t\t\t\tnodes[i][j].topNode = null;\r\n\t\t\t\t\tnodes[i][j].bottomNode = nodes[i][j + 1];\r\n\t\t\t\t\tnodes[i][j].leftNode = nodes[i - 1][j];\r\n\t\t\t\t\tnodes[i][j].rightNode = null;\r\n\t\t\t\t}\r\n\t\t\t\t// connect the bottom right node\r\n\t\t\t\telse if (i == sizeOfMap[1] - 1\r\n\t\t\t\t\t\t&& j == sizeOfMap[0] - 1) {\r\n\t\t\t\t\tnodes[i][j].topNode = nodes[i][j - 1];\r\n\t\t\t\t\tnodes[i][j].bottomNode = null;\r\n\t\t\t\t\tnodes[i][j].leftNode = nodes[i - 1][j];\r\n\t\t\t\t\tnodes[i][j].rightNode = null;\r\n\t\t\t\t}\r\n\t\t\t\t// connect the left edge nodes\r\n\t\t\t\telse if (i == 0 && j != 0 && j != sizeOfMap[0] - 1) {\r\n\t\t\t\t\tnodes[i][j].topNode = nodes[i][j - 1];\r\n\t\t\t\t\tnodes[i][j].bottomNode = nodes[i][j + 1];\r\n\t\t\t\t\tnodes[i][j].leftNode = null;\r\n\t\t\t\t\tnodes[i][j].rightNode = nodes[i + 1][j];\r\n\t\t\t\t}\r\n\t\t\t\t// connect the right edge nodes\r\n\t\t\t\telse if (i == sizeOfMap[1] - 1 && j != 0\r\n\t\t\t\t\t\t&& j != sizeOfMap[0] - 1) {\r\n\t\t\t\t\tnodes[i][j].topNode = nodes[i][j - 1];\r\n\t\t\t\t\tnodes[i][j].bottomNode = nodes[i][j + 1];\r\n\t\t\t\t\tnodes[i][j].leftNode = nodes[i - 1][j];\r\n\t\t\t\t\tnodes[i][j].rightNode = null;\r\n\t\t\t\t}\r\n\t\t\t\t// connect the top edge nodes\r\n\t\t\t\telse if (i != 0 && i != sizeOfMap[1] - 1 && j == 0) {\r\n\t\t\t\t\tnodes[i][j].topNode = null;\r\n\t\t\t\t\tnodes[i][j].bottomNode = nodes[i][j + 1];\r\n\t\t\t\t\tnodes[i][j].leftNode = nodes[i - 1][j];\r\n\t\t\t\t\tnodes[i][j].rightNode = nodes[i + 1][j];\r\n\t\t\t\t}\r\n\t\t\t\t// connect the bottom edge nodes\r\n\t\t\t\telse if (i != 0 && i != sizeOfMap[1] - 1\r\n\t\t\t\t\t\t&& j == sizeOfMap[0] - 1) {\r\n\t\t\t\t\tnodes[i][j].topNode = nodes[i][j - 1];\r\n\t\t\t\t\tnodes[i][j].bottomNode = null;\r\n\t\t\t\t\tnodes[i][j].leftNode = nodes[i - 1][j];\r\n\t\t\t\t\tnodes[i][j].rightNode = nodes[i + 1][j];\r\n\t\t\t\t}\r\n\t\t\t\t// connect all rest nodes\r\n\t\t\t\telse {\r\n\t\t\t\t\tnodes[i][j].topNode = nodes[i][j - 1];\r\n\t\t\t\t\tnodes[i][j].bottomNode = nodes[i][j + 1];\r\n\t\t\t\t\tnodes[i][j].leftNode = nodes[i - 1][j];\r\n\t\t\t\t\tnodes[i][j].rightNode = nodes[i + 1][j];\r\n\t\t\t\t}\r\n\t\t\t\t// update the weight on the edge between each node\r\n\t\t\t\tnodes[i][j].updateTopWeight();// update the top edge weight\r\n\t\t\t\tnodes[i][j].updateBottomWeight();// update the bottom edge weight\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\tnodes[i][j].updateLeftWeight();// update the Left edge weight\r\n\t\t\t\tnodes[i][j].updateRightWeight();// update the Right edge weight\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//method\r\n\t\tVector<int []> result;\r\n\t\tVector<int []> result2;\r\n\t\tstartPoint[0] = startPoint[0] - 1;\r\n\t\tstartPoint[1] = startPoint[1] - 1;\r\n\t\tendPoint[0] = endPoint[0] - 1;\r\n\t\tendPoint[1] = endPoint[1] - 1;\r\n\t\t\r\n\t\tint temp;\r\n\t\ttemp = startPoint[0];\r\n\t\tstartPoint[0] = startPoint[1];\r\n\t\tstartPoint[1] = temp;\r\n\t\t\r\n\t\ttemp = endPoint[0];\r\n\t\tendPoint[0] = endPoint[1];\r\n\t\tendPoint[1] = temp;\r\n\t\t\r\n\t\t//test case\r\n\t\t//endPoint[0] = 1;\r\n\t\t//endPoint[1] = 1;\r\n\t\t\r\n\t\t//Main Method for searching the path\r\n\t\t//print original map\r\n\t\t//System.out.println(\"print out the map\");\r\n\t\t//printMap(nodes);\r\n\t\tif(method.equals(\"bfs\")){\r\n\t\t\tresult2 = BFS(startPoint,endPoint, nodes);\r\n\t\t\tif(result2 == null)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"null\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\tupdateResultOnMap(result2,nodes);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(method.equals(\"ucs\")){\r\n\t\t\t//System.out.println(\"UCS Shortest Path: \");\r\n\t\t\tresult = UCS(startPoint, endPoint, nodes);\r\n\t\t\tif(result == null)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"null\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\tupdateResultOnMap(result,nodes);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(method.equals(\"astar\")){\r\n\t\t\t//System.out.println(\"A* Path:\");\r\n\t\t\tresult = aStar(startPoint, endPoint, nodes, method2);\r\n\t\t\tif(result == null)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"null\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\tupdateResultOnMap(result,nodes);\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "public static void main(String [ ] args){\n\t\tScoreTrakker tracker = new ScoreTrakker();\n\t\ttracker.processFiles();\n\t}", "public static void main(String[] args) {\n\t\tFile txtFiles = new File(DIRECTORY);\n\t\tTextReader reader = new TextReader();\n\t\t\n\t\t// read words from each file\n\t\tfor(File f : txtFiles.listFiles()) {\n\t\t\t\n\t\t\tSystem.out.println(\"Reading from: \" + f.getName());\n\t\t\ttry {\n\t\t\t\tScanner s = new Scanner(f);\t\n\t\t\t\treader.readWords(s);\n\t\t\t\ts.close();\n\t\t\t}\n\t\t\tcatch(FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"Cannot find file named: \" + f.getName());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t// sort words\n\t\tSystem.out.println(\"\\n\\n\\nSorting words\\n\\n\\n\");\n\t\treader.sortByCount();\n\t\t\n\t\t//Find 20 most used\n\t\tSystem.out.println(\"Top \"+TOPCOUNT+\" Words by Count\");\n\t\tfor(int i = 0; i < TOPCOUNT; i++) {\n\t\t\tSystem.out.println((i+1) + \" : \\t\" + reader.words.get(i).word + \"\\t\\t\" + reader.words.get(i).count);\n\t\t}\n\n\t}", "public static void main(String... args)\n {\n String path = Configuration.instance.dataDirectory + Configuration.instance.fileSeparator;\n String suffix = \"_default.xml\";\n String algorithm = \"\";\n boolean paramSeach = false;\n int maxGens = 10000;\n\n readItems();\n\n // Parsing CLI\n for (int i = 0; i < args.length; i++)\n {\n if (args[i].equals(\"-algorithm\"))\n {\n i++;\n algorithm = args[i];\n }\n\n if (args[i].equals(\"-configuration\"))\n {\n i++;\n if (args[i].equals(\"best\"))\n suffix = \"_best.xml\";\n }\n\n if (args[i].equals(\"-search_best_configuration\"))\n paramSeach = true;\n }\n\n if (paramSeach) suffix = \"_best.xml\";\n double[] hyperparameters = loadConfig(path + algorithm + suffix);\n System.out.println(\"Chosen algorithm: \" + algorithm);\n\n double time = System.currentTimeMillis();\n // Running correct algorithm according to CLI\n switch (algorithm)\n {\n case \"ga\":\n if (paramSeach)\n new GARecommender().recommend();\n else\n new Population(maxGens, hyperparameters).run();\n break;\n case \"sa\":\n case \"best-algorithm\":\n if (paramSeach)\n new SARecommender().recommend();\n else\n new Annealing(hyperparameters).run();\n break;\n case \"aco\":\n if (paramSeach)\n new ACORecommender().recommend();\n else\n new AntColony(maxGens, hyperparameters).run();\n break;\n case \"pso\":\n if (paramSeach)\n new PSORecommender().recommend();\n else\n new Swarm(maxGens * 10, hyperparameters).run(); // 10x max gens because PSO is does less per gen and is much faster\n break;\n default:\n System.out.println(\"Could not find algorithm with name \" + algorithm + \". Options are: ga, sa, aco, pso\");\n break;\n }\n System.out.println(\"Finished in: \" + ((System.currentTimeMillis() - time) / 1000) + \"s\");\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tmapName = \"\";\r\n\t\ttrack = false;\r\n\t\tdrawingDataLines = false;\r\n\t\tLog.getLog().setFilter(Log.NONE);\r\n\t\tint argindex = \t0;\r\n\t\twhile(argindex<args.length) {\r\n\t\t\tString arg = args[argindex];\r\n\t\t\tif(arg.compareTo(\"-map\")==0) {\r\n\t\t\t\tmapName = args[argindex+1];\r\n\t\t\t\targindex+=2;\r\n\t\t\t}\r\n\t\t\telse if(arg.compareTo(\"-pigeon\")==0) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpigeonCt = Integer.parseInt(args[argindex+1]);\r\n\t\t\t\t}catch (NumberFormatException e) {\r\n\t\t\t\t\tSystem.out.println(\"Illegal argument: '\"+args[argindex+1]+\"'\");\r\n\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t}\r\n\t\t\t\targindex+=2;\r\n\t\t\t}\r\n\t\t\telse if(arg.compareTo(\"-sparrow\")==0) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsparrowCt = Integer.parseInt(args[argindex+1]);\r\n\t\t\t\t}catch (NumberFormatException e) {\r\n\t\t\t\t\tSystem.out.println(\"Illegal argument: '\"+args[argindex+1]+\"'\");\r\n\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t}\r\n\t\t\t\targindex+=2;\r\n\t\t\t}\r\n\t\t\telse if(arg.compareTo(\"-hawk\")==0) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\thawkCt = Integer.parseInt(args[argindex+1]);\r\n\t\t\t\t}catch (NumberFormatException e) {\r\n\t\t\t\t\tSystem.out.println(\"Illegal argument: '\"+args[argindex+1]+\"'\");\r\n\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t}\r\n\t\t\t\targindex+=2;\r\n\t\t\t}\r\n\t\t\telse if(arg.compareTo(\"-track\")==0) {\r\n\t\t\t\ttrack=true;\r\n\t\t\t\targindex+=1;\r\n\t\t\t}\r\n\t\t\telse if(arg.compareTo(\"-draw\")==0) {\r\n\t\t\t\tdrawingDataLines=true;\r\n\t\t\t\targindex+=1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Unknown Argument: '\"+arg+\"'\");\r\n\t\t\t\tSystem.exit(1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(mapName.compareTo(\"\")!=0) {\r\n\t\t\ttry {\r\n\t\t\t\tloadmap(mapName);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\tSystem.out.println(\"Could not load: '\"+mapName+\"'\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tRandomBoids(pigeonCt,sparrowCt,hawkCt);\r\n\t\t\r\n\t\tSystem.out.println(\"Welcome to Boids!\");\r\n\t\tWindow = graphics.Screen.initScreen(1000,800); \r\n\t\tTimer clock = new Timer(\"Clock\",20);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//add birds to screen\r\n\t\tfor(int i=0;i<Bird.getAllBirds().size();i++) {\r\n\t\t\tWindow.getToDraw().add((Drawable)Bird.getAllBirds().get(i));\r\n\t\t}\r\n\t\t//add map objecst\r\n\t\tfor(int i=0;i<mapobjects.size();i++) {\r\n\t\t\tWindow.getToDraw().add(mapobjects.get(i));\r\n\t\t}\r\n\t\t\r\n\t\t//main loop\r\n\t\tboolean done = false;\r\n\t\twhile(!done) {\r\n\t\t\t\r\n\t\t\t//clear for calculations\r\n\t\t\tfor(int i=0;i<Bird.getAllBirds().size();i++) {\r\n\t\t\t\tBird.getAllBirds().get(i).preBehaviour();\r\n\t\t\t}\r\n\t\t\t//see each bird\r\n\t\t\tfor(int i=0;i<Bird.getAllBirds().size()-1;i++) {\r\n\t\t\t\tfor(int ii=i+1;ii<Bird.getAllBirds().size();ii++) {\r\n\t\t\t\t\tBoid.sight(Bird.getAllBirds().get(i), Bird.getAllBirds().get(ii));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//run formula\r\n\t\t\tfor(int i=0;i<Bird.getAllBirds().size();i++) {\r\n\t\t\t\tBird.getAllBirds().get(i).behaviour();\r\n\t\t\t}\r\n\t\t\t//move birds\r\n\t\t\tfor(int i=0;i<Bird.getAllBirds().size();i++) {\r\n\t\t\t\tBird.getAllBirds().get(i).movement();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//myLog.println(a, DEBUG_CODE);\r\n\t\t\tif(track) {\r\n\t\t\t\tWindow.getViewPoint().copy(Bird.getAllBirds().get(0).getPositionVector());\r\n\t\t\t}\r\n\t\t\tWindow.updateFrameBuffer();\r\n\t\t\tWindow.repaint();\r\n\t\t\ttry {\r\n\t\t\t\tclock.sleep();\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tdone = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n \t\tLoadProperties loadP = new LoadProperties(args[0]);\n \t\tloadP.load();\n \t\t\n \t\t//Cargamos los datos del fichero .arff\n \t\tLoadData loadD = new LoadData(loadP.getData());\n\t\tListaEntidades lista = loadD.CargarDatos(loadP.getK());\n \t\t\n \t\t//Llamamos a k-means\n \t}", "public static void main(String[] args) throws IOException, SQLException {\n\t\treadFile rf = new readFile();\n\t\trf.create();\n\t\trf.readData();\n\t\t//String sql = \"select * from examSelect\";\n\t\t//rf.select(sql);\n//\t\trf.test();\n\t\t//rf.readItem();\n\t}", "public static void main(String[] args) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\");\n System.setProperty(\"current.date\", dateFormat.format(new Date()));\n // set path\n if (args.length > 1) path = args[1];\n // лучше называть каталог с результатами осмысленно :)\n File cfgFile = new File(args[0]);\n PropertyConfigurator.configure(cfgFile.getAbsolutePath());\n \n File[] files = getFilesInDir(path);\n for (File file : files) {\n // среднее считать - за сколько поколений в среднем достигается максимальнй фитнес - проще в расчетах писать и пихать в файл\n try {\n read(file.getAbsolutePath());\n System.out.println(\"Stats: \" + stats.size());\n }catch (IOException ex) { log.info(ex); }\n }\n \n System.out.println(\"bestFitness: \" + bestFitness);\n System.out.println(\"bestFile : \" + bestFile);\n System.out.println(\"bestUrgent : \" + bestUrgent);\n \n for (Integer id : stats.keySet()) {\n Stat stat = stats.get(id);\n //System.out.println(stat);\n //System.out.println(id + \". SumFit: \" + stat.sumFit() + \". SumUrg: \" + stat.sumUrgent());\n //System.out.println(id + \". AvgFit: \" + stat.avgFit() + \". avgUrg: \" + stat.avgUrgent());\n log.info(stat.avgFit() + \" \" + stat.avgUrgent() + \" \" + stat.id());\n }\n }", "public static void main(String[] args) throws Exception {\n for (String arg : args) {\n if (arg.split(\"=\").length != 2) {\n continue;\n }\n if (arg.startsWith(\"filePath=\")) {\n filePath = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"showTop=\")) {\n showTop = Integer.valueOf(arg.split(\"=\")[1]);\n } else if (arg.startsWith(\"warnTime=\")) {\n warnTime = Integer.valueOf(arg.split(\"=\")[1]);\n } else if (arg.startsWith(\"maxCountLine=\")) {\n maxCountLine = Long.valueOf(arg.split(\"=\")[1]);\n } else {\n System.out.println(\"unknow arg:\" + arg);\n System.out.println(helpInfo);\n System.exit(0);\n }\n }\n System.out.println(\"filePath=\" + filePath + \" maxCountLine=\" + maxCountLine + \" showTop=\" + showTop + \" warnTime=\" + warnTime);\n\n long beginTime = System.currentTimeMillis();\n File dir = new File(filePath);\n if (dir.isDirectory()) {\n for (File file : dir.listFiles()) {\n loadData(file);\n }\n } else if (dir.isFile()) {\n loadData(dir);\n }\n printStat();\n printWarnStatMap();\n System.out.println(\"readLine:\" + readLine + \" countLine:\" + countLine + \" useTime:\" + (System.currentTimeMillis() - beginTime));\n }", "public static void main(String[] args) throws Exception {\n\t\tlong startTime, stopTime;\n\t\tdouble t_searchCache, t_storeCache;\n//\t\tMap<SmallGraph, SmallGraph> cache = new HashMap<SmallGraph, SmallGraph>(); // the cache\n\t\t// the index on the ploytrees stored in the cache\n\t\tMap<Set<Pair<Integer,Integer>>, Set<SmallGraph>> cacheIndex = new HashMap<Set<Pair<Integer,Integer>>, Set<SmallGraph>>();\n\t\tMap<SmallGraph, Pair<Integer, SmallGraph>> polytree2query = new HashMap<SmallGraph, Pair<Integer, SmallGraph>>();\n\n\t\t// reading the original data graph\n\t\tGraph originalDataGraph = new Graph(args[0]);\n\t\tif(args.length == 6)\toriginalDataGraph.buildParentIndex(args[5]);\n\n\t\t// reading all popular data graphs\n\t\tFile dirG = new File(args[1]);\n\t\tif(!dirG.isDirectory())\n\t\t\tthrow new Exception(\"The specified path for the candidate data graphs is not a valid directory\");\n\t\tFile[] graphFiles = dirG.listFiles();\n\t\tint nPopularGraphs = graphFiles.length;\n\t\tGraph[] graphs = new Graph[nPopularGraphs];\n\t\tfor(int i=0; i < nPopularGraphs; i++)\n\t\t\tgraphs[i] = new Graph(graphFiles[i].getAbsolutePath());\n\t\t\n\t\t// statistical result file\n\t\tFile file = new File(args[2]);\n\t\t// if file does not exists, then create it\n\t\tif (!file.exists()) file.createNewFile();\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\t\t\t\n\t\tBufferedWriter bw = new BufferedWriter(fw);\t\n\n\t\tbw.write(\"queryNo\\t querySize\\t degree\\t sourceNo\\t isPolytree\\t nHitCandidates\\t t_searchCache\\t isHit\\t hitQueryNo\\t hitQuerySize\\t t_storeCache\\n\");\n\t\tStringBuilder fileContents = new StringBuilder();\n\t\t\n\t\tint nSourceOptions = nPopularGraphs + 1; // number of sources for creating query\n\t\tRandom randSource = new Random();\n\t\tint[] querySizes = {20,22,24,26,28,30,32,34,36,38}; // different available sizes for queries\n\t\tRandom randQuerySize = new Random();\n//\t\tRandom randDegree = new Random();\n\t\tRandom randCenter = new Random();\n\t\t\t\t\n\t\tint requestedQueries = Integer.parseInt(args[4]);\n\t\tfor(int queryNo=0; queryNo < requestedQueries; queryNo++) { // main loop\n\t\t\tSystem.out.print(\"Processing Q\" + queryNo + \":\\t\");\n\t\t\tSmallGraph q;\n\t\t\tint querySize = 25;\n\t\t\tint degree = 5;\n\t\t\tint sourceNo = randSource.nextInt(nSourceOptions);\n\t\t\t// q is created\n\t\t\tif(sourceNo == nSourceOptions - 1) { // from the original data graph\n\t\t\t\tboolean notFound = true;\n\t\t\t\tSmallGraph sg = null;\n\t\t\t\twhile(notFound) {\n\t\t\t\t\tquerySize = querySizes[randQuerySize.nextInt(querySizes.length)];\n\t\t\t\t\t//degree = randDegree.nextInt(querySize/DEGREE_RATIO);\n\t\t\t\t\tdegree = (int)Math.sqrt(querySize);\n\t\t\t\t\tint center = randCenter.nextInt(originalDataGraph.getNumVertices());\n\t\t\t\t\tsg = GraphUtils.subGraphBFS(originalDataGraph, center, degree, querySize);\n\t\t\t\t\tif(sg.getNumVertices() == querySize)\n\t\t\t\t\t\tnotFound = false;\n\t\t\t\t}\n\t\t\t\tq = QueryGenerator.arrangeID(sg);\n\t\t\t} else {\t// from popular data graphs\n\t\t\t\tGraph dataGraph = graphs[sourceNo];\n\t\t\t\tboolean notFound = true;\n\t\t\t\tSmallGraph sg = null;\n\t\t\t\twhile(notFound) {\n\t\t\t\t\tquerySize = querySizes[randQuerySize.nextInt(querySizes.length)];\n\t\t\t\t\tdegree = (int)Math.sqrt(querySize);\n\t\t\t\t\tif(degree == 0) continue;\n\t\t\t\t\tint center = randCenter.nextInt(dataGraph.getNumVertices());\n\t\t\t\t\tsg = GraphUtils.subGraphBFS(dataGraph, center, degree, querySize);\n\t\t\t\t\tif(sg.getNumVertices() == querySize)\n\t\t\t\t\t\tnotFound = false;\n\t\t\t\t}\n\t\t\t\tq = QueryGenerator.arrangeID(sg);\n\t\t\t} //if-else\n\t\t\t\n\t\t\tfileContents.append(queryNo + \"\\t\" + q.getNumVertices() + \"\\t\" + degree + \"\\t\" + sourceNo + \"\\t\");\n\t\t\tSystem.out.print(\"N\" + q.getNumVertices() + \"D\" + degree + \"S\" + sourceNo + \",\\t\");\n\t\t\t\n\t\t\tint queryStatus = q.isPolytree();\n\t\t\tswitch (queryStatus) {\n\t\t\t\tcase -1: System.out.println(\"The query Graph is disconnected\");\n\t\t\t\t\tfileContents.append(\"-1\\t 0\\t 0\\t 0\\t -1\\t 0\\t\");\n\t\t\t\t\tcontinue;\n\t\t\t\tcase 0: System.out.print(\"! polytree, \");\n\t\t\t\t\tfileContents.append(\"0\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: System.out.print(\"a polytree, \");\n\t\t\t\t\tfileContents.append(\"1\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: System.out.println(\"Undefined status of the query graph\");\n\t\t\t\t\tfileContents.append(\"2\\t 0\\t 0\\t 0\\t -1\\t 0\\t\");\n\t\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// searching in the cache\n\t\t\tPair<Integer, SmallGraph> hitPair = null;\n\t\t\tstartTime = System.nanoTime();\n\t\t\tboolean notInCache = true;\n\t\t\tSet<SmallGraph> candidateMatchSet = CacheUtils.getCandidateMatchSet(q, cacheIndex);\n\t\t\tint nHitCandidates = candidateMatchSet.size();\n\t\t\tSystem.out.print(\"nHitCandidates=\" + nHitCandidates + \", \");\n\t\t\tfileContents.append(nHitCandidates + \"\\t\");\n\t\t\t\n\t\t\tfor(SmallGraph candidate : candidateMatchSet) {\n\t\t\t\tif(CacheUtils.isDualCoverMatch(q, candidate)) {\n\t\t\t\t\tnotInCache = false;\n\t\t\t\t\tSystem.out.print(\"Hit the cache!, \");\n\n\t\t\t\t\thitPair = polytree2query.get(candidate);\n\t\t\t\t\t// use the cache content to answer the query\n//\t\t\t\t\tlong bTime = System.currentTimeMillis();\n//\t\t\t\t\tSmallGraph inducedSubgraph = cache.get(candidate);\n//\t\t\t\t\tSet<Ball> tightResults_cache = TightSimulation.getTightSimulation(inducedSubgraph, queryGraph);\n//\t\t\t\t\ttightResults_cache = TightSimulation.filterMatchGraphs(tightResults_cache);\n//\t\t\t\t\tlong fTime = System.currentTimeMillis();\n//\t\t\t\t\tSystem.out.println(\"The time for tight simulation from cache: \" + (fTime - bTime) + \" ms\");\n\t\t\t\t\tbreak; // the first match would be enough \n\t\t\t\t} //if\n\t\t\t} //for\n\t\t\tstopTime = System.nanoTime();\n\t\t\tt_searchCache = (double)(stopTime - startTime) / 1000000;\n\t\t\tSystem.out.print(\"search: \" + t_searchCache + \", \");\n\t\t\tfileContents.append(t_searchCache + \"\\t\");\n\t\t\t\n\t\t\tif(! notInCache) { // found in the cache\n\t\t\t\t// hit query\n\t\t\t\tfileContents.append(\"1\\t\");\n\t\t\t\tint hitQueryNo = hitPair.getValue0();\n\t\t\t\tSmallGraph hitQuery = hitPair.getValue1();\n\t\t\t\thitQuery.print2File(args[3] + \"/Q\" + hitQueryNo + \"_N\" + hitQuery.getNumVertices() + \".txt\");\n\t\t\t\tfileContents.append(hitQueryNo + \"\\t\" + hitQuery.getNumVertices() + \"\\t\");\n\t\t\t}\n\n\t\t\tstartTime = System.nanoTime();\n\t\t\tif(notInCache) { // Not found in the cache\n\t\t\t\tSystem.out.print(\"Not the cache!, \");\n\t\t\t\tfileContents.append(\"0\\t\");\n\t\t\t\tfileContents.append(\"-1\\t-1\\t\");\n//\t\t\t\tlong bTime = System.currentTimeMillis();\n//\t\t\t\tSet<Ball> tightResults_cache = TightSimulation.getTightSimulation(dataGraph, queryGraph);\n//\t\t\t\ttightResults_cache = TightSimulation.filterMatchGraphs(tightResults_cache);\n//\t\t\t\tlong fTime = System.currentTimeMillis();\n//\t\t\t\tSystem.out.println(\"The time for tight simulation without cache: \" + (fTime - bTime) + \" ms\");\n\t\t\t\t// store in the cache\n\t\t\t\t// The polytree of the queryGraph is created\n\t\t\t\tint center = q.getSelectedCenter();\n\t\t\t\tSmallGraph polytree = GraphUtils.getPolytree(q, center);\n\t\t\t\t// The dualSimSet of the polytree is found\n\t\t\t\t// The induced subgraph of the dualSimSet is found\n\t\t\t\t// The <polytree, inducedSubgraph> is stored in the cache\n//\t\t\t\tcache.put(polytree, inducedSubgraph);\n\t\t\t\tSet<Pair<Integer, Integer>> sig = polytree.getSignature(); \n\t\t\t\tif (cacheIndex.get(sig) == null) {\n\t\t\t\t\tSet<SmallGraph> pltSet = new HashSet<SmallGraph>();\n\t\t\t\t\tpltSet.add(polytree);\n\t\t\t\t\tcacheIndex.put(sig, pltSet);\n\t\t\t\t} else\n\t\t\t\t\tcacheIndex.get(sig).add(polytree);\n\t\t\t\t\n\t\t\t\tpolytree2query.put(polytree, new Pair<Integer, SmallGraph>(queryNo, q)); // save the queries filling the cache\n\t\t\t} //if\n\t\t\tstopTime = System.nanoTime();\n\t\t\tt_storeCache = (double)(stopTime - startTime) / 1000000;\n\t\t\tSystem.out.println(\"store: \" + t_storeCache);\n\t\t\tfileContents.append(t_storeCache + \"\\n\");\t\t\t\n\t\t\t\n\t\t\tbw.write(fileContents.toString());\n\t\t\tfileContents.delete(0, fileContents.length());\n\t\t} //for\n\t\t\n\t\tbw.close();\n\t\t\n\t\tSystem.out.println(\"Number of signatures stored: \" + cacheIndex.size());\n\t\tSystem.out.println(\"Number of polytrees stored: \" + polytree2query.size());\n\t\tint maxSet = 0;\n\t\tfor(Set<SmallGraph> pt : cacheIndex.values()) {\n\t\t\tint theSize = pt.size();\n\t\t\tif(theSize > maxSet)\n\t\t\t\tmaxSet = theSize;\n\t\t} //for\n\t\tSystem.out.println(\"The maximum number of stored polytrees with the same signature: \" + maxSet);\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tString folder = \"/Users/haopeng/Dropbox/research/2nd/Usecase/Yanlei/\";\n\t\tString fileName = \"P0_2324.txt\";\n\t\t\n\t\tFileReader reader = new FileReader(folder + fileName, 20000000);\n\t\treader.parseFile();\n\t\t\n\t\t//reader.printValues(reader.getServerName(), \"ServerName\");\n\t\t//reader.printValues(reader.getCommand(), \"Command\");\n\t\t//reader.printValues(reader.getTimestamp(), \"Timestamp\"); \n\t\t//reader.printValues(reader.getPath(), \"Path\");\n\t\treader.printValues(reader.getMethod(), \"Method\");\n\t}", "public static void main(String[] args) throws IOException {\n\n fileReader(\"endpoints1.txt\", \"endpoints2.txt\");\n\n /* First Test Case Completed with Correct Files */\n\n /*===============================================/*\n\n /* Second Test Case With Valid and Invalid Files */\n\n// fileReader(\"endpoints1.txt\", \"invalidpoints.txt\");\n\n /* Second Test Case Completed with one Invalid File */\n\n /*===============================================/*\n\n /* Third Test Case With Invalid Files */\n\n// fileReader(\"invalidpoints.txt\", \"endpoints2.txt\");\n\n /* Third Test Case Completed with Invalid File */\n\n }", "public static void main(String[] args) {\n // Check if the input file and output file are specified in the arguments\n if (args == null || args.length != 2) {\n System.out.println(\"Invalid arguments for the program.\");\n return;\n }\n\n String inputFile = args[0];\n Path inputFilePath = Paths.get(inputFile);\n\n String outputFile = args[1];\n Path outputFilePath = Paths.get(outputFile);\n\n // Check if the input file is valid\n if (Files.notExists(inputFilePath) || !Files.isReadable(inputFilePath) || !Files.isRegularFile(inputFilePath)) {\n System.out.println(\"Invalid input file.\");\n return;\n }\n\n // Create the output file if it doesn't exist\n if (Files.notExists(outputFilePath)) {\n try {\n Files.createFile(outputFilePath);\n } catch (IOException e) {\n System.out.println(\"Failed to create output file.\");\n e.printStackTrace();\n return;\n }\n }\n\n // Check if the output file is valid\n if (Files.notExists(outputFilePath) || !Files.isWritable(outputFilePath) || !Files.isRegularFile(outputFilePath)) {\n System.out.println(\"Invalid output file.\");\n return;\n }\n\n\n try {\n // Create folders for the temp generated files\n createTempFolder(TEMP_FOLDER);\n createTempFolder(TEMP_LONG_WORD_FOLDER);\n createTempFolder(TEMP_SORTED_WORD_FOLDER);\n\n // Analyze the words from the input file\n // Save words which are too long to separate files\n Path analyzeFile = analyzeFile(inputFilePath);\n\n // Read the words batch by batch\n // And save each batch of sorted words to separate files\n splitFileAndSortWord(analyzeFile);\n Files.delete(analyzeFile);\n\n // Merge sort the batches of sorted words to one file\n Path tempResultPath = mergeSortWord();\n deleteTempFolder(TEMP_SORTED_WORD_FOLDER);\n\n // Insert long words to the sorted word\n tempResultPath = mergeLongWord(tempResultPath);\n deleteTempFolder(TEMP_LONG_WORD_FOLDER);\n\n // Copy to results to the output file\n copyFile(tempResultPath, outputFilePath);\n\n } catch (IOException | RuntimeException | Error e) {\n System.out.println(\"Error occurred when running the program: \");\n e.printStackTrace();\n } finally {\n try {\n // Cleanup the temp generated files\n deleteTempFolder(TEMP_FOLDER);\n } catch (IOException e) {\n System.out.println(\"Error occurred when deleting temp generated files.\");\n }\n }\n }", "public static void main(String[] args) {\n int arg = 0;\n int seedNum = 100;\n int trainNum = 0;\n int testNum = 0;\n boolean treeFlag = false;\n boolean textFlag = false;\n //handle options\n while (args[arg].startsWith(\"-\")) {\n switch(args[arg]) {\n case (\"-tree\"):\n treeFlag = true;\n break;\n case (\"-text\"):\n textFlag = true;\n break;\n case (\"-seednum\"):\n arg++;\n seedNum = Integer.parseInt(args[arg]);\n break;\n case (\"-trainnum\"):\n arg++;\n trainNum = Integer.parseInt(args[arg]);\n break;\n case (\"-testnum\"):\n arg++;\n testNum = Integer.parseInt(args[arg]);\n break;\n case (\"-trainall\"):\n trainNum = Integer.MAX_VALUE;\n break;\n case (\"-testall\"):\n testNum = Integer.MAX_VALUE;\n break;\n default:\n throw new IllegalArgumentException(\"Unrecognized command: \" + args[arg]);\n }\n arg++;\n }\n File sourceDirectory = new File(args[arg]);\n arg++;\n File destinationDirectory = new File(args[arg]);\n\n if(treeFlag && textFlag) {\n System.err.println(\"Both text and tree flags detected, which one do you want?\");\n System.exit(2);\n }\n\n if (trainNum == Integer.MAX_VALUE && testNum == Integer.MAX_VALUE) {\n System.err.println(\"Can't max both train and test values!\");\n System.exit(3);\n }\n\n if (!sourceDirectory.isDirectory()) {\n System.err.println(\"ERROR: \" + sourceDirectory.getName() + \"is not a directory!\");\n System.exit(4);\n }\n if (!destinationDirectory.exists()) {\n destinationDirectory.mkdirs();\n } else if (!destinationDirectory.isDirectory()) {\n System.err.println(\"ERROR: \" + destinationDirectory.getName() + \"is not a directory!\");\n System.exit(5);\n }\n\n if (treeFlag) {\n createSeededFiles(\"tree\", seedNum, trainNum, testNum, sourceDirectory, destinationDirectory);\n } else if (textFlag) {\n createSeededFiles(\"text\", seedNum, trainNum, testNum, sourceDirectory, destinationDirectory);\n }\n }", "public static void main(String[] args) throws IOException {\n\t\t\r\n\t\t\r\n\t\tString dir = \"C:\\\\Eclipse\\\\OxygenWorkspace\\\\DigestedProteinDB\\\\misc\\\\sample_data\";\r\n\t\t//dir = \"F:\\\\Downloads\\\\uniprot\\\\uniprot_sprot.dat_delta-db1_100000\";\r\n\t\treadPeptideRow1(dir, 600.1f, 600.3f);\r\n\t\t\r\n\r\n\t}", "public static void main (String[] args)\n {\n Data_Sorter calculator = new Data_Sorter();\n calculator.display();\n }", "public static void main(String[] args) {\n try {\n File dataFolder = new File(\"data\");\n for (File imageFile : dataFolder.listFiles()) {\n BufferedImage bufferedImage = ImageIO.read(imageFile);\n ImageProcessor.instance.processImage(bufferedImage, imageFile.getName());\n }\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static void main(String[] args) throws IOException\r\n {\r\n if (Arrays.asList(args).contains(\"-h\"))\r\n {\r\n displayHelp();\r\n return;\r\n }\r\n \r\n logger.info(\"Reading command line arguments\");\r\n \r\n String inputFileName = null;\r\n String outputFileName = null;\r\n boolean embedded = false;\r\n boolean binary = false;\r\n int indicesComponentType = GltfConstants.GL_UNSIGNED_SHORT;\r\n boolean oneMeshPerPrimitive = false;\r\n int version = 2;\r\n for (String a : args)\r\n {\r\n String arg = a.trim();\r\n if (arg.startsWith(\"-i=\"))\r\n {\r\n inputFileName = arg.substring(3);\r\n }\r\n else if (arg.startsWith(\"-o=\"))\r\n {\r\n outputFileName = arg.substring(3);\r\n }\r\n else if (arg.equals(\"-e\"))\r\n {\r\n embedded = true;\r\n }\r\n else if (arg.equals(\"-b\"))\r\n {\r\n binary = true;\r\n }\r\n else if (arg.equals(\"-m\"))\r\n {\r\n oneMeshPerPrimitive = true;\r\n }\r\n else if (arg.startsWith(\"-c\"))\r\n {\r\n String s = arg.substring(3);\r\n if (s.equals(\"GL_UNSIGNED_BYTE\"))\r\n {\r\n indicesComponentType = GltfConstants.GL_UNSIGNED_BYTE;\r\n }\r\n else if (s.equals(\"GL_UNSIGNED_SHORT\"))\r\n {\r\n indicesComponentType = GltfConstants.GL_UNSIGNED_SHORT;\r\n }\r\n else if (s.equals(\"GL_UNSIGNED_INT\"))\r\n {\r\n indicesComponentType = GltfConstants.GL_UNSIGNED_INT;\r\n }\r\n else\r\n {\r\n System.err.println(\"Invalid indices component type: \" + s);\r\n displayHelp();\r\n return;\r\n }\r\n }\r\n else if (arg.startsWith(\"-v=\"))\r\n {\r\n String s = arg.substring(3);\r\n try\r\n {\r\n version = Integer.parseInt(s);\r\n }\r\n catch (NumberFormatException e)\r\n {\r\n System.err.println(\"Invalid argument: \" + arg);\r\n displayHelp();\r\n return;\r\n }\r\n }\r\n else\r\n {\r\n System.err.println(\"Invalid argument: \" + arg);\r\n displayHelp();\r\n return;\r\n }\r\n }\r\n if (inputFileName == null)\r\n {\r\n System.err.println(\"No input file name given\");\r\n displayHelp();\r\n return;\r\n }\r\n if (outputFileName == null)\r\n {\r\n System.err.println(\"No output path name given\");\r\n displayHelp();\r\n return;\r\n }\r\n \r\n logger.info(\"Reading input file \" + inputFileName);\r\n \r\n long beforeNs = System.nanoTime();\r\n\r\n URI objUri = Paths.get(inputFileName).toUri();\r\n\r\n GltfModel gltfModel = null;\r\n ObjGltfModelCreator gltfModelCreator = new ObjGltfModelCreator();\r\n gltfModelCreator.setIndicesComponentType(indicesComponentType);\r\n gltfModelCreator.setOneMeshPerPrimitive(oneMeshPerPrimitive);\r\n if (version == 1)\r\n {\r\n gltfModelCreator.setTechniqueBasedMaterials(true);\r\n }\r\n gltfModel = gltfModelCreator.create(objUri);\r\n\r\n GltfModelWriter gltfModelWriter = new GltfModelWriter();\r\n File outputFile = new File(outputFileName);\r\n File parentFile = outputFile.getParentFile();\r\n if (parentFile != null)\r\n {\r\n parentFile.mkdirs();\r\n }\r\n if (binary)\r\n {\r\n logger.info(\"Writing binary glTF to \" + outputFileName);\r\n gltfModelWriter.writeBinary(gltfModel, outputFile);\r\n }\r\n else if (embedded)\r\n {\r\n logger.info(\"Writing embedded glTF to \" + outputFileName);\r\n gltfModelWriter.writeEmbedded(gltfModel, outputFile);\r\n }\r\n else\r\n {\r\n logger.info(\"Writing glTF to \" + outputFileName);\r\n gltfModelWriter.write(gltfModel, outputFile);\r\n }\r\n \r\n \r\n long afterNs = System.nanoTime();\r\n double durationS = (afterNs - beforeNs) * 1e-9;\r\n String durationString =\r\n String.format(Locale.ENGLISH, \"%.3fs\", durationS);\r\n logger.info(\"Done. \" + durationString);\r\n }", "public static void main(String[] args) {\n\n getProperties();\n\n Options optionsMain = new Options();\n optionsMain.addOption(\"h\", \"help\", false, \"display this message\");\n optionsMain.addOption(\"db\", \"database\", true, \"path to the database\");\n //optionsMain.addOption(\"p\", \"peaqb\", true, \"path to the PEAQb program\");\n //optionsMain.addOption(\"r\", \"reference\", true, \"path to the reference sound file\");\n //optionsMain.addOption(\"t\", \"test\", true, \"path to the test sound file\");\n //optionsMain.addOption(\"m\", \"metric\", true, \"name of the metric to be used\");\n CommandLineParser commandLineParser = new DefaultParser();\n CommandLine commandLine = null;\n try {\n commandLine = commandLineParser.parse(optionsMain, args);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if (args.length == 0 || commandLine.hasOption(\"help\")) {\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp(\"Robco\", optionsMain);\n return;\n }\n if (commandLine.hasOption(\"database\")) {\n dbPath = commandLine.getOptionValue(\"database\");\n } else {\n System.err.println(\"No database file specified\");\n System.exit(1);\n }\n System.out.println(\"Using database \" + dbPath);\n /*if (commandLine.hasOption(\"reference\")) {\n reference = commandLine.getOptionValue(\"reference\");\n } else {\n System.err.println(\"No reference file specified\");\n System.exit(1);\n }\n System.out.println(\"Using reference \" + reference);\n if (commandLine.hasOption(\"test\")) {\n test = commandLine.getOptionValue(\"test\");\n } else {\n System.err.println(\"No test file specified\");\n System.exit(1);\n }\n System.out.println(\"Using test \" + test);*/\n /*if (commandLine.hasOption(\"metric\")) {\n String metricParam = commandLine.getOptionValue(\"metric\");\n if (metricParam.equalsIgnoreCase(\"PEAQ\")) {\n metric = PEAQ;\n if (commandLine.hasOption(\"peaqb\")) {\n peaqbPath = commandLine.getOptionValue(\"peaqb\");\n } else {\n System.err.println(\"No PEAQb programPEAQ specified\");\n System.exit(1);\n }\n System.out.println(\"Using programPEAQ \" + peaqbPath);\n } else if (metricParam.equalsIgnoreCase(\"SSIM\")) {\n metric = SSIM;\n } else {\n System.err.println(\"Couldn't recognize metric \" + metricParam);\n System.exit(1);\n }\n System.out.println(\"Using metric \" + metricParam);\n } else {\n System.err.println(\"No metric specified\");\n System.exit(1);\n }*/\n /*double result;\n switch (metric) {\n case PEAQ:\n SQLiteConnector connectorPEAQ = new SQLiteConnector(dbPath, \"peaq\", \"ODG\", \"REF\", \"TEST\", \"ID\");\n result = executePEAQAnalysis(peaqbPath, reference, test).getMean();\n System.out.println(\"MeanODG=\" + result);\n connectorPEAQ.write(result, reference, test, getUsableId(connectorPEAQ) + 1);\n System.exit(0);\n case SSIM:\n SQLiteConnector connectorSSIM = new SQLiteConnector(dbPath, \"ssim\", \"VALUE\", \"REF\", \"TEST\", \"ID\");\n result = executeSSIMAnalysis(reference, test);\n System.out.println(\"SSIMIndex=\" + result);\n connectorSSIM.write(result, reference, test, getUsableId(connectorSSIM) + 1);\n System.exit(0);\n default:\n return;\n }*/\n processResults(resultPath);\n }", "public static void main(String[] args) {\n // if required - start the graphical output using -v parameter\n if (args.length > 0) {\n if (args[0].equals(\"-v\")) {\n visualize = true;\n }\n } else {\n // change this to true if you want to visualize always, disregarding parameters.\n visualize = false;\n }\n // stores references to animation windows\n LinkedList<Visualizator> windows = new LinkedList();\n // if true then create windows with graps.\n if (visualize) {\n createGUI(windows);\n }\n\n // list of results\n LinkedList results = new LinkedList();\n\n // data set name(s) are stored in this list. Typically, the data are expected to be in a \"$PATH/data-set/\" directory, where $PATH is the path to where the Alea directory is.\n // Therefore, this directory should contain both ./Alea and ./data-set directories. Files describing machines should be placed in a file named e.g., \"metacentrum.mwf.machines\".\n // Similarly machine failures (if simulated) should be placed in a file called e.g., \"metacentrum.mwf.failures\".\n // Please read carefully the copyright note when using public workload traces!\n //String data_sets[] = {\"SDSC-SP2.swf\", \"hpc2n.swf\", \"star.swf\", \"thunder.swf\", \"metacentrum.mwf\", \"meta2008.mwf\", \"atlas.swf\",};\n String data_sets[] = {\"metacentrum.mwf\"};\n\n // number of gridlets in data set\n //int total_gridlet[] = {59700, 202876, 96000, 121038, 103656, 187370, 42724,};\n int total_gridlet[] = {6, 6};\n // the weight of the fairness criteria in objective function\n int fairw[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n // set true to use failures\n failures = false;\n // set true to use specific job requirements\n reqs = true;\n // set true to use runtime estimates\n estimates = false;\n\n // set true to refine estimates using job avg. length\n useAvgLength = false;\n // set true to use last job length as a new runtime estimate\n useLastLength = false;\n // set true to use \"on demand\" schedule optimization when early job completions appear\n useEventOpt = false;\n\n // set true to use very imprecise estimates\n useUserPrecision = false;\n // set true to use Feitelson's deterministic f-model to generate runtime estimates\n useDurationPrecision = false;\n // if useDurationPrecision = true, then following number denotes the level of imprecison\n // 100 = 2 x real lenght, 400 = 5 x real length, 900 = 10x, 1900 = 20x, 4900 = 50x\n userPercentage = 4900;\n // the minimal length (in seconds) of gap in schedule since when the \"on demand\" optimization is executed\n gap_length = 10 * 60;\n // the weigh of fairness criterion\n fair_weight = 1;\n\n // use binary heap dat structure to represent schedule (generally faster solution)\n useHeap = true;\n\n\n //defines the name format of output files\n String problem = \"Result\";\n if (!failures && !reqs) {\n problem += \"Basic\";\n }\n if (reqs) {\n problem += \"R-\";\n }\n if (failures) {\n problem += \"F\";\n }\n if (estimates) {\n problem += \"-Estim\";\n } else {\n problem += \"-Exact\";\n }\n if (useAvgLength) {\n problem += \"-AvgL\";\n }\n if (useLastLength) {\n problem += \"-LastL\";\n }\n if (useEventOpt) {\n problem += \"-EventOpt\";\n }\n if (useUserPrecision) {\n problem += \"-UserPrec\" + userPercentage;\n }\n if (useDurationPrecision) {\n problem += \"-DurPrec\" + userPercentage;\n }\n\n // data sets are outside the project folder (i.e. in ../data-set/)\n data = true;\n // multiply the number of iterations of optimization techniques\n multiplicator = 1;\n // used to influence the frequency of job arrivals (mwf files only)\n double multiplier = 1.0;\n\n // used only when executed on a real cluster (do not change)\n path = \"estim100/\";\n meta = false;\n if (meta) {\n String date = \"-\" + new Date().toString();\n date = date.replace(\" \", \"_\");\n date = date.replace(\"CET_\", \"\");\n date = date.replace(\":\", \"-\");\n System.out.println(date);\n problem += date;\n }\n\n String user_dir = \"\";\n if (ExperimentSetup.meta) {\n user_dir = \"/scratch/xklusac/\" + path;\n } else {\n user_dir = System.getProperty(\"user.dir\");\n }\n try {\n Output out = new Output();\n out.deleteResults(user_dir + \"/jobs(\" + problem + \"\" + ExperimentSetup.algID + \").csv\");\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n // creates Result Collector\n ResultCollector result_collector = new ResultCollector(results, problem);\n\n\n // this cycle selects data set from data_sets[] list\n for (int set = 0; set <= 0; set++) {\n String prob = problem;\n fair_weight = fairw[set];\n if (useUserPrecision) {\n prob += \"-UserPrec\" + userPercentage;\n }\n max_estim = 0;\n result_collector.generateHeader(data_sets[set] + \"_\" + prob);\n prevAlgID = -1;\n\n // selects algorithm\n // write down the IDs of algorithm that you want to use (FCFS = 0, EDF = 1, EASY = 2, CONS = 4, PBS PRO = 5, BestGap = 10, BestGap+RandomSearch = 11, ...)\n int algorithms[] = {2};\n\n // select which algorithms from the algorithms[] list will be used.\n for (int sel_alg = 0; sel_alg <= 0; sel_alg++) {\n\n // reset values from previous iterations\n use_compresion = false;\n opt_alg = null;\n fix_alg = null;\n\n // get proper algorithm\n int alg = algorithms[sel_alg];\n int experiment_count = 1;\n name = data_sets[set];\n algID = alg;\n if (sel_alg > 0) {\n prevAlgID = algorithms[sel_alg - 1];\n }\n\n // used for output description\n String suff = \"\";\n // initialize the simulation - create the scheduler\n Scheduler scheduler = null;\n String scheduler_name = \"Alea_3.0_scheduler\";\n try {\n Calendar calendar = Calendar.getInstance();\n boolean trace_flag = false; // true means tracing GridSim events\n String[] exclude_from_file = {\"\"};\n String[] exclude_from_processing = {\"\"};\n String report_name = null;\n GridSim.init(entities, calendar, trace_flag, exclude_from_file, exclude_from_processing, report_name);\n scheduler = new Scheduler(scheduler_name, baudRate, entities, results, alg, data_sets[set], total_gridlet[set], suff, windows, result_collector, sel_alg);\n } catch (Exception ex) {\n Logger.getLogger(ExperimentSetup.class.getName()).log(Level.SEVERE, null, ex);\n }\n // this will set up the proper algorithm according to the algorithms[] list\n if (alg == 0) {\n policy = new FCFS(scheduler);\n suff = \"FCFS\";\n }\n if (alg == 1) {\n policy = new EDF(scheduler);\n suff = \"EDF\";\n }\n if (alg == 2) {\n policy = new EASY_Backfilling(scheduler);\n // fixed version of EASY Backfilling\n suff = \"EASY\";\n }\n if (alg == 4) {\n policy = new CONS(scheduler);\n use_compresion = true;\n suff = \"CONS+compression\";\n }\n // do not use PBS-PRO on other than \"metacentrum.mwf\" data - not enough information is available.\n if (alg == 5) {\n policy = new PBS_PRO(scheduler);\n suff = \"PBS-PRO\";\n }\n\n if (alg == 10) {\n policy = new BestGap(scheduler);\n suff = \"BestGap\";\n }\n if (alg == 11) {\n suff = \"BestGap+RandSearch(\" + multiplicator + \")\";\n policy = new BestGap(scheduler);\n opt_alg = new RandomSearch();\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n\n if (alg == 19) {\n suff = \"CONS+LS(\" + multiplicator + \")\";\n policy = new CONS(scheduler);\n opt_alg = new GapSearch();\n\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n if (alg == 20) {\n suff = \"CONS+RandSearch(\" + multiplicator + \")\";\n policy = new CONS(scheduler);\n opt_alg = new RandomSearch();\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n if (alg == 21) {\n suff = \"CONS-no-compress\";\n policy = new CONS(scheduler);\n if (useEventOpt) {\n fix_alg = new GapSearch();\n // instead of compression, use LS-based optimization on early job completion\n suff += \"-EventOptLS\";\n }\n }\n\n System.out.println(\"Now scheduling \" + total_gridlet[set] + \" jobs by: \" + suff + \", using \" + data_sets[set] + \" data set.\");\n\n suff += \"@\" + data_sets[set];\n\n // this cycle may be used when some modifications of one data set are required in multiple runs of Alea 3.0 over same data-set.\n for (int pass_count = 1; pass_count <= experiment_count; pass_count++) {\n\n try {\n // creates entities\n String job_loader_name = data_sets[set] + \"_JobLoader\";\n String failure_loader_name = data_sets[set] + \"_FailureLoader\";\n\n // creates all grid resources\n MachineLoader m_loader = new MachineLoader(10000, 3.0, data_sets[set]);\n rnd_seed = sel_alg;\n\n // creates 1 scheduler\n\n JobLoader job_loader = new JobLoader(job_loader_name, baudRate, total_gridlet[set], data_sets[set], maxPE, minPErating, maxPErating,\n multiplier, pass_count, m_loader.total_CPUs, estimates);\n if (failures) {\n FailureLoaderNew failure = new FailureLoaderNew(failure_loader_name, baudRate, data_sets[set], clusterNames, machineNames, 0);\n }\n // start the simulation\n System.out.println(\"Starting the Alea 3.0\");\n GridSim.startGridSimulation();\n } catch (Exception e) {\n System.out.println(\"Unwanted errors happened!\");\n System.out.println(e.getMessage());\n e.printStackTrace();\n System.out.println(\"Usage: java Test [time | space] [1-8]\");\n }\n\n System.out.println(\"=============== END OF TEST \" + pass_count + \" ====================\");\n // reset inner variables of the simulator\n Scheduler.load = 0.0;\n Scheduler.classic_load = 0.0;\n Scheduler.max_load = 0.0;\n Scheduler.classic_activePEs = 0.0;\n Scheduler.classic_availPEs = 0.0;\n Scheduler.activePEs = 0.0;\n Scheduler.availPEs = 0.0;\n Scheduler.requestedPEs = 0.0;\n Scheduler.last_event = 0.0;\n Scheduler.start_event = -10.0;\n Scheduler.runtime = 0.0;\n\n // reset internal SimJava variables to start new experiment with different job/gridlet setup\n Sim_system.setInComplete(true);\n // store results\n result_collector.generateResults(suff, experiment_count);\n result_collector.reset();\n results.clear();\n System.out.println(\"Max. estim has been used = \" + max_estim);\n System.gc();\n }\n }\n }\n // end of the whole simulation\n }", "private void start()\n\tthrows FileNotFoundException\n\t{\n\t\t// Open the data file for reading\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(\"distance.in\")));\n\n\t\t// Read in the number of datasets.\n\t\ttry {\n \t\tline = in.readLine();\n\t\t\ttokenBuffer = new StringTokenizer(line);\n\t\t\tnumDatasets = Integer.parseInt(tokenBuffer.nextToken());\n\n \t} catch(IOException ioError) {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\"Error occurred while reading in the first line of input.\");\n \t\tioError.printStackTrace();\n\t\t\t\tSystem.exit(1);\n \t}\n\n\t\t// While we have data to process...\n\t\tfor(int index = 0; index < numDatasets; index++) { \n\t\t\t// Grab a line of input \t\t\n\t\t\ttry {\n \t\tline = in.readLine();\n\n } catch(IOException ioError) {\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Error occurred while reading in the next line of input.\");\n \t\t\tioError.printStackTrace();\n\t\t\t\t\tSystem.exit(1);\n \t\t}\n\n\t\t\t// Popluate the unsorted list using this line of data\n\t\t\tbuildUnsortedList(line);\n\n\t\t\t// Sort the list using recursion\n\t\t\twhile(!sortList());\n\n\t\t\t// Print the mean variable between the sorted and unsorted list\n\t\t\tSystem.out.println(calcDistance());\n\t\t}\n\t}", "public static void main(String args[]) throws FileNotFoundException{\n\t\t//Pass parameters to inputGenerator if necessary\n\t\tif(args.length > 2 && args[2].equalsIgnoreCase(\"G\")){\n\t\t\tif(args.length == 4){\n\t\t\tInputGenerator.main(new String[]{args[3]});\n\t\t\t}\n\t\t\telse if(args.length == 5){\n\t\t\t\tInputGenerator.main(new String[]{args[3], args[4]});\n\t\t\t}\n\t\t\telse\n\t\t\t\tInputGenerator.main(null);\n\t\t}\n\t\tForest forest = new Forest(args[0]);\n\t\t//System.out.println();\n\t\tif(args.length > 1){\n\t\t\tLocalSearch search = new LocalSearch(forest, args[1]);\n\t\t}\n\t\telse{\n\t\t\tLocalSearch search = new LocalSearch(forest, null);\n\t\t}\n\t\t//forest.printForestGrid();\n\t\tfor(Space f:forest.getFriendLocations()){\n\t\t\tSystem.out.println((f.getRowNumber() + 1) + \" \" + (f.getColumnNumber() + 1));\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n String usage =\n \"Usage:\\tjava org.apache.lucene.demo.SearchFiles [-index dir] [-field f] [-repeat n] [-queries file] [-query string] [-raw] [-paging hitsPerPage]\\n\\nSee http://lucene.apache.org/core/4_1_0/demo/ for details.\";\n if (args.length > 0 && (\"-h\".equals(args[0]) || \"-help\".equals(args[0]))) {\n System.out.println(usage);\n System.exit(0);\n }\n\n String index = \"index\";\n String field = \"contents\";\n String queries = null;\n int repeat = 0;\n boolean raw = false;\n String queryString = null;\n int hitsPerPage = 10;\n String[] fileTypes = null;\n Date fileDate = null;\n Set<String> mFilesSet = new HashSet<>();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n String fileDateString = null;\n\n for (int i = 0; i < args.length; i++) {\n if (\"-index\".equals(args[i])) {\n index = args[i + 1];\n i++;\n } else if (\"-field\".equals(args[i])) {\n field = args[i + 1];\n i++;\n } else if (\"-queries\".equals(args[i])) {\n queries = args[i + 1];\n i++;\n } else if (\"-query\".equals(args[i])) {\n queryString = args[i + 1];\n i++;\n } else if (\"-repeat\".equals(args[i])) {\n repeat = Integer.parseInt(args[i + 1]);\n i++;\n } else if (\"-raw\".equals(args[i])) {\n raw = true;\n } else if (\"-paging\".equals(args[i])) {\n hitsPerPage = Integer.parseInt(args[i + 1]);\n if (hitsPerPage <= 0) {\n System.err.println(\"There must be at least 1 hit per page.\");\n System.exit(1);\n }\n i++;\n } else if(\"-filter\".equals(args[i])){\n filtering = true;\n }\n }\n\n if(filtering) {\n //read the filters file\n try (\n InputStream fis = new FileInputStream(\"filters.txt\");\n InputStreamReader isr = new InputStreamReader(fis, Charset.defaultCharset());\n BufferedReader br = new BufferedReader(isr);\n ) {\n //read first line which contains the types of the files to be searched\n Stream<String> lines;\n lines = br.lines();\n\n\n for (Iterator<String> i = lines.iterator(); i.hasNext(); ) {\n String line;\n line = i.next();\n if (line.startsWith(\"#\")) { //ignore comments in filters file\n } else if (line.startsWith(\"files: \")) {\n line = line.replaceFirst(\"files: \", \"\");\n fileTypes = line.split(\",\");\n mFilesSet.add(\"pdf\");\n mFilesSet.add(\"txt\");\n mFilesSet.add(\"epub\");\n for (int j = 0; j < fileTypes.length; j++) {\n mFilesSet.remove(fileTypes[j]); //remove from the hashset those file types parsed from the user file\n }\n } else if (line.startsWith(\"date:\")) {\n line = line.replaceFirst(\"date: \", \"\");\n fileDate = dateFormat.parse(line);\n fileDateString = line;\n //System.out.println(fileDateString);\n //System.out.println(\"Date: \" + fileDate.toString());\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n IndexReader reader = DirectoryReader.open(FSDirectory.open(Paths.get(index)));\n IndexSearcher searcher = new IndexSearcher(reader);\n Analyzer analyzer = new MyAnalyzer();\n\n BufferedReader in = null;\n\n if (queries != null) {\n in = Files.newBufferedReader(Paths.get(queries), StandardCharsets.UTF_8);\n } else {\n in = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8));\n }\n\n QueryParser parser = new QueryParser(field, analyzer);\n BooleanQuery.Builder booleanQueryBuilder = new BooleanQuery.Builder();\n BooleanQuery booleanQuery = booleanQueryBuilder.build();\n while (true) {\n if (queries == null && queryString == null) {// prompt the user\n System.out.println(\"Enter query: \");\n }\n\n String line = queryString != null ? queryString : in.readLine();\n\n if (line == null || line.length() == -1) {\n break;\n }\n\n line = line.trim();\n if (line.length() == 0) {\n break;\n }\n\n Query query;\n\n if(filtering) {\n for (Iterator<String> iterator = mFilesSet.iterator(); iterator.hasNext(); ) {\n String mString = iterator.next();\n Query mQuery = new TermQuery(new Term(\"filetype\", mString));\n booleanQueryBuilder.add(mQuery, BooleanClause.Occur.MUST_NOT);\n }\n query = parser.parse(line);\n\n Date currentDate = new Date();\n BytesRef lowerTerm = new BytesRef(fileDateString);\n BytesRef upperTerm = new BytesRef(dateFormat.format(currentDate));\n //System.out.println(dateFormat.format(currentDate));\n TermRangeQuery dateQuery = TermRangeQuery.newStringRange(\"modified\",fileDateString,dateFormat.format(currentDate),false,false);\n //Query dateQuery = IntPoint.newRangeQuery(\"modified\", ((int) fileDate.getTime()),(int)currentDate.getTime());\n booleanQueryBuilder.add(dateQuery, BooleanClause.Occur.MUST);\n booleanQueryBuilder.add(query, BooleanClause.Occur.MUST);\n //booleanQueryBuilder.add(dateQuery, BooleanClause.Occur.MUST);\n\n booleanQuery = booleanQueryBuilder.build();\n //System.out.println(\"Query: \" + booleanQuery.toString());\n //System.out.println(\"Searching for: \" + query.toString(field));\n }\n else {\n query = parser.parse(line);\n }\n if (repeat > 0) { // repeat & time as benchmark\n Date start = new Date();\n for (int i = 0; i < repeat; i++) {\n searcher.search(query, 100);\n }\n Date end = new Date();\n System.out.println(\"Time: \" + (end.getTime() - start.getTime()) + \"ms\");\n }\n\n if(filtering){\n doPagingSearch(in, searcher, booleanQuery, hitsPerPage, raw, queries == null && queryString == null);\n }\n else {\n doPagingSearch(in, searcher, query, hitsPerPage, raw, queries == null && queryString == null);\n }\n if (queryString != null) {\n break;\n }\n }\n reader.close();\n\n }", "public static void main(final String[] args) {\n \t\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tPhotoOrganizer main = new PhotoOrganizer();\n\t\t\t\t\n\t\t\t\tmain.setVisible(true);\n\t\t\t\t\n\t\t\t\tif (args.length == 0) {\n\t\t\t\t\tmain.loadPhotos(\"sample-photos\");\n\t\t\t\t} else if (args.length == 1) {\n\t\t\t\t\tmain.loadPhotos(args[0]);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.err.println(\"too many command-line arguments\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}); \n\t}", "public static void main(String[] args) throws IOException {\n\t String FinalContigWritePath=args[0];\n\t\tString ContigAfterPath=args[1];\n\t\tString ContigSPAdesPath=args[2];\n\t\tString MUMmerFile1=args[3];\n\t\tString MUMmerFile2=args[4];\n\t\tint SizeOfContigAfter=CommonClass.getFileLines(ContigAfterPath)/2;\n\t String ContigSetAfterArray[]=new String[SizeOfContigAfter];\n\t int RealSizeOfContigSetAfter=CommonClass.FastaToArray(ContigAfterPath,ContigSetAfterArray); \n\t System.out.println(\"The real size of ContigSetAfter is:\"+RealSizeOfContigSetAfter);\n\t\t//low.\n\t\tint SizeOfContigSPAdes=CommonClass.getFileLines(ContigSPAdesPath);\n\t String ContigSetSPAdesArray[]=new String[SizeOfContigSPAdes+1];\n\t int RealSizeOfContigSetSPAdes=CommonClass.FastaToArray(ContigSPAdesPath,ContigSetSPAdesArray); \n\t System.out.println(\"The real size of ContigSetSPAdes is:\"+RealSizeOfContigSetSPAdes);\n\t\t//Loading After.\n\t\tint LoadingContigAfterCount=0;\n\t\tString LoadingContigAfterArray[]=new String[RealSizeOfContigSetAfter]; \n\t\tfor(int r=0;r<RealSizeOfContigSetAfter;r++)\n\t\t{\n\t\t\t if(ContigSetAfterArray[r].length()>=64)\n\t\t\t {\n\t\t\t\t LoadingContigAfterArray[LoadingContigAfterCount++]=ContigSetAfterArray[r];\n\t\t\t }\n\t\t}\n\t\tSystem.out.println(\"File After loading process end!\");\n\t\t//Alignment1.\n\t\tint SizeOfMUMmerFile1 = CommonClass.getFileLines(MUMmerFile1);\n\t\tString MUMerArray1[] = new String[SizeOfMUMmerFile1];\n\t\tint RealSizeMUMmer1 = CommonClass.FileToArray(MUMmerFile1, MUMerArray1);\n\t\tSystem.out.println(\"The real size of MUMmer1 is:\" + RealSizeMUMmer1);\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile2 = CommonClass.getFileLines(MUMmerFile2);\n\t\tString MUMerArray2[] = new String[SizeOfMUMmerFile2];\n\t\tint RealSizeMUMmer2 = CommonClass.FileToArray(MUMmerFile2, MUMerArray2);\n\t\tSystem.out.println(\"The real size of MUMmer2 is:\" + RealSizeMUMmer2);\n\t\t//Get ID1.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor(int f=4;f<RealSizeMUMmer1;f++)\n\t\t{\n\t\t\tString[] SplitLine1 = MUMerArray1[f].split(\"\\t|\\\\s+\");\n\t\t\tif(SplitLine1.length==14 && (SplitLine1[13].equals(\"[CONTAINS]\") || SplitLine1[13].equals(\"[BEGIN]\") || SplitLine1[13].equals(\"[END]\")))\n\t\t\t{\n\t\t\t\tString[] SplitLine2 = SplitLine1[11].split(\"_\");\n\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine2[1]);\n\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t}\n\t\t}\n\t\t//Get ID2.\n\t\tfor(int g=4;g<RealSizeMUMmer2;g++)\n\t\t{\n\t\t\tString[] SplitLine11 = MUMerArray2[g].split(\"\\t|\\\\s+\");\n\t\t\tString[] SplitLine12 = SplitLine11[12].split(\"_\");\n\t\t\tint SPAdes_id = Integer.parseInt(SplitLine12[1]);\n\t\t\thashSet.add(SPAdes_id);\n\t\t}\n\t //Write.\n\t\tint LineNum1=0;\n\t for(int x=0;x<LoadingContigAfterCount;x++)\n\t {\n\t\t\t FileWriter writer1= new FileWriter(FinalContigWritePath+\"contig.AfterMerge.fa\",true);\n\t writer1.write(\">\"+(LineNum1++)+\":\"+LoadingContigAfterArray[x].length()+\"\\n\"+LoadingContigAfterArray[x]+\"\\n\");\n\t writer1.close();\n\t }\n\t //Filter.\n\t\tint CountAdd=0;\n\t\tSet<String> HashSetSave = new HashSet<String>();\n\t for(int k=0;k<RealSizeOfContigSetSPAdes;k++)\n\t {\n\t \tif(!hashSet.contains(k))\n\t \t{\n\t \t\tHashSetSave.add(ContigSetSPAdesArray[k]);\n\t \t}\n\t }\n\t\tSystem.out.println(\"The real size of un-useded contigs is:\" + HashSetSave.size());\n\t\t//Write.\n\t\tIterator<String> it = HashSetSave.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tString SPAdesString = it.next();\n\t\t\tint Flag=1;\n\t\t for(int x=0;x<LoadingContigAfterCount;x++)\n\t\t {\n\t\t \tif((LoadingContigAfterArray[x].length()>=SPAdesString.length())&&(LoadingContigAfterArray[x].contains(SPAdesString)))\n\t\t \t{\n\t\t \t\tFlag=0;\n\t\t \t\tbreak;\n\t\t \t}\n\t\t }\n\t\t\tif(Flag==1)\n\t\t\t{\n\t\t\t\tFileWriter writer = new FileWriter(FinalContigWritePath+\"contig.AfterMerge.fa\",true);\n\t\t\t\twriter.write(\">Add:\"+(LineNum1++)+\"\\n\"+SPAdesString+\"\\n\");\n\t\t\t\twriter.close();\n\t\t\t\tCountAdd++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The real size of add Complementary contigs is:\" + CountAdd);\n\t\tSystem.out.println(\"File write process end!\");\n }", "public static void main(String [] args) {\n\n String priorDirectory = \"pathway_lists\"; //Directory of prior knowledge files, we assume that every file in here is a prior knowledge file\n boolean priorMatrices = true; //Are priors in the form of a matrix or a sif file?\n String dataFile = \"\"; //Filename of the dataset to analyze\n String runName = \"\"; //Name of the run to produce output directory\n int ns = 20; //Number of subsamples to test\n int numLambdas = 40; //Number of lambda values to test\n double low = 0.05; //Low end of lambda range to do knee point analysis\n double high = 0.95; //High end of lambda range to do knee point analysis\n boolean loocv = false; //Do we do leave-one-out cross validation instead of ns subsamples\n boolean makeScores = false; //Should we make edge score matrices?\n boolean fullCounts = false; //Do we want to output counts for edges across subsamples / lambda parameters\n int index = 0;\n List<String> toRemove = new ArrayList<String>();\n try {\n while (index < args.length) {\n if (args[index].equals(\"-ns\")) {\n ns = Integer.parseInt(args[index + 1]);\n index += 2;\n } else if (args[index].equals(\"-nl\")) {\n numLambdas = Integer.parseInt(args[index + 1]);\n index += 2;\n } else if(args[index].equals(\"-llow\")){\n low = Double.parseDouble(args[index+1]);\n index+=2;\n }else if (args[index].equals(\"-lhigh\")){\n high = Double.parseDouble(args[index+1]);\n index+=2;\n } else if(args[index].equals(\"-run\")) {\n runName = args[index+1];\n index+=2;\n }\n else if(args[index].equals(\"-fullCounts\"))\n {\n fullCounts = true;\n index++;\n }\n else if (args[index].equals(\"-priors\")) {\n priorDirectory = args[index + 1];\n index += 2;\n } else if (args[index].equals(\"-sif\")) {\n priorMatrices = false;\n index++;\n } else if (args[index].equals(\"-data\")) {\n dataFile = args[index + 1];\n index += 2;\n }\n else if(args[index].equals(\"-rm\"))\n {\n int count = index + 1;\n while(count < args.length && !args[count].startsWith(\"-\"))\n {\n toRemove.add(args[count]);\n count++;\n }\n index = count;\n } else if (args[index].equals(\"-loocv\")) {\n loocv = true;\n index++;\n }\n else if(args[index].equals(\"-makeScores\"))\n {\n makeScores = true;\n index++;\n }\n else if(args[index].equals(\"-v\"))\n {\n verbose = true;\n index++;\n }\n else\n index++;\n }\n }\n catch(ArrayIndexOutOfBoundsException e)\n {\n System.err.println(\"Command line arguments not specified properly at argument: \" + args[index]);\n e.printStackTrace();\n System.exit(-1);\n }\n catch(NumberFormatException e)\n {\n System.err.println(\"Expected a number for element: \" + args[index]);\n e.printStackTrace();\n System.exit(-1);\n }\n catch(Exception e)\n {\n System.err.println(\"Double check command line arguments\");\n e.printStackTrace();\n System.exit(-1);\n }\n\n //Create lambda range to test based on input parameters\n double [] initLambdas = new double[numLambdas];\n for(int i = 0; i < numLambdas;i++)\n {\n initLambdas[i] = low + i*(high-low)/numLambdas;\n }\n\n //Load in the dataset\n DataSet d = null;\n try {\n d = MixedUtils.loadDataSet2(dataFile);\n }\n catch(Exception e)\n {\n System.err.println(\"Error loading in data file\");\n e.printStackTrace();\n System.exit(-1);\n }\n\n if(verbose)\n {\n System.out.println(\"Removing Variables... \" + toRemove);\n }\n //Remove variables specified by the user\n for(String s:toRemove)\n {\n d.removeColumn(d.getVariable(s));\n }\n\n //Add dummy discrete variable to the dataset if only a continuous dataset is provided\n boolean addedDummy = false;\n if(d.isContinuous())\n {\n System.out.print(\"Data is only continuous, adding a discrete variable...\");\n Random rand = new Random();\n DiscreteVariable temp= new DiscreteVariable(\"Dummy\",2);\n d.addVariable(temp);\n int column = d.getColumn(d.getVariable(temp.getName()));\n for(int i = 0; i < d.getNumRows();i++)\n {\n d.setInt(i,column,rand.nextInt(temp.getNumCategories()));\n }\n System.out.println(\"Done\");\n addedDummy = true;\n }\n if(verbose)\n {\n System.out.println(\"Full Dataset: \" + d);\n System.out.println(\"Is DataSet Mixed? \" + d.isMixed());\n }\n try{\n File x = new File(runName);\n if(x.exists())\n {\n if(x.isDirectory())\n {\n System.err.println(\"Please specify a run name that does not have an existing directory\");\n System.exit(-1);\n }\n else\n {\n System.err.println(\"Please specify a run name that isn't a file\");\n System.exit(-1);\n }\n\n }\n x.mkdir();\n\n\n //Loading in prior knowledge files\n File f = new File(priorDirectory);\n if(!f.isDirectory())\n {\n System.err.println(\"Prior sources directory does not exist\");\n System.exit(-1);\n }\n HashMap<Integer,String> fileMap = new HashMap<Integer,String>();\n int numPriors = f.listFiles().length;\n SparseDoubleMatrix2D[] priors = new SparseDoubleMatrix2D[numPriors];\n\n //Load in each prior from the directory, accounting for whether its a matrix or an sif file\n //Add accounting for whether a dummy variable was added to the data\n for(int i = 0;i < f.listFiles().length;i++)\n {\n fileMap.put(i,f.listFiles()[i].getName());\n String currFile = f.listFiles()[i].getPath();\n if(!priorMatrices)\n {\n PrintStream out = new PrintStream(\"temp.txt\");\n createPrior(f.listFiles()[i],out,d.getVariableNames());\n currFile = \"temp.txt\";\n }\n if(addedDummy)\n {\n addLines(new File(currFile));\n priors[i] = new SparseDoubleMatrix2D(realDataPriorTest.loadPrior(new File(\"temp_2.txt\"),d.getNumColumns()));\n }\n else\n {\n priors[i] = new SparseDoubleMatrix2D(realDataPriorTest.loadPrior(new File(currFile),d.getNumColumns()));\n }\n }\n //Delete maintenance files\n File t = new File(\"temp.txt\");\n t.deleteOnExit();\n t = new File(\"temp_2.txt\");\n if(t.exists())\n t.deleteOnExit();\n\n\n\n //Generate subsample indices\n int [][] samps = genSubs(d,ns,loocv);\n System.out.println(\"Done\");\n //Generate lambda parameters to test based on knee points and initial lambdas\n System.out.print(\"Generating Lambda Params...\");\n mgmPriors m = new mgmPriors(ns,initLambdas,d,priors,samps,verbose);\n System.out.println(\"Done\");\n\n\n //Set piMGM to output edge scores subsampled data after computing optimal lambda parameters)\n if(makeScores) {\n m.makeEdgeScores();\n }\n\n //Run piMGM\n System.out.print(\"Running piMGM...\");\n Graph g = m.runPriors();\n System.out.println(\"Done\");\n System.out.print(\"Printing Results...\");\n\n //Print all result files, edge scores, and full edge counts (across subsamples and params)\n printAllResults(g,m,runName,fileMap);\n if(makeScores)\n {\n double [][] scores = m.edgeScores;\n printScores(scores,d,runName);\n }\n if(fullCounts)\n {\n TetradMatrix tm = m.fullCounts;\n printCounts(tm,d,runName);\n }\n System.out.println(\"Done\");\n }\n catch(Exception e)\n {\n System.err.println(\"Unknown Error\");\n e.printStackTrace();\n System.exit(-1);\n }\n\n }", "public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String fileName = reader.readLine();\n reader.close();\n\n //verify is the program has the console arguments\n if (args.length > 0) {\n\n //put all file to Map<Integer, String>. Integer is the qual to id\n reader = new BufferedReader(new FileReader(fileName));\n HashMap<Integer, String> map = new LinkedHashMap<>();\n while (reader.ready()) {\n String data = reader.readLine();\n int i = Integer.parseInt(data.substring(0, 8).trim());\n map.put(i, data);\n }\n reader.close();\n\n if (args[0].equals(\"-u\")) { //verify is the first console argument equals to \"-u\"\n String lineValue = map.get(args[1]);\n String id, productName,price, quantity;\n// if (args.length == 5) {\n id = args[1];\n productName = args[2];\n price = args[3];\n quantity = args [4];\n String updatedLine = String.format(\"%-8s%-30.30s%-8s%-4s\", id, productName, price, quantity);\n map.put(Integer.parseInt(id.trim()), updatedLine);\n// } else if (args.length > 5) {\n//\n// }\n\n\n } else if (args[0].equals(\"-d\")) { //verify is the first console argument equals to \"-d\"\n map.remove(Integer.parseInt(args[1]));\n }\n\n //write the file from the Map\n BufferedWriter writer = new BufferedWriter(new FileWriter(fileName));\n for (String s: map.values()) {\n writer.write(s);\n writer.newLine();\n }\n writer.close();\n\n }\n }", "public static void main(String[] args) {\n\t\tCreateClassificationData test = new CreateClassificationData(\"originalData/Data.txt\");\n\t}" ]
[ "0.67421716", "0.66614217", "0.6450099", "0.6436978", "0.6424919", "0.6422015", "0.6399726", "0.63868845", "0.63654846", "0.6276294", "0.6259914", "0.6247561", "0.6243733", "0.6235318", "0.6215965", "0.62108594", "0.620612", "0.61942816", "0.61780167", "0.6173881", "0.6171461", "0.6169024", "0.6161667", "0.6159836", "0.6156713", "0.6152242", "0.6148796", "0.6137239", "0.61338586", "0.61297554", "0.6129507", "0.61223453", "0.61185724", "0.60987186", "0.6095083", "0.6087021", "0.60846645", "0.6083943", "0.60839206", "0.60719603", "0.60640633", "0.6061666", "0.6045532", "0.6043411", "0.6038328", "0.60332334", "0.60324454", "0.60208946", "0.60149676", "0.60137194", "0.60125965", "0.60104513", "0.60101426", "0.6008294", "0.59857213", "0.59838736", "0.59757936", "0.59752244", "0.5972929", "0.5972888", "0.5970565", "0.5969088", "0.5967226", "0.59653217", "0.59611154", "0.596059", "0.5960455", "0.5959413", "0.59580755", "0.5948466", "0.59439135", "0.5939442", "0.59313965", "0.5931162", "0.5925965", "0.5925587", "0.59253216", "0.59163743", "0.5915889", "0.5909254", "0.59078497", "0.5906039", "0.5890359", "0.5882974", "0.5882797", "0.58812696", "0.5881142", "0.58793074", "0.58791196", "0.58733165", "0.5872864", "0.5869947", "0.586989", "0.5868471", "0.58626056", "0.586022", "0.58574915", "0.585146", "0.5842495", "0.584239" ]
0.69459206
0
This is the interface that all observers have to implement. Created by Sripadmanaban on 9/6/2015.
public interface Observer { /** * This is the function that gets ccalled when the temperature gets updated. * * @param temperature A double that contains the temperature in kelvin. * @param maxTemperature A double that contains the maximum temperature in kelvin. * @param minTemperature A double that conatins the minimum temperature in kelvin. */ void update(double temperature, double maxTemperature, double minTemperature, int humidity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void NotifyObserver() {\n\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\t\r\n\t}", "public interface DataObserver {\n }", "public interface Observer {\n\n void register(Listener listener);\n void unRegister(Listener listener);\n void update(String name);\n String getName();\n}", "public interface Observer {\n\tvoid update(Observable o, String event);\n}", "public interface Observer {\n //method to update the observer, used by subject\n public void update();\n\n}", "public interface Observer {\n void upate();\n}", "public interface Observer {\n void update();\n}", "public abstract O getObserver();", "public interface Subject {\n /**\n * method that will add an observer to a list of observers\n * @param observer the Observer that is added to the list\n */\n public void registerObserver(Observer observer);\n\n /**\n * method that will remove an observer from a list of observers\n * @param observer the Observer that will be removed from the list\n */\n public void removeObserver(Observer observer);\n\n /**\n * method that will notify the observers by updating the par and strokes\n * @param strokes the int for the number of strokes the golfer has made\n * @param par the int for the par of the hole the golfer is on \n */\n public void notifyObservers(int strokes, int par);\n}", "public void notifyObservers() {}", "public interface Observer {\n /**\n * This method is called by observed object (Observable) when it wants to notify their observers.\n */\n void update();\n}", "public static interface Observer {\n\n\t\tpublic void turnoIniciado(TableroInmutable estadoTablero, Ficha turno);\n\t\tpublic void onMovimientoEnd(TableroInmutable estadoTablero, Ficha turno, Ficha siguiente);\n\t\tpublic void onMovimientoIncorrecto(java.lang.String explicacion, TableroInmutable estadoTablero, Ficha turno);\n\t\tpublic void onMovimientoStart(Ficha turno);\n\t\tpublic void onReset(TableroInmutable estadoInicial, Ficha turno);\n\t\tpublic void onUndo(TableroInmutable estadoTablero, Ficha turno, boolean hayMas);\n\t\tpublic void onUndoNotPossible();\n\t\tpublic void partidaTerminada(TableroInmutable tableroFinal, Ficha ganador);\n\t}", "public interface Observer{\n //一发现别人有动静,自己也要行动起来\n public void update(String context);\n\n\n}", "public void notifyObservers();", "public void notifyObservers();", "public void notifyObservers();", "interface Observer {\r\n public void update(String msg);\r\n}", "public interface Observer {\r\n \r\n /**\r\n * This method allows to update.\r\n */\r\n void update();\r\n}", "public interface IObservable\n{\n\t/**\n\t * This method allows an observer to be added to the list of observer\n\t * objects\n\t * \n\t * @param anIObserver\n\t * the observer (IObsever) who wants to be added and updated when\n\t * a specific state changes or event occurs\n\t */\n\tpublic abstract void addObserver(IObserver anIObserver);\n\n\tpublic abstract void deleteObserver(IObserver anIObserver);\n\n\tpublic abstract void deleteObservers();\n\n\tpublic abstract int countObservers();\n}", "public interface Observer {\n /**\n * Called when createAndSetLocalDescription or setRemoteDescription failed.\n */\n void onFailure(String description);\n\n /**\n * Called when createAndSetLocalDescription succeeded.\n */\n void onLocalDescriptionCreatedAndSet(SessionDescriptionType type, String description);\n\n /**\n * Called when setRemoteDescription succeeded.\n */\n void onRemoteDescriptionSet();\n\n /**\n * New ICE candidate available. String representation defined in the IceCandidate class.\n * To be sent to the remote peer connection.\n */\n void onIceCandidate(String iceCandidate);\n\n /**\n * Called when connected or disconnected. In disconnected state recovery procedure\n * should only rely on signaling channel.\n */\n void onIceConnectionChange(boolean connected);\n }", "protected abstract void registerObserver();", "public interface IObserverPartie {\n\n\t/**\n\t * Notifie aux observers que les attributs des joueurs ont ete modifies\n\t */\n\tpublic void updateJoueurs();\n\t\n}", "public interface Observed {\n\n public void addObserver(Observer o);\n\n public void removeObserver(Observer o);\n}", "public interface TManagerObserver extends ModelObserver {\n\t/**\n\t * Metodo para notificar que se ha avanzado en la partida, y que el jugador que tiene\n\t * el turno actual y el siguiente han cambiado\n\t * @param act Nombre del Integrante de la partida que tiene el turno actual\n\t * @param sig Nombre del Integrante de la partida que tendra el siguiente turno\n\t */\n\tpublic void mostrarTurnos(String act, String sig);\n\t\n\t\n\t/**\n\t * Metodo para notificar a los observadores que se ha comenzado un nuevo turno\n\t * @param mano Lista de fichas a mostrar por Pantalla\n\t */\n\tpublic void nuevoTurno(Integrante i, String act, String sig);\n\n\tpublic void turnoAcabado(String j);\t\n\t\n\t/**\n\t * Metodo para notificar un error a un jugador por la GUI\n\t * @param nick \n\t * @param err\n\t */\n\tpublic void onError(String err, String nick);\t\n\t\n\tpublic void onRegister(String act, String sig);\n\n\n\tpublic void partidaAcabada(String nick);\n\t\n}", "static void NotifyCorrespondingObservers() {}", "void notifyObservers();", "void notifyObservers();", "public interface Observer {\n public void update(String context);\n\n}", "@Override\r\n\tpublic void registerObserver(Observer observer) {\n\t\t\r\n\t}", "public void updateObserver();", "private interface Observable{\n void registerObserver(Observer observer);\n void removeObserver(Observer observer);\n void updateScore(String score);\n void notifyObservers();\n void notifyObservers(String errorMessage);\n }", "public interface Observer <T> {\n /**\n * The method that is called by the notify method of the Observable classes.\n * @param message The message sent by the notify method of the observable classes.\n */\n void update(T message);\n}", "public static interface Observer {\n\t\t\n\t\t/**\n\t\t * On modify clicked.\n\t\t * \n\t\t * @param result\n\t\t * the result\n\t\t */\n\t\tvoid onModifyClicked(CQLFunctionArgument result);\n\t\t\n\t\t/**\n\t\t * On delete clicked.\n\t\t *\n\t\t * @param result\n\t\t * the result\n\t\t * @param index\n\t\t * the index\n\t\t */\n\t\tvoid onDeleteClicked(CQLFunctionArgument result, int index);\n\t}", "public interface Observer<T> {\n\n void modified(T obj);\n}", "public interface MyObserver {\n\n public void myNotify(MyObservable observable);\n\n}", "public interface MyObservable {\n\n void addObserver(MyObserver maddObserver);\n void removeObserver(MyObserver rmObserver);\n void notifyObservers1(String data);\n void notifyObservers2(String data);\n void notifyObservers3(String data);\n void notifyObservers4(String data);\n}", "public interface Timer \n{\n\t/**\n\t * Add an observer to subject's list of observers.\n\t * @param oboserver\n\t */\n public void addTimeObserver(TimeObserver observer);\n /**\n\t * Remove an observer from the subject's list of observers.\n\t * @param oboserver\n\t */\n public void removeTimeObserver(TimeObserver observer);\n /**\n * Inform all observers of a change.\n */\n public void timeChanged();\n}", "public interface Observer {\n\tpublic abstract void update(ArrayList<Document> documents);\n}", "private interface Observer {\n void update(Observable observable, String errorMessage);\n }", "public interface Observer {\n\tpublic void update(Action action);\n}", "void notifyObserver();", "public interface Observer {\n void update(String celebrityName, String facebookPost);\n String getName();\n}", "@Override\n public void notifyObservers() {\n for (Observer observer : observers){\n // observers will pull the data from the observer when notified\n observer.update(this, null);\n }\n }", "public abstract void addObserver(Observer observer);", "public interface ReceiverObserver {\n\n void update(DataNotification notification);\n}", "public interface Observer {\n void update(Observable o, Object arg);\n}", "public interface Observer {\n\n void update(float temperature,float humidity,float pressure);\n\n}", "public interface Subject {\n\n\n void registerObserver(Observer o);\n void removeObserver(Observer o);\n void notifyObservers();\n\n}", "public abstract void addObserver(IObserver anIObserver);", "public abstract IObserver getMediatedObserver();", "public interface Observer {\r\n\r\n /**\r\n * Updates the observer whether he is the winner\r\n * @param winner tells if the observer won the auction\r\n */\r\n void update(boolean winner);\r\n\r\n /**\r\n * Updates the observer with a specific information field\r\n * @param info the information field set by the subject\r\n */\r\n void update(Information info);\r\n\r\n /**\r\n * Bidding, used for actively participating in an auction\r\n * @return a pair of the current bid and the current number\r\n * of won auctions\r\n */\r\n Pair<Double, Integer> bid();\r\n\r\n /**\r\n * A getter for an observer's information, used by the subject\r\n * to better perform in the auction process\r\n * @return the information of this observer\r\n */\r\n Information getInfo();\r\n}", "public interface ShopSubject {\n\n\t /**\n\t * Register an observer to our list of observers.\n\t * \n\t * @param driver the observer object\n\t */\n\t public void registerObserver(DriverObserver driver);\n\n\t /**\n\t * remove an observer from our observer list.\n\t * \n\t * @param driver\n\t */\n\t public void removeObserver(DriverObserver driver);\n\n\t /**\n\t * Notify all observers and Select one.\n\t */\n\t// public void notifyObservers();\n\t \n\t // it come instead of notifyObserver\n\t public void selectDriver();\n\n\t \n\t\n\n}", "public interface Observer {\n public void update(float temperature , float pressure , float humdity);\n}", "@Override\r\n\tpublic void registerObserver(BeatObserver o) {\n\r\n\t}", "public interface VerificateObservable {\n\n\n public void notifyDataChange();\n\n /**\n * subscribe to Obervable\n * @param obs Observer that want to be be subscribe\n */\n public void addLikeObserver(VerificateObserver obs);\n\n public void removeObserver(VerificateObserver obs);\n\n\n public void setGlobalParamActivator(GlobalParamActivator globalParamActivator);\n}", "void addPropertyChangedObserver(PropertyChangeObserver observer);", "public static interface DataChangeObserver {\n /**\n * Called when data has been changed.\n */\n void onDataChanged();\n /**\n * Called when data has been cleared.\n */\n void onDataCleared();\n /**\n * Called when usage reports can be reported to local indexing service.\n */\n void startReportingTask();\n /**\n * Called when usage reports can't be reported to local indexing service any more.\n */\n void stopReportingTask();\n }", "public interface Subject {\n\n void attach(campspot.Observer o);\n void detatch(campspot.Observer o);\n void notifyObserver();\n\n}", "public interface Observer {\n public void update(float temp, float humidity, float pressure);\n}", "public interface Observer {\n public void update(float temp, float humidity, float pressure);\n}", "public interface ModelObserver {\n\n void update();\n void update(Model model);\n\n}", "public interface IObservableGameManager {\t\n\t\n\t/**Methode permettant de declarer la victoire d'un joueur\n\t * @param p le joueur victorieux\n\t */\n\tpublic void notifyPlayerVictory(Player p);\n\t\n\t/**Methode permettant de declarer la defaite d'un joueur\n\t * @param p le joueur perdant\n\t */\n\tpublic void notifyPlayerDefeat(Player p);\n\t\n\t/**Methode permettant de notifier le controlleur lors du changement de la liste de croyants sur table*/\n\tpublic void notifyChangementCroyants();\n\t\n\t/**Methode permettant de notifier le controller lors du changement de tour de jeu*/\n\tpublic void notifyChangementTour();\n\t\n\t/**Methode permettant de notifier le controller lors du changement de contenu de la liste de joueur*/\n\tpublic void notifyChangementJoueurs();\n\t\n\t/**Methode permettant de notifier le controller lors du changement du joueur actif*/\n\tpublic void notifyJoueurActif();\n}", "@Override\r\n\tpublic void notifyObservers() {\n\t\tfor(Observer o : list) {\r\n\t\t\t// Atualiza a informacao no observador\r\n\t\t\to.update(this, this);\r\n\t\t}\r\n\t}", "public interface ObservableListener<T> {\n /**\n * Is called upon an update to the observable\n */\n public void onUpdate(T oldValue, T newValue);\n}", "public interface ObserverInterface<T> {\n\n\n public void noticeAll();\n\n public void notice();\n\n public void register(T t);\n\n\n\n}", "public interface Listener{\n\t\tpublic void notify(Map<String,Serializable> datas);\n\t}", "@Override\n\tpublic void notifyObserver() {\n\t\tEnumeration<ObserverListener> enumd = vector.elements();\n\t\twhile (enumd.hasMoreElements()) {\n\t\t\tObserverListener observerListener = enumd\n\t\t\t\t\t.nextElement();\n\t\t\tobserverListener.observer();\n\t\t\tobserverListener.obsupdata();\n\t\t}\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t for(Observer o : observers){\r\n\t\t o.update();\r\n\t }\r\n\t}", "public interface Observer<T> {\n\n /**\n * Retreive an update from an observable\n *\n * @param subject\n */\n Void update(T subject);\n}", "public interface Observer {\n /**\n * A new section has been created in the test result.\n *\n * @param tr The test result in which the section was created.\n * @param section The section that has been created\n */\n void createdSection(TestResult tr, Section section);\n\n /**\n * A section has been been completed in the test result.\n *\n * @param tr The test result containing the section.\n * @param section The section that has been completed.\n */\n void completedSection(TestResult tr, Section section);\n\n /**\n * New output has been created in a section of the test result.\n *\n * @param tr The test result containing the output.\n * @param section The section in which the output has been created.\n * @param outputName The name of the output.\n */\n void createdOutput(TestResult tr, Section section, String outputName);\n\n /**\n * Output has been completed in a section of the test result.\n *\n * @param tr The test result containing the output.\n * @param section The section in which the output has been completed.\n * @param outputName The name of the output.\n */\n void completedOutput(TestResult tr, Section section, String outputName);\n\n /**\n * The output for a section has been updated.\n *\n * @param tr The test result object being modified.\n * @param section The section in which the output is being produced.\n * @param outputName The name of the output.\n * @param start the start offset of the text that was changed\n * @param end the end offset of the text that was changed\n * @param text the text that replaced the specified range.\n */\n void updatedOutput(TestResult tr, Section section, String outputName, int start, int end, String text);\n\n /**\n * A property of the test result has been updated.\n *\n * @param tr The test result containing the property that was modified.\n * @param name The key for the property that was modified.\n * @param value The new value for the property.\n */\n void updatedProperty(TestResult tr, String name, String value);\n\n /**\n * The test has completed, and the results are now immutable.\n * There will be no further observer calls.\n *\n * @param tr The test result that has been completed.\n */\n void completed(TestResult tr);\n\n }", "@Override\r\n\tpublic void registerObserver(BpmObserver o) {\n\r\n\t}", "public void registerObserver(Observer observer);", "public interface ModelListener {\n\n /**\n * actualise le listener\n * @param src l'Object a actualiser\n */\n public void update(Object src);\n\n}", "public interface Observer<E extends Event> {\n void update(E e);\n\n}", "public void atacar() {\n notifyObservers();\n }", "public interface BioObserver {\n\n\t/**\n\t * Updates the application according to the message passed by an observable class.\n\t * This happens whenever the observer class gets notified by an observable class.\n\t *\n\t * @param message\n\t * - the message transmitted when the observer gets notified.\n\t */\n\tpublic abstract void update(Message message);\n\n}", "public interface Observable<T> {\n /**\n * Sets the variable that is observable. Notifies its Observers of this change.\n *\n * @param t The value to set the observable variable to.\n */\n void set(T t);\n\n /**\n * Adds the given Observer to a collection of this observable. Observers added will be notified of changes.\n *\n * @param observer Object that is observing this Observable.\n */\n void addObserver(Observer observer);\n}", "public interface CrimeObserver {\n void onCrimeChange(int position);\n}", "public interface BPSubject {\n\n void registerObserver(BPObserver bpObserver);\n\n void removeObserver(BPObserver bpObserver);\n\n void notifyItemInserted(Object obj);\n\n void notifyItemChanged(Object obj);\n\n void notifyItemRemoved(Object obj);\n\n}", "@Override\n void notifys() {\n for (Observer o : observers) {\n o.update();\n }\n }", "public interface Observer<T> {\n\n /**\n * Notifies the observer that the provider has finished sending push-based notifications.\n */\n void onComplete();\n\n /**\n * Notifies the observer that the provider has experienced an error condition.\n * @param throwable An object that provides additional information about the error.\n */\n void onError(Throwable throwable);\n\n /**\n * Provides the observer with new data.\n * @param item The current notification information.\n */\n void onNext(T item);\n}", "public interface MyObserver extends Parcelable, Observer {\n\n}", "public interface OAObjectCacheListener<T extends OAObject> {\n \n /**\n * Called when there is a change to an object.\n */\n public void afterPropertyChange(T obj, String propertyName, Object oldValue, Object newValue);\n\n /** \n * called when a new object is added to OAObjectCache, during the object construction. \n */\n public void afterAdd(T obj);\n \n public void afterAdd(Hub<T> hub, T obj);\n \n public void afterRemove(Hub<T> hub, T obj);\n \n public void afterLoad(T obj);\n \n}", "public interface IntegerStorageObserver {\r\n\t\r\n\t/**\r\n\t * The method called every time the subject's\r\n\t * value is being changed.\r\n\t *\r\n\t * @param change the reference that holds all the changes that were made\r\n\t */\r\n\tpublic void valueChanged(IntegerStorageChange change);\r\n}", "private Observer<ArrayList<Station>> createStationListObserver() {\n return new Observer<ArrayList<Station>>() {\n @Override\n public void onChanged(@Nullable ArrayList<Station> newStationList) {\n\n }\n };\n }", "public interface Subject {\n\n void registerObserver(Observer observer);\n\n void removeObserver(Observer observer);\n\n void notifyObservers();\n\n}", "public interface ISubscriber {\r\n\r\n\tpublic void setName(String name);\r\n\tpublic String getName();\r\n\tpublic void notifyMe();\r\n}", "public interface ChatObservable {\r\n void attach(ChatObserver forumObserver);\r\n\r\n void detach(ChatObserver forumObserver);\r\n\r\n void inform();\r\n}", "private void notifyObservers() {\n\t\tIterator<Observer> i = observers.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tObserver o = ( Observer ) i.next();\r\n\t\t\to.update( this );\r\n\t\t}\r\n\t}", "public interface Publisher {\n\n public void registerObserver(Observer o);\n public void removeObserver(Observer o);\n public void notifyObservers();\n\n\n}", "@Override\n public void registerObserver(Observer o) {\n list.add(o);\n \n }", "private void notifyObservers() {\n\t\tfor (Observer observer : subscribers) {\n\t\t\tobserver.update(theInterestingValue); // we can send whole object, or just value of interest\n\t\t\t// using a pull variant, the update method will ask for the information from the observer\n\t\t\t// observer.update(this)\n\t\t}\n\t}", "void addObserver(Observer observer);", "void addObserver(Observer observer);", "public interface Subject {\n\n void registryObserver(Observer observer);\n\n void removeObserver(Observer observer);\n\n void notifyObervers();\n}", "public interface Subject {\n void registerObserver(Observer o);\n void removeObserver(Observer o);\n void notifyObservers();\n}", "public interface Subject {\n void registerObserver(Observer o);\n void removeObserver(Observer o);\n void notifyObservers();\n}", "public interface INotifyChangeListenerServer\n{\n /**\n * 患者状态监听\n *\n * @param listener 消息状态监听器\n * @param registerType 注册类型\n */\n void registerPatientStatusChangeListener(@NonNull IChange<String> listener, @NonNull RegisterType registerType);\n\n /**\n * 医生状态监听\n *\n * @param listener 接收消息监听器\n * @param registerType 注册类型\n */\n void registerDoctorStatusChangeListener(@NonNull IChange<String> listener, @NonNull RegisterType registerType);\n /**\n * 医生转诊申请监听\n *\n * @param listener 接收消息监听器\n * @param registerType 注册类型\n */\n void registerDoctorTransferPatientListener(@NonNull IChange<String> listener, @NonNull RegisterType registerType);\n /**\n * 医生认证状态监听\n *\n * @param listener 接收消息监听器\n * @param registerType 注册类型\n */\n void registerDoctorAuthStatusChangeListener(@NonNull IChange<Integer> listener, @NonNull RegisterType registerType);\n /**\n * 最近联系人监听\n *\n * @param listener 接收消息监听器\n * @param registerType 注册类型\n */\n void registerRecentContactChangeListener(@NonNull IChange<String> listener, @NonNull RegisterType registerType);\n /**\n * 服务包订单状态\n *\n * @param listener 接收消息监听器\n * @param registerType 注册类型\n */\n void registerOrderStatusChangeListener(@NonNull IChange<String> listener, @NonNull RegisterType registerType);\n}", "public interface INotificationListener extends INotifyObject{\r\n\t\r\n\tvoid OnNotificationEvent(int notification, INotifyObject notificationData);\r\n}" ]
[ "0.8036672", "0.78831726", "0.7629715", "0.75851697", "0.755885", "0.75130314", "0.7504584", "0.74873114", "0.74542904", "0.74335015", "0.74036646", "0.74024", "0.7384691", "0.7382417", "0.73315835", "0.73315835", "0.73315835", "0.7327904", "0.73257893", "0.7305329", "0.73049855", "0.729604", "0.7272941", "0.72602916", "0.72501427", "0.72404665", "0.7238206", "0.7238206", "0.72381306", "0.71965486", "0.7180595", "0.71522987", "0.7129101", "0.71281826", "0.71198726", "0.7114225", "0.71015406", "0.7098155", "0.7088085", "0.708659", "0.7068634", "0.7052323", "0.7043636", "0.7037117", "0.70200765", "0.701991", "0.70028543", "0.6999517", "0.698652", "0.69582605", "0.6945107", "0.69428706", "0.6941271", "0.69314754", "0.6907521", "0.68959", "0.68929195", "0.6861418", "0.68434846", "0.68394035", "0.68394035", "0.68255323", "0.68208385", "0.6797852", "0.6790057", "0.6786169", "0.6784671", "0.6783743", "0.67815584", "0.6778167", "0.6761138", "0.6749994", "0.67459834", "0.67326707", "0.67232263", "0.67165166", "0.67106265", "0.67013556", "0.66911143", "0.6688024", "0.6684406", "0.66745025", "0.6666965", "0.666353", "0.6662293", "0.6657209", "0.6646242", "0.6643345", "0.66410226", "0.6633483", "0.662107", "0.6607564", "0.6604617", "0.6592683", "0.6592683", "0.65837604", "0.65817255", "0.65817255", "0.6581125", "0.6579834" ]
0.658249
96
This is the function that gets ccalled when the temperature gets updated.
void update(double temperature, double maxTemperature, double minTemperature, int humidity);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateCelcius(){\n tempInC = ( (tempInF - 32)/9 ) * 5;\n }", "@Override\n\tpublic void update(float temp, float humidity, float pressure) {\n\n\t}", "@Override\r\n\tpublic void TemperatureUpdated(Temperature temperature) {\n\t\t\r\n\t\twhile (form == null);\r\n\t\tform.UpdateTemperature(temperature.getValue());\r\n\t}", "void update(float temp, float humidity, float pressure);", "private void updateTemperatureValue(float temperature) {\n \t\t\n \t\tString mValue = null;\n \t\t\n \t\tif(temperatureFormat.equals(\"c\")) {\n \t\t\tmValue = String.format(celsiusFormat, temperature);\n \t\t} else if(temperatureFormat.equals(\"f\")) {\n \t\t\tmValue = String.format(fahrenheitFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.FAHRENHEIT));\n \t\t} else {\n \t\t\tmValue = String.format(kelvinFormat, \n \t\t\t\t\tUnitConversionUtils.comvertTemperature(temperature, UnitConversionUtils.CELSIUS, UnitConversionUtils.KELVIN));\n \t\t}\n \t\t\n temperatureValueView.setText(mValue);\n \t}", "public void updateChange(View v){\n if(tempUnit=='F')\n changeToTemp.setText(Double.toString(\n (double)Math.round(totalChangeFarenheit*10)/10)\n );\n // Display temperature in Celsius\n else\n changeToTemp.setText(Double.toString(\n (double)Math.round((totalChangeFarenheit-32)*5/9*10)/10)\n );\n }", "private void updateValues(){\n if (mCelsian != null) {\n mCelsian.readMplTemp();\n mCelsian.readShtTemp();\n mCelsian.readRh();\n mCelsian.readPres();\n mCelsian.readUvaValue();\n mCelsian.readUvbValue();\n mCelsian.readUvdValue();\n mCelsian.readUvcomp1Value();\n mCelsian.readUvcomp2Value();\n }\n }", "@Override\n\tpublic void Update(float temperature, float humidity, float pressure) {\n\t\ttemperatureSum += temperature;\n\t\tnumReadings++;\n\t\t\n\t\tif (temperature > maxTemp) {\n\t\t\tmaxTemp = temperature;\n\t\t}\n\t\t\n\t\tif (temperature < minTemp) {\n\t\t\tminTemp = temperature;\n\t\t}\n\t}", "public void setTemperatureNeededToCookAt(double t) {\r\n temp = t;\r\n }", "@Override\n public void skinTemperature(int value, int timestamp) {\n }", "@Override\r\n\tpublic void update(float temp, float umidade, float pressao) {\n\t\t\r\n\t\tthis.temp = temp;\r\n\t\tthis.umid = umidade;\r\n\t\tthis.pressao = pressao;\r\n\t\texibir();\r\n\t\t\r\n\t}", "public void setTemp(int temp) {\n \tthis.temperature = temp;\n }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_m[0] = event.values[0];\r\n\t\t\t\ttemp_m[1] = event.values[1];\r\n\t\t\t\ttemp_m[2] = event.values[2];\r\n\t\t\t}", "private void UI_RefreshSensorData ()\r\n\t{\r\n\t\t\t\t\r\n\t\tlong now = System.currentTimeMillis();\r\n\t\t\r\n\t\tif (now-ts_last_rate_calc>1000)\r\n\t\t{\r\n\t\t\tsensor_event_rate=last_nAccVal/((now-ts_last_rate_calc)/1000.0);\r\n\t\t\tts_last_rate_calc=now;\r\n\t\t}\r\n\t}", "private void openRealTemp() {\n YCBTClient.appTemperatureMeasure(0x01, new BleDataResponse() {\n @Override\n public void onDataResponse(int i, float v, HashMap hashMap) {\n if (i == 0) {\n //success\n }\n }\n });\n }", "private void setTemp(int temperature) {\n\t\tthis.temperature.setValue(temperature);\n\t}", "float getTemperature();", "public void setTemperature(double temp){tempval.setText(Double.toString(temp));}", "void getCabinTemperature(Bus bus, TempHandler callback);", "@Override \n public double getTemperature() { \n return pin.getValue();\n }", "public void setTemperature(Float temperature) {\n this.temperature = temperature;\n }", "public double getTemperature() {return temperature;}", "private void updateViews() {\n if (mStructure == null || mThermostat == null) {\n return;\n }\n\n display_temp = mThermostat.getTargetTemperatureC();\n Log.v(TAG,\"updateViews: display_temp=\"+display_temp);\n // updates all views\n updateAmbientTempTextView();\n updateMenuItems();\n updateThermostatViews();\n updateControlView();\n\n //update the seekbar progress\n double temp = display_temp;\n mTempSeekbar.setProgress(0);\n display_temp = temp;\n mTempSeekbar.setProgress((int)((display_temp-9)/(32-9)*100));\n }", "@Override\r\n public int getTemperature(){\r\n return 10;\r\n }", "private void updateTemperatureImage(float temperature) {\n \t\t\n \t\t//determine which drawable to use\n \t\tif(temperature < maxColdTemp) {\n \t\t\tif(coldTempDrawable == null) {\n \t\t\t\tcoldTempDrawable = getResources().getDrawable(R.drawable.temperature_cold);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(coldTempDrawable);\n \t\t} else if(temperature > minHotTemp) {\n \t\t\tif(hotTempDrawable == null) {\n \t\t\t\thotTempDrawable = getResources().getDrawable(R.drawable.temperature_hot);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(hotTempDrawable);\n \t\t} else {\n \t\t\tif(warmTempDrawable == null) {\n \t\t\t\twarmTempDrawable = getResources().getDrawable(R.drawable.temperature_warm);\n \t\t\t}\n \t\t\ttemperatureImgView.setImageDrawable(warmTempDrawable);\n \t\t}\n \t}", "public void onSensorChanged() {\n\t\tsensorChanged();\n\t}", "public interface Observer {\n\n /**\n * This is the function that gets ccalled when the temperature gets updated.\n *\n * @param temperature A double that contains the temperature in kelvin.\n * @param maxTemperature A double that contains the maximum temperature in kelvin.\n * @param minTemperature A double that conatins the minimum temperature in kelvin.\n */\n void update(double temperature, double maxTemperature, double minTemperature, int humidity);\n}", "public void setTemp(double currentTemp) {\n\t\tthis.currentTemp = currentTemp;\n\t}", "public void updatePeriodic() {\r\n }", "public void setTemperature(int temperature) {\n if (status) {\n this.temperature = temperature;\n } else System.out.println(\"dispozitivul este oprit\");\n }", "public void onTriggerChange() {\n findViewById(R.id.temp).post(new Runnable() {\n public void run() {\n ConsumerIrManager mCIR = ScaryUtil.getConsumerIRService(getApplicationContext());\n if (m_Inst.power) {\n TransmissionCode data = ScaryUtil.getIRCode(m_Inst.sequence, m_Inst.temp); // (TransmissionCode)samsung.get(m_Inst.temp);\n ScaryUtil.transmit(getApplicationContext(),data);\n }\n }\n });\n }", "public float getCurrentTemp(){\n return currentTemp;\n }", "public void setTemperature(int value) {\n this.temperature = value;\n }", "public abstract void temperatureReport();", "public double autoMaintain(double temperature) {\n\t\tthis.temperature = 3.0;\n\t\treturn temperature;\n\t}", "public double getTemp(){\n return currentTemp;\n }", "protected void onSetTemperatureSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public void update(float temp, float humidity, float windSpeed) {\n\t\tSystem.out.println(\n\t\t\t\t\"temp On Park Display\\t\" + temp + \"\\nHumidity\\t\" + humidity + \"\\nWind Speed\\t\" + windSpeed + \"\\n\");\n\t}", "public Float getTemperature () {\n return temperature;\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\tdouble celsius;\r\n\t\tcelsius = Double.parseDouble(temp.getText());//Recuperation de la valeur dans le champ de texte\r\n\t\tcelsius = (celsius * (1.8)) + 32;//Conversion celsius a fahrenheit\r\n\t\tfar.setText(\"\"+celsius+\" Fahrenheit\");\r\n\t//Modifie le texte Fahrenheit pou le modifier et afficher la temperature en Fahrenheit\r\n\t\t\r\n\t}", "public void setExternalTemperature(double value) {\r\n this.externalTemperature = value;\r\n }", "protected void onSetTemperatureSetting2(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public void sensorSystem() {\n\t}", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_r[0] = event.values[0];\r\n\t\t\t\ttemp_r[1] = event.values[1];\r\n\t\t\t\ttemp_r[2] = event.values[2];\r\n\t\t\t\t// TipsTextView.setText(String.valueOf(temp_r[0]) + \" \"\r\n\t\t\t\t// + String.valueOf(temp_r[1]) + \" \"\r\n\t\t\t\t// + String.valueOf(temp_r[2]));\r\n\t\t\t}", "public void onClick(View v){\n tempChange = Integer.parseInt(fieldTempIncrement.getText().toString());\n\n // Add amount to requested temperature\n if(v.getId()==R.id.incTemp) {\n if (tempUnit == 'F') // Farenheit\n totalChangeFarenheit += tempChange;\n else // Celsius\n totalChangeFarenheit += tempChange * 1.8;\n\n // Subtract amount from requested temperature\n }else if (v.getId()==R.id.decTemp) {\n if (tempUnit == 'F') // Farenheit\n totalChangeFarenheit -= tempChange;\n else // Celsius\n totalChangeFarenheit -= tempChange * 1.8;\n }\n updateChange(v);\n }", "private void updateHumidityValue(float humidity) {\n \t\thumidityValueView.setText(String.format(humidityFormat, humidity));\n \t}", "@Override\n public void handleGpioPinAnalogValueChangeEvent(GpioPinAnalogValueChangeEvent event) {\n notifyListeners(new TemperatureChangeEvent(sensor, getValue(), event.getValue()));\n }", "@Override\r\n\tpublic void updateVariables(GregorianCalendar currentTime, Weather weather,\r\n\t\t\tint resolution) {\n\t}", "private void updateAmbientTempTextView() {\n mAmbientTempText.setText(String.format(Locale.CANADA, DEG_C, mThermostat.getAmbientTemperatureC()));\n }", "public void setTemperature(int value) {\n\t\tthis.temperature = value;\n\t}", "public void update(float temp, int rain) {\n\t\tthis.temp3=temp2;\n\t\tthis.temp2=temp1;\n\t\tthis.temp1=temp;\n\t\tthis.rain3=rain2;\n\t\tthis.rain2=rain1;\n\t\tthis.rain1=rain;\n\t\tthis.raint=rain1+rain2+rain3;\n\t}", "int surfaceTemperature(C config);", "public void updateWeather(){\n syncImmediately(getActivity());\n }", "public void setHumidityTemperature(double value) {\r\n this.humidityTemperature = value;\r\n }", "private synchronized void updateBattery(){\n \tdouble battery = MathUtils.round(Battery.getVoltage(),1);\n \tstore(new DisplayableData(\"battery\", battery+\"V\", battery));\n }", "protected void onGetTemperatureSetting1(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "private synchronized void setInTemp(String temp)\n {\n Platform.runLater(() -> this.inTemp.setText(temp + \"°\"));\n }", "public void timeChanged();", "protected void onGetTemperatureSetting2(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public void update() {\n\t\t\n\t}", "@Override\r\n\tpublic void update(int cnum) {\n\r\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n float[] valuesCopy = event.values.clone();\n\n if (uptime == 0) {\n uptime = event.timestamp;\n }\n\n double x = (double) ((event.timestamp - uptime))/1000000000.0;\n this.addValues(x, valuesCopy);\n\n TextView xAxisValue = (TextView) findViewById(R.id.xAxisValue);\n xAxisValue.setText(Float.toString(valuesCopy[0]) + \" \" + STI.getUnitString(sensorType));\n\n if (STI.getNumberValues(sensorType) > 1) {\n //set y value to textfield\n TextView yAxisValue = (TextView) findViewById(R.id.yAxisValue);\n yAxisValue.setText(Float.toString(valuesCopy[1]) + \" \" + STI.getUnitString(sensorType));\n\n //set z value to textfield\n TextView zAxisValue = (TextView) findViewById(R.id.zAxisValue);\n zAxisValue.setText(Float.toString(valuesCopy[2]) + \" \" + STI.getUnitString(sensorType));\n }\n }", "public boolean handleTempChange(int temp)\r\n\t{\r\n\t\tif (temp > 100) {\r\n\t\t\tSystem.out.print(\"Subsection \" + getName() + \" turning heater OFF due to hight temparture: \" + temp + \"\\n\");\r\n\t\t}\r\n\t\telse if (temp < 60) {\r\n\t\t\tSystem.out.print(\"Subsection \" + getName() + \" turning heater ON due to low temparture: \" + temp + \"\\n\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void update() {}", "public void update() {\r\n\t\t\r\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "private void tempBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tempBtnActionPerformed\n if (tempPress == 0) {\n tempPress = 1;\n\n jLabel9.setText(\"Current Temperature: \" + roboLogic.currentTemperature());\n\n } else {\n tempPress = 0;\n jLabel9.setText(\"\");\n }\n repaint();\n }", "public double getCurrentTemperature() {\n return this.currentTemperature;\n }", "private void getTemperature() {\r\n \t\r\n \t//Get the date from the DateService class\r\n \tDate theDate = theDateService.getDate(); \r\n \t\r\n \t//Increment the number of readings\r\n \tlngNumberOfReadings ++;\r\n \tdouble temp = 0.0;\r\n \tString rep = \"\";\r\n \t\r\n \t//Assume that the TMP36 is connected to AIN4\r\n \trep = this.theTemperatureService.readTemperature(\"4\");\r\n \tpl(rep);\r\n \ttemp = this.theTemperatureService.getTheTemperature();\r\n \t\r\n \t//All details necessary to send this reading are present so create a new TemperatureReading object\r\n \tTemperatureReading theReading = new TemperatureReading(temp, theDate, lngNumberOfReadings);\r\n \tthis.send(theReading);\r\n \t\r\n }", "void updateActiveTime(int T);", "public void update(){\r\n }", "public void update() ;", "public void setTemperature(String temperature) {\n this.temperature = temperature;\n }", "public double getTemperatureCelsius() {\n return temperatureCelsius;\n }", "public void update(){\r\n\t\t\r\n\t}", "private void readRealTemp() {\n YCBTClient.getRealTemp(new BleDataResponse() {\n @Override\n public void onDataResponse(int i, float v, HashMap hashMap) {\n if (i == 0) {\n String temp = (String) hashMap.get(\"tempValue\");\n }\n }\n });\n }", "public void update() {\n }", "private void setHeatTemp(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_setHeatTemp\n\n String tempStr = this.heatTempTextField.getText();\n if (Double.parseDouble(tempStr) < 60.0 || Double.parseDouble(tempStr) > 80.0 ){\n\n System.out.println(\"Error. Please set a temperature between 60.0 - 80.0\");\n }else{\n // turn on heat and transmit the temp\n this.setTemp = Double.parseDouble(tempStr);\n this.turnOnHeat(Double.parseDouble(tempStr));\n }\n }", "public abstract void physicalContextChange(long ms, \n\t\t\tint temperature, \n\t\t\tContextDescription.PhysicalEnvironment.Weather weather, \n\t\t\tint noise, \n\t\t\tint light);", "public void onAccelerationChanged(float x, float y, float z) {\n\n }", "public void onLocationChange() {\n\t\tupdateWeather();\n\t\tgetLoaderManager().restartLoader(FORECAST_LOADER_ID, null, this);\n\t}", "protected void useDataOld() {\n\t\tfloat x = values[0];\n\t\tfloat y = values[1];\n\t\tfloat z = values[2];\n\n\t\tcallListener(new AccelarationSensorData(millis, nanos, x, y, z));\n\t}", "@Override\n public void update() {\n \n }", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\n\t}", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\n\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void update() {\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "public double getExternalTemperature() {\r\n return externalTemperature;\r\n }", "public void update() {\n\n }", "public void update() {\n\n }" ]
[ "0.7825061", "0.7380807", "0.7172305", "0.7094377", "0.70594424", "0.68804336", "0.67784756", "0.6717219", "0.66524243", "0.6521032", "0.65170836", "0.6492919", "0.6481073", "0.6451535", "0.64489794", "0.6430882", "0.64303213", "0.6419959", "0.6397985", "0.6386298", "0.6377585", "0.63701683", "0.6349888", "0.6331074", "0.63093925", "0.6285488", "0.6261192", "0.62471986", "0.6219192", "0.62118167", "0.62106395", "0.62067586", "0.619323", "0.61712736", "0.6167505", "0.6155297", "0.61409926", "0.6139432", "0.6130377", "0.61278266", "0.6119324", "0.61062425", "0.61024034", "0.6089839", "0.60819995", "0.6062445", "0.6040629", "0.60327095", "0.6027454", "0.601967", "0.6014793", "0.6011891", "0.5995638", "0.5979743", "0.5970234", "0.59699214", "0.5954065", "0.5945943", "0.5941315", "0.5940793", "0.59394276", "0.5932549", "0.5924331", "0.59204245", "0.59163004", "0.59157044", "0.59157044", "0.59157044", "0.59157044", "0.5908896", "0.59069514", "0.59019107", "0.5896996", "0.5893555", "0.58922154", "0.58824754", "0.58823055", "0.588203", "0.58771473", "0.58751935", "0.58745444", "0.58632606", "0.58515435", "0.5842316", "0.5840359", "0.5836677", "0.5832692", "0.5832692", "0.58258927", "0.58258927", "0.5824939", "0.5824758", "0.5824758", "0.5824758", "0.5824758", "0.5824758", "0.5822162", "0.58215654", "0.5819316", "0.5819316" ]
0.70462906
5
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}", "void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"GET log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) return;\r\n\tif (\"get-response\".equals( requestId )) {\r\n\t try {\r\n\t\tonMEVPollsForResponse( req, resp );\r\n\t } catch (Exception e) {\r\n\t\tlogError( req, resp, e, \"MEV polling error\" );\r\n\t\tsendError( resp, \"MEV polling error: \" + e.toString() );\r\n\t }\r\n\t}\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t\t\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "public void doGet() throws IOException {\n\n // search ressource\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n this.sendBodyByte(contentByte);\n }", "public HttpResponseWrapper invokeGET(String path) {\n\t\treturn invokeHttpMethod(HttpMethodType.HTTP_GET, path, \"\");\n\t}", "@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t}", "public Result get(Get get) throws IOException;", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) {\n System.out.println(\"[Servlet] GET request \" + request.getRequestURI());\n\n response.setContentType(FrontEndServiceDriver.APP_TYPE);\n response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);\n\n try {\n String url = FrontEndServiceDriver.primaryEventService +\n request.getRequestURI().replaceFirst(\"/events\", \"\");\n HttpURLConnection connection = doGetRequest(url);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n PrintWriter pw = response.getWriter();\n JsonObject responseBody = (JsonObject) parseResponse(connection);\n\n response.setStatus(HttpURLConnection.HTTP_OK);\n pw.println(responseBody.toString());\n }\n }\n catch (Exception ignored) {}\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here--get--\");\n processRequest(request, response);\n }", "@Override\n public final void doGet() {\n try {\n checkPermissions(getRequest());\n // GET one\n if (id != null) {\n output(api.runGet(id, getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER)));\n } else if (countParameters() == 0) {\n throw new APIMissingIdException(getRequestURL());\n }\n // Search\n else {\n\n final ItemSearchResult<?> result = api.runSearch(Integer.parseInt(getParameter(PARAMETER_PAGE, \"0\")),\n Integer.parseInt(getParameter(PARAMETER_LIMIT, \"10\")), getParameter(PARAMETER_SEARCH),\n getParameter(PARAMETER_ORDER), parseFilters(getParameterAsList(PARAMETER_FILTER)),\n getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER));\n\n head(\"Content-Range\", result.getPage() + \"-\" + result.getLength() + \"/\" + result.getTotal());\n\n output(result.getResults());\n }\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n }\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.service(req, resp);\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public void get(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }", "@Override\npublic void get(String url) {\n\t\n}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString action = req.getParameter(\"action\");\r\n\t\t\r\n\t\tif(action == null) {\r\n\t\t\taction = \"List\";\r\n\t\t}\r\n\t\t\r\n\t\tswitch(action) {\r\n\t\t\tcase \"List\":\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request, \n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tSystem.out.println(\"Routed to doGet\");\n\t}", "@NonNull\n public String getAction() {\n return \"GET\";\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "@Override\r\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t process(req,resp);\r\n\t }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\n\tpublic HttpResponse get(final String endpoint) {\n\t\treturn httpRequest(HTTP_GET, endpoint, null);\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste doget\");\r\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain\");\n // Actual logic goes here.\n PrintWriter out = response.getWriter();\n out.println(\"Wolken,5534-0848-5100,0299-6830-9164\");\n\ttry \n\t{\n Get g = new Get(Bytes.toBytes(request.getParameter(\"userid\")));\n Result r = table.get(g);\n byte [] value = r.getValue(Bytes.toBytes(\"v\"),\n Bytes.toBytes(\"\"));\n\t\tString valueStr = Bytes.toString(value);\n\t\tout.println(valueStr);\n\t}\n\tcatch (Exception e)\n\t{\n\t\tout.println(e);\n\t}\n }", "@Override\r\n public void doGet(String path, HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n // throw new UnsupportedOperationException();\r\n System.out.println(\"Inside the get\");\r\n response.setContentType(\"text/xml\");\r\n response.setCharacterEncoding(\"utf-8\");\r\n final Writer w = response.getWriter();\r\n w.write(\"inside the get\");\r\n w.close();\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n System.out.println(\"Console: doGET visited\");\n String result = \"\";\n //get the user choice from the client\n String choice = (request.getPathInfo()).substring(1);\n response.setContentType(\"text/plain;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n //methods call appropriate to user calls\n if (Integer.valueOf(choice) == 3) {\n result = theBlockChain.toString();\n if (result != null) {\n out.println(result);\n response.setStatus(200);\n //set status if result output is not generated\n } else {\n response.setStatus(401);\n return;\n }\n }\n //verify chain method\n if (Integer.valueOf(choice) == 2) {\n response.setStatus(200);\n boolean validity = theBlockChain.isChainValid();\n out.print(\"verifying:\\nchain verification: \");\n out.println(validity);\n }\n }", "@Override\n public DataObjectResponse<T> handleGET(DataObjectRequest<T> request)\n {\n if(getRequestValidator() != null) getRequestValidator().validateGET(request);\n\n DefaultDataObjectResponse<T> response = new DefaultDataObjectResponse<>();\n try\n {\n VisibilityFilter<T, DataObjectRequest<T>> visibilityFilter = visibilityFilterMap.get(VisibilityMethod.GET);\n List<Query> queryList = new LinkedList<>();\n if(request.getQueries() != null)\n queryList.addAll(request.getQueries());\n\n if(request.getId() != null)\n {\n // if the id is specified\n queryList.add(new ById(request.getId()));\n }\n\n DataObjectFeed<T> feed = objectPersister.retrieve(queryList);\n if(feed == null)\n feed = new DataObjectFeed<>();\n List<T> filteredObjects = visibilityFilter.filterByVisible(request, feed.getAll());\n response.setCount(feed.getCount());\n response.addAll(filteredObjects);\n }\n catch(PersistenceException e)\n {\n ObjectNotFoundException objectNotFoundException = new ObjectNotFoundException(String.format(OBJECT_NOT_FOUND_EXCEPTION, request.getId()), e);\n response.setErrorResponse(ErrorResponseFactory.objectNotFound(objectNotFoundException, request.getCID()));\n }\n return response;\n }", "public void handleGet( HttpExchange exchange ) throws IOException {\n switch( exchange.getRequestURI().toString().replace(\"%20\", \" \") ) {\n case \"/\":\n print(\"sending /MainPage.html\");\n sendResponse( exchange, FU.readFromFile( getReqDir( exchange )), 200);\n break;\n case \"/lif\":\n // send log in page ( main page )\n sendResponse ( exchange, FU.readFromFile(getReqDir(exchange)), 200);\n //\n break;\n case \"/home.html\":\n\n break;\n case \"/book.html\":\n\n break;\n default:\n //checks if user is logged in\n\n //if not send log in page\n //if user is logged in then\n print(\"Sending\");\n String directory = getReqDir( exchange ); // dont need to do the / replace as no space\n File page = new File( getReqDir( exchange) );\n\n // IMPLEMENT DIFFERENT RESPONSE CODE FOR HERE IF EXISTS IS FALSE OR CAN READ IS FALSE\n sendResponse(exchange, FU.readFromFile(directory), 200);\n break;\n }\n }", "public int handleGET(String requestURL) throws ClientProtocolException, IOException{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\thttpGet = new HttpGet(requestURL);\t\t\r\n\t\t\t\t\t\t\r\n\t\tinputsource=null;\r\n\t\t\t\r\n\t\toutputString=\"\";\r\n\t\t\r\n\t\t//taking response by executing http GET object\r\n\t\tCloseableHttpResponse response = httpclient.execute(httpGet);\t\t\r\n\t\r\n\t\t/* \r\n\t\t * \tThe underlying HTTP connection is still held by the response object\r\n\t\t\tto allow the response content to be streamed directly from the network socket.\r\n\t\t\tIn order to ensure correct deallocation of system resources\r\n\t\t\tthe user MUST call CloseableHttpResponse.close() from a finally clause.\r\n\t\t\tPlease note that if response content is not fully consumed the underlying\r\n\t\t\tconnection cannot be safely re-used and will be shut down and discarded\r\n\t\t\tby the connection manager.\r\n\t\t */\r\n\t\t\r\n\t\t\tstatusLine= response.getStatusLine().toString();\t\t//status line\r\n\t\t\t\r\n\t\t\tHttpEntity entity1 = response.getEntity();\t\t\t\t//getting response entity from server response \t\r\n\t\t\t\t\t\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(entity1.getContent()));\r\n\r\n\t\t\tString line;\r\n\t\t\twhile((line=br.readLine())!=null)\r\n\t\t\t{\r\n\t\t\t\toutputString=outputString+line.toString();\r\n\t }\r\n\t\t\t\r\n\t\t\t//removing spaces around server response string.\r\n\t\t\toutputString.trim();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//converting server response string into InputSource.\r\n\t\t\tinputsource = new InputSource(new StringReader(outputString));\t\r\n\t\t\t\r\n\t\t\t// and ensure it is fully consumed\r\n\t\t\tEntityUtils.consume(entity1);\t\t\t//consuming entity.\r\n\t\t\tresponse.close();\t\t\t\t\t\t//closing response.\r\n\t\t\tbr.close();\t\t\t\t\t\t\t\t//closing buffered reader\r\n\t\t\t\r\n\t\t\t//returning response code\r\n\t\t\treturn response.getStatusLine().getStatusCode();\r\n\t\r\n\t}", "@Override\n\tprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t logger.error(\"BISHUNNN CALLED\");\n\t\tString category = request.getParameter(\"category\").trim();\n\t\tGetHttpCall getHttpCall = new GetHttpCall();\n\t\turl = APIConstants.baseURL+category.toLowerCase();\n\t\tresponseString = getHttpCall.execute(url);\n\t\tresponse.getWriter().write(responseString);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tPrintWriter out = resp.getWriter();\n\t\tout.print(\"<h1>Hello from your doGet method!</h1>\");\n\t}", "public void doGet(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException {\n response.setContentType(TYPE_TEXT_HTML.label);\n response.setCharacterEncoding(UTF8.label);\n request.setCharacterEncoding(UTF8.label);\n String path = request.getRequestURI();\n logger.debug(RECEIVED_REQUEST + path);\n Command command = null;\n try {\n command = commands.get(path);\n command.execute(request, response);\n } catch (NullPointerException e) {\n logger.error(REQUEST_PATH_NOT_FOUND);\n request.setAttribute(JAVAX_SERVLET_ERROR_STATUS_CODE, 404);\n command = commands.get(EXCEPTION.label);\n command.execute(request, response);\n }\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString search = req.getParameter(\"searchBook\");\n\t\tString output=search;\n\n\t\t//redirect output to view search.jsp\n\t\treq.setAttribute(\"output\", output);\n\t\tresp.setContentType(\"text/json\");\n\t\tRequestDispatcher view = req.getRequestDispatcher(\"search.jsp\");\n\t\tview.forward(req, resp);\n\t\t\t\n\t}", "public void doGet( HttpServletRequest request, HttpServletResponse response )\n throws ServletException, IOException\n {\n handleRequest( request, response, false );\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response handleGet() {\n Gson gson = GSONFactory.getInstance();\n List allEmployees = getAllEmployees();\n\n if (allEmployees == null) {\n allEmployees = new ArrayList();\n }\n\n Response response = Response.ok().entity(gson.toJson(allEmployees)).build();\n return response;\n }", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tsuper.doGet(request, response);\t\t\t\n\t}", "private static String sendGET(String getURL) throws IOException {\n\t\tURL obj = new URL(getURL);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\tcon.setRequestMethod(\"GET\");\n\t\tString finalResponse = \"\";\n\n\t\t//This way we know if the request was processed successfully or there was any HTTP error message thrown.\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(\"GET Response Code : \" + responseCode);\n\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\tString inputLine;\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tbuffer.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\n\t\t\t// print result\n\t\t\tfinalResponse = buffer.toString();\n\t\t} else {\n\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t}\n\t\treturn finalResponse;\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n }", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "public BufferedReader reqGet(final String route) throws\n ServerStatusException, IOException {\n System.out.println(\"first reqGet\");\n return reqGet(route, USER_AGENT);\n }", "HttpGet getRequest(HttpServletRequest request, String address) throws IOException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\r\n\r\n try {\r\n switch (action)\r\n {\r\n case \"/getUser\":\r\n \tgetUser(request, response);\r\n break;\r\n \r\n }\r\n } catch (Exception ex) {\r\n throw new ServletException(ex);\r\n }\r\n }", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}", "@Test\r\n\tpublic void doGet() throws Exception {\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\r\n\t\t// Create a GET object and pass a url to it\r\n\t\tHttpGet get = new HttpGet(\"http://www.google.com\");\r\n\t\t// make a request\r\n\t\tCloseableHttpResponse response = httpClient.execute(get);\r\n\t\t// get response as result\r\n\t\tSystem.out.println(response.getStatusLine().getStatusCode());\r\n\t\tHttpEntity entity = response.getEntity();\r\n\t\tSystem.out.println(EntityUtils.toString(entity));\r\n\t\t// close HttpClient\r\n\t\tresponse.close();\r\n\t\thttpClient.close();\r\n\t}", "private void requestGet(String endpoint, Map<String, String> params, RequestListener listener) throws Exception {\n String requestUri = Constant.API_BASE_URL + ((endpoint.indexOf(\"/\") == 0) ? endpoint : \"/\" + endpoint);\n get(requestUri, params, listener);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint i = request.getRequestURI().lastIndexOf(\"/\") + 1;\n\t\tString action = request.getRequestURI().substring(i);\n\t\tSystem.out.println(action);\n\t\t\n\t\tString view = \"Error\";\n\t\tObject model = \"service Non disponible\";\n\t\t\n\t\tif (action.equals(\"ProductsList\")) {\n\t\t\tview = productAction.productsList();\n\t\t\tmodel = productAction.getProducts();\n\t\t}\n\t\t\n\t\trequest.setAttribute(\"model\", model);\n\t\trequest.getRequestDispatcher(prefix + view + suffix).forward(request, response); \n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\tprocessRequest(request, response);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tcommandAction(request,response);\r\n\t}" ]
[ "0.7589609", "0.71665615", "0.71148175", "0.705623", "0.7030174", "0.70291144", "0.6995984", "0.697576", "0.68883485", "0.6873811", "0.6853569", "0.6843572", "0.6843572", "0.6835363", "0.6835363", "0.6835363", "0.68195957", "0.6817864", "0.6797789", "0.67810035", "0.6761234", "0.6754993", "0.6754993", "0.67394847", "0.6719924", "0.6716244", "0.67054695", "0.67054695", "0.67012346", "0.6684415", "0.6676695", "0.6675696", "0.6675696", "0.66747975", "0.66747975", "0.6669016", "0.66621476", "0.66621476", "0.66476154", "0.66365504", "0.6615004", "0.66130257", "0.6604073", "0.6570195", "0.6551141", "0.65378064", "0.6536579", "0.65357745", "0.64957607", "0.64672184", "0.6453189", "0.6450501", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.64067316", "0.6395873", "0.6379907", "0.63737476", "0.636021", "0.6356937", "0.63410467", "0.6309468", "0.630619", "0.630263", "0.63014317", "0.6283933", "0.62738425", "0.62680805", "0.62585783", "0.62553537", "0.6249043", "0.62457556", "0.6239428", "0.6239428", "0.62376446", "0.62359244", "0.6215947", "0.62125194", "0.6207376", "0.62067443", "0.6204527", "0.6200444", "0.6199078", "0.61876005", "0.6182614", "0.61762017", "0.61755335", "0.61716276", "0.6170575", "0.6170397", "0.616901" ]
0.0
-1
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n }", "public String post();", "@Override\n\tpublic void doPost(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}", "@Override\n public String getMethod() {\n return \"POST\";\n }", "public ResponseTranslator post() {\n setMethod(\"POST\");\n return doRequest();\n }", "protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }", "public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}", "public void postData() {\n\n\t}", "@Override\n public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {\n logger.warn(\"doPost Called\");\n handle(req, res);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tpublic void postHandle(WebRequest request, ModelMap model) throws Exception {\n\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}", "@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }", "@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n\n\tpublic void handlePOST(CoapExchange exchange) {\n\t\tFIleStream read = new FIleStream();\n\t\tread.tempWrite(Temp_Path, exchange.getRequestText());\n\t\texchange.respond(ResponseCode.CREATED, \"POST successfully!\");\n\t\t_Logger.info(\"Receive post request:\" + exchange.getRequestText());\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "public abstract boolean handlePost(FORM form, BindException errors) throws Exception;", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "public void processPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n }", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\n\t}", "public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "public void post(){\n\t\tHttpClient client = new HttpClient();\n\n\t\tPostMethod post = new PostMethod(\"http://211.138.245.85:8000/sso/POST\");\n//\t\tPostMethod post = new PostMethod(\"/eshopclient/product/show.do?id=111655\");\n//\t\tpost.addRequestHeader(\"Cookie\", cookieHead);\n\n\n\t\ttry {\n\t\t\tSystem.out.println(\"��������====\");\n\t\t\tint status = client.executeMethod(post);\n\t\t\tSystem.out.println(status);\n\t\t} catch (HttpException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n//\t\ttaskCount++;\n//\t\tcountDown--;\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"POST log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) {\r\n\t try {\r\n\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t } catch (IOException ex) {\r\n\t }\r\n\t logError( req, resp, new Exception(\"Unrecognized POST\"), \"\" );\r\n\t sendError(resp, \"Unrecognized POST\");\r\n\t} else\r\n\t if (\"post-request\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onMEVPostsRequest( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"MEV POST error\" );\r\n\t\t sendError( resp, \"MEV POST error: \" + e.toString() );\r\n\t\t}\r\n\t } else if (\"post-response\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onPVMPostsResponse( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"PVM POST error\" );\r\n\t\t sendError( resp, \"PVM POST error: \" + e.toString() );\r\n\t\t}\r\n\t }\r\n }", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest req, HttpServletResponse resp, Object handler, ModelAndView m)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}", "@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }", "@Override\n\tvoid post() {\n\t\t\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\tSystem.out.println(\"=========interCpetor Post=========\");\r\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString method = request.getParameter(\"method\");\n\t\tswitch(method){\n\t\tcase \"Crawl\":\n\t\t\tcrawl(request, response);\n\t\t\tbreak;\n\t\tcase \"Extract\":\n\t\t\textract(request, response);\n\t\t\tbreak;\n\t\tcase \"JDBC\":\n\t\t\tjdbc(request, response);\n\t\t\tbreak;\n\t\tcase \"Indexer\":\n\t\t\tindexer(request, response);\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }", "protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}", "public void handlePost(SessionSrvc session, IObjectContext context)\n throws Exception\n {\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tdoGet(request, response);\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}", "@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(PDCBukUpload.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n\r\n }", "@Override\r\n\tpublic void doPost(CustomHttpRequest request, CustomHttpResponse response) throws Exception {\n\t\tdoGet(request, response);\r\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler, ModelAndView modelAndView) throws Exception {\n\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoHandle(request, response);\n\t}", "private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n public void postHandle(HttpServletRequest request,\n HttpServletResponse response, Object handler,\n ModelAndView modelAndView) throws Exception {\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (Exception ex) {\n Logger.getLogger(PedidoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }" ]
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197", "0.6515622", "0.6513045", "0.6512626", "0.6492367", "0.64817846", "0.6477479", "0.64725804", "0.6472099", "0.6469389", "0.6456206", "0.6452577", "0.6452577", "0.6452577", "0.6450273", "0.6450273", "0.6438126", "0.6437522", "0.64339423", "0.64253825", "0.6422238", "0.6420897", "0.6420897", "0.6420897", "0.6407662", "0.64041835", "0.64041835", "0.639631", "0.6395677", "0.6354875", "0.63334197", "0.6324263", "0.62959254", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6280875", "0.6272104", "0.6272104", "0.62711537", "0.62616795", "0.62544584", "0.6251865", "0.62274224", "0.6214439", "0.62137586", "0.621211", "0.620854", "0.62023044", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61638993", "0.61603814", "0.6148914", "0.61465937", "0.61465937", "0.614548", "0.6141879", "0.6136717", "0.61313903", "0.61300284", "0.6124381", "0.6118381", "0.6118128", "0.61063534", "0.60992104", "0.6098801", "0.6096766" ]
0.0
-1
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo()\n {\n return \"Short description\";\n }", "@Override\r\n\tpublic String getServletInfo() {\r\n\t\treturn \"Short description\";\r\n\t}", "@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }" ]
[ "0.87634975", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8531295", "0.8531295", "0.85282224", "0.85282224", "0.85282224", "0.8527433", "0.8527433", "0.8527433", "0.8527433", "0.8527433", "0.8527433", "0.8516995", "0.8512296", "0.8511239", "0.8510324", "0.84964365" ]
0.0
-1
Returns sample short table model.
@NotNull public static TableModel createShortTableModel ( final boolean editable ) { return new SampleTableModel ( editable, 5 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SerializableState getSampleModel(Long id) throws RemoteException;", "@Override\n public SampleModel getSampleModel() {\n return this.sampleModel;\n }", "public ExampleTable toExampleTable() { return new ExampleTableImpl(this); }", "public String getFullSampleName(int column);", "public jkt.hms.masters.business.MasSample getSample() {\n\t\treturn sample;\n\t}", "List<TargetTable> retrieveShortCadenceTargetTable(TargetTable ttable);", "private GenericTableView populateSeriesSamplesTableView(String viewName) {\n\t GenericTable table = assembler.createTable();\n GenericTableView tableView = new GenericTableView (viewName, 5, table);\n tableView.setRowsSelectable();\n\t\ttableView.addCollection(0, 0);\n tableView.setCollectionBottons(1);\n tableView.setDisplayTotals(false);\n //tableView.setColAlignment(2, 0);\n tableView.setColAlignment(5, 0);\n tableView.setColAlignment(6, 0);\n \n return tableView;\n }", "private MolecularSample createTestSample() {\n testMolecularSample = new MolecularSample();\n testMolecularSample.setName(TEST_MOLECULAR_SAMPLE_NAME_CREATE);\n testMolecularSample.setMaterialSample(TEST_MATERIAL_SAMPLE_UUID);\n testMolecularSample.setSampleType(TEST_MOLECULAR_SAMPLE_SAMPLE_TYPE);\n \n persist(testMolecularSample);\n \n return testMolecularSample;\n }", "private StadiumModel dummyDataStadium()\n\t{\n\t\tfinal StadiumModel wembley = new StadiumModel();\n\t\twembley.setCode(STADIUM_NAME);\n\t\twembley.setCapacity(STADIUM_CAPACITY);\n\t\treturn wembley;\n\t}", "public String getSourceTable();", "@Override\n\tpublic String getModel() {\n\t\treturn \"medium model\";\n\t}", "public String getSampleName();", "Table getTable();", "private String generateModel() {\n\t\tString model = \"\";\n\t\tint caseNumber = randomGenerator.nextInt(6) + 1;\n\t\t\n\t\tswitch (caseNumber) {\n\t\tcase 1: \n\t\t\tmodel = \"compact\";\n\t\t\tbreak;\n\t\tcase 2: \n\t\t\tmodel = \"intermediate\";\n\t\t\tbreak;\n\t\tcase 3: \n\t\t\tmodel = \"fullSized\";\n\t\t\tbreak;\n\t\tcase 4: \n\t\t\tmodel = \"van\";\n\t\t\tbreak;\n\t\tcase 5: \n\t\t\tmodel = \"suv\";\n\t\t\tbreak;\n\t\tcase 6: \n\t\t\tmodel = \"pickup\";\n\t\t\tbreak;\n\t\tdefault: \n\t\t\tmodel = \"\";\n\t\t\tbreak;\n\t\t}\n\t\treturn model;\n\t}", "public TableSpecificationSource getPrimaryTable();", "public MSBQueryTableModel getModel() {\n return msbQTM;\n }", "String getBaseTable();", "TableFull createTableFull();", "public final Object getSample()\n { return(this.sample); }", "public String getTable()\n {\n return table;\n }", "List<TABLE41> selectByExample(TABLE41Example example);", "public static String getShowTableStatement() {\n return SHOW_TABLE_STATEMENT;\n }", "Table getBaseTable();", "private JTable getJTable_spect() {\n\n\t\tspectColumn.add(\"Specialist Name\");\n\t\tspectColumn.add(\"Specialist Type\");\n\t\tspectColumn.add(\"Booking Date\");\n\t\tspectColumn.add(\"Time-period\");\n\t\tspectColumn.add(\"Member ID\");\n\t\tspectColumn.add(\"Room\");\n\n\t\tfor (int i=0; i<50; i++){\n\t\t\tVector<String> row = new Vector<String>();\n\t\t\trow.add(\"\");\n\t\t\trow.add(\"\");\n\t\t\trow.add(\"\");\n\t\t\trow.add(\"\");\n\t\t\trow.add(\"\");\n\t\t\trow.add(\"\");\n\t\t\tspectRow.add(row);\n\t\t}\n\n\t\tif (jTable_spect == null) {\n\t\t\tjTable_spect = new JTable(new AllTableModel(spectRow, spectColumn));\n\t\t\tjTable_spect.setRowHeight(30);\n\t\t}\n\t\t\n\t\treturn jTable_spect;\n\t\t\n\t}", "SModel getOutputModel();", "TCpySpouse selectOneByExample(TCpySpouseExample example);", "public String getTableSummary() {\n return \"A summary description of table data\";\n }", "protected String getFromSource() {\n return sourceTable;\n }", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "String getModelA();", "public String displayShort(){\n return \"\\tId: \" + id + \"\\n\" +\n \"\\tName: \" + name + \"\\n\" +\n \"\\tDescription: \" + description + \"\\n\";\n }", "public String getSampleType() {\n return sampleType;\n }", "List<Drug_OutWarehouse> selectByExample(Drug_OutWarehouseExample example);", "String downsampledPVTableName();", "public static final SourceModel.Expr showShort(SourceModel.Expr s) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showShort), s});\n\t\t}", "public Sample SelectSample() {\n\t\t\n\t\tif(sample_map.size() == 0) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tfloat sum = 0;\n\t\tfloat min = Float.MAX_VALUE;\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tmin = Math.min(min, ptr.s.weight);\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tmin = Math.abs(min) + 1;\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tsum += ptr.s.weight + min;\n\t\t\tif(ptr.s.weight + min < 0) {\n\t\t\t\tSystem.out.println(\"neg val\");System.exit(0);\n\t\t\t}\n\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfloat val = (float) (Math.random() * sum);\n\n\t\tsum = 0;\n\t\tptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tsum += ptr.s.weight + min;\n\n\t\t\tif(sum >= val) {\n\t\t\t\treturn ptr.s;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\tSystem.out.println(\"error\");System.exit(0);\n\t\treturn null;\n\t}", "HdbSequenceModel createHdbSequenceModel();", "public String getTable() {\n return table;\n }", "DashboardGoods selectOneByExample(DashboardGoodsExample example);", "List<TCpySpouse> selectByExample(TCpySpouseExample example);", "List<RepStuLearning> selectByExample(RepStuLearningExample example);", "short[][] productionTable();", "public String getTable() {\n return table;\n }", "@Override\n\t\t\t\tpublic TableModel getModel() {\n\t\t\t\t\treturn model;\n\t\t\t\t}", "public SampleMode getSampleMode();", "public SampleResult sample() {\n SampleResult res = null;\n try {\n res = sample(getUrl(), getMethod(), false, 0);\n if(res != null) {\n res.setSampleLabel(getName());\n }\n return res;\n } catch (Exception e) {\n return errorResult(e, new HTTPSampleResult());\n }\n }", "public SampleResult sample() {\n SampleResult res = null;\n try {\n res = sample(getUrl(), getMethod(), false, 0);\n if (res != null) {\n res.setSampleLabel(getName());\n }\n return res;\n } catch (Exception e) {\n return errorResult(e, new HTTPSampleResult());\n }\n }", "TableId table();", "public String getNomTable();", "private DefaultTableModel getTableModel() {\n return (DefaultTableModel) constantsTable.getModel();\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "HdbdtiModel createHdbdtiModel();", "public Item sample()\n {\n checkNotEmpty();\n\n return items[nextIndex()];\n }", "String getModelB();", "List<cskaoyan_mall_order_goods> selectByExample(cskaoyan_mall_order_goodsExample example);", "public Table<Integer, Integer, String> getData();", "public static final String getTopicTableCreationSQL(String shortname) {\r\n\t\tString crTopicTableSQL = \"CREATE TABLE IF NOT EXISTS dblp_topic_\" +shortname +\r\n\t\t\"(tid varchar(50) NOT NULL, \" +\r\n\t\t\" keyword varchar(255) NOT NULL, \" + \r\n\t\t\" istop tinyint UNSIGNED ZEROFILL, \" + // Is this keyword a top keyword for this topic\r\n\t\t\" PRIMARY KEY (tid,keyword)) \";\r\n\t\treturn crTopicTableSQL;\r\n\t}", "@NotNull\n public static TableModel createLongTableModel ( final boolean editable )\n {\n return new SampleTableModel ( editable, 12 );\n }", "public TableModel getTableModel() {\n\t\tfinal int numEach = calcMags.length+1;\n\t\tfinal int rows = probs.rowKeySet().size()*numEach;\n\t\tfinal int cols = 4;\n\t\treturn new AbstractTableModel() {\n\n\t\t\t@Override\n\t\t\tpublic int getRowCount() {\n\t\t\t\treturn rows;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int getColumnCount() {\n\t\t\t\treturn cols;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Object getValueAt(int rowIndex, int columnIndex) {\n\t\t\t\tif (rowIndex == 0)\n\t\t\t\t\treturn headers[columnIndex];\n\t\t\t\trowIndex -= 1;\n\t\t\t\tint m = rowIndex % numEach;\n\t\t\t\tint d = rowIndex / numEach;\n\t\t\t\t\n\t\t\t\tif (columnIndex == 0) {\n\t\t\t\t\tif (m == 0)\n\t\t\t\t\t\treturn durations[d].label;\n\t\t\t\t\telse if (m == 1)\n\t\t\t\t\t\treturn df.format(Date.from(startDate));\n\t\t\t\t\telse if (m == 2)\n\t\t\t\t\t\treturn \"through\";\n\t\t\t\t\telse if (m == 3)\n\t\t\t\t\t\treturn df.format(Date.from(endDates[d]));\n\t\t\t\t\telse\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t} else {\n\t\t\t\t\tif (m >= calcMags.length)\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\tdouble mag = calcMags[m];\n\t\t\t\t\tif (columnIndex == 1) {\n\t\t\t\t\t\tif (m == minMags.length) {\n\t\t\t\t\t\t\treturn \"M ≥ Main (\" + ((float)mag) + \")\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn \"M ≥ \"+(float)mag;\n\t\t\t\t\t} else if (columnIndex == 2) {\n\t\t\t\t\t\tint lower = (int)(numEventsLower.get(durations[d], mag)+0.5);\n\t\t\t\t\t\tint upper = (int)(numEventsUpper.get(durations[d], mag)+0.5);\n\t\t\t\t\t\tint median = (int)(numEventsMedian.get(durations[d], mag)+0.5);\n\t\t\t\t\t\tif (upper == 0)\n\t\t\t\t\t\t\treturn \"*\";\n\t\t\t\t\t\treturn lower + \" to \" + upper + \", median \" + median;\n\t\t\t\t\t} else if (columnIndex == 3) {\n\n\t\t\t\t\t\tdouble prob = 100.0 * probs.get(durations[d], mag);\n\t\t\t\t\t\tString probFormatted;\n\t\t\t\t\t\tif (prob < 1.0e-6 && prob > 0.0) {\n\t\t\t\t\t\t\tprobFormatted = SimpleUtils.double_to_string (\"%.2e\", prob);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble probRounded = SimpleUtils.round_double_via_string (\"%.2e\", prob);\n\t\t\t\t\t\t\tprobFormatted = SimpleUtils.double_to_string_trailz (\"%.8f\", SimpleUtils.TRAILZ_REMOVE, probRounded);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn probFormatted + \" %\";\n\n\t\t\t\t\t\t//int prob = (int)(100d*probs.get(durations[d], mag) + 0.5);\n\t\t\t\t\t\t//if (prob == 0)\n\t\t\t\t\t\t//\treturn \"*\";\n\t\t\t\t\t\t//else if (prob == 100)\n\t\t\t\t\t\t//\treturn \">99 %\";\n\t\t\t\t\t\t//return prob+\" %\";\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\t\n\t\t};\n\t}", "public TableModel getModel() {\n return model;\n }", "@Override\n public String toString() {\n return \"Utilities.DataCreationAndProcessing.SingleDataUnit{\" +\n \"sampleId=\" + sampleId +\n \", sampleInput=\" + sampleInput +\n \", sampleOutput=\" + sampleOutput +\n '}';\n }", "public Samples samples() {\n return samples;\n }", "public static String getRandomShortDescription() {\n int length = RandomNumberGenerator.getRandomInt(10, 30);\n return getRandomText(length, 1);\n }", "@Test void testInterpretTableFunction() {\n SchemaPlus schema = rootSchema.add(\"s\", new AbstractSchema());\n final TableFunction table1 = TableFunctionImpl.create(Smalls.MAZE_METHOD);\n schema.add(\"Maze\", table1);\n final String sql = \"select *\\n\"\n + \"from table(\\\"s\\\".\\\"Maze\\\"(5, 3, 1))\";\n String[] rows = {\"[abcde]\", \"[xyz]\", \"[generate(w=5, h=3, s=1)]\"};\n sql(sql).returnsRows(rows);\n }", "public Table getTable() {\n return table;\n }", "List<TVmManufacturer> selectByExample(TVmManufacturerExample example);", "public Units getUnitTable();", "org.hl7.fhir.SampledData getValueSampledData();", "protected List<DataModel> generateModel(){\n\t\tList<DataModel> list = new ArrayList<DataModel>();\n\t\t\n\t\tDataModel outTemperature = new DataModelTemperature(\"Outer Temperature\", this);\n\t\toutTemperature.setShouldAlarm(false);\n\t\toutTemperature.setMaxSafeValue(200);\n\t\toutTemperature.setHowManyPercentageToAdd(0.5);\n\t\toutTemperature.setVibeRate(2.42);\n\t\tlist.add(outTemperature);\n\t\t\n\t\tlist.add(new DataModelTemperature(\"Inner Temperature\", this));\n\t\tlist.add(new DataModelHumidity(\"Humidity\", this));\n\t\tlist.add(new DataModelOxygen(\"Oxygen\", this));\n\t\t\n\t\treturn list;\n\t}", "public static LearningTable createLearningTable() {\n\t\tLearningTable table = new LearningTable(null, null, null);\n\t\t\n\t\ttable.getAttributes().addAll(createAttributes());\n\t\ttable.getExamples().addAll(createExamples(table.getAttributes()));\n\t\t\n\t\treturn table;\n\t}", "public Table<Integer, Integer, String> getAnonymizedData();", "@Override\n\tpublic String getModel() {\n\t\treturn \"cool model\";\n\t}", "@Test\n public void random() {\n Shorts.random();\n }", "List<CmstTransfdevice> selectByExample(CmstTransfdeviceExample example);", "public String getShortContent();", "public boolean getShowTable() {\n return showTable;\n }", "public TestSmallBenchmarkObjectRecord() {\n\t\tsuper(org.sfm.jooq.beans.tables.TestSmallBenchmarkObject.TEST_SMALL_BENCHMARK_OBJECT);\n\t}", "ModelData getModel();", "public HDPModel getModel() {\n HDPModelBuilder builder = new HDPModelBuilder(numberOfTopics, totalNumberOfWords);\n for (int k = 0; k < numberOfTopics; k++) {\n for (int w = 0; w < sizeOfVocabulary; w++) {\n builder.addTopicWordCount(k, w, wordCountByTopicAndTerm[k][w]);\n }\n }\n return builder.build();\n }", "public Table getTable() { return this.table; }", "@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}", "public Table getTable() {\n return table;\n }", "List<FinMonthlySnapModel> selectByExample(FinMonthlySnapModelExample example);", "List<TbComEqpModel> selectByExample(TbComEqpModelExample example);", "private List<Model> getModel() {\n \r\n DataBaseTestAdapter1 mDbHelper = new DataBaseTestAdapter1(this); \r\n\t \tmDbHelper.createDatabase(); \r\n\t \tmDbHelper.open(); \r\n\t \t \r\n \t \tpure = (Pure?\"T\":\"F\");\r\n\r\n \t \tString sql =\"SELECT Code FROM \"+major+\" WHERE (Pure='All' OR Pure='\" + pure + \"') ORDER BY Year,Code\"; \r\n\t \tCursor testdata = mDbHelper.getTestData(sql); \r\n\t \tString code = DataBaseUtility1.GetColumnValue(testdata, \"Code\");\r\n\t \tlist.add(new Model(code));\r\n\t \twhile (testdata.moveToNext()){\r\n\t \t\t \r\n\t \tcode = DataBaseUtility1.GetColumnValue(testdata, \"Code\");\r\n\t \tModel temp = new Model(code);\r\n\t \t\r\n\t \tif ((code.equals(\"CommonCore1\") && SA) ||\t\t\t//name conversion\r\n\t \t\t\t(code.equals(\"CommonCore2\") && S_T) ||\r\n\t \t\t\t(code.equals(\"CommonCore3\") && A_H) ||\r\n\t \t\t\t(code.equals(\"CommonCore4\") && Free) ||\r\n\t \t\t\t(code.equals(\"SBM\") && SBM) ||\r\n\t \t\t\t(code.equals(\"ENGG\") && ENGG) ||\r\n\t \t\t\t(code.equals(\"FreeElective\") && FreeE) ||\r\n\t \t\t\t(code.equals(\"COMPElective1\") && compx1) ||\r\n\t \t\t\t((code.equals(\"COMPElective1\")|| code.equals(\"COMPElective2\")) && compx2) ||\r\n\t \t\t\t((code.equals(\"COMPElective1\")|| code.equals(\"COMPElective2\") || code.equals(\"COMPElective3\")) && compx3) ||\r\n\t \t\t\t((code.equals(\"COMPElective1\")|| code.equals(\"COMPElective2\") || code.equals(\"COMPElective3\") || code.equals(\"COMPElective4\")) && compx4) ||\r\n\t \t\t\t((code.equals(\"COMPElective1\")|| code.equals(\"COMPElective2\") || code.equals(\"COMPElective3\") || code.equals(\"COMPElective4\") || code.equals(\"COMPElective5\")) && compx5) ||\r\n\t \t\t\t(code.equals(\"COMP/ELEC/MATH1\") && CEMx1) ||\r\n\t \t\t\t((code.equals(\"COMP/ELEC/MATH1\") || code.equals(\"COMP/ELEC/MATH2\")) && CEMx2) \r\n\t \t\t\t\t\t\t\t){\r\n\t \t\t\r\n\t \t\ttemp.setSelected(true);\r\n\t \t}\r\n\t \r\n\t \tlist.add(temp);\r\n \t}\r\n\r\n\t\ttestdata.close();\r\n \tmDbHelper.close();\r\n\r\n return list;\r\n }", "TbProductAttributes selectOneByExample(TbProductAttributesExample example);", "SMALL createSMALL();", "@Column(name = \"model\", length = 32)\r\n public String getModel() {\r\n return model;\r\n }", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public java.lang.String getSampleId() {\n return sampleId;\n }", "ColumnFull createColumnFull();", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\tpublic Data(String table) throws EmptyDatasetException, SQLException, EmptySetException, NoValueException{\r\n\t\tTableData tableData = new TableData(new DbAccess());\r\n\t\tdata = tableData.getDistinctTransazioni(table);\r\n\t\t\r\n\t\tTableSchema tableSchema = new TableSchema(new DbAccess(),table);\r\n\t\tnumberOfExamples=data.size();\r\n\t\t\r\n\t\tQUERY_TYPE min,max;\r\n\t\tmin = QUERY_TYPE.MIN;\r\n\t\tmax = QUERY_TYPE.MAX;\r\n\t\t\r\n\t\tfor (int i=0;i<tableSchema.getNumberOfAttributes();i++) {\r\n\t\t\tif(!tableSchema.getColumn(i).isNumber()) {\r\n\t\t\t\texplanatorySet.add((T) new DiscreteAttribute(tableSchema.getColumn(i).getColumnName(),i,(TreeSet)tableData.getDistinctColumnValues(table, tableSchema.getColumn(i))));\r\n\t\t\t}else {\r\n\t\t\t\texplanatorySet.add((T) new ContinuousAttribute(tableSchema.getColumn(i).getColumnName(),i,(float)tableData.getAggregateColumnValue(table,tableSchema.getColumn(i),min),(float)tableData.getAggregateColumnValue(table,tableSchema.getColumn(i),max)));\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "public Table getTable() { \n\t\treturn this.table; \n\t}", "public io.envoyproxy.envoy.type.v3.FractionalPercent.Builder getRandomSamplingBuilder() {\n \n onChanged();\n return getRandomSamplingFieldBuilder().getBuilder();\n }", "public TapTable findOneTable(String tableName);", "@Test\n public void test_ToTableFormat() {\n System.out.println(\"Testing MeasuredRatioModel's toTableFormat()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n String expResult = \"0 : 0\";\n String result = instance.toTableFormat();\n assertEquals(expResult, result);\n instance = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"213\"),\"ABS\",new BigDecimal(\"0.4324\"),false,true);\n result = instance.toTableFormat();\n expResult=\"213 : 0.4324\";\n assertEquals(expResult, result);\n }", "public String getModel();", "public String toStringShort()\n {\n return (denormTemp() + \",\" + denormDO() + \",\" +\n denormPercSat() + \",\" + denormPH() + \",\" +\n denormCond() + \",\" + denormEcoli() + \",\" + clusterId);\n\n }", "public java.lang.String getSampleId() {\n return sampleId;\n }", "public Tile getSample() {\n return (Tile) super.getSample();\n }" ]
[ "0.60166466", "0.5904636", "0.58478665", "0.572103", "0.5666222", "0.56022257", "0.55455947", "0.55127037", "0.547906", "0.54414314", "0.543274", "0.53408617", "0.5314017", "0.53064954", "0.5295945", "0.5262282", "0.5261426", "0.5214116", "0.5155983", "0.5125451", "0.5107119", "0.50896597", "0.5076378", "0.5074771", "0.50561416", "0.5053725", "0.5043955", "0.50405556", "0.502558", "0.5017589", "0.50111544", "0.5010103", "0.5009666", "0.4997607", "0.49958494", "0.49911866", "0.4981676", "0.497984", "0.49767372", "0.4973304", "0.495556", "0.4949711", "0.4943431", "0.49393338", "0.492951", "0.4928313", "0.49254924", "0.49168354", "0.48786837", "0.48747623", "0.48744407", "0.48729798", "0.4870754", "0.48642352", "0.48540366", "0.48459506", "0.48421162", "0.48414978", "0.48377305", "0.48374158", "0.4835859", "0.48144224", "0.48044735", "0.48018947", "0.4800468", "0.479552", "0.47921032", "0.4791952", "0.47775653", "0.47748578", "0.47734466", "0.4770157", "0.4768877", "0.47632438", "0.47556385", "0.47506395", "0.47454578", "0.47398055", "0.4737063", "0.4733783", "0.47321317", "0.4732103", "0.47251713", "0.47208434", "0.47134787", "0.47122452", "0.47106275", "0.4706654", "0.4700571", "0.4695464", "0.4693849", "0.46932572", "0.46930835", "0.4685853", "0.468409", "0.46839356", "0.46818942", "0.46789187", "0.46769956", "0.46764258" ]
0.63114446
0
Returns sample long table model.
@NotNull public static TableModel createLongTableModel ( final boolean editable ) { return new SampleTableModel ( editable, 12 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<TargetTable> retrieveLongCadenceTargetTable(TargetTable ttable);", "SerializableState getSampleModel(Long id) throws RemoteException;", "public Table<Integer, Integer, String> getData();", "public static LearningTable createLearningTable() {\n\t\tLearningTable table = new LearningTable(null, null, null);\n\t\t\n\t\ttable.getAttributes().addAll(createAttributes());\n\t\ttable.getExamples().addAll(createExamples(table.getAttributes()));\n\t\t\n\t\treturn table;\n\t}", "public ExampleTable toExampleTable() { return new ExampleTableImpl(this); }", "List<TargetTable> retrieveShortCadenceTargetTable(TargetTable ttable);", "TableId table();", "String downsampledPVTableName();", "Table getTable();", "TableFull createTableFull();", "@NotNull\n public static TableModel createShortTableModel ( final boolean editable )\n {\n return new SampleTableModel ( editable, 5 );\n }", "public List<Sample> getSamplesFromDB(String TABLE_NAME, int k) {\n String query = \"SELECT * FROM \" + TABLE_NAME + \" ORDER BY timestamp DESC LIMIT \" + k;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(query, null);\n List<Sample> sampleList = new ArrayList<>();\n while (cursor.moveToNext()) {\n Sample sample = new Sample(cursor.getLong(0),\n cursor.getDouble(1),\n cursor.getDouble(2),\n cursor.getDouble(3)\n );\n sampleList.add(sample);\n }\n cursor.close();\n db.close();\n return sampleList;\n }", "List<TABLE41> selectByExample(TABLE41Example example);", "String getBaseTable();", "private GenericTableView populateSeriesSamplesTableView(String viewName) {\n\t GenericTable table = assembler.createTable();\n GenericTableView tableView = new GenericTableView (viewName, 5, table);\n tableView.setRowsSelectable();\n\t\ttableView.addCollection(0, 0);\n tableView.setCollectionBottons(1);\n tableView.setDisplayTotals(false);\n //tableView.setColAlignment(2, 0);\n tableView.setColAlignment(5, 0);\n tableView.setColAlignment(6, 0);\n \n return tableView;\n }", "Table getBaseTable();", "@Test\n public void doGetTable()\n throws Exception\n {\n logger.info(\"doGetTable - enter\");\n\n // Mock mapping.\n Schema mockMapping = SchemaBuilder.newBuilder()\n .addField(\"mytext\", Types.MinorType.VARCHAR.getType())\n .addField(\"mykeyword\", Types.MinorType.VARCHAR.getType())\n .addField(new Field(\"mylong\", FieldType.nullable(Types.MinorType.LIST.getType()),\n Collections.singletonList(new Field(\"mylong\",\n FieldType.nullable(Types.MinorType.BIGINT.getType()), null))))\n .addField(\"myinteger\", Types.MinorType.INT.getType())\n .addField(\"myshort\", Types.MinorType.SMALLINT.getType())\n .addField(\"mybyte\", Types.MinorType.TINYINT.getType())\n .addField(\"mydouble\", Types.MinorType.FLOAT8.getType())\n .addField(new Field(\"myscaled\",\n new FieldType(true, Types.MinorType.BIGINT.getType(), null,\n ImmutableMap.of(\"scaling_factor\", \"10.0\")), null))\n .addField(\"myfloat\", Types.MinorType.FLOAT4.getType())\n .addField(\"myhalf\", Types.MinorType.FLOAT4.getType())\n .addField(\"mydatemilli\", Types.MinorType.DATEMILLI.getType())\n .addField(\"mydatenano\", Types.MinorType.DATEMILLI.getType())\n .addField(\"myboolean\", Types.MinorType.BIT.getType())\n .addField(\"mybinary\", Types.MinorType.VARCHAR.getType())\n .addField(\"mynested\", Types.MinorType.STRUCT.getType(), ImmutableList.of(\n new Field(\"l1long\", FieldType.nullable(Types.MinorType.BIGINT.getType()), null),\n new Field(\"l1date\", FieldType.nullable(Types.MinorType.DATEMILLI.getType()), null),\n new Field(\"l1nested\", FieldType.nullable(Types.MinorType.STRUCT.getType()), ImmutableList.of(\n new Field(\"l2short\", FieldType.nullable(Types.MinorType.LIST.getType()),\n Collections.singletonList(new Field(\"l2short\",\n FieldType.nullable(Types.MinorType.SMALLINT.getType()), null))),\n new Field(\"l2binary\", FieldType.nullable(Types.MinorType.VARCHAR.getType()),\n null))))).build();\n\n // Real mapping.\n LinkedHashMap<String, Object> mapping = new ObjectMapper().readValue(\n \"{\\n\" +\n \" \\\"mishmash\\\" : {\\n\" + // Index: mishmash\n \" \\\"mappings\\\" : {\\n\" +\n \" \\\"_meta\\\" : {\\n\" + // _meta:\n \" \\\"mynested.l1nested.l2short\\\" : \\\"list\\\",\\n\" + // mynested.l1nested.l2short: LIST<SMALLINT>\n \" \\\"mylong\\\" : \\\"list\\\"\\n\" + // mylong: LIST<BIGINT>\n \" },\\n\" +\n \" \\\"properties\\\" : {\\n\" +\n \" \\\"mybinary\\\" : {\\n\" + // mybinary:\n \" \\\"type\\\" : \\\"binary\\\"\\n\" + // type: binary (VARCHAR)\n \" },\\n\" +\n \" \\\"myboolean\\\" : {\\n\" + // myboolean:\n \" \\\"type\\\" : \\\"boolean\\\"\\n\" + // type: boolean (BIT)\n \" },\\n\" +\n \" \\\"mybyte\\\" : {\\n\" + // mybyte:\n \" \\\"type\\\" : \\\"byte\\\"\\n\" + // type: byte (TINYINT)\n \" },\\n\" +\n \" \\\"mydatemilli\\\" : {\\n\" + // mydatemilli:\n \" \\\"type\\\" : \\\"date\\\"\\n\" + // type: date (DATEMILLI)\n \" },\\n\" +\n \" \\\"mydatenano\\\" : {\\n\" + // mydatenano:\n \" \\\"type\\\" : \\\"date_nanos\\\"\\n\" + // type: date_nanos (DATEMILLI)\n \" },\\n\" +\n \" \\\"mydouble\\\" : {\\n\" + // mydouble:\n \" \\\"type\\\" : \\\"double\\\"\\n\" + // type: double (FLOAT8)\n \" },\\n\" +\n \" \\\"myfloat\\\" : {\\n\" + // myfloat:\n \" \\\"type\\\" : \\\"float\\\"\\n\" + // type: float (FLOAT4)\n \" },\\n\" +\n \" \\\"myhalf\\\" : {\\n\" + // myhalf:\n \" \\\"type\\\" : \\\"half_float\\\"\\n\" + // type: half_float (FLOAT4)\n \" },\\n\" +\n \" \\\"myinteger\\\" : {\\n\" + // myinteger:\n \" \\\"type\\\" : \\\"integer\\\"\\n\" + // type: integer (INT)\n \" },\\n\" +\n \" \\\"mykeyword\\\" : {\\n\" + // mykeyword:\n \" \\\"type\\\" : \\\"keyword\\\"\\n\" + // type: keyword (VARCHAR)\n \" },\\n\" +\n \" \\\"mylong\\\" : {\\n\" + // mylong: LIST\n \" \\\"type\\\" : \\\"long\\\"\\n\" + // type: long (BIGINT)\n \" },\\n\" +\n \" \\\"mynested\\\" : {\\n\" + // mynested: STRUCT\n \" \\\"properties\\\" : {\\n\" +\n \" \\\"l1date\\\" : {\\n\" + // mynested.l1date:\n \" \\\"type\\\" : \\\"date_nanos\\\"\\n\" + // type: date_nanos (DATEMILLI)\n \" },\\n\" +\n \" \\\"l1long\\\" : {\\n\" + // mynested.l1long:\n \" \\\"type\\\" : \\\"long\\\"\\n\" + // type: long (BIGINT)\n \" },\\n\" +\n \" \\\"l1nested\\\" : {\\n\" + // mynested.l1nested: STRUCT\n \" \\\"properties\\\" : {\\n\" +\n \" \\\"l2binary\\\" : {\\n\" + // mynested.l1nested.l2binary:\n \" \\\"type\\\" : \\\"binary\\\"\\n\" + // type: binary (VARCHAR)\n \" },\\n\" +\n \" \\\"l2short\\\" : {\\n\" + // mynested.l1nested.l2short: LIST\n \" \\\"type\\\" : \\\"short\\\"\\n\" + // type: short (SMALLINT)\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" },\\n\" +\n \" \\\"myscaled\\\" : {\\n\" + // myscaled:\n \" \\\"type\\\" : \\\"scaled_float\\\",\\n\" + // type: scaled_float (BIGINT)\n \" \\\"scaling_factor\\\" : 10.0\\n\" + // factor: 10\n \" },\\n\" +\n \" \\\"myshort\\\" : {\\n\" + // myshort:\n \" \\\"type\\\" : \\\"short\\\"\\n\" + // type: short (SMALLINT)\n \" },\\n\" +\n \" \\\"mytext\\\" : {\\n\" + // mytext:\n \" \\\"type\\\" : \\\"text\\\"\\n\" + // type: text (VARCHAR)\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \"}\\n\", LinkedHashMap.class);\n LinkedHashMap<String, Object> index = (LinkedHashMap<String, Object>) mapping.get(\"mishmash\");\n LinkedHashMap<String, Object> mappings = (LinkedHashMap<String, Object>) index.get(\"mappings\");\n\n when(mockClient.getMapping(nullable(String.class))).thenReturn(mappings);\n\n // Get real mapping.\n when(domainMapProvider.getDomainMap(null)).thenReturn(ImmutableMap.of(\"movies\",\n \"https://search-movies-ne3fcqzfipy6jcrew2wca6kyqu.us-east-1.es.amazonaws.com\"));\n handler = new ElasticsearchMetadataHandler(awsGlue, new LocalKeyFactory(), awsSecretsManager, amazonAthena,\n \"spill-bucket\", \"spill-prefix\", domainMapProvider, clientFactory, 10, com.google.common.collect.ImmutableMap.of());\n GetTableRequest req = new GetTableRequest(fakeIdentity(), \"queryId\", \"elasticsearch\",\n new TableName(\"movies\", \"mishmash\"));\n GetTableResponse res = handler.doGetTable(allocator, req);\n Schema realMapping = res.getSchema();\n\n logger.info(\"doGetTable - {}\", res);\n\n // Test1 - Real mapping must NOT be empty.\n assertTrue(\"Real mapping is empty!\", realMapping.getFields().size() > 0);\n // Test2 - Real and mocked mappings must have the same fields.\n assertTrue(\"Real and mocked mappings are different!\",\n ElasticsearchSchemaUtils.mappingsEqual(realMapping, mockMapping));\n\n logger.info(\"doGetTable - exit\");\n }", "static LearningTable createFilledLearningTable() {\n\t\tLearningTable table = new LearningTable(null, null, null);\n\t\t\n\t\ttable.getAttributes().addAll(createAttributes());\n\t\ttable.getExamples().addAll(createFilledExamples());\n\t\t\n\t\treturn table;\n\t}", "public Lecturers getLecTable();", "private HashMap<Long, String> getTable() {\n return table;\n }", "List<Assist_table> selectByExample(Assist_tableExample example);", "HdbSequenceModel createHdbSequenceModel();", "public static MlTableModel createModel(MlObjectTable table) {\n\n MlTableModel model = null;\n switch (table.getType()) {\n case Contact:\n model = new ContactTableModel(table);\n break;\n case Task:\n model = new TaskTableModel(table);\n break;\n case Image:\n model = new ImageTableModel(table);\n break;\n case Knowlet:\n case Collection:\n case Map:\n case Container:\n case Any:\n model = new AllObjectTableModel(table);\n break;\n default:\n throw new IllegalStateException(\"No table model found for specified object class: \" + table.getType().name());\n }\n return model;\n }", "public Term getRandomTerm (String table) {\n // Select Query\n String selectQuery = \"SELECT * FROM \" + table + \" WHERE \" + KEY_TERM + \" NOT NULL AND \" +\n \"LENGTH(\" + KEY_TERM + \") <= 16 \" + \"ORDER BY RANDOM() LIMIT 1\";\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n if (cursor != null) { cursor.moveToFirst(); }\n\n Term term = new Term(Integer.parseInt(cursor.getString(0)), cursor.getString(1), cursor.getString(2), cursor.getString(3),\n cursor.getString(4), cursor.getString(5), Integer.parseInt(cursor.getString(6)));\n\n // return term\n return term;\n }", "public Table<Integer, Integer, String> getAnonymizedData();", "@Override\n public SampleModel getSampleModel() {\n return this.sampleModel;\n }", "BTable createBTable();", "TableView ShowTableLuggage() {\n\n tableview = new TableView();\n showLuggageL();\n\n return this.tableview;\n }", "List<RepStuLearning> selectByExample(RepStuLearningExample example);", "public static SCSongDatabaseTable getInstance(Context ctx) {\n\t\t if (mInstance == null) {\n\t\t mInstance = new SCSongDatabaseTable(ctx);\n\t\t }\n\t\t //System.out.println (\"DATA BASE = \" + mInstance);\n\t\t return mInstance;\n\t\t }", "public String getTable()\n {\n return table;\n }", "@Override\n\t\t\t\tpublic TableModel getModel() {\n\t\t\t\t\treturn model;\n\t\t\t\t}", "public String getNomTable();", "List<Table2> selectByExample(Table2Example example);", "public Table getTable() { return this.table; }", "tbls createtbls();", "FromTable createFromTable();", "@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }", "@RequestMapping(value = \"/data/{srcEnv}/{srcDB}/{pid}\", method = {RequestMethod.GET})\n @ResponseBody\n public RestWrapper getTableData(@PathVariable(\"srcEnv\") String srcEnv, @PathVariable(\"srcDB\") String srcDB, @PathVariable(\"pid\") String pid) {\n RestWrapper restWrapper = null;\n LOGGER.info(srcEnv + \"srcEnvi\");\n LOGGER.info(srcDB + \"srcDB\");\n try {\n Class.forName(driverName);\n connection = DriverManager.getConnection(\"jdbc:hive2://\" + srcEnv + \"/\" + srcDB.toLowerCase(), \"\", \"\");\n String tableName=\"ML_\"+pid;\n ResultSet rs = connection.createStatement().executeQuery(\"select * from \" + srcDB + \".\" + tableName);\n\n ResultSetMetaData metaData = rs.getMetaData();\n List<Map<String, Object>> tables = new ArrayList<Map<String, Object>>();\n while (rs.next()) {\n Map<String,Object> m=new LinkedHashMap<>();\n for(int j=1;j<=metaData.getColumnCount();j++){\n\n String colName = metaData.getColumnLabel(j).replaceFirst(tableName.toLowerCase()+\".\", \"\");\n if(!colName.equals(\"features\") && !colName.equals(\"rawprediction\") && !colName.equals(\"probability\")){\n Object colValue=rs.getObject(j);\n m.put(colName,colValue);}\n }\n tables.add(m);\n }\n restWrapper = new RestWrapper(tables, RestWrapperOptions.OK);\n\n } catch (Exception e) {\n LOGGER.error(\"error occured \" + e);\n restWrapper = new RestWrapper(e.getMessage(), RestWrapper.ERROR);\n }\n return restWrapper;\n }", "public Table getTable() {\n return table;\n }", "RepStuLearning selectByPrimaryKey(RepStuLearningKey key);", "public String getTable() {\n return table;\n }", "MultTable() //do not use the name of the constructor for the name of another method\n {}", "private JTable getJTable_spect() {\n\n\t\tspectColumn.add(\"Specialist Name\");\n\t\tspectColumn.add(\"Specialist Type\");\n\t\tspectColumn.add(\"Booking Date\");\n\t\tspectColumn.add(\"Time-period\");\n\t\tspectColumn.add(\"Member ID\");\n\t\tspectColumn.add(\"Room\");\n\n\t\tfor (int i=0; i<50; i++){\n\t\t\tVector<String> row = new Vector<String>();\n\t\t\trow.add(\"\");\n\t\t\trow.add(\"\");\n\t\t\trow.add(\"\");\n\t\t\trow.add(\"\");\n\t\t\trow.add(\"\");\n\t\t\trow.add(\"\");\n\t\t\tspectRow.add(row);\n\t\t}\n\n\t\tif (jTable_spect == null) {\n\t\t\tjTable_spect = new JTable(new AllTableModel(spectRow, spectColumn));\n\t\t\tjTable_spect.setRowHeight(30);\n\t\t}\n\t\t\n\t\treturn jTable_spect;\n\t\t\n\t}", "@Override\n\tpublic String getModel() {\n\t\treturn \"medium model\";\n\t}", "public String getFullSampleName(int column);", "public String getTable() {\n return table;\n }", "int rawDataCreateDownSampleLevelNumber();", "public Table getTable() { \n\t\treturn this.table; \n\t}", "public static String getRandomLongDescription() {\n int paragraphs = RandomNumberGenerator.getRandomInt(2, 5);\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < paragraphs; i++) {\n\n sb.append(\"##\").append(getRandomText(2, 1).replace('.', ' ')).append(\"##\\n\");\n int length = RandomNumberGenerator.getRandomInt(30, 200);\n sb.append(getRandomText(length, 1)).append(\"\\n\");\n }\n return sb.toString();\n }", "@Override\n\tpublic String selectTableList(int top) {\n\t\treturn \"select sqltext,pointid,type from history_table_view where rownum <= \"+top+\" order by id desc\";\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}", "private JTable getTable(String key){\n\t\tJTable table = null;\n\t\t\n\t\ttry{\n\t\t\tObjectInputStream in = new ObjectInputStream(new FileInputStream(key+\"_Details.sce\"));\n\t\t\ttable = (JTable) in.readObject();\n\t\t\tin.close();\n\t\t}catch(IOException ex){\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}catch(ClassNotFoundException ey){\n\t\t\tSystem.out.println(ey.getMessage());\n\t\t}\n\t\t\n\t\treturn table;\n\t}", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "public TableModel getTableModel() {\n\t\tfinal int numEach = calcMags.length+1;\n\t\tfinal int rows = probs.rowKeySet().size()*numEach;\n\t\tfinal int cols = 4;\n\t\treturn new AbstractTableModel() {\n\n\t\t\t@Override\n\t\t\tpublic int getRowCount() {\n\t\t\t\treturn rows;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int getColumnCount() {\n\t\t\t\treturn cols;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Object getValueAt(int rowIndex, int columnIndex) {\n\t\t\t\tif (rowIndex == 0)\n\t\t\t\t\treturn headers[columnIndex];\n\t\t\t\trowIndex -= 1;\n\t\t\t\tint m = rowIndex % numEach;\n\t\t\t\tint d = rowIndex / numEach;\n\t\t\t\t\n\t\t\t\tif (columnIndex == 0) {\n\t\t\t\t\tif (m == 0)\n\t\t\t\t\t\treturn durations[d].label;\n\t\t\t\t\telse if (m == 1)\n\t\t\t\t\t\treturn df.format(Date.from(startDate));\n\t\t\t\t\telse if (m == 2)\n\t\t\t\t\t\treturn \"through\";\n\t\t\t\t\telse if (m == 3)\n\t\t\t\t\t\treturn df.format(Date.from(endDates[d]));\n\t\t\t\t\telse\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t} else {\n\t\t\t\t\tif (m >= calcMags.length)\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\tdouble mag = calcMags[m];\n\t\t\t\t\tif (columnIndex == 1) {\n\t\t\t\t\t\tif (m == minMags.length) {\n\t\t\t\t\t\t\treturn \"M ≥ Main (\" + ((float)mag) + \")\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn \"M ≥ \"+(float)mag;\n\t\t\t\t\t} else if (columnIndex == 2) {\n\t\t\t\t\t\tint lower = (int)(numEventsLower.get(durations[d], mag)+0.5);\n\t\t\t\t\t\tint upper = (int)(numEventsUpper.get(durations[d], mag)+0.5);\n\t\t\t\t\t\tint median = (int)(numEventsMedian.get(durations[d], mag)+0.5);\n\t\t\t\t\t\tif (upper == 0)\n\t\t\t\t\t\t\treturn \"*\";\n\t\t\t\t\t\treturn lower + \" to \" + upper + \", median \" + median;\n\t\t\t\t\t} else if (columnIndex == 3) {\n\n\t\t\t\t\t\tdouble prob = 100.0 * probs.get(durations[d], mag);\n\t\t\t\t\t\tString probFormatted;\n\t\t\t\t\t\tif (prob < 1.0e-6 && prob > 0.0) {\n\t\t\t\t\t\t\tprobFormatted = SimpleUtils.double_to_string (\"%.2e\", prob);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble probRounded = SimpleUtils.round_double_via_string (\"%.2e\", prob);\n\t\t\t\t\t\t\tprobFormatted = SimpleUtils.double_to_string_trailz (\"%.8f\", SimpleUtils.TRAILZ_REMOVE, probRounded);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn probFormatted + \" %\";\n\n\t\t\t\t\t\t//int prob = (int)(100d*probs.get(durations[d], mag) + 0.5);\n\t\t\t\t\t\t//if (prob == 0)\n\t\t\t\t\t\t//\treturn \"*\";\n\t\t\t\t\t\t//else if (prob == 100)\n\t\t\t\t\t\t//\treturn \">99 %\";\n\t\t\t\t\t\t//return prob+\" %\";\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\t\n\t\t};\n\t}", "public TableModel getModel() {\n return model;\n }", "public abstract @NotNull LibraryTable getLibraryTable();", "public long[][] longMatrix() {\n\t\treturn LongMatrixMath\n\t\t\t\t.toMatrixFromArray(_value, _rowCount, _columnCount);\n\t}", "public Units getUnitTable();", "int maxSecondsForRawSampleRow();", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "public LearningType findOne(Long id);", "public Table getTable() {\n return table;\n }", "public static void loadSellTable()\n {\n final String QUERY = \"SELECT Sells.SellId, Sells.ProductId, Clients.FirstName, Clients.LastName, Products.ProductName, Sells.Stock, Sells.FinalPrice \"\n + \"FROM Sells, Products, Clients WHERE Sells.ProductId = Products.ProductId AND Sells.ClientId=Clients.clientId\";\n\n DefaultTableModel dtm = (DefaultTableModel) new SellDatabase().selectTable(QUERY);\n sellTable.setModel(dtm);\n }", "private Table<Integer,String> buildTable(Collection<Block> featuresAsBlocks, Collection<Clause> featuresAsClauses, List<PredicateDefinition> globalConstants, Dataset dataset, Algorithm mode, PresubsumptionType presubsumptionType){\n Table<Integer,String> table = new Table<Integer,String>();\n //i.e. not global constants\n List<Block> nonConstantAttributes = new ArrayList<Block>();\n List<Block> globalConstantAttributes = new ArrayList<Block>();\n for (Block attribute : featuresAsBlocks){\n if (attribute.definition().isGlobalConstant()){\n globalConstantAttributes.add(attribute);\n } else {\n nonConstantAttributes.add(attribute);\n }\n }\n Dataset copyOfDataset = dataset.shallowCopy();\n copyOfDataset.reset();\n while (copyOfDataset.hasNextExample()){\n Example example = copyOfDataset.nextExample();\n table.addClassification(copyOfDataset.currentIndex(), copyOfDataset.classificationOfCurrentExample());\n addGlobalConstants(example, copyOfDataset.currentIndex(), table, globalConstants);\n }\n if (mode == HIFI || mode == HIFI_GROUNDING_COUNTING || mode == RELF || mode == RELF_GROUNDING_COUNTING){\n HiFi tableConstructionHifi = new HiFi(dataset);\n if (mode == HIFI_GROUNDING_COUNTING || mode == RELF_GROUNDING_COUNTING){\n tableConstructionHifi.setAggregablesBuilder(VoidAggregablesBuilder.construct());\n tableConstructionHifi.setPostProcessingAggregablesBuilder(GroundingCountingAggregablesBuilder.construct());\n }\n if (this.normalizationFactor != null){\n tableConstructionHifi.setNormalizationFactor(normalizationFactor);\n }\n table.addAll(tableConstructionHifi.constructTable(nonConstantAttributes));\n } else if (mode == POLY || mode == POLY_GROUNDING_COUNTING){\n Poly tableConstructionHiFi = new Poly(dataset);\n if (mode == POLY){\n tableConstructionHiFi.setUseGroundingCounting(false);\n } else if (mode == POLY_GROUNDING_COUNTING){\n tableConstructionHiFi.setUseGroundingCounting(true);\n }\n table.addAll(tableConstructionHiFi.constructTable(nonConstantAttributes));\n } else if (mode == RELF_X){\n throw new UnsupportedOperationException();\n// HiFi tableConstructionHifi = new HiFi(dataset);\n// if (mode == HIFI_GROUNDING_COUNTING || mode == RELF_GROUNDING_COUNTING){\n// tableConstructionHifi.setAggregablesBuilder(VoidAggregablesBuilder.construct());\n// tableConstructionHifi.setPostProcessingAggregablesBuilder(GroundingCountingAggregablesBuilder.construct());\n// }\n// if (this.normalizationFactor != null){\n// tableConstructionHifi.setNormalizationFactor(normalizationFactor);\n// }\n// //table.addAll(tableConstructionHifi.constructTable(nonConstantAttributes));\n//\n// RelfX tableConstructionRelfX = new RelfX(dataset);\n// table.addAll(tableConstructionRelfX.constructTable(Sugar.listFromCollections(featuresAsClauses), presubsumptionType));\n }\n\n return table;\n }", "public TestSmallBenchmarkObjectRecord() {\n\t\tsuper(org.sfm.jooq.beans.tables.TestSmallBenchmarkObject.TEST_SMALL_BENCHMARK_OBJECT);\n\t}", "public LongTermTest()\r\n {\r\n super(new LongTermStorage());\r\n }", "static int OPLOpenTable() {\n int s, t;\n double rate;\n int i, j;\n double pom;\n\n /* allocate dynamic tables */\n TL_TABLE = new IntArray(TL_MAX * 2);\n SIN_TABLE = new IntArray[SIN_ENT * 4];\n AMS_TABLE = new IntArray(AMS_ENT * 2);\n VIB_TABLE = new IntArray(VIB_ENT * 2);\n /* make total level table */\n for (t = 0; t < EG_ENT - 1; t++) {\n rate = ((1 << TL_BITS) - 1) / Math.pow(10, EG_STEP * t / 20);\n /* dB . voltage */\n\n TL_TABLE.write(t, (int) rate);\n TL_TABLE.write(TL_MAX + t, -TL_TABLE.read(t));\n /*Log(LOG_INF,\"TotalLevel(%3d) = %x\\n\",t,TL_TABLE[t]);*/\n }\n /* fill volume off area */\n for (t = EG_ENT - 1; t < TL_MAX; t++) {\n\n TL_TABLE.write(t, 0);\n TL_TABLE.write(TL_MAX + t, 0);//TL_TABLE[t] = TL_TABLE[TL_MAX + t] = 0;\n }\n\n /* make sinwave table (total level offet) */\n /* degree 0 = degree 180 = off */\n SIN_TABLE[0] = SIN_TABLE[SIN_ENT / 2] = new IntArray(TL_TABLE, EG_ENT - 1);\n for (s = 1; s <= SIN_ENT / 4; s++) {\n pom = Math.sin(2 * Math.PI * s / SIN_ENT);\n /* sin */\n\n pom = 20 * Math.log10(1 / pom);\n /* decibel */\n\n j = (int) (pom / EG_STEP);\n /* TL_TABLE steps */\n\n /* degree 0 - 90 , degree 180 - 90 : plus section */\n SIN_TABLE[s] = SIN_TABLE[SIN_ENT / 2 - s] = new IntArray(TL_TABLE, j);\n /* degree 180 - 270 , degree 360 - 270 : minus section */\n SIN_TABLE[SIN_ENT / 2 + s] = SIN_TABLE[SIN_ENT - s] = new IntArray(TL_TABLE, TL_MAX + j);\n /*\t\tLog(LOG_INF,\"sin(%3d) = %f:%f db\\n\",s,pom,(double)j * EG_STEP);*/\n }\n for (s = 0; s < SIN_ENT; s++) {\n SIN_TABLE[SIN_ENT * 1 + s] = s < (SIN_ENT / 2) ? SIN_TABLE[s] : new IntArray(TL_TABLE, EG_ENT);\n SIN_TABLE[SIN_ENT * 2 + s] = SIN_TABLE[s % (SIN_ENT / 2)];\n SIN_TABLE[SIN_ENT * 3 + s] = ((s / (SIN_ENT / 4)) & 1) != 0 ? new IntArray(TL_TABLE, EG_ENT) : SIN_TABLE[SIN_ENT * 2 + s];\n }\n /* envelope counter . envelope output table */\n for (i = 0; i < EG_ENT; i++) {\n /* ATTACK curve */\n pom = Math.pow(((double) (EG_ENT - 1 - i) / EG_ENT), 8) * EG_ENT;\n /* if( pom >= EG_ENT ) pom = EG_ENT-1; */\n ENV_CURVE[i] = (int) pom;\n /* DECAY ,RELEASE curve */\n ENV_CURVE[(EG_DST >> ENV_BITS) + i] = i;\n }\n /* off */\n ENV_CURVE[EG_OFF >> ENV_BITS] = EG_ENT - 1;\n /* make LFO ams table */\n for (i = 0; i < AMS_ENT; i++) {\n pom = (1.0 + Math.sin(2 * Math.PI * i / AMS_ENT)) / 2;\n /* sin */\n\n AMS_TABLE.write(i, (int) ((1.0 / EG_STEP) * pom));\n /* 1dB */\n\n AMS_TABLE.write(AMS_ENT + i, (int) ((4.8 / EG_STEP) * pom));\n /* 4.8dB */\n\n }\n /* make LFO vibrate table */\n for (i = 0; i < VIB_ENT; i++) {\n /* 100cent = 1seminote = 6% ?? */\n pom = (double) VIB_RATE * 0.06 * Math.sin(2 * Math.PI * i / VIB_ENT);\n /* +-100sect step */\n\n VIB_TABLE.write(i, (int) (VIB_RATE + (pom * 0.07)));\n /* +- 7cent */\n\n VIB_TABLE.write(VIB_ENT + i, (int) (VIB_RATE + (pom * 0.14)));\n /* +-14cent */\n /* Log(LOG_INF,\"vib %d=%d\\n\",i,VIB_TABLE[VIB_ENT+i]); */\n\n }\n return 1;\n }", "public final Table getTable()\n {\n return table;\n }", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "private DefaultTableModel getTableModel() {\n return (DefaultTableModel) constantsTable.getModel();\n }", "List<cskaoyan_mall_order_goods> selectByExample(cskaoyan_mall_order_goodsExample example);", "public Rooms getRmTable();", "Object getTables();", "public MSBQueryTableModel getModel() {\n return msbQTM;\n }", "public TblWhyl getModel() {\n\t\t// TODO Auto-generated method stub\n\t\treturn whyl;\n\t}", "List<FinMonthlySnapModel> selectByExample(FinMonthlySnapModelExample example);", "private ResultsTable getResultsTable(boolean enReset) {\n ResultsTable rt = ResultsTable.getResultsTable();\n\n if(rt == null || rt.getCounter() == 0) {\n rt = new ResultsTable();\n }\n\n if(enReset) {\n rt.reset();\n }\n\n rt.show(\"Results\");\n\n return rt;\n }", "public Courses getCourseTable();", "public Table select_en(int teableSeq) throws Exception {\n\t\treturn tableDao.select_en(teableSeq);\r\n\t}", "public LeagueTableBase getEntity() {\n LeagueTableBase leagueTable = new LeagueTableBase();\n\n leagueTable.setId(new LeagueTableBasePK(getId().getLeagueSeasonId(), getId().getTeamNo(), getId().getPredicted(), getId().getWeekNo()));\n leagueTable.setGameDate(this.gameDate);\n leagueTable.setPlayed(this.played);\n leagueTable.setWon(this.won);\n leagueTable.setDrawn(this.drawn);\n leagueTable.setLost(this.lost);\n leagueTable.setGoalsFor(this.goalsFor);\n leagueTable.setGoalsAgainst(this.goalsAgainst);\n leagueTable.setPoints(this.points);\n leagueTable.setForm(this.form);\n leagueTable.setHomeWon(this.homeWon);\n leagueTable.setHomeDrawn(this.homeDrawn);\n leagueTable.setHomeLost(this.homeLost);\n leagueTable.setHomeGoalsFor(this.homeGoalsFor);\n leagueTable.setHomeGoalsAgainst(this.homeGoalsAgainst);\n leagueTable.setHomePoints(this.homePoints);\n leagueTable.setHomeForm(this.homeForm);\n leagueTable.setAwayWon(this.awayWon);\n leagueTable.setAwayDrawn(this.awayDrawn);\n leagueTable.setAwayLost(this.awayLost);\n leagueTable.setAwayGoalsFor(this.awayGoalsFor);\n leagueTable.setAwayGoalsAgainst(this.awayGoalsAgainst);\n leagueTable.setAwayPoints(this.awayPoints);\n leagueTable.setAwayForm(this.awayForm);\n leagueTable.setUpdatedDate(this.updatedDate);\n\n return leagueTable;\n }", "List<TbComEqpModel> selectByExample(TbComEqpModelExample example);", "public String loadModel() {\n\t\tgatherCriteria();\n\t\trefreshModel();\n\t\treturn listPage();\n\t}", "List<SwmsStockOutRecordDetail> selectByExample(SwmsStockOutRecordDetailExample example);", "public interface TableQueryResult extends Catalog, TableModel {\n\n /**\n * Returns the Vector of Vectors that contains the table's data values.\n * The vectors contained in the outer vector are each a single row of values.\n */\n Vector<Vector<Object>> getDataVector();\n\n /** Return a description of the ith table column field */\n FieldDesc getColumnDesc(int i);\n\n /** Return the table column index for the given column name */\n int getColumnIndex(String name);\n\n /** Return a vector of column headings for this table. */\n List<String> getColumnIdentifiers();\n\n /** Return true if the table has coordinate columns, such as (ra, dec) */\n boolean hasCoordinates();\n\n /**\n * Return a Coordinates object based on the appropriate columns in the given row,\n * or null if there are no coordinates available for the row.\n */\n Coordinates getCoordinates(int rowIndex);\n\n /**\n * Return an object describing the columns that can be used to search\n * this catalog.\n */\n RowCoordinates getRowCoordinates();\n\n /**\n * Return the center coordinates for this table from the query arguments,\n * if known, otherwise return the coordinates of the first row, or null\n * if there are no world coordinates available.\n */\n WorldCoordinates getWCSCenter();\n\n /**\n * Return the object representing the arguments to the query that resulted in this table,\n * if known, otherwise null.\n */\n QueryArgs getQueryArgs();\n\n /**\n * Set the object representing the arguments to the query that resulted in this table.\n */\n void setQueryArgs(QueryArgs queryArgs);\n\n /** Return true if the result was truncated and more data would have been available */\n boolean isMore();\n\n /**\n * Return the catalog used to create this table,\n * or a dummy, generated catalog object, if not known.\n */\n Catalog getCatalog();\n\n /**\n * Return a possible SiderealTarget for the row i\n */\n Option<SiderealTarget> getSiderealTarget(int i);\n\n}", "public DefaultTableModel obtenerInmuebles(String minPrecio,String maxPrecio,String direccion,String lugarReferencia){\n\t\tDefaultTableModel tableModel=new DefaultTableModel();\n\t\tint registros=0;\n\t\tString[] columNames={\"ID\",\"DIRECCION\",\"PRECIO\",\"USUARIO\"};\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"select count(*) as total from inmuebles where precio between \"+minPrecio+\" and \"+maxPrecio+\" and direccion like '%\"+direccion+\"%' and lugarReferencia like '%\"+lugarReferencia+\"%' \");\n\t\t\t\n\t\t\tResultSet respuesta=statement.executeQuery();\n\t\t\trespuesta.next();\n\t\t\tregistros=respuesta.getInt(\"total\");\n\t\t\trespuesta.close();\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception.getMessage());\n\t\t}\n\t\tObject [][] data=new String[registros][5];\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"select id,direccion,precio,idUsuario from inmuebles where precio between \"+minPrecio+\" and \"+maxPrecio+\" and direccion like ? and lugarReferencia like ? \");\n\t\t\tstatement.setString(1, \"%\"+direccion+\"%\");\n\t\t\tstatement.setString(2, \"%\"+lugarReferencia+\"%\");\n\t\t\tResultSet respuesta=statement.executeQuery();\n\t\t\tint i=0;\n\t\t\twhile(respuesta.next()){\n\t\t\t\tdata[i][0]=respuesta.getString(\"id\");\n\t\t\t\tdata[i][1]=respuesta.getString(\"direccion\");\n\t\t\t\tdata[i][2]=respuesta.getString(\"precio\");\n\t\t\t\tdata[i][3]=respuesta.getString(\"idUsuario\");\n\t\t\t\ti++;\n\t\t\t}\n\t\t\trespuesta.close();\n\t\t\ttableModel.setDataVector(data, columNames);\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception.getMessage());\n\t\t}\n\t\treturn tableModel;\n\t}", "public String getTabledesc() {\n return tabledesc;\n }", "@Test(enabled = false)\n\tpublic void getRandomBirdShouldReturnBirdModel() {\n\t\tBirdModel model = dao.getRandomBird();\n\t\t\n\t\tassertNotNull(model, \"returned randomised bird was null\");\n\t\tassertNotNull(model.getId(), \"returned randomised bird had null ID\");\n\t\tassertFalse(model.getId().isEmpty(), \"returned randomised bird had empty ID\");\n\t}", "@Override\n public Class<LinearmodelRecord> getRecordType() {\n return LinearmodelRecord.class;\n }", "Table8 create(Table8 table8);", "public TestFrame() {\n\n final String[] columnNames = {\"Nombre\",\n \"Apellido\",\n \"webeo\",\n \"Años de Practica\",\n \"Soltero(a)\"};\n final Object[][] data = {\n\n {\"Lhucas\", \"Huml\",\n \"Patinar\", new Integer(3), new Boolean(true)},\n {\"Kathya\", \"Walrath\",\n \"Escalar\", new Integer(2), new Boolean(false)},\n {\"Marcus\", \"Andrews\",\n \"Correr\", new Integer(7), new Boolean(true)},\n {\"Angela\", \"Lalth\",\n \"Nadar\", new Integer(4), new Boolean(false)}\n };\n\n Vector dataV1 = new Vector();\n dataV1.add(\"XXXX\");\n dataV1.add(\"YYYY\");\n dataV1.add(\"JJJJ\");\n\n Vector dataV2 = new Vector();\n dataV2.add(\"XX2XX\");\n dataV2.add(\"Y2YYY\");\n dataV2.add(\"J2JJJ\");\n\n List dataF = new ArrayList();\n dataF.add(dataV1);\n dataF.add(dataV2);\n\n /*Vector dataC = new Vector();\n dataC.add(\"1\");\n dataC.add(\"2\");\n dataC.add(\"J23JJJ\");\n\n //model = new ModeloDatosTabla(data, true);\n model = new TableModel_1_1(dataC, dataF);\n model2 = new TableModel(columnNames, data, false);\n*/\n\n\n\n initComponents();\n\n\n }", "@Override\n public int getMaxRowSize() {\n return 1048576;\n }", "ColumnFull createColumnFull();", "public String getSourceTable();", "public long getModelId();", "public Table getTable() {\n\t\treturn table;\n\t}", "private String generateModel() {\n\t\tString model = \"\";\n\t\tint caseNumber = randomGenerator.nextInt(6) + 1;\n\t\t\n\t\tswitch (caseNumber) {\n\t\tcase 1: \n\t\t\tmodel = \"compact\";\n\t\t\tbreak;\n\t\tcase 2: \n\t\t\tmodel = \"intermediate\";\n\t\t\tbreak;\n\t\tcase 3: \n\t\t\tmodel = \"fullSized\";\n\t\t\tbreak;\n\t\tcase 4: \n\t\t\tmodel = \"van\";\n\t\t\tbreak;\n\t\tcase 5: \n\t\t\tmodel = \"suv\";\n\t\t\tbreak;\n\t\tcase 6: \n\t\t\tmodel = \"pickup\";\n\t\t\tbreak;\n\t\tdefault: \n\t\t\tmodel = \"\";\n\t\t\tbreak;\n\t\t}\n\t\treturn model;\n\t}", "public void loadModel() throws SQLException {\n\t\tObject rs = MysqlConnection.getDbConnection().getQueryData(query);\n\t\tclassifier = (FilteredClassifier)rs;\n\t}", "public String getTarget_table() {\n return target_table;\n }" ]
[ "0.5898341", "0.57709306", "0.5546669", "0.5395561", "0.5301907", "0.52787894", "0.5243798", "0.5207164", "0.5193781", "0.5118751", "0.5112965", "0.5106111", "0.5061227", "0.50364953", "0.5019319", "0.5018169", "0.50067323", "0.49991322", "0.49921352", "0.49901444", "0.49727502", "0.49622324", "0.49521837", "0.49278218", "0.49259406", "0.49165338", "0.49069563", "0.49049082", "0.48879197", "0.48869258", "0.48516256", "0.48464334", "0.48231837", "0.4803829", "0.48015773", "0.4777789", "0.47751385", "0.47729242", "0.47505602", "0.47481638", "0.47382", "0.47318026", "0.47302914", "0.47297114", "0.4727293", "0.47244027", "0.4722619", "0.47202775", "0.47200972", "0.47194523", "0.47184798", "0.4713996", "0.4710827", "0.46975806", "0.4697466", "0.46958706", "0.46937388", "0.46886614", "0.46858895", "0.46826807", "0.4678248", "0.46688095", "0.46669617", "0.46608266", "0.4656245", "0.4655507", "0.46540204", "0.46480033", "0.4646891", "0.46431375", "0.4636207", "0.4634874", "0.46272534", "0.4618246", "0.46043465", "0.46030197", "0.46029374", "0.45938876", "0.458485", "0.45755884", "0.45741013", "0.4566104", "0.45582736", "0.455651", "0.45522", "0.45430282", "0.45385897", "0.4536983", "0.4534762", "0.45345265", "0.45336306", "0.4532069", "0.45301488", "0.45293298", "0.45285553", "0.45276725", "0.45263314", "0.45194435", "0.45157647", "0.45151955" ]
0.62107474
0
/ Enabled aggressive block sorting
amx(Parcel parcel) { int n = 1; this.a = parcel.readInt(); this.b = parcel.readInt(); if (parcel.readInt() != n) { n = 0; } this.c = n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortBlocks(){\n\t\tCurrentSets = getCurrentSets();\n\t\tif(CurrentSets == 1){\n\t\t\treturn;\n\t\t}else{\n\t\t\tfor(i = 0; i < CurrentSets - 1; i++){\n\t\t\t\tfor(j = i + 1; j < CurrentSets; j++){\n\t\t\t\t\tif((Integer.parseInt(blocks[i].getHexTag(), 16)) > (Integer.parseInt(blocks[j].getHexTag(), 16))){\n\t\t\t\t\t\ttemp = blocks[j];\n\t\t\t\t\t\tblocks[j] = blocks[i];\n\t\t\t\t\t\tblocks[i] = temp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void sort(IAlg algorithm, boolean decrescent){}", "private static void sortingMemo() {\n\t\t\n\t}", "public void sort()throws InterruptedException{\n\t\tfor (int i = 0; i < a.length - 1; i++) {\n\t\t\tint minPos = minPosition(i);\n\t\t\tsortStateLock.lock();\n\t\t\ttry{\n\t\t\t\tswap(minPos, i);\n\t\t\t\t// For animation\n\t\t\t\talreadySorted = i;\n\t\t\t}\n\t\t\tfinally{\n\t\t\t\tsortStateLock.unlock();\n\t\t \t\t}\n\t\t\tpause(2);\n\t }\n }", "public FastNondominatedSorting() {\r\n\t\tthis(new ParetoDominanceComparator());\r\n\t}", "private PerfectMergeSort() {}", "@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void sort() {\n compares = 0;\n shuttlesort((int[]) indexes.clone(), indexes, 0, indexes.length);\n }", "public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }", "public void oldSort()\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) {\n\t\t\tfor (int secondIndex = index + 1; secondIndex < arraySize; secondIndex++) {\n\t\t\t\tint temp = 0;\n\t\t\t\tif (array[index] > array[secondIndex]) {\n\t\t\t\t\ttemp = array[index];\n\t\t\t\t\tarray[index] = array[secondIndex];\n\t\t\t\t\tarray[secondIndex] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void sort() {\n\t\trunPassZero();\n\t\tList<TupleReaderBinary> buffers = new ArrayList<>();\n\t\tList<Tuple> sortStage = new ArrayList<>();\n\t\tassert (readerBucketID == 0);\n\t\tassert (writerBucketID == 0);\n\t\tassert (passNumber == 1);\n\t\tassert (currentGroup == 1);\n\t\toutputBuffer.clear();\n\n\t\t// assign buffers\n\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\tbuffers.add(null);\n\t\t\tassignBuffer(buffers, i);\n\t\t\tsortStage.add(null);\n\t\t}\n\n\t\tassert (buffers.size() == numInputBuffers);\n\t\tassert (sortStage.size() == numInputBuffers);\n\n\t\t// read from buffers into list of size numInputBuffers\n\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\tsortStage.set(i, readFromBuffer(buffers, i));\n\t\t}\n\n\t\toutputWriter = new TupleWriterBinary(DatabaseCatalog.getInstance().getTempDirectory() + \"/\" + instanceHashcode\n\t\t\t\t+ \"_\" + passNumber + \"_\" + writerBucketID);\n\n\t\twhile (true) {\n\t\t\tif (!findAndReplaceSmallest(buffers, sortStage)) {\n\t\t\t\tprevPrevTotalBuckets = prevTotalBuckets;\n\t\t\t\tprevTotalBuckets = writerBucketID + 1;\n\t\t\t\tflushOutputBuffer();\n\t\t\t\toutputWriter.close();\n\n\t\t\t\t// We are done! Return\n\t\t\t\tif (prevTotalBuckets == 1) {\n\t\t\t\t\tdeleteTempFiles();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\twriterBucketID = 0;\n\t\t\t\treaderBucketID = 0;\n\t\t\t\twriterFlushes = 0;\n\t\t\t\tdeleteTempFiles();\n\t\t\t\tpassNumber++;\n\t\t\t\tcurrentGroup = 1;\n\n\t\t\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\t\t\tassignBuffer(buffers, i);\n\t\t\t\t\tsortStage.add(null);\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\t\t\tsortStage.set(i, readFromBuffer(buffers, i));\n\t\t\t\t}\n\n\t\t\t\toutputWriter = new TupleWriterBinary(DatabaseCatalog.getInstance().getTempDirectory() + \"/\"\n\t\t\t\t\t\t+ instanceHashcode + \"_\" + passNumber + \"_\" + writerBucketID);\n\t\t\t}\n\t\t}\n\n\t}", "public void radixSorting() {\n\t\t\n\t}", "public void sort() {\n }", "public void sort() {\n\t\tdivider(0, array.size() - 1);\n\t}", "public void setBubbleSort() \n\t{\n\t\tint last = recordCount + NOT_FOUND; //array.length() - 1\n\n\t\twhile(last > RESET_VALUE) //last > 0\n\t\t{\n\t\t\tint localIndex = RESET_VALUE; \n\t\t\tboolean swap = false;\n\n\t\t\twhile(localIndex < last) \n\t\t\t{\n\t\t\t\tif(itemIDs[localIndex] > itemIDs[localIndex + 1]) \n\t\t\t\t{\n\t\t\t\t\tsetSwapArrayElements(localIndex);\n\t\t\t\t\tswap = true;\n\t\t\t\t}\n\t\t\t\tlocalIndex++;\n\t\t\t}\n\n\t\t\tif(swap == false) \n\t\t\t{\n\t\t\t\tlast = RESET_VALUE;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tlast = last + NOT_FOUND;\n\t\t\t}\n\n\t\t}//END while(last > RESET_VALUE)\n\t\treturn;\n\t}", "private void trIntroSort(int r34, int r35, int r36, int r37, int r38, io.netty.handler.codec.compression.Bzip2DivSufSort.TRBudget r39, int r40) {\n /*\n r33 = this;\n r0 = r33;\n r0 = r0.SA;\n r16 = r0;\n r4 = 64;\n r0 = new io.netty.handler.codec.compression.Bzip2DivSufSort.StackEntry[r4];\n r29 = r0;\n r32 = 0;\n r27 = 0;\n r4 = r38 - r37;\n r22 = trLog(r4);\n r28 = r27;\n r23 = r22;\n L_0x001a:\n if (r23 >= 0) goto L_0x02b6;\n L_0x001c:\n r4 = -1;\n r0 = r23;\n if (r0 != r4) goto L_0x01a4;\n L_0x0021:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 != 0) goto L_0x0050;\n L_0x002d:\n r22 = r23;\n L_0x002f:\n r26 = 0;\n L_0x0031:\n r0 = r26;\n r1 = r28;\n if (r0 >= r1) goto L_0x072a;\n L_0x0037:\n r4 = r29[r26];\n r4 = r4.d;\n r5 = -3;\n if (r4 != r5) goto L_0x004d;\n L_0x003e:\n r4 = r29[r26];\n r4 = r4.b;\n r5 = r29[r26];\n r5 = r5.c;\n r0 = r33;\n r1 = r34;\n r0.lsUpdateGroup(r1, r4, r5);\n L_0x004d:\n r26 = r26 + 1;\n goto L_0x0031;\n L_0x0050:\n r6 = r35 + -1;\n r10 = r38 + -1;\n r4 = r33;\n r5 = r34;\n r7 = r36;\n r8 = r37;\n r9 = r38;\n r25 = r4.trPartition(r5, r6, r7, r8, r9, r10);\n r0 = r25;\n r8 = r0.first;\n r0 = r25;\n r9 = r0.last;\n r0 = r37;\n if (r0 < r8) goto L_0x0072;\n L_0x006e:\n r0 = r38;\n if (r9 >= r0) goto L_0x016d;\n L_0x0072:\n r0 = r38;\n if (r8 >= r0) goto L_0x0087;\n L_0x0076:\n r17 = r37;\n r31 = r8 + -1;\n L_0x007a:\n r0 = r17;\n if (r0 >= r8) goto L_0x0087;\n L_0x007e:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x007a;\n L_0x0087:\n r0 = r38;\n if (r9 >= r0) goto L_0x009c;\n L_0x008b:\n r17 = r8;\n r31 = r9 + -1;\n L_0x008f:\n r0 = r17;\n if (r0 >= r9) goto L_0x009c;\n L_0x0093:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x008f;\n L_0x009c:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = 0;\n r6 = 0;\n r4.<init>(r5, r8, r9, r6);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + -1;\n r6 = -2;\n r0 = r37;\n r1 = r38;\n r4.<init>(r5, r0, r1, r6);\n r29[r27] = r4;\n r4 = r8 - r37;\n r5 = r38 - r9;\n if (r4 > r5) goto L_0x0117;\n L_0x00bd:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x00e3;\n L_0x00c2:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r38 - r9;\n r5 = trLog(r5);\n r0 = r35;\n r1 = r38;\n r4.<init>(r0, r9, r1, r5);\n r29[r28] = r4;\n r38 = r8;\n r4 = r8 - r37;\n r22 = trLog(r4);\n L_0x00dd:\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x00e3:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x00f3;\n L_0x00e8:\n r37 = r9;\n r4 = r38 - r9;\n r22 = trLog(r4);\n r27 = r28;\n goto L_0x00dd;\n L_0x00f3:\n if (r28 != 0) goto L_0x00fa;\n L_0x00f5:\n r27 = r28;\n r22 = r23;\n L_0x00f9:\n return;\n L_0x00fa:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n goto L_0x00dd;\n L_0x0117:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x0138;\n L_0x011c:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r8 - r37;\n r5 = trLog(r5);\n r0 = r35;\n r1 = r37;\n r4.<init>(r0, r1, r8, r5);\n r29[r28] = r4;\n r37 = r9;\n r4 = r38 - r9;\n r22 = trLog(r4);\n goto L_0x00dd;\n L_0x0138:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x0148;\n L_0x013d:\n r38 = r8;\n r4 = r8 - r37;\n r22 = trLog(r4);\n r27 = r28;\n goto L_0x00dd;\n L_0x0148:\n if (r28 != 0) goto L_0x014f;\n L_0x014a:\n r27 = r28;\n r22 = r23;\n goto L_0x00f9;\n L_0x014f:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n goto L_0x00dd;\n L_0x016d:\n r17 = r37;\n L_0x016f:\n r0 = r17;\n r1 = r38;\n if (r0 >= r1) goto L_0x017e;\n L_0x0175:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r17;\n r17 = r17 + 1;\n goto L_0x016f;\n L_0x017e:\n if (r28 != 0) goto L_0x0186;\n L_0x0180:\n r27 = r28;\n r22 = r23;\n goto L_0x00f9;\n L_0x0186:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n goto L_0x00dd;\n L_0x01a4:\n r4 = -2;\n r0 = r23;\n if (r0 != r4) goto L_0x01ea;\n L_0x01a9:\n r27 = r28 + -1;\n r4 = r29[r27];\n r8 = r4.b;\n r4 = r29[r27];\n r9 = r4.c;\n r11 = r35 - r34;\n r4 = r33;\n r5 = r34;\n r6 = r36;\n r7 = r37;\n r10 = r38;\n r4.trCopy(r5, r6, r7, r8, r9, r10, r11);\n if (r27 != 0) goto L_0x01c8;\n L_0x01c4:\n r22 = r23;\n goto L_0x00f9;\n L_0x01c8:\n r27 = r27 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x01ea:\n r4 = r16[r37];\n if (r4 < 0) goto L_0x0202;\n L_0x01ee:\n r8 = r37;\n L_0x01f0:\n r4 = r16[r8];\n r4 = r4 + r34;\n r16[r4] = r8;\n r8 = r8 + 1;\n r0 = r38;\n if (r8 >= r0) goto L_0x0200;\n L_0x01fc:\n r4 = r16[r8];\n if (r4 >= 0) goto L_0x01f0;\n L_0x0200:\n r37 = r8;\n L_0x0202:\n r0 = r37;\n r1 = r38;\n if (r0 >= r1) goto L_0x028c;\n L_0x0208:\n r8 = r37;\n L_0x020a:\n r4 = r16[r8];\n r4 = r4 ^ -1;\n r16[r8] = r4;\n r8 = r8 + 1;\n r4 = r16[r8];\n if (r4 < 0) goto L_0x020a;\n L_0x0216:\n r4 = r16[r8];\n r4 = r4 + r34;\n r4 = r16[r4];\n r5 = r16[r8];\n r5 = r5 + r35;\n r5 = r16[r5];\n if (r4 == r5) goto L_0x0241;\n L_0x0224:\n r4 = r8 - r37;\n r4 = r4 + 1;\n r24 = trLog(r4);\n L_0x022c:\n r8 = r8 + 1;\n r0 = r38;\n if (r8 >= r0) goto L_0x0244;\n L_0x0232:\n r9 = r37;\n r31 = r8 + -1;\n L_0x0236:\n if (r9 >= r8) goto L_0x0244;\n L_0x0238:\n r4 = r16[r9];\n r4 = r4 + r34;\n r16[r4] = r31;\n r9 = r9 + 1;\n goto L_0x0236;\n L_0x0241:\n r24 = -1;\n goto L_0x022c;\n L_0x0244:\n r4 = r8 - r37;\n r5 = r38 - r8;\n if (r4 > r5) goto L_0x0264;\n L_0x024a:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = -3;\n r0 = r35;\n r1 = r38;\n r4.<init>(r0, r8, r1, r5);\n r29[r28] = r4;\n r35 = r35 + 1;\n r38 = r8;\n r22 = r24;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0264:\n r4 = 1;\n r5 = r38 - r8;\n if (r4 >= r5) goto L_0x0282;\n L_0x0269:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r37;\n r1 = r24;\n r4.<init>(r5, r0, r8, r1);\n r29[r28] = r4;\n r37 = r8;\n r22 = -3;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0282:\n r35 = r35 + 1;\n r38 = r8;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x028c:\n if (r28 != 0) goto L_0x0294;\n L_0x028e:\n r27 = r28;\n r22 = r23;\n goto L_0x00f9;\n L_0x0294:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x02b6:\n r4 = r38 - r37;\n r5 = 8;\n if (r4 > r5) goto L_0x02d5;\n L_0x02bc:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 != 0) goto L_0x02cc;\n L_0x02c8:\n r22 = r23;\n goto L_0x002f;\n L_0x02cc:\n r33.trInsertionSort(r34, r35, r36, r37, r38);\n r22 = -3;\n r23 = r22;\n goto L_0x001a;\n L_0x02d5:\n r22 = r23 + -1;\n if (r23 != 0) goto L_0x0331;\n L_0x02d9:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 == 0) goto L_0x002f;\n L_0x02e5:\n r15 = r38 - r37;\n r10 = r33;\n r11 = r34;\n r12 = r35;\n r13 = r36;\n r14 = r37;\n r10.trHeapSort(r11, r12, r13, r14, r15);\n r8 = r38 + -1;\n L_0x02f6:\n r0 = r37;\n if (r0 >= r8) goto L_0x032b;\n L_0x02fa:\n r4 = r16[r8];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r9 = r8 + -1;\n L_0x030a:\n r0 = r37;\n if (r0 > r9) goto L_0x0329;\n L_0x030e:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r4 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n if (r4 != r0) goto L_0x0329;\n L_0x0320:\n r4 = r16[r9];\n r4 = r4 ^ -1;\n r16[r9] = r4;\n r9 = r9 + -1;\n goto L_0x030a;\n L_0x0329:\n r8 = r9;\n goto L_0x02f6;\n L_0x032b:\n r22 = -3;\n r23 = r22;\n goto L_0x001a;\n L_0x0331:\n r8 = r33.trPivot(r34, r35, r36, r37, r38);\n r0 = r16;\n r1 = r37;\n r2 = r16;\n swapElements(r0, r1, r2, r8);\n r4 = r16[r37];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r31 = r0.trGetC(r1, r2, r3, r4);\n r9 = r37 + 1;\n L_0x034e:\n r0 = r38;\n if (r9 >= r0) goto L_0x0369;\n L_0x0352:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x0369;\n L_0x0366:\n r9 = r9 + 1;\n goto L_0x034e;\n L_0x0369:\n r8 = r9;\n r0 = r38;\n if (r9 >= r0) goto L_0x039e;\n L_0x036e:\n r0 = r32;\n r1 = r31;\n if (r0 >= r1) goto L_0x039e;\n L_0x0374:\n r9 = r9 + 1;\n r0 = r38;\n if (r9 >= r0) goto L_0x039e;\n L_0x037a:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 > r1) goto L_0x039e;\n L_0x038e:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x0374;\n L_0x0394:\n r0 = r16;\n r1 = r16;\n swapElements(r0, r9, r1, r8);\n r8 = r8 + 1;\n goto L_0x0374;\n L_0x039e:\n r17 = r38 + -1;\n L_0x03a0:\n r0 = r17;\n if (r9 >= r0) goto L_0x03bb;\n L_0x03a4:\n r4 = r16[r17];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x03bb;\n L_0x03b8:\n r17 = r17 + -1;\n goto L_0x03a0;\n L_0x03bb:\n r18 = r17;\n r0 = r17;\n if (r9 >= r0) goto L_0x03f5;\n L_0x03c1:\n r0 = r32;\n r1 = r31;\n if (r0 <= r1) goto L_0x03f5;\n L_0x03c7:\n r17 = r17 + -1;\n r0 = r17;\n if (r9 >= r0) goto L_0x03f5;\n L_0x03cd:\n r4 = r16[r17];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 < r1) goto L_0x03f5;\n L_0x03e1:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x03c7;\n L_0x03e7:\n r0 = r16;\n r1 = r17;\n r2 = r16;\n r3 = r18;\n swapElements(r0, r1, r2, r3);\n r18 = r18 + -1;\n goto L_0x03c7;\n L_0x03f5:\n r0 = r17;\n if (r9 >= r0) goto L_0x045a;\n L_0x03f9:\n r0 = r16;\n r1 = r16;\n r2 = r17;\n swapElements(r0, r9, r1, r2);\n L_0x0402:\n r9 = r9 + 1;\n r0 = r17;\n if (r9 >= r0) goto L_0x042c;\n L_0x0408:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 > r1) goto L_0x042c;\n L_0x041c:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x0402;\n L_0x0422:\n r0 = r16;\n r1 = r16;\n swapElements(r0, r9, r1, r8);\n r8 = r8 + 1;\n goto L_0x0402;\n L_0x042c:\n r17 = r17 + -1;\n r0 = r17;\n if (r9 >= r0) goto L_0x03f5;\n L_0x0432:\n r4 = r16[r17];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 < r1) goto L_0x03f5;\n L_0x0446:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x042c;\n L_0x044c:\n r0 = r16;\n r1 = r17;\n r2 = r16;\n r3 = r18;\n swapElements(r0, r1, r2, r3);\n r18 = r18 + -1;\n goto L_0x042c;\n L_0x045a:\n r0 = r18;\n if (r8 > r0) goto L_0x0716;\n L_0x045e:\n r17 = r9 + -1;\n r26 = r8 - r37;\n r30 = r9 - r8;\n r0 = r26;\n r1 = r30;\n if (r0 <= r1) goto L_0x046c;\n L_0x046a:\n r26 = r30;\n L_0x046c:\n r19 = r37;\n r21 = r9 - r26;\n L_0x0470:\n if (r26 <= 0) goto L_0x0484;\n L_0x0472:\n r0 = r16;\n r1 = r19;\n r2 = r16;\n r3 = r21;\n swapElements(r0, r1, r2, r3);\n r26 = r26 + -1;\n r19 = r19 + 1;\n r21 = r21 + 1;\n goto L_0x0470;\n L_0x0484:\n r26 = r18 - r17;\n r4 = r38 - r18;\n r30 = r4 + -1;\n r0 = r26;\n r1 = r30;\n if (r0 <= r1) goto L_0x0492;\n L_0x0490:\n r26 = r30;\n L_0x0492:\n r19 = r9;\n r21 = r38 - r26;\n L_0x0496:\n if (r26 <= 0) goto L_0x04aa;\n L_0x0498:\n r0 = r16;\n r1 = r19;\n r2 = r16;\n r3 = r21;\n swapElements(r0, r1, r2, r3);\n r26 = r26 + -1;\n r19 = r19 + 1;\n r21 = r21 + 1;\n goto L_0x0496;\n L_0x04aa:\n r4 = r9 - r8;\n r8 = r37 + r4;\n r4 = r18 - r17;\n r9 = r38 - r4;\n r4 = r16[r8];\n r4 = r4 + r34;\n r4 = r16[r4];\n r0 = r31;\n if (r4 == r0) goto L_0x04d3;\n L_0x04bc:\n r4 = r9 - r8;\n r24 = trLog(r4);\n L_0x04c2:\n r17 = r37;\n r31 = r8 + -1;\n L_0x04c6:\n r0 = r17;\n if (r0 >= r8) goto L_0x04d6;\n L_0x04ca:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x04c6;\n L_0x04d3:\n r24 = -1;\n goto L_0x04c2;\n L_0x04d6:\n r0 = r38;\n if (r9 >= r0) goto L_0x04eb;\n L_0x04da:\n r17 = r8;\n r31 = r9 + -1;\n L_0x04de:\n r0 = r17;\n if (r0 >= r9) goto L_0x04eb;\n L_0x04e2:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x04de;\n L_0x04eb:\n r4 = r8 - r37;\n r5 = r38 - r9;\n if (r4 > r5) goto L_0x060c;\n L_0x04f1:\n r4 = r38 - r9;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x0571;\n L_0x04f7:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x051e;\n L_0x04fc:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r27] = r4;\n r38 = r8;\n r23 = r22;\n goto L_0x001a;\n L_0x051e:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x0538;\n L_0x0523:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r37 = r9;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0538:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x0549;\n L_0x053d:\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x0549:\n if (r28 != 0) goto L_0x054f;\n L_0x054b:\n r27 = r28;\n goto L_0x00f9;\n L_0x054f:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0571:\n r4 = r8 - r37;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x05c6;\n L_0x0577:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x059e;\n L_0x057c:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r27] = r4;\n r38 = r8;\n r23 = r22;\n goto L_0x001a;\n L_0x059e:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x05c0;\n L_0x05a3:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x05c0:\n r37 = r9;\n r23 = r22;\n goto L_0x001a;\n L_0x05c6:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x05f5;\n L_0x05cb:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r27] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x05f5:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r38 = r8;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x060c:\n r4 = r8 - r37;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x067b;\n L_0x0612:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x0639;\n L_0x0617:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r27] = r4;\n r37 = r9;\n r23 = r22;\n goto L_0x001a;\n L_0x0639:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x0653;\n L_0x063e:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r38 = r8;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0653:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x0664;\n L_0x0658:\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x0664:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r38;\n r3 = r22;\n r4.<init>(r0, r1, r2, r3);\n r29[r28] = r4;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x067b:\n r4 = r38 - r9;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x06d0;\n L_0x0681:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x06a8;\n L_0x0686:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r27] = r4;\n r37 = r9;\n r23 = r22;\n goto L_0x001a;\n L_0x06a8:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x06ca;\n L_0x06ad:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x06ca:\n r38 = r8;\n r23 = r22;\n goto L_0x001a;\n L_0x06d0:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x06ff;\n L_0x06d5:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r27] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x06ff:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r37 = r9;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0716:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 == 0) goto L_0x002f;\n L_0x0722:\n r22 = r22 + 1;\n r35 = r35 + 1;\n r23 = r22;\n goto L_0x001a;\n L_0x072a:\n r27 = r28;\n goto L_0x00f9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.netty.handler.codec.compression.Bzip2DivSufSort.trIntroSort(int, int, int, int, int, io.netty.handler.codec.compression.Bzip2DivSufSort$TRBudget, int):void\");\n }", "public void sort()\n\t{\n\t\tfor(int i=0;i<bowlers.size()-1;i++)\n\t\t{\n\t\t\tfor(int j=i+1;j<bowlers.size();j++)\n\t\t\t{\n\t\t\t\tif(bowlers.get(i).getBall()<bowlers.get(j).getBall())\n\t\t\t\t{\n\t\t\t\t\tBowler bowler=bowlers.get(i);\n\t\t\t\t\tbowlers.set(i,bowlers.get(j));\n\t\t\t\t\tbowlers.set(j,bowler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<bowlers.size();i++)\n\t\t{\n\t\tSystem.out.println(bowlers.get(i).getBall());\n\t\t}\n\t}", "@Override\r\n\tpublic void editSort() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void addSort() {\n\t\t\r\n\t}", "@Override\n protected void runAlgorithm() {\n for (int i = 0; i < getArray().length; i++) {\n for (int j = i + 1; j < getArray().length; j++) {\n if (applySortingOperator(getValue(j), getValue(i))) {\n swap(i, j);\n }\n }\n }\n }", "@Override\n\tvoid sort(int[] array, SortingVisualizer display) {\n\t\tSystem.out.println(\"a\");\n\t\tboolean sorted = false;\n\t\tboolean h = true;\n\t\twhile (sorted == false) {\nh=true;\n\t\t\t// System.out.println(\"1\");\n\t\t\tRandom x = new Random();\n\t\t\tint y = x.nextInt(array.length);\n\n\t\t\tint el1 = array[y];\n\t\t\tint z = x.nextInt(array.length);\n\t\t\tint el2 = array[z];\n\n\t\t\tarray[y] = el2;\n\t\t\tarray[z] = el1;\n\t\t\tfor (int i = 0; i < array.length - 1; i++) {\n/*\n\t\t\t\tif (array[i] < array[i + 1]) {\n\n\t\t\t\t\th = true;\n\n\t\t\t\t}*/\n\n\t\t\t\tif (array[i] > array[i + 1]) {\n\t\t\t\t\th = false;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (h == true) {\n\n\t\t\t\tsorted = true;\n\t\t\t}\n\n\t\t\tdisplay.updateDisplay();\n\t\t\t\n\t\t}\n\t}", "public List<SimulinkBlock> generateBlockOrder(UnmodifiableCollection<SimulinkBlock> unmodifiableCollection,\n\t\t\tSet<SimulinkBlock> unsortedBlocks) {\n\t\tSet<SimulinkBlock> unsorted = new HashSet<SimulinkBlock>();\n\t\tSet<SimulinkBlock> unsortedRev = new HashSet<SimulinkBlock>();\n\t\tList<SimulinkBlock> sorted = new LinkedList<SimulinkBlock>();\n\n\t\t// start with source blocks without input\n\t\tfor (SimulinkBlock block : unmodifiableCollection) {\n\t\t\tif (block.getInPorts().isEmpty()) {\n\t\t\t\tsorted.add(block);\n\t\t\t} else {\n\t\t\t\tunsorted.add(block);\n\t\t\t}\n\t\t}\n\n\t\tint sizeBefore = 0;\n\t\tint sizeAfter = 0;\n\t\tdo {\n\t\t\tsizeBefore = unsorted.size();\n\t\t\tfor (SimulinkBlock myBlock : unsorted) {\n\t\t\t\tunsortedRev.add(myBlock);\n\t\t\t}\n\t\t\tunsorted.clear();\n\t\t\tfor (SimulinkBlock block : unsortedRev) {\n\t\t\t\tboolean allPredeccesorsAvailable = specialBlockChecking(block, sorted);\n\t\t\t\tif (allPredeccesorsAvailable) {\n\t\t\t\t\tsorted.add(block);\n\t\t\t\t} else {\n\t\t\t\t\tunsorted.add(block);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsizeAfter = unsorted.size();\n\t\t\tunsortedRev.clear();\n\t\t} while ((!(unsorted.isEmpty())) && (!(sizeBefore == sizeAfter)));\n\n\t\tfor (SimulinkBlock block : unsorted) {\n\t\t\t// TODO sort the last unsorted blocks\n\t\t\tPluginLogger\n\t\t\t\t\t.info(\"Currently unsorted after sorting : \" + block.getName() + \" of type \" + block.getType());\n\t\t\tsorted.add(block);\n\t\t\tunsortedBlocks.add(block);\n\t\t}\n\t\treturn sorted;\n\t}", "@Test\n public void doubleSortWithExchangeUnbalancedNodes() {\n ExternalSort es1 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), ARBTRIARY_LEAF, Collections.emptyList(), false);\n SingleSender ss = new SingleSender(OpProps.prototype(1, Long.MAX_VALUE).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), Mockito.mock(BatchSchema.class), es1, 0,\n MinorFragmentIndexEndpoint.newBuilder().setMinorFragmentId(0).build());\n Fragment f1 = new Fragment();\n f1.addOperator(ss);\n Wrapper w1 = new Wrapper(f1, 0);\n w1.overrideEndpoints(Arrays.asList(N1, N2));\n\n UnorderedReceiver or = new UnorderedReceiver(OpProps.prototype(1, Long.MAX_VALUE), Mockito.mock(BatchSchema.class), 0, Collections.emptyList(), false);\n ExternalSort es2 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), or, Collections.emptyList(), false);\n Fragment f2 = new Fragment();\n f2.addOperator(es2);\n Wrapper w2 = new Wrapper(f2, 0);\n w2.overrideEndpoints(Collections.singletonList(N1));\n\n\n MemoryAllocationUtilities.setMemory(options, ImmutableMap.of(f1, w1, f2, w2), 10 + adjustReserve);\n assertEquals(3L, es1.getProps().getMemLimit());\n assertEquals(3L, es2.getProps().getMemLimit());\n }", "@Override\n\t\tpublic void run() {\n\t\t\tfor (int i = 0; i < 1000000; i++) {\n\t\t\t\tint[] a = Util.generateRandomArray(500, 200000);\n\t\t\t\tint[] b = a.clone();\n\t\t\t\t\n\t\t\t\ta = sort(a);\n\t\t\t\tArrays.sort(b);\n\t\t\t\t\n\t\t\t\tfor (int j = 0; j < b.length; j++) {\n\t\t\t\t\tUtil.Assert(a[j] == b[j], \"shit\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Heap sort ok\");\n\t\t}", "private Sort() { }", "public void sort() {\n\t\tSystem.out.println(\"Quick Sort Algorithm invoked\");\n\n\t}", "@Override\n public void sortCurrentList(FileSortHelper sort) {\n }", "public String doSort();", "public void sortArray() {\n\t\tSystem.out.println(\"QUICK SORT\");\n\t}", "@Override\n public void sort() throws IOException {\n long i = 0;\n // j represents the turn of writing the numbers either to g1 or g2 (or viceversa)\n long j = 0;\n long runSize = (long) Math.pow(2, i);\n long size;\n\n long startTime = System.currentTimeMillis();\n\n System.out.println(\"Strart sorting \"+ this.inputFileName);\n\n while(i <= Math.ceil(Math.log(this.n) / Math.log(2))){\n j = 0;\n do{\n size = merge(runSize, destinationFiles[(int)j % 2]);\n j += 1;\n }while (size/2 == runSize);\n\n System.out.println(\"iteration: \" + i + \", Run Size:\" + runSize + \", Total time elapsed: \" + (System.currentTimeMillis() - startTime));\n i += 1;\n runSize = (long) Math.pow(2, i);\n swipe();\n }\n System.out.println(\"The file has been sorted! Total time elapsed: \"+(System.currentTimeMillis() - startTime));\n\n destinationFiles[0].close();\n destinationFiles[1].close();\n originFiles[0].close();\n originFiles[1].close();\n\n createFile(OUT_PATH +inputFileName);\n copyFile(new File(originFileNames[0]), new File(\"out/TwoWayMergesort/OUT_\"+inputFileName));\n\n }", "private void updateOrder() {\n Arrays.sort(positions);\n }", "@Override\n public void sort() {\n for (int i = 0; i < size; i++) {\n for (int j = i + 1; j < size; j++) {\n if (((Comparable) data[i]).compareTo(data[j]) > 0) {\n E c = data[i];\n data[i] = data[j];\n data[j] = c;\n\n }\n }\n }\n }", "void order() {\n for (int i = 0; i < numVertices; i++) {\n if (simp[i][numParams] < simp[best][numParams]) {\n best = i;\n }\n if (simp[i][numParams] > simp[worst][numParams]) {\n worst = i;\n }\n }\n nextWorst = best;\n for (int i = 0; i < numVertices; i++) {\n if (i != worst) {\n if (simp[i][numParams] > simp[nextWorst][numParams]) {\n nextWorst = i;\n }\n }\n }\n }", "public void shellSort(int[] a) \n {\n int increment = a.length / 2;\n while (increment > 0) \n {\n \n for (int i = increment; i < a.length; i++) //looping over the array\n {\n int j = i;\n int temp = a[i]; // swapping the values to a temporary array\n try\n {\n if(!orderPanel) // checking for Descending order\n {\n while (j >= increment && a[j - increment] > temp) \n {\n a[j] = a[j - increment]; //swapping the values\n thread.sleep(100);\n repaint();\n this.setThreadState();\n j = j - increment;\n }\n }\n \n else\n {\n while (j >= increment && a[j - increment] < temp) //checking for Ascending order\n {\n a[j] = a[j - increment];\n thread.sleep(200);\n repaint();\n this.setThreadState();\n j = j - increment;\n }\n \n }\n }\n catch(Exception e)\n {\n System.out.println(\"Exception occured\" + e);\n }\n a[j] = temp;\n }\n \n if (increment == 2) \n {\n increment = 1;\n } \n else \n {\n increment *= (5.0 / 11);\n }\n }\n }", "void sort();", "void sort();", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif (currentSize >= size)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"MERGESORT END\");\n\t\t\t\t\ttimer.stop();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// deciding the block to to merged\n\t\t\t\telse if (mergeSortCodeFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tif (leftStart >= size - 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentSize = currentSize * 2;\n\t\t\t\t\t\tleftStart = 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tmid = leftStart + currentSize - 1;\n\t\t\t\t\t\tif (leftStart + 2 * currentSize - 1 >= size - 1)\n\t\t\t\t\t\t\trightEnd = size - 1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\trightEnd = leftStart + 2 * currentSize - 1;\n\t\t\t\t\t\tbox.setBaseColor(BASE_COLOR);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tmergeSortDelayFlag1 = 1;\n\t\t\t\t\t\tmergeSortdelay1 = 0;\n\t\t\t\t\t\tmergeSortCodeFlag = 0;\n\t\t\t\t\t\tif(mid >= rightEnd)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tleftStart += 2 * currentSize;\n\t\t\t\t\t\t\tmergeSortDelayFlag1 = 0;\n\t\t\t\t\t\t\tmergeSortCodeFlag = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (mergeSortDelayFlag1 == 1)\n\t\t\t\t{\n\t\t\t\t\tmergeSortdelay1++;\n\t\t\t\t\tif (mergeSortdelay1 >= DELAY)\n\t\t\t\t\t{\n\t\t\t\t\t\tl = leftStart;\n\t\t\t\t\t\tm = mid;\n\t\t\t\t\t\tr = rightEnd;\n\t\t\t\t\t\tmergeSortDelayFlag1 = 0;\n\t\t\t\t\t\tmergeInitializeFlag = 1;\n\t\t\t\t\t\tleftStart += 2 * currentSize;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Merging the block selected\n\t\t\t\t\n\t\t\t\t// initializing the variables needed by the merge block \n\t\t\t\telse if (mergeInitializeFlag == 1)\n\t\t\t\t{\n\t\t\t\t\ti = l;\n\t\t\t\t\tj = m + 1;\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tcurrentDownCount = 0;\n\t\t\t\t\tindexRightCount = 0;\n\t\t\t\t\tcurrentLeftCount = 0;\n\t\t\t\t\tcurrentUpCount = 0;\n\t\t\t\t\tcodeFlag = 1;\n\t\t\t\t\trightFlag = 0;\n\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\tdownFlag = 0;\n\t\t\t\t\tupFlag = 0;\n\t\t\t\t\tleftFlag = 0;\n\t\t\t\t\tdelay1 = 0;\n\t\t\t\t\tdelayFlag1 = 0;\n\t\t\t\t\tdelay2 = 0;\n\t\t\t\t\tdelayFlag2 = 0;\n\t\t\t\t\tcolorFlag1 = 1;\n\t\t\t\t\tcolorDelayFlag1 = 0;\n\t\t\t\t\tcolorDelay1 = 0;\n\t\t\t\t\tcolorFlag2 = 1;\n\t\t\t\t\tcolorDelayFlag2 = 0;\n\t\t\t\t\tcolorDelay2 = 0;\n\t\t\t\t\tbox.setBaseColor(BASE_COLOR);\n\t\t\t\t\tbox.setColorRange(l, m, BLOCK_COLOR1);\n\t\t\t\t\tbox.setColorRange(m + 1, r, BLOCK_COLOR2);\n\t\t\t\t\tpaintBox();\n\t\t\t\t\t\n\t\t\t\t\tmergeFlag = 1;\n\t\t\t\t\tmergeInitializeFlag = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// actual merging starts here\n\t\t\t\telse if (mergeFlag == 1)\n\t\t\t\t{\n\t\t\t\t\t// step zero check whether to continue merging or not\n\t\t\t\t\tif (j > r)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (i >= j)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmergeFlag = 0;\n\t\t\t\t\t\t\tmergeSortCodeFlag = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (colorFlag1 == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbox.getRectangle(i).setColor(END_COLOR);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\tcolorDelay1 = 0;\n\t\t\t\t\t\t\tcolorDelayFlag1 = 1;\n\t\t\t\t\t\t\tcolorFlag1 = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (colorDelayFlag1 == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcolorDelay1++;\n\t\t\t\t\t\t\tif (colorDelay1 >= DELAY)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t\tcolorDelayFlag1 = 0;\n\t\t\t\t\t\t\t\tcolorFlag1 = 1;\n\t\t\t\t\t\t\t\tcolorDelay1 = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (i >= j)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (j > r)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmergeFlag = 0;\n\t\t\t\t\t\t\tmergeSortCodeFlag = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (colorFlag2 == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbox.getRectangle(j).setColor(END_COLOR);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\tcolorDelay2 = 0;\n\t\t\t\t\t\t\tcolorDelayFlag2 = 1;\n\t\t\t\t\t\t\tcolorFlag2 = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (colorDelayFlag2 == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcolorDelay2++;\n\t\t\t\t\t\t\tif (colorDelay2 >= DELAY)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\t\tcolorDelayFlag2 = 0;\n\t\t\t\t\t\t\t\tcolorFlag2 = 1;\n\t\t\t\t\t\t\t\tcolorDelay2 = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Step one Check whether a[i] <= a[j]\n\t\t\t\t\telse if (codeFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tRectangle currRect = box.getRectangle(i);\n\t\t\t\t\t\tRectangle scanRect = box.getRectangle(j);\n\t\t\t\t\t\tcurrRect.setColor(FOCUS_COLOR1);\n\t\t\t\t\t\tscanRect.setColor(FOCUS_COLOR2);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tdelayFlag2 = 1;\n\t\t\t\t\t\tcodeFlag = 0;\n\t\t\t\t\t\tdelay2 = 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (delayFlag2 == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelay2++;\n\t\t\t\t\t\tif (delay2 >= DELAY)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRectangle currRect = box.getRectangle(i);\n\t\t\t\t\t\t\tRectangle scanRect = box.getRectangle(j);\n\t\t\t\t\t\t\tif (currRect.getData() < scanRect.getData())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbox.getRectangle(i).setColor(END_COLOR);\n\t\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\t\tdelay1 = 0;\n\t\t\t\t\t\t\t\tdelayFlag2 = 0;\n\t\t\t\t\t\t\t\tdelayFlag1 = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbox.getRectangle(j).setColor(END_COLOR);\n\t\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\t\tdelayFlag2 = 0;\n\t\t\t\t\t\t\t\tdownFlag = 1;\n\t\t\t\t\t\t\t\tcurrentDownCount = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (delayFlag1 == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelay1++;\n\t\t\t\t\t\tif (delay1 >= DELAY)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcodeFlag = 1;\n\t\t\t\t\t\t\tdelayFlag1 = 0;\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Moving the first rectangle on right down (if it was smaller than the first one on the left)\n\t\t\t\t\telse if (downFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.addOffsetRectangle(j, 0, YCHANGE);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tcurrentDownCount += YCHANGE;\n\t\t\t\t\t\tif (currentDownCount >= DOWN)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint excess = currentDownCount - DOWN;\n\t\t\t\t\t\t\tbox.addOffsetRectangle(j, 0, -excess);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\tdownFlag = 0;\n\t\t\t\t\t\t\trightBlockFlag = 1;\n\t\t\t\t\t\t\tindexRightCount = 0;\n\t\t\t\t\t\t\tindex = j - 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// moving each of the rectangles in the block to the right(between the two smallest rectangle on both side)\n\t\t\t\t\t// including the first rectangle\n\t\t\t\t\telse if (rightBlockFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (index < i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\t\t\tleftFlag = 1;\n\t\t\t\t\t\t\tcurrentLeftCount = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trightFlag = 1;\n\t\t\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\t\t\tindexRightCount = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// moving a rectangle in the block to the right\n\t\t\t\t\telse if (rightFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.addOffsetRectangle(index, XCHANGE, 0);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tindexRightCount += XCHANGE;\n\t\t\t\t\t\tif (indexRightCount >= width)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint excess = indexRightCount - width;\n\t\t\t\t\t\t\tbox.addOffsetRectangle(index, -excess, 0);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\trightFlag = 0;\n\t\t\t\t\t\t\trightBlockFlag = 1;\n\t\t\t\t\t\t\tindex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// moving the rectangle left (the smallest in the un-merged block)\n\t\t\t\t\telse if (leftFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.addOffsetRectangle(j, -XCHANGE, 0);\n\t\t\t\t\t\tcurrentLeftCount += XCHANGE;\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tif (currentLeftCount >= width * (j - i))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint excess = currentLeftCount - width * (j - i);\n\t\t\t\t\t\t\tbox.addOffsetRectangle(j, excess, 0);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tleftFlag = 0;\n\t\t\t\t\t\t\tupFlag = 1;\n\t\t\t\t\t\t\tcurrentUpCount = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// moving the rectangle up (the smallest in the un-merged block)\n\t\t\t\t\telse if (upFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.addOffsetRectangle(j, 0, -YCHANGE);\n\t\t\t\t\t\tcurrentUpCount += YCHANGE;\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tif (currentUpCount >= DOWN)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint excess = currentUpCount - DOWN;\n\t\t\t\t\t\t\tbox.addOffsetRectangle(j, 0, excess);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tRectangle smallestRect = box.getRectangle(j);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int t = j - 1; t >= i; t--)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbox.setRectangle(box.getRectangle(t), t + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbox.setRectangle(smallestRect, i);\n\t\t\t\t\t\t\tupFlag = 0;\n\t\t\t\t\t\t\tcodeFlag = 1;\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "private void externalSort() throws IOException{\n\t\t/*\n\t\t * Pass 0: internal sort\n\t\t */\n\t\t// Read in from child;Write out runs of B pages;\n\t\t\n\t\tint numPerRun = B * 4096 / (schema.size() * 4); // # of tuples per run given in Pass0\n\t\tboolean buildMore;\n\t\tint numRuns = 0;\n\t\tif(sortAttrsIndex == null) {\n\t\t\tthis.buildAttrsIndex();\n\t\t}\n\t\texComparator myComp = new exComparator();\n\t\tinternal = new PriorityQueue<Tuple>(myComp);\n\t\tdo {\n\t\t\tbuildMore = this.buildHeap(numPerRun);\n\t\t\tnumRuns++;\n\t\t\t\n\t\t\t// write out the (numRuns)th run\n\t\t\tTupleWriter TW;\n\t\t\tif(!buildMore && numRuns == 1) {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"sortResult\"));\n\t\t\t} else {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"0_\" + numRuns));\n\t\t\t}\n\t\t\twhile(!internal.isEmpty()) {\n//\t\t\t\tSystem.out.println(internal.peek().data);\n\t\t\t\tTW.setNextTuple(internal.poll()); \n\t\t\t}\n\t\t\t// leftover, fill with zero and write out\n\t\t\tif(!TW.bufferEmpty()) { // TW would never know the end of writing\n\t\t\t\tTW.fillFlush(); \n\t\t\t}\n\t\t\tTW.close();\n\t\t\t// internal must be empty until this point\n\t\t}while (buildMore);\n\t\t\n\t\t/*\n\t\t * Pass 1 and any following\n\t\t */\n\t\tif(numRuns > 1) { // if numRuns generated in Pass 0 is 1 already, file sorted already, no need to merge\n\t\t\tthis.merge(numRuns, myComp);\n\t\t}\n\t\t\n\t}", "public void sortByLength()\n {\n boolean swapMade;//has a swap been made in the most recent pass?\n \n //repeat looking for swaps\n do\n {\n swapMade=false;//just starting this pass, so no swap yet\n \n //go through entire array. looking for swaps that need to be done\n for(int i = 0; i<currentRide-1; i++)\n {\n //if the other RideLines has less people\n if(rides[i].getCurrentPeople()<rides[i+1].getCurrentPeople())\n {\n // standard swap, using a temporary. swap with less people\n RideLines temp = rides[i];\n rides[i]=rides[i+1];\n rides[i+1]=temp;\n \n swapMade=true;//remember this pass made at least one swap\n }\n \n } \n }while(swapMade);//until no swaps were found in the most recent past\n \n redrawLines();//redraw the image\n \n }", "private void sortByAmount(){\n int stopPos = 0;\n while(colours.size()-stopPos > 0){\n int inARow = 1;\n for(int i = colours.size() - 1; i > stopPos; i--){\n if(colours.get(i-1).getAmount() < colours.get(i).getAmount()){\n rgb temp = new rgb(colours.get(i-1));\n colours.set(i-1, colours.get(i));\n colours.set(i, temp);\n }else{\n inARow++;\n }\n }\n stopPos++;\n if(inARow == colours.size()){\n break;\n }\n }\n }", "public static void specialSets() {\n\t\tSystem.out.printf(\"%12s%15s%15s%10s%10s%10s%10s%n\",\"Size\",\"Range\",\"Pre-Sort Type\",\"Insertion\",\"Selectuon\",\"Quick\",\"Merge\");\n\t\tint[] array;\n\t\t//200K\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 200000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Sorted array\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Sorted\");\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Reverse Sorted\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Reverse Sorted\");\n\t\tint[] temp = new int[array.length];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\ttemp[i] = array[array.length -1 -i];\n\t\t}\n\t\tfourSorts(temp);\n\t\tSystem.out.println();\n\t\t//Range 1-20\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-20\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 20);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }", "public void sortCompetitors(){\n\t\t}", "public void sortPassing(){\n\t\tpassing.sort(PlayingCard.PlayingCardComparator_ACEHIGH);\n\t}", "@Override\n\tvoid sort(int[] arr, SortingVisualizer display) {\n\t\tint current = 0;\n\t\tint x;\n\t\tint y;\n\t\tboolean complete = false;\n\t\twhile(complete == false) {\n\t\t\tcurrent = 0;\n\t\t\tcomplete = true;\n\t\t\tfor(int i = 0 ; i < arr.length; i ++) {\n\t\t\t\tdisplay.updateDisplay();\n\t\t\t\tif(arr[current] > arr[i]) {\n\t\t\t\t\tx = arr[i];\n\t\t\t\t\ty = arr[current];\n\t\t\t\t\tarr[i] = y;\n\t\t\t\t\tarr[current] = x;\n\t\t\t\t\tcomplete = false;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\tcurrent = i;\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public BucketSort()\n {\n for(int i = 0; i < 30; i++)\n {\n a[i] = generator.nextInt(50)+1;\n b[i] = a[i];\n }\n }", "@Override\n\tpublic void setSortCounters(boolean sortCounters) {\n\t\t\n\t}", "public void sort() {\n /*int jokers = this.getJokers();\n\t\tif (jokers > 0 && this.size() > 2) {\n\t\t\tArrayList<Tile> list = new ArrayList<>();\n for (int i=0; i<this.size(); i++) {\n\t\t\t\tif (this.get(i).getColour() == 'J') {\n\t\t\t\t\tTile joker = this.remove(this.get(i));\n\t\t\t\t\tlist.add(joker);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Tile j : list) {\n\t\t\t\tthis.addInSort(j);\n\t\t\t}\n }*/\n \n\n //may need something in here to accomodate a joker changing its form\n\n if (tiles.size() > 1) { //will only sort a meld with any tiles in it\n //Override default comparator to compare by tile value (ints)\n Collections.sort(tiles, new Comparator<Tile>() {\n @Override \n public int compare(Tile t1, Tile t2) { \n if (t1.getColour() > t2.getColour()) {\n return 1;\n } else if (t1.getColour() < t2.getColour()) {\n return -1;\n }\n if (t1.getValue() > t2.getValue()) {\n return 1;\n } else if (t1.getValue() < t2.getValue()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n }\n\n }", "public void sort() {\n\n // Fill in the blank here.\n\tfor(int i = 0; i < size; i++){\n\t\tint currentLowest, cLIndex, temp;\n\t\tcurrentLowest = elements[i];\n\t\tcLIndex = i; \n\t\tfor(int c = i+1; c < size; c++){\n\t\t\tif(currentLowest > elements[c]){\n\t\t\t\tcurrentLowest = elements[c];\n\t\t\t\tcLIndex = c;\n\t\t\t} \n\t\t}\n\t\ttemp = elements[i];\n\t\telements[i] = elements[cLIndex];\n\t\telements[cLIndex] = temp;\n\t\t\n\t}\n System.out.println(\"Sorting...\");\n }", "private void setup() {\r\n final int gsz = _g.getNumNodes();\r\n if (_k==2) {\r\n\t\t\tNodeComparator2 comp = new NodeComparator2();\r\n\t\t\t_origNodesq = new TreeSet(comp);\r\n\t\t} else { // _k==1\r\n\t\t\tNodeComparator4 comp = new NodeComparator4();\r\n\t\t\t_origNodesq = new TreeSet(comp);\r\n\t\t}\r\n for (int i=0; i<gsz; i++) {\r\n _origNodesq.add(_g.getNodeUnsynchronized(i)); // used to be _g.getNode(i)\r\n }\r\n _nodesq = new TreeSet(_origNodesq);\r\n //System.err.println(\"done sorting\");\r\n }", "public void changeSortOrder();", "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }", "private static void selectionSort(ArrayList<Box> BoxArray) { \n\n\t\tfor ( int i = 0; i < BoxArray.size(); i++ ) { \n\t\t\tint lowPos = i; \n\t\t\tfor ( int j = i + 1; j < BoxArray.size(); j++ ) \n\t\t\t\tif ( BoxArray.get(j).volume() < BoxArray.get(lowPos).volume() ) \n\t\t\t\t\tlowPos = j;\n\t\t\tif ( BoxArray.get(lowPos) != BoxArray.get(i) ) { \n\t\t\t\tBox temp = BoxArray.get(lowPos);\n\t\t\t\tBoxArray.set(lowPos, BoxArray.get(i));\n\t\t\t\tBoxArray.set(i, temp);\n\t\t\t}\n\t\t}\n\t}", "public void sort() {\n\t\t\tfor (int j = nowLength - 1; j > 1; j--) {\n\t\t\t\tfor (int i = 0; i < j; i++) {\n\t\t\t\t\tif (ray[i] > ray[i+1]) {\n\t\t\t\t\t\tint tmp = ray [i];\n\t\t\t\t\t\tray[i] = ray[i+1];\n\t\t\t\t\t\tray[i+1] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprint();\n\t\t\t}\n\t}", "public BubSortList() {\n\t\tray = new int[MAXSIZE];\n\t\tnowLength = 0;\n\t}", "public static void s1AscendingTest() {\n int key = 903836722;\n SortingLab<Integer> sli = new SortingLab<Integer>(key);\n int M = 600000;\n int N = 1000;\n double start;\n double elapsedTime;\n System.out.print(\"Sort 1 Ascending\\n\");\n for (; N < M; N *= 2) {\n Integer[] ai = getRandomArray(N, Integer.MAX_VALUE);\n Arrays.sort(ai);\n start = System.nanoTime();\n sli.sort1(ai);\n elapsedTime = (System.nanoTime() - start) / 1_000_000_000d;\n System.out.print(N + \"\\t\");\n System.out.printf(\"%4.3f\\n\", elapsedTime);\n }\n }", "public void sortByDefault() {\r\n\t\tcomparator = null;\r\n\t}", "public static int[] partialSort(int[] a) {\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < 2 - i; j++) {\n if (a[j] > a[j+1]) {\n int temp = a[j+1];\n a[j+1] = a[j];\n a[j] = temp;\n }\n }\n }\n return a;\n}", "public void setSortOnCPUTime() {\n this.sortedJobList = new TreeSet<Job>(new Comparator<Job>() {\n @Override\n public int compare(Job a, Job b) {\n\n int aCPUUsed = 0;\n int bCPUUsed = 0;\n\n try {\n aCPUUsed = a.getCPUUsed();\n bCPUUsed = b.getCPUUsed();\n } catch (AS400SecurityException e) {\n e.printStackTrace();\n } catch (ErrorCompletingRequestException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ObjectDoesNotExistException e) {\n e.printStackTrace();\n }\n\n if (aCPUUsed == bCPUUsed) return 0;\n else return bCPUUsed - aCPUUsed;\n }\n });\n }", "@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}", "public void sortOccurred() {\n //SET ALL THE ROWS TO -1, (THEY INITIALIZE TO 0).\n \tfor(int i = 0; i < data.length; i++) {\n \t\tdata[i] = null;\n \t\trowIndexLookup[i] = -1;\n \t}\t\t\n }", "public void doTheAlgorithm() {\n this.swapCount = 0;\n this.compCount = 0;\n \n\t\tdoQuickSort(0, this.sortArray.length - 1);\n\t}", "@VTID(28)\n boolean getSortUsingCustomLists();", "private void sort()\n {\n // This implements Shell sort.\n // Unfortunately we cannot use the sorting functions from the library\n // (e.g. java.util.Arrays.sort), since the ones that work on int\n // arrays do not accept a comparison function, but only allow\n // sorting into natural order.\n int jump = length;\n boolean done;\n \n while( jump>1 ){\n jump /= 2;\n \n do {\n done = true;\n \n for( int j = 0; j<(length-jump); j++ ){\n int i = j + jump;\n \n if( !areCorrectlyOrdered( indices[j], indices[i] ) ){\n // Things are in the wrong order, swap them and step back.\n int tmp = indices[i];\n indices[i] = indices[j];\n indices[j] = tmp;\n done = false;\n }\n }\n } while( !done );\n }\n \n // TODO: integrate this with the stuff above.\n for( int i=1; i<length; i++ ){\n commonality[i] = commonLength( indices[i-1], indices[i] );\n }\n commonality[0] = -1;\n }", "public void sort() {\n Collections.sort(jumpers, new SortJumperByPoints()); \n }", "private static void sort2(int[] a) {\n for(int i=0; i<a.length; i++){\n //find smallest from i to end \n int minIndex=i;\n for(int j=i ; j<a.length; j++)\n if(a[j]<a[minIndex])\n minIndex=j;\n //swap\n int t = a[i];\n a[i] = a[minIndex];\n a[minIndex] = t;\n }\n }", "void sortV();", "private void sortAndEmitUpTo(double maxX)\n {\n /**\n * Heuristic: Check if there are no obvious segments to process\n * and skip sorting & processing if so\n * \n * This is a heuristic only.\n * There may be new segments at the end of the buffer\n * which are less than maxx. But this should be rare,\n * and they will all get processed eventually.\n */\n if (bufferHeadMaxX() >= maxX)\n return;\n \n // this often sorts more than are going to be processed.\n //TODO: Can this be done faster? eg priority queue?\n \n // sort segs in buffer, since they arrived in potentially unsorted order\n Collections.sort(segmentBuffer, ORIENT_COMPARATOR);\n int i = 0;\n int n = segmentBuffer.size();\n LineSeg prevSeg = null;\n \n //reportProcessed(maxX);\n \n while (i < n) {\n LineSeg seg = (LineSeg) segmentBuffer.get(i);\n if (seg.getMaxX() >= maxX)\n \tbreak;\n \n i++;\n if (removeDuplicates) {\n if (prevSeg != null) {\n // skip this segment if it is a duplicate\n if (prevSeg.equals(seg)) {\n // merge in side label of dup seg\n prevSeg.merge(seg);\n continue;\n }\n }\n prevSeg = seg;\n }\n // remove interior segments (for dissolving)\n if (removeInteriorSegs\n && seg.getTopoLabel() == TopologyLabel.BOTH_INTERIOR)\n continue;\n \n segSink.process(seg);\n }\n //System.out.println(\"SegmentStreamSorter: total segs = \" + n + \", processed = \" + i);\n removeSegsFromBuffer(i);\n }", "public void sort(){\n for(int i = array.length-1;i >= 0;i--){\n sink(i);\n }\n while(size > 0){\n swap(0, size-1);\n size -= 1;\n sink(0);\n }\n }", "public static void main(String[] args) throws FileNotFoundException{\n int[] quicktimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes1[i] = (int)endTime;\n }\n \n int[] mergetimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes1[i] = (int)endTime;\n }\n \n int[] heaptimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes1[i] = (int)endTime;\n }\n \n int[] quicktimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[i] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes2[i] = (int)endTime;\n }\n \n int[] mergetimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes2[i] = (int)endTime;\n }\n \n int[] heaptimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes2[i] = (int)endTime;\n }\n \n int[] quicktimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes3[i] = (int)endTime;\n }\n \n int[] mergetimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes3[i] = (int)endTime;\n }\n \n int[] heaptimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes3[i] = (int)endTime;\n }\n \n int[] quicktimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes4[i] = (int)endTime;\n }\n \n int[] mergetimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes4[i] = (int)endTime;\n }\n \n int[] heaptimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes4[i] = (int)endTime;\n }\n \n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE REVERSE SORTED ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes5[i] = (int)endTime;\n }\n \n int[] mergetimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes5[i] = (int)endTime;\n }\n \n int[] heaptimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes5[i] = (int)endTime;\n }\n \n int[] quicktimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes6[i] = (int)endTime;\n }\n \n int[] mergetimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes6[i] = (int)endTime;\n }\n \n int[] heaptimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes6[i] = (int)endTime;\n }\n \n int[] quicktimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes7[i] = (int)endTime;\n }\n \n int[] mergetimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes7[i] = (int)endTime;\n }\n \n int[] heaptimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes7[i] = (int)endTime;\n }\n \n int[] quicktimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes8[i] = (int)endTime;\n }\n \n int[] mergetimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes8[i] = (int)endTime;\n }\n \n int[] heaptimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes8[i] = (int)endTime;\n }\n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE RANDOM ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes9[i] = (int)endTime;\n }\n \n int[] mergetimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes9[i] = (int)endTime;\n }\n \n int[] heaptimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes9[i] = (int)endTime;\n }\n \n int[] quicktimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes10[i] = (int)endTime;\n }\n \n int[] mergetimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes10[i] = (int)endTime;\n }\n \n int[] heaptimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes10[i] = (int)endTime;\n }\n \n int[] quicktimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes11[i] = (int)endTime;\n }\n \n int[] mergetimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes11[i] = (int)endTime;\n }\n \n int[] heaptimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);;\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes11[i] = (int)endTime;\n }\n \n int[] quicktimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes12[i] = (int)endTime;\n }\n \n int[] mergetimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes12[i] = (int)endTime;\n }\n \n int[] heaptimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes12[i] = (int)endTime;\n }\n \n //PRINTING THE RESULTS OUT INTO FILE\n File f = new File(\"Results.txt\");\n FileOutputStream fos = new FileOutputStream(f);\n PrintWriter pw = new PrintWriter(fos);\n pw.println(\"SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes1), medVal(quicktimes1), varVal(quicktimes1, meanVal(quicktimes1)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes2), medVal(quicktimes2), varVal(quicktimes2, meanVal(quicktimes2)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes3), medVal(quicktimes3), varVal(quicktimes3, meanVal(quicktimes3)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes4), medVal(quicktimes4), varVal(quicktimes4, meanVal(quicktimes4)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes1), medVal(mergetimes1), varVal(mergetimes1, meanVal(mergetimes1)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes2), medVal(mergetimes2), varVal(mergetimes2, meanVal(mergetimes2)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes3), medVal(mergetimes3), varVal(mergetimes3, meanVal(mergetimes3)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes4), medVal(mergetimes4), varVal(mergetimes4, meanVal(mergetimes4)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes1), medVal(heaptimes1), varVal(heaptimes1, meanVal(heaptimes1)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes2), medVal(heaptimes2), varVal(heaptimes2, meanVal(heaptimes2)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes3), medVal(heaptimes3), varVal(heaptimes3, meanVal(heaptimes3)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes4), medVal(heaptimes4), varVal(heaptimes4, meanVal(heaptimes4)));\n pw.println(\"REVERSE SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes5), medVal(quicktimes5), varVal(quicktimes5, meanVal(quicktimes5)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes6), medVal(quicktimes6), varVal(quicktimes6, meanVal(quicktimes6)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes7), medVal(quicktimes7), varVal(quicktimes7, meanVal(quicktimes7)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes8), medVal(quicktimes8), varVal(quicktimes8, meanVal(quicktimes8)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes5), medVal(mergetimes5), varVal(mergetimes5, meanVal(mergetimes5)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes6), medVal(mergetimes6), varVal(mergetimes6, meanVal(mergetimes6)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes7), medVal(mergetimes7), varVal(mergetimes7, meanVal(mergetimes7)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes8), medVal(mergetimes8), varVal(mergetimes8, meanVal(mergetimes8)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes5), medVal(heaptimes5), varVal(heaptimes5, meanVal(heaptimes5)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes6), medVal(heaptimes6), varVal(heaptimes6, meanVal(heaptimes6)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes7), medVal(heaptimes7), varVal(heaptimes7, meanVal(heaptimes7)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes8), medVal(heaptimes8), varVal(heaptimes8, meanVal(heaptimes8)));\n pw.println(\"RANDOM ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes9), medVal(quicktimes9), varVal(quicktimes9, meanVal(quicktimes9)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes10), medVal(quicktimes10), varVal(quicktimes10, meanVal(quicktimes10)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes11), medVal(quicktimes11), varVal(quicktimes11, meanVal(quicktimes11)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes12), medVal(quicktimes12), varVal(quicktimes12, meanVal(quicktimes12)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes9), medVal(mergetimes9), varVal(mergetimes9, meanVal(mergetimes9)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes10), medVal(mergetimes10), varVal(mergetimes10, meanVal(mergetimes10)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes11), medVal(mergetimes11), varVal(mergetimes11, meanVal(mergetimes11)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes12), medVal(mergetimes12), varVal(mergetimes12, meanVal(mergetimes12)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes9), medVal(heaptimes9), varVal(heaptimes9, meanVal(heaptimes9)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes10), medVal(heaptimes10), varVal(heaptimes10, meanVal(heaptimes10)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes11), medVal(heaptimes11), varVal(heaptimes11, meanVal(heaptimes11)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes12), medVal(heaptimes12), varVal(heaptimes12, meanVal(heaptimes12)));\n pw.close();\n }", "public void sort() {\r\n lang.setInteractionType(Language.INTERACTION_TYPE_AVINTERACTION);\r\n\r\n int nrElems = array.getLength();\r\n ArrayMarker iMarker = null, jMarker = null;\r\n // highlight method header\r\n code.highlight(\"header\");\r\n lang.nextStep();\r\n\r\n // check if array is null\r\n code.toggleHighlight(\"header\", \"ifNull\");\r\n incrementNrComparisons(); // if null\r\n lang.nextStep();\r\n\r\n // switch to variable declaration\r\n\r\n code.toggleHighlight(\"ifNull\", \"variables\");\r\n lang.nextStep();\r\n\r\n // initialize i\r\n code.toggleHighlight(\"variables\", \"initializeI\");\r\n iMarker = installArrayMarker(\"iMarker\", array, nrElems - 1);\r\n incrementNrAssignments(); // i =...\r\n lang.nextStep();\r\n\r\n // switch to outer loop\r\n code.unhighlight(\"initializeI\");\r\n\r\n while (iMarker.getPosition() >= 0) {\r\n code.highlight(\"outerLoop\");\r\n lang.nextStep();\r\n\r\n code.toggleHighlight(\"outerLoop\", \"innerLoop\");\r\n if (jMarker == null) {\r\n jMarker = installArrayMarker(\"jMarker\", array, 0);\r\n } else\r\n jMarker.move(0, null, DEFAULT_TIMING);\r\n incrementNrAssignments();\r\n while (jMarker.getPosition() <= iMarker.getPosition() - 1) {\r\n incrementNrComparisons();\r\n lang.nextStep();\r\n code.toggleHighlight(\"innerLoop\", \"if\");\r\n array.highlightElem(jMarker.getPosition() + 1, null, null);\r\n array.highlightElem(jMarker.getPosition(), null, null);\r\n incrementNrComparisons();\r\n lang.nextStep();\r\n\r\n if (array.getData(jMarker.getPosition()) > array.getData(jMarker\r\n .getPosition() + 1)) {\r\n // swap elements\r\n code.toggleHighlight(\"if\", \"swap\");\r\n array.swap(jMarker.getPosition(), jMarker.getPosition() + 1, null,\r\n DEFAULT_TIMING);\r\n incrementNrAssignments(3); // swap\r\n lang.nextStep();\r\n code.unhighlight(\"swap\");\r\n } else {\r\n code.unhighlight(\"if\");\r\n }\r\n // clean up...\r\n // lang.nextStep();\r\n code.highlight(\"innerLoop\");\r\n array.unhighlightElem(jMarker.getPosition(), null, null);\r\n array.unhighlightElem(jMarker.getPosition() + 1, null, null);\r\n if (jMarker.getPosition() <= iMarker.getPosition())\r\n jMarker.move(jMarker.getPosition() + 1, null, DEFAULT_TIMING);\r\n incrementNrAssignments(); // j++ will always happen...\r\n }\r\n lang.nextStep();\r\n code.toggleHighlight(\"innerLoop\", \"decrementI\");\r\n array.highlightCell(iMarker.getPosition(), null, DEFAULT_TIMING);\r\n if (iMarker.getPosition() > 0)\r\n iMarker.move(iMarker.getPosition() - 1, null, DEFAULT_TIMING);\r\n else\r\n iMarker.moveBeforeStart(null, DEFAULT_TIMING);\r\n incrementNrAssignments();\r\n lang.nextStep();\r\n code.unhighlight(\"decrementI\");\r\n }\r\n\r\n // some interaction...\r\n TrueFalseQuestionModel tfQuestion = new TrueFalseQuestionModel(\"tfQ\");\r\n tfQuestion.setPrompt(\"Did this work?\");\r\n tfQuestion.setPointsPossible(1);\r\n tfQuestion.setGroupID(\"demo\");\r\n tfQuestion.setCorrectAnswer(true);\r\n tfQuestion.setFeedbackForAnswer(true, \"Great!\");\r\n tfQuestion.setFeedbackForAnswer(false, \"argh!\");\r\n lang.addTFQuestion(tfQuestion);\r\n\r\n lang.nextStep();\r\n HtmlDocumentationModel link = new HtmlDocumentationModel(\"link\");\r\n link.setLinkAddress(\"http://www.heise.de\");\r\n lang.addDocumentationLink(link);\r\n\r\n lang.nextStep();\r\n MultipleChoiceQuestionModel mcq = new MultipleChoiceQuestionModel(\"mcq\");\r\n mcq.setPrompt(\"Which AV system can handle dynamic rewind?\");\r\n mcq.setGroupID(\"demo\");\r\n mcq.addAnswer(\"GAIGS\", -1, \"Only static images, not dynamic\");\r\n mcq.addAnswer(\"Animal\", 1, \"Good!\");\r\n mcq.addAnswer(\"JAWAA\", -2, \"Not at all!\");\r\n lang.addMCQuestion(mcq);\r\n\r\n lang.nextStep();\r\n MultipleSelectionQuestionModel msq = new MultipleSelectionQuestionModel(\r\n \"msq\");\r\n msq.setPrompt(\"Which of the following AV systems can handle interaction?\");\r\n msq.setGroupID(\"demo\");\r\n msq.addAnswer(\"Animal\", 2, \"Right - I hope!\");\r\n msq.addAnswer(\"JHAVE\", 2, \"Yep.\");\r\n msq.addAnswer(\"JAWAA\", 1, \"Only in Guido's prototype...\");\r\n msq.addAnswer(\"Leonardo\", -1, \"Nope.\");\r\n lang.addMSQuestion(msq);\r\n lang.nextStep();\r\n // Text text = lang.newText(new Offset(10, 20, \"array\", \"S\"), \"Hi\", \"hi\",\r\n // null);\r\n // lang.nextStep();\r\n }", "public void shellSort(){\n int increment = list.size() / 2;\n while (increment > 0) {\n for (int i = increment; i < list.size(); i++) {\n int j = i;\n int temp = list.get(i);\n while (j >= increment && list.get(j - increment) > temp) {\n list.set(j, list.get(j - increment));\n j = j - increment;\n }\n list.set(j, temp);\n }\n if (increment == 2) {\n increment = 1;\n } else {\n increment *= (5.0 / 11);\n }\n }\n }", "public void sort() {\n\t\tif (data.size() < 10) {\n\t\t\tbubbleSort();\n\t\t\tSystem.out.println(\"Bubble Sort\");\n\t\t} else {\n\t\t\tquickSort();\n\t\t\tSystem.out.println(\"Quick Sort\");\n\t\t}\n\t}", "public void insertReorderBarrier() {\n\t\t\n\t}", "private static void allSorts(int[] array) {\n\t\tSystem.out.printf(\"%12d\",array.length);\n\t\tint[] temp;\n\t\tStopWatch1 timer;\n\t\t\n\t\t//Performs bubble sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.bubbleSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"\\tSelection\\tBubble\\tInsertion\\tCollections\\tQuick\\tinPlaceQuick\\tMerge\");\r\n\t\tfor (int n = 1000; n <= 7000; n += 500) {\r\n\t\t\tAPArrayList<Double> lists = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listb = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listi = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listc = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listipq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listm = new APArrayList<Double>();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tDouble val = Math.random();\r\n\t\t\t\tlists.add(val);\r\n\t\t\t\tlistb.add(val);\r\n\t\t\t\tlisti.add(val);\r\n\t\t\t\tlistc.add(val);\r\n\t\t\t\tlistq.add(val);\r\n\t\t\t\tlistipq.add(val);\r\n\t\t\t\tlistm.add(val);\r\n\t\t\t}\r\n\r\n\t\t\tlong selStartTime = System.nanoTime();\r\n\t\t\tlists.selectionSort();\r\n\t\t\tlong selEndTime = System.nanoTime();\r\n\t\t\tlong selSortTime = selEndTime - selStartTime;\r\n\t\t\tlists.clear();\r\n\t\t\t\r\n\t\t\tlong bubStartTime = System.nanoTime();\r\n\t\t\tlistb.bubbleSort();\r\n\t\t\tlong bubEndTime = System.nanoTime();\r\n\t\t\tlong bubSortTime = bubEndTime - bubStartTime;\r\n\t\t\tlistb.clear();\r\n\t\t\t\r\n\t\t\tlong insStartTime = System.nanoTime();\r\n\t\t\tlisti.insertionSort();\r\n\t\t\tlong insEndTime = System.nanoTime();\r\n\t\t\tlong insSortTime = insEndTime - insStartTime;\r\n\t\t\tlisti.clear();\r\n\t\t\t\r\n\t\t\tlong CollStartTime = System.nanoTime();\r\n\t\t\tlistc.sort();\r\n\t\t\tlong CollEndTime = System.nanoTime();\r\n\t\t\tlong CollSortTime = CollEndTime - CollStartTime;\r\n\t\t\tlistc.clear();\r\n\t\t\t\r\n\t\t\tlong quickStartTime = System.nanoTime();\r\n\t\t\tlistq.simpleQuickSort();\r\n\t\t\tlong quickEndTime = System.nanoTime();\r\n\t\t\tlong quickSortTime = quickEndTime - quickStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\tlong inPlaceQuickStartTime = System.nanoTime();\r\n\t\t\tlistipq.inPlaceQuickSort();\r\n\t\t\tlong inPlaceQuickEndTime = System.nanoTime();\r\n\t\t\tlong inPlaceQuickSortTime = inPlaceQuickEndTime - inPlaceQuickStartTime;\r\n\t\t\tlistipq.clear();\r\n\t\t\t\r\n\t\t\tlong mergeStartTime = System.nanoTime();\r\n\t\t\tlistm.mergeSort();\r\n\t\t\tlong mergeEndTime = System.nanoTime();\r\n\t\t\tlong mergeSortTime = mergeEndTime - mergeStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(n + \"\\t\" + selSortTime + \"\\t\" + bubSortTime + \"\\t\" + insSortTime + \"\\t\" + CollSortTime + \"\\t\" + quickSortTime + \"\\t\" + inPlaceQuickSortTime + \"\\t\" + mergeSortTime);\r\n\t\t}\r\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic void sort() {\n\t\t\n\t\t// create maxHeap\n\t\tHeap<E> maxHeap = new MaxHeap<E>(arr);\n\t\t\n\t\telapsedTime = System.nanoTime(); // get time of start\n\t\t\n\t\tfor (int i = length - 1; i > 0; i--) {\n\n\t\t\tmaxHeap.swap(arr, 0, i);\n\t\t\tmaxHeap.heapSize--;\n\t\t\t((MaxHeap) maxHeap).maxHeapify(arr, 0);\n\n\t\t}\n\t\t\n\t\telapsedTime = System.nanoTime() - elapsedTime; // get elapsed time\n\t\t\n\t\tprint(); // print sorted array\n\t\tprintElapsedTime(); // print elapsed time\n\t\t\n\t\t\n\t}", "private void collapseIgloo() {\n blocks.sort(Comparator.comparing(a -> a.center.getY()));\n\n double minDistance, distance;\n Point3D R = new Point3D(0, -1, 0);\n for (int i = 0; i < blocks.size(); i++) {\n minDistance = Double.MAX_VALUE;\n for (int j = i - 1; j >= 0; j--) {\n if (boundingSpheresIntersect(blocks.get(i), blocks.get(j))) {\n distance = minDistance(blocks.get(i), blocks.get(j), R);\n if (distance < minDistance) {\n minDistance = distance;\n }\n }\n }\n if (minDistance != Double.MAX_VALUE) {\n blocks.get(i).move(R.multiply(minDistance));\n }\n }\n }", "public void sortAllRows(){\n\t\t/* code goes here */ \n\t\t\n\t\t\n\t\t//WHY SHOULD THEY BE SORTED LIKE THE EXAMPLE SAYS???????\n\t\t\n\t}", "private void sortGallery_10_Runnable() {\r\n\r\n\t\tif (_allPhotos == null || _allPhotos.length == 0) {\r\n\t\t\t// there are no files\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfinal GalleryMT20Item[] virtualGalleryItems = _galleryMT20.getAllVirtualItems();\r\n\t\tfinal int virtualSize = virtualGalleryItems.length;\r\n\r\n\t\tif (virtualSize == 0) {\r\n\t\t\t// there are no items\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// sort photos with new sorting algorithm\r\n\t\tArrays.sort(_sortedAndFilteredPhotos, getCurrentComparator());\r\n\r\n\t\tupdateUI_GalleryItems(_sortedAndFilteredPhotos, null);\r\n\t}", "private static long sortingTime(String[] array, boolean isStandardSort) {\n long start = System.currentTimeMillis(); // starting time\n if (isStandardSort) \n Arrays.sort(array);\n selectionSort(array);\n return System.currentTimeMillis() - start; // measure time consumed\n }", "@Override // java.util.Comparator\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public int compare(androidx.recyclerview.widget.GapWorker.Task r6, androidx.recyclerview.widget.GapWorker.Task r7) {\n /*\n r5 = this;\n androidx.recyclerview.widget.GapWorker$Task r6 = (androidx.recyclerview.widget.GapWorker.Task) r6\n androidx.recyclerview.widget.GapWorker$Task r7 = (androidx.recyclerview.widget.GapWorker.Task) r7\n androidx.recyclerview.widget.RecyclerView r5 = r6.view\n r0 = 0\n r1 = 1\n if (r5 != 0) goto L_0x000c\n r2 = r1\n goto L_0x000d\n L_0x000c:\n r2 = r0\n L_0x000d:\n androidx.recyclerview.widget.RecyclerView r3 = r7.view\n if (r3 != 0) goto L_0x0013\n r3 = r1\n goto L_0x0014\n L_0x0013:\n r3 = r0\n L_0x0014:\n r4 = -1\n if (r2 == r3) goto L_0x001d\n if (r5 != 0) goto L_0x001b\n L_0x0019:\n r0 = r1\n goto L_0x0037\n L_0x001b:\n r0 = r4\n goto L_0x0037\n L_0x001d:\n boolean r5 = r6.immediate\n boolean r2 = r7.immediate\n if (r5 == r2) goto L_0x0026\n if (r5 == 0) goto L_0x0019\n goto L_0x001b\n L_0x0026:\n int r5 = r7.viewVelocity\n int r1 = r6.viewVelocity\n int r5 = r5 - r1\n if (r5 == 0) goto L_0x002f\n L_0x002d:\n r0 = r5\n goto L_0x0037\n L_0x002f:\n int r5 = r6.distanceToItem\n int r6 = r7.distanceToItem\n int r5 = r5 - r6\n if (r5 == 0) goto L_0x0037\n goto L_0x002d\n L_0x0037:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: androidx.recyclerview.widget.GapWorker.AnonymousClass1.compare(java.lang.Object, java.lang.Object):int\");\n }", "private static void performSort(TestApp testApp) {\n testApp.testPartition();\n\n /*\n Date end = new Date();\n System.out.println(\"Sort ended @ \" + end.getTime());\n System.out.println(\"Total time = \" + (end.getTime() - start.getTime())/1000.0 + \" seconds...\");\n */\n }", "public void sort() {\n\t\tfor (int i = 1; i < this.dataModel.getLength(); i++) {\n\t\t\tfinal int x = this.dataModel.get(i);\n\n\t\t\t// Find location to insert using binary search\n\t\t\tfinal int j = Math.abs(this.dataModel.binarySearch(0, i, x) + 1);\n\n\t\t\t// Shifting array to one location right\n\t\t\tthis.dataModel.arrayCopy(j, j + 1, i - j);\n\n\t\t\t// Placing element at its correct location\n\t\t\tthis.dataModel.set(j, x);\n\t\t\tthis.repaint(this.count++);\n\t\t}\n\t}", "public void sortieBloc() {\n this.tableLocaleCourante = this.tableLocaleCourante.getTableLocalPere();\n }", "private static void fourSorts(int[] array) {\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\t//Performs insertion sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.insertionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\n\t\t//Performs selection sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.selectionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t}", "private void orderSegments() {\n //insert numOrder for the db\n int i = 0;\n for(TransportSegmentLogic transportSegment: transportSegments){\n transportSegment.setOrder(i);\n i++;\n }\n\n\n\n /*int i = 0;\n int j = 1;\n\n\n TransportSegmentLogic swapSegment;\n\n while(j < transportSegments.size()){\n if(transportSegments.get(j).getOrigin().equals(transportSegments.get(i).getDestination())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(i +1, swapSegment);\n i = i + 1;\n j = i + 1;\n }\n j++;\n }\n\n j = transportSegments.size() -1;\n\n while(j > i){\n if(transportSegments.get(j).getDestination().equals(transportSegments.get(0).getOrigin())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(0, swapSegment);\n i = i + 1;\n j = transportSegments.size();\n }\n j--;\n } */\n }", "public void run()\n { // checking for appropriate sorting algorithm\n \n if(comboAlgorithm.equals(\"Shell Sort\"))\n {\n this.shellSort(randInt);\n }\n \n if(comboAlgorithm.equals(\"Selection Sort\"))\n {\n this.selectionSort(randInt);\n }\n \n if(comboAlgorithm.equals(\"Insertion Sort\"))\n {\n this.insertionSort(randInt);\n }\n if(comboAlgorithm.equals(\"Bubble Sort\"))\n {\n this.bubbleSort(randInt);\n }\n \n }", "private synchronized void freshSort(){\n Process[] newQueue = new Process[pros.proSize()];\n for(int i = 0; i <queue.length; i++){\n if(pros.isInList(queue[i])){\n newQueue[i] = queue[i];\n }\n }\n queue = new Process[pros.proSize()];\n queue = newQueue;\n }", "public void sortFullList()\r\n {\r\n if (log.isDebugEnabled())\r\n {\r\n log.debug(\"[\" + this.id + \"] sorting full data\");\r\n }\r\n sortRowList(this.getRowListFull());\r\n }", "private void updateFilteringAndSorting() {\n log.debug(\"update filtering of adapter called\");\n if (lastUsedComparator != null) {\n sortWithoutNotify(lastUsedComparator, lastUsedAsc);\n }\n Filter filter = getFilter();\n if (filter instanceof UpdateableFilter){\n ((UpdateableFilter)filter).updateFiltering();\n }\n }", "private static void evaluateMergesortVogellaThreaded() {\n\n // LOGGER.info(\"evaluating parallel mergesort with Java Threads based on the Vogella version\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort\n msVogellaJThreads.sort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: Java Threads (Vogella) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "public void sortSpeeds() {\n\n//\t\tSystem.out.println(\"BEGIN: SORT SPEEDS\");\n\t\tthis.printMoves();\n\n\t\tArrayList<Move> temp = new ArrayList<Move>();\n\t\tint i = 1;\n\t\tint x = 0;\n\t\tboolean y = true;\n\n\t\ttemp.add(niceMoves.get(0));\n\t\tint size = niceMoves.size();\n\n\t\twhile (i < niceMoves.size()) {\n\n//\t\t\tSystem.out.println(\"Reiterating.\");\n\t\t\ty = true;\n\n\t\t\twhile (y) {\n\n\t\t\t\t//System.out.println(\"I: \" + i + \" X: \" + x);\n\n\t\t\t\ttry {\n\n\t\t\t\t\tif (niceMoves.get(i).getSpeed() > temp.get(x).getCalcedSpeed()) {\n\n//\t\t\t\t\t\tSystem.out.println(\"Adding \" + niceMoves.get(i).getCaster() + \" to spot \" + x);\n\t\t\t\t\t\ttemp.add(x, niceMoves.get(i));\n\t\t\t\t\t\ty = false;\n\t\t\t\t\t}\n\t\t\t\t\t//X has cycled through temp, meaning nicemoves.i should be added to the end\n\t\t\t\t\t//The only way to check for this is to let it overflow lol\n\t\t\t\t} catch (Exception E) {\n//\t\t\t\t\tSystem.out.println(\"Adding \" + niceMoves.get(i).getCaster() + \" to spot \" + x);\n\t\t\t\t\ttemp.add(x, niceMoves.get(i));\n\t\t\t\t\ty = false;\n\n\t\t\t\t}\n\n\t\t\t\tx += 1;\n\t\t\t}\n\n\t\t\ti += 1;\n\t\t\tx = 0;\n\t\t}\n\n\t\tniceMoves = temp;\n\n//\t\tSystem.out.println();\n//\t\tSystem.out.println(\"Sorting Complete! New Order: \");\n//\t\tthis.printMoves();\n\t\t//end of sort speeds\n\t}", "public void sort() {\r\n // sort the process variables\r\n Arrays.sort(pvValues, categoryComparator);\r\n fireTableDataChanged();\r\n }", "public void sort() throws IOException {\n for(int i = 0; i < 32; i++)\n {\n if(i%2 == 0){\n filePointer = file;\n onePointer = one;\n }else{\n filePointer = one;\n onePointer = file;\n }\n filePointer.seek(0);\n onePointer.seek(0);\n zero.seek(0);\n zeroCount = oneCount = 0;\n for(int j = 0; j < totalNumbers; j++){\n int n = filePointer.readInt();\n sortN(n,i);\n }\n //Merging\n onePointer.seek(oneCount*4);\n zero.seek(0L);\n for(int j = 0; j < zeroCount; j++){\n int x = zero.readInt();\n onePointer.writeInt(x);\n }\n //One is merged\n }\n }", "void sortUI();", "private static long sortingTime(double[] array, boolean isStandardSort) {\n long start = 0; // starting time\n if (isStandardSort) { \n start = System.currentTimeMillis(); \n Arrays.sort(array);\n } else {\t\n start = System.currentTimeMillis();\n selectionSort(array);\n }\n return System.currentTimeMillis() - start; // measure time consumed\n }", "private void compressBlocks(final int phaseId) {\n // 1. uncross all crossing blocks: O(|G|)\n popBlocks(head -> head.isTerminal() && head.getPhaseId() < phaseId,\n tail -> tail.isTerminal() && tail.getPhaseId() < phaseId);\n\n List<BlockRecord<N, S>> shortBlockRecords = new ArrayList<>();\n List<BlockRecord<N, S>> longBlockRecords = new ArrayList<>();\n\n // 2. get all blocks: O(|G|)\n slp.getProductions().stream().forEach(rule -> consumeBlocks(rule.getRight(), shortBlockRecords::add, longBlockRecords::add, letter -> true));\n\n // 3.1 sort short blocks using RadixSort: O(|G|)\n sortBlocks(shortBlockRecords);\n\n // 3.2 sort long blocks O((n+m) log(n+m))\n Collections.sort(longBlockRecords, blockComparator);\n List<BlockRecord<N, S>> blockRecords = mergeBlocks(shortBlockRecords, longBlockRecords);\n\n // compress blocks\n BlockRecord<N, S> lastRecord = null;\n S letter = null;\n\n // 4. compress blocks: O(|G|)\n for(BlockRecord<N, S> record : blockRecords) {\n\n // check when it is the correct time to introduce a fresh letter\n if(lastRecord == null || !lastRecord.equals(record)) {\n letter = terminalAlphabet.createTerminal(phase, 1L, record.node.getElement().getLength() * record.block.getLength(), record.block);\n lastRecord = record;\n }\n replaceBlock(record, letter);\n }\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testAdaptiveInsertionSort() {\n //Test adaptiveness of completely ordered sort\n\n //Generate sorted array\n toSort = randArrDuplicates(MAX_ARR_SIZE, new Random(2110));\n Arrays.parallelSort(toSort, comp);\n sortedInts = cloneArr(toSort);\n\n comp.resetCount();\n Sorting.insertionSort(sortedInts, comp);\n int numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n //Should require only 1 pass through array, for n-1 comparisons\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= MAX_ARR_SIZE - 1);\n\n //Check adaptiveness with 1 item out-of-order\n\n //Set up list\n toSort = new IntPlus[6];\n for (int i = 0; i < toSort.length; i++) {\n toSort[i] = new IntPlus(2 * i);\n }\n toSort[3] = new IntPlus(-1);\n\n sortedInts = cloneArr(toSort);\n\n /*\n Initial Array: [0, 2, 4, -1, 8, 10]\n Should require 7 comparisons to sort\n */\n comp.resetCount();\n Sorting.insertionSort(sortedInts, comp);\n numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= 7);\n }", "public static void main(String[] args) {\n\r\n\t\t int[] arr = generateRandomArrayWithRandomNum();\r\n\t int checksSelectionSort = 0;\r\n\t int checksBubbleSort = 0;\r\n\t int checksMergeSort = 0;\r\n\t int checksQuickSort = 0;\r\n\t int[] copyArr = new int[1000];\r\n\t for (int x = 0; x < 20; x++) {\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksSelectionSort += doSelectionSort(arr);\r\n\r\n\t \r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksBubbleSort += bubbleSort(copyArr);\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksMergeSort += new mergeSort().sort(arr);\r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksQuickSort += new quickSort().sort(copyArr);\r\n\t }\r\n\t System.out.println(\"Analysis Of Sorting algorithms \");\r\n\t System.out.println(\"Selection Sort : \"+checksSelectionSort/20);\r\n\t System.out.println(\"Bubble Sort : \"+checksBubbleSort/20);\r\n\t System.out.println(\"Merge Sort : \"+checksMergeSort/20);\r\n\t System.out.println(\"Quick Sort : \"+checksQuickSort/20);\r\n\r\n\t \r\n\t }", "public void sort(){\n ListNode t, x, b = new ListNode(null, null);\n while (firstNode != null){\n t = firstNode; firstNode = firstNode.nextNode;\n for (x = b; x.nextNode != null; x = x.nextNode) //b is the first node of the new sorted list\n if (cmp.compare(x.nextNode.data, t.data) > 0) break;\n t.nextNode = x.nextNode; x.nextNode = t;\n if (t.nextNode==null) lastNode = t;\n }\n firstNode = b.nextNode;\n }" ]
[ "0.719662", "0.6253113", "0.6209965", "0.60641325", "0.6062344", "0.60514784", "0.6039714", "0.6020895", "0.6018125", "0.6015914", "0.59652436", "0.5950544", "0.5932971", "0.5900926", "0.58313674", "0.5802383", "0.5788351", "0.57315594", "0.56716985", "0.56670487", "0.5629508", "0.5613598", "0.5612099", "0.5611703", "0.5592451", "0.55917716", "0.5588461", "0.55848163", "0.5554659", "0.5554079", "0.5549377", "0.55441636", "0.5537118", "0.5532984", "0.5532803", "0.5532803", "0.55292463", "0.55275965", "0.5522279", "0.5519424", "0.551642", "0.5511716", "0.55057514", "0.5502017", "0.54939586", "0.5476436", "0.54741585", "0.5473029", "0.5441123", "0.54384875", "0.54355913", "0.5428854", "0.5424462", "0.5404587", "0.54042906", "0.5398141", "0.53981346", "0.5394633", "0.5393649", "0.53902", "0.538549", "0.53852785", "0.5384685", "0.53686666", "0.5345649", "0.5341686", "0.53390706", "0.53294265", "0.53148216", "0.53070915", "0.53057426", "0.5305577", "0.5304475", "0.5292254", "0.52918285", "0.5290364", "0.5287865", "0.52842516", "0.52834797", "0.52813774", "0.5267899", "0.52645266", "0.5263191", "0.5262101", "0.5261538", "0.5259155", "0.52528334", "0.5249513", "0.524533", "0.5243381", "0.5239559", "0.5239141", "0.5237668", "0.52372295", "0.5224401", "0.5223193", "0.5222278", "0.522134", "0.5221159", "0.5217173", "0.52171165" ]
0.0
-1
/ Enabled aggressive block sorting
public final void writeToParcel(Parcel parcel, int n) { parcel.writeInt(this.a); parcel.writeInt(this.b); int n2 = this.c ? 1 : 0; parcel.writeInt(n2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortBlocks(){\n\t\tCurrentSets = getCurrentSets();\n\t\tif(CurrentSets == 1){\n\t\t\treturn;\n\t\t}else{\n\t\t\tfor(i = 0; i < CurrentSets - 1; i++){\n\t\t\t\tfor(j = i + 1; j < CurrentSets; j++){\n\t\t\t\t\tif((Integer.parseInt(blocks[i].getHexTag(), 16)) > (Integer.parseInt(blocks[j].getHexTag(), 16))){\n\t\t\t\t\t\ttemp = blocks[j];\n\t\t\t\t\t\tblocks[j] = blocks[i];\n\t\t\t\t\t\tblocks[i] = temp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void sort(IAlg algorithm, boolean decrescent){}", "private static void sortingMemo() {\n\t\t\n\t}", "public void sort()throws InterruptedException{\n\t\tfor (int i = 0; i < a.length - 1; i++) {\n\t\t\tint minPos = minPosition(i);\n\t\t\tsortStateLock.lock();\n\t\t\ttry{\n\t\t\t\tswap(minPos, i);\n\t\t\t\t// For animation\n\t\t\t\talreadySorted = i;\n\t\t\t}\n\t\t\tfinally{\n\t\t\t\tsortStateLock.unlock();\n\t\t \t\t}\n\t\t\tpause(2);\n\t }\n }", "public FastNondominatedSorting() {\r\n\t\tthis(new ParetoDominanceComparator());\r\n\t}", "private PerfectMergeSort() {}", "@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void sort() {\n compares = 0;\n shuttlesort((int[]) indexes.clone(), indexes, 0, indexes.length);\n }", "public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }", "public void oldSort()\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) {\n\t\t\tfor (int secondIndex = index + 1; secondIndex < arraySize; secondIndex++) {\n\t\t\t\tint temp = 0;\n\t\t\t\tif (array[index] > array[secondIndex]) {\n\t\t\t\t\ttemp = array[index];\n\t\t\t\t\tarray[index] = array[secondIndex];\n\t\t\t\t\tarray[secondIndex] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void sort() {\n\t\trunPassZero();\n\t\tList<TupleReaderBinary> buffers = new ArrayList<>();\n\t\tList<Tuple> sortStage = new ArrayList<>();\n\t\tassert (readerBucketID == 0);\n\t\tassert (writerBucketID == 0);\n\t\tassert (passNumber == 1);\n\t\tassert (currentGroup == 1);\n\t\toutputBuffer.clear();\n\n\t\t// assign buffers\n\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\tbuffers.add(null);\n\t\t\tassignBuffer(buffers, i);\n\t\t\tsortStage.add(null);\n\t\t}\n\n\t\tassert (buffers.size() == numInputBuffers);\n\t\tassert (sortStage.size() == numInputBuffers);\n\n\t\t// read from buffers into list of size numInputBuffers\n\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\tsortStage.set(i, readFromBuffer(buffers, i));\n\t\t}\n\n\t\toutputWriter = new TupleWriterBinary(DatabaseCatalog.getInstance().getTempDirectory() + \"/\" + instanceHashcode\n\t\t\t\t+ \"_\" + passNumber + \"_\" + writerBucketID);\n\n\t\twhile (true) {\n\t\t\tif (!findAndReplaceSmallest(buffers, sortStage)) {\n\t\t\t\tprevPrevTotalBuckets = prevTotalBuckets;\n\t\t\t\tprevTotalBuckets = writerBucketID + 1;\n\t\t\t\tflushOutputBuffer();\n\t\t\t\toutputWriter.close();\n\n\t\t\t\t// We are done! Return\n\t\t\t\tif (prevTotalBuckets == 1) {\n\t\t\t\t\tdeleteTempFiles();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\twriterBucketID = 0;\n\t\t\t\treaderBucketID = 0;\n\t\t\t\twriterFlushes = 0;\n\t\t\t\tdeleteTempFiles();\n\t\t\t\tpassNumber++;\n\t\t\t\tcurrentGroup = 1;\n\n\t\t\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\t\t\tassignBuffer(buffers, i);\n\t\t\t\t\tsortStage.add(null);\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\t\t\tsortStage.set(i, readFromBuffer(buffers, i));\n\t\t\t\t}\n\n\t\t\t\toutputWriter = new TupleWriterBinary(DatabaseCatalog.getInstance().getTempDirectory() + \"/\"\n\t\t\t\t\t\t+ instanceHashcode + \"_\" + passNumber + \"_\" + writerBucketID);\n\t\t\t}\n\t\t}\n\n\t}", "public void radixSorting() {\n\t\t\n\t}", "public void sort() {\n }", "public void sort() {\n\t\tdivider(0, array.size() - 1);\n\t}", "public void setBubbleSort() \n\t{\n\t\tint last = recordCount + NOT_FOUND; //array.length() - 1\n\n\t\twhile(last > RESET_VALUE) //last > 0\n\t\t{\n\t\t\tint localIndex = RESET_VALUE; \n\t\t\tboolean swap = false;\n\n\t\t\twhile(localIndex < last) \n\t\t\t{\n\t\t\t\tif(itemIDs[localIndex] > itemIDs[localIndex + 1]) \n\t\t\t\t{\n\t\t\t\t\tsetSwapArrayElements(localIndex);\n\t\t\t\t\tswap = true;\n\t\t\t\t}\n\t\t\t\tlocalIndex++;\n\t\t\t}\n\n\t\t\tif(swap == false) \n\t\t\t{\n\t\t\t\tlast = RESET_VALUE;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tlast = last + NOT_FOUND;\n\t\t\t}\n\n\t\t}//END while(last > RESET_VALUE)\n\t\treturn;\n\t}", "private void trIntroSort(int r34, int r35, int r36, int r37, int r38, io.netty.handler.codec.compression.Bzip2DivSufSort.TRBudget r39, int r40) {\n /*\n r33 = this;\n r0 = r33;\n r0 = r0.SA;\n r16 = r0;\n r4 = 64;\n r0 = new io.netty.handler.codec.compression.Bzip2DivSufSort.StackEntry[r4];\n r29 = r0;\n r32 = 0;\n r27 = 0;\n r4 = r38 - r37;\n r22 = trLog(r4);\n r28 = r27;\n r23 = r22;\n L_0x001a:\n if (r23 >= 0) goto L_0x02b6;\n L_0x001c:\n r4 = -1;\n r0 = r23;\n if (r0 != r4) goto L_0x01a4;\n L_0x0021:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 != 0) goto L_0x0050;\n L_0x002d:\n r22 = r23;\n L_0x002f:\n r26 = 0;\n L_0x0031:\n r0 = r26;\n r1 = r28;\n if (r0 >= r1) goto L_0x072a;\n L_0x0037:\n r4 = r29[r26];\n r4 = r4.d;\n r5 = -3;\n if (r4 != r5) goto L_0x004d;\n L_0x003e:\n r4 = r29[r26];\n r4 = r4.b;\n r5 = r29[r26];\n r5 = r5.c;\n r0 = r33;\n r1 = r34;\n r0.lsUpdateGroup(r1, r4, r5);\n L_0x004d:\n r26 = r26 + 1;\n goto L_0x0031;\n L_0x0050:\n r6 = r35 + -1;\n r10 = r38 + -1;\n r4 = r33;\n r5 = r34;\n r7 = r36;\n r8 = r37;\n r9 = r38;\n r25 = r4.trPartition(r5, r6, r7, r8, r9, r10);\n r0 = r25;\n r8 = r0.first;\n r0 = r25;\n r9 = r0.last;\n r0 = r37;\n if (r0 < r8) goto L_0x0072;\n L_0x006e:\n r0 = r38;\n if (r9 >= r0) goto L_0x016d;\n L_0x0072:\n r0 = r38;\n if (r8 >= r0) goto L_0x0087;\n L_0x0076:\n r17 = r37;\n r31 = r8 + -1;\n L_0x007a:\n r0 = r17;\n if (r0 >= r8) goto L_0x0087;\n L_0x007e:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x007a;\n L_0x0087:\n r0 = r38;\n if (r9 >= r0) goto L_0x009c;\n L_0x008b:\n r17 = r8;\n r31 = r9 + -1;\n L_0x008f:\n r0 = r17;\n if (r0 >= r9) goto L_0x009c;\n L_0x0093:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x008f;\n L_0x009c:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = 0;\n r6 = 0;\n r4.<init>(r5, r8, r9, r6);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + -1;\n r6 = -2;\n r0 = r37;\n r1 = r38;\n r4.<init>(r5, r0, r1, r6);\n r29[r27] = r4;\n r4 = r8 - r37;\n r5 = r38 - r9;\n if (r4 > r5) goto L_0x0117;\n L_0x00bd:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x00e3;\n L_0x00c2:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r38 - r9;\n r5 = trLog(r5);\n r0 = r35;\n r1 = r38;\n r4.<init>(r0, r9, r1, r5);\n r29[r28] = r4;\n r38 = r8;\n r4 = r8 - r37;\n r22 = trLog(r4);\n L_0x00dd:\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x00e3:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x00f3;\n L_0x00e8:\n r37 = r9;\n r4 = r38 - r9;\n r22 = trLog(r4);\n r27 = r28;\n goto L_0x00dd;\n L_0x00f3:\n if (r28 != 0) goto L_0x00fa;\n L_0x00f5:\n r27 = r28;\n r22 = r23;\n L_0x00f9:\n return;\n L_0x00fa:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n goto L_0x00dd;\n L_0x0117:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x0138;\n L_0x011c:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r8 - r37;\n r5 = trLog(r5);\n r0 = r35;\n r1 = r37;\n r4.<init>(r0, r1, r8, r5);\n r29[r28] = r4;\n r37 = r9;\n r4 = r38 - r9;\n r22 = trLog(r4);\n goto L_0x00dd;\n L_0x0138:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x0148;\n L_0x013d:\n r38 = r8;\n r4 = r8 - r37;\n r22 = trLog(r4);\n r27 = r28;\n goto L_0x00dd;\n L_0x0148:\n if (r28 != 0) goto L_0x014f;\n L_0x014a:\n r27 = r28;\n r22 = r23;\n goto L_0x00f9;\n L_0x014f:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n goto L_0x00dd;\n L_0x016d:\n r17 = r37;\n L_0x016f:\n r0 = r17;\n r1 = r38;\n if (r0 >= r1) goto L_0x017e;\n L_0x0175:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r17;\n r17 = r17 + 1;\n goto L_0x016f;\n L_0x017e:\n if (r28 != 0) goto L_0x0186;\n L_0x0180:\n r27 = r28;\n r22 = r23;\n goto L_0x00f9;\n L_0x0186:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n goto L_0x00dd;\n L_0x01a4:\n r4 = -2;\n r0 = r23;\n if (r0 != r4) goto L_0x01ea;\n L_0x01a9:\n r27 = r28 + -1;\n r4 = r29[r27];\n r8 = r4.b;\n r4 = r29[r27];\n r9 = r4.c;\n r11 = r35 - r34;\n r4 = r33;\n r5 = r34;\n r6 = r36;\n r7 = r37;\n r10 = r38;\n r4.trCopy(r5, r6, r7, r8, r9, r10, r11);\n if (r27 != 0) goto L_0x01c8;\n L_0x01c4:\n r22 = r23;\n goto L_0x00f9;\n L_0x01c8:\n r27 = r27 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x01ea:\n r4 = r16[r37];\n if (r4 < 0) goto L_0x0202;\n L_0x01ee:\n r8 = r37;\n L_0x01f0:\n r4 = r16[r8];\n r4 = r4 + r34;\n r16[r4] = r8;\n r8 = r8 + 1;\n r0 = r38;\n if (r8 >= r0) goto L_0x0200;\n L_0x01fc:\n r4 = r16[r8];\n if (r4 >= 0) goto L_0x01f0;\n L_0x0200:\n r37 = r8;\n L_0x0202:\n r0 = r37;\n r1 = r38;\n if (r0 >= r1) goto L_0x028c;\n L_0x0208:\n r8 = r37;\n L_0x020a:\n r4 = r16[r8];\n r4 = r4 ^ -1;\n r16[r8] = r4;\n r8 = r8 + 1;\n r4 = r16[r8];\n if (r4 < 0) goto L_0x020a;\n L_0x0216:\n r4 = r16[r8];\n r4 = r4 + r34;\n r4 = r16[r4];\n r5 = r16[r8];\n r5 = r5 + r35;\n r5 = r16[r5];\n if (r4 == r5) goto L_0x0241;\n L_0x0224:\n r4 = r8 - r37;\n r4 = r4 + 1;\n r24 = trLog(r4);\n L_0x022c:\n r8 = r8 + 1;\n r0 = r38;\n if (r8 >= r0) goto L_0x0244;\n L_0x0232:\n r9 = r37;\n r31 = r8 + -1;\n L_0x0236:\n if (r9 >= r8) goto L_0x0244;\n L_0x0238:\n r4 = r16[r9];\n r4 = r4 + r34;\n r16[r4] = r31;\n r9 = r9 + 1;\n goto L_0x0236;\n L_0x0241:\n r24 = -1;\n goto L_0x022c;\n L_0x0244:\n r4 = r8 - r37;\n r5 = r38 - r8;\n if (r4 > r5) goto L_0x0264;\n L_0x024a:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = -3;\n r0 = r35;\n r1 = r38;\n r4.<init>(r0, r8, r1, r5);\n r29[r28] = r4;\n r35 = r35 + 1;\n r38 = r8;\n r22 = r24;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0264:\n r4 = 1;\n r5 = r38 - r8;\n if (r4 >= r5) goto L_0x0282;\n L_0x0269:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r37;\n r1 = r24;\n r4.<init>(r5, r0, r8, r1);\n r29[r28] = r4;\n r37 = r8;\n r22 = -3;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0282:\n r35 = r35 + 1;\n r38 = r8;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x028c:\n if (r28 != 0) goto L_0x0294;\n L_0x028e:\n r27 = r28;\n r22 = r23;\n goto L_0x00f9;\n L_0x0294:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x02b6:\n r4 = r38 - r37;\n r5 = 8;\n if (r4 > r5) goto L_0x02d5;\n L_0x02bc:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 != 0) goto L_0x02cc;\n L_0x02c8:\n r22 = r23;\n goto L_0x002f;\n L_0x02cc:\n r33.trInsertionSort(r34, r35, r36, r37, r38);\n r22 = -3;\n r23 = r22;\n goto L_0x001a;\n L_0x02d5:\n r22 = r23 + -1;\n if (r23 != 0) goto L_0x0331;\n L_0x02d9:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 == 0) goto L_0x002f;\n L_0x02e5:\n r15 = r38 - r37;\n r10 = r33;\n r11 = r34;\n r12 = r35;\n r13 = r36;\n r14 = r37;\n r10.trHeapSort(r11, r12, r13, r14, r15);\n r8 = r38 + -1;\n L_0x02f6:\n r0 = r37;\n if (r0 >= r8) goto L_0x032b;\n L_0x02fa:\n r4 = r16[r8];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r9 = r8 + -1;\n L_0x030a:\n r0 = r37;\n if (r0 > r9) goto L_0x0329;\n L_0x030e:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r4 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n if (r4 != r0) goto L_0x0329;\n L_0x0320:\n r4 = r16[r9];\n r4 = r4 ^ -1;\n r16[r9] = r4;\n r9 = r9 + -1;\n goto L_0x030a;\n L_0x0329:\n r8 = r9;\n goto L_0x02f6;\n L_0x032b:\n r22 = -3;\n r23 = r22;\n goto L_0x001a;\n L_0x0331:\n r8 = r33.trPivot(r34, r35, r36, r37, r38);\n r0 = r16;\n r1 = r37;\n r2 = r16;\n swapElements(r0, r1, r2, r8);\n r4 = r16[r37];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r31 = r0.trGetC(r1, r2, r3, r4);\n r9 = r37 + 1;\n L_0x034e:\n r0 = r38;\n if (r9 >= r0) goto L_0x0369;\n L_0x0352:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x0369;\n L_0x0366:\n r9 = r9 + 1;\n goto L_0x034e;\n L_0x0369:\n r8 = r9;\n r0 = r38;\n if (r9 >= r0) goto L_0x039e;\n L_0x036e:\n r0 = r32;\n r1 = r31;\n if (r0 >= r1) goto L_0x039e;\n L_0x0374:\n r9 = r9 + 1;\n r0 = r38;\n if (r9 >= r0) goto L_0x039e;\n L_0x037a:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 > r1) goto L_0x039e;\n L_0x038e:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x0374;\n L_0x0394:\n r0 = r16;\n r1 = r16;\n swapElements(r0, r9, r1, r8);\n r8 = r8 + 1;\n goto L_0x0374;\n L_0x039e:\n r17 = r38 + -1;\n L_0x03a0:\n r0 = r17;\n if (r9 >= r0) goto L_0x03bb;\n L_0x03a4:\n r4 = r16[r17];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x03bb;\n L_0x03b8:\n r17 = r17 + -1;\n goto L_0x03a0;\n L_0x03bb:\n r18 = r17;\n r0 = r17;\n if (r9 >= r0) goto L_0x03f5;\n L_0x03c1:\n r0 = r32;\n r1 = r31;\n if (r0 <= r1) goto L_0x03f5;\n L_0x03c7:\n r17 = r17 + -1;\n r0 = r17;\n if (r9 >= r0) goto L_0x03f5;\n L_0x03cd:\n r4 = r16[r17];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 < r1) goto L_0x03f5;\n L_0x03e1:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x03c7;\n L_0x03e7:\n r0 = r16;\n r1 = r17;\n r2 = r16;\n r3 = r18;\n swapElements(r0, r1, r2, r3);\n r18 = r18 + -1;\n goto L_0x03c7;\n L_0x03f5:\n r0 = r17;\n if (r9 >= r0) goto L_0x045a;\n L_0x03f9:\n r0 = r16;\n r1 = r16;\n r2 = r17;\n swapElements(r0, r9, r1, r2);\n L_0x0402:\n r9 = r9 + 1;\n r0 = r17;\n if (r9 >= r0) goto L_0x042c;\n L_0x0408:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 > r1) goto L_0x042c;\n L_0x041c:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x0402;\n L_0x0422:\n r0 = r16;\n r1 = r16;\n swapElements(r0, r9, r1, r8);\n r8 = r8 + 1;\n goto L_0x0402;\n L_0x042c:\n r17 = r17 + -1;\n r0 = r17;\n if (r9 >= r0) goto L_0x03f5;\n L_0x0432:\n r4 = r16[r17];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 < r1) goto L_0x03f5;\n L_0x0446:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x042c;\n L_0x044c:\n r0 = r16;\n r1 = r17;\n r2 = r16;\n r3 = r18;\n swapElements(r0, r1, r2, r3);\n r18 = r18 + -1;\n goto L_0x042c;\n L_0x045a:\n r0 = r18;\n if (r8 > r0) goto L_0x0716;\n L_0x045e:\n r17 = r9 + -1;\n r26 = r8 - r37;\n r30 = r9 - r8;\n r0 = r26;\n r1 = r30;\n if (r0 <= r1) goto L_0x046c;\n L_0x046a:\n r26 = r30;\n L_0x046c:\n r19 = r37;\n r21 = r9 - r26;\n L_0x0470:\n if (r26 <= 0) goto L_0x0484;\n L_0x0472:\n r0 = r16;\n r1 = r19;\n r2 = r16;\n r3 = r21;\n swapElements(r0, r1, r2, r3);\n r26 = r26 + -1;\n r19 = r19 + 1;\n r21 = r21 + 1;\n goto L_0x0470;\n L_0x0484:\n r26 = r18 - r17;\n r4 = r38 - r18;\n r30 = r4 + -1;\n r0 = r26;\n r1 = r30;\n if (r0 <= r1) goto L_0x0492;\n L_0x0490:\n r26 = r30;\n L_0x0492:\n r19 = r9;\n r21 = r38 - r26;\n L_0x0496:\n if (r26 <= 0) goto L_0x04aa;\n L_0x0498:\n r0 = r16;\n r1 = r19;\n r2 = r16;\n r3 = r21;\n swapElements(r0, r1, r2, r3);\n r26 = r26 + -1;\n r19 = r19 + 1;\n r21 = r21 + 1;\n goto L_0x0496;\n L_0x04aa:\n r4 = r9 - r8;\n r8 = r37 + r4;\n r4 = r18 - r17;\n r9 = r38 - r4;\n r4 = r16[r8];\n r4 = r4 + r34;\n r4 = r16[r4];\n r0 = r31;\n if (r4 == r0) goto L_0x04d3;\n L_0x04bc:\n r4 = r9 - r8;\n r24 = trLog(r4);\n L_0x04c2:\n r17 = r37;\n r31 = r8 + -1;\n L_0x04c6:\n r0 = r17;\n if (r0 >= r8) goto L_0x04d6;\n L_0x04ca:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x04c6;\n L_0x04d3:\n r24 = -1;\n goto L_0x04c2;\n L_0x04d6:\n r0 = r38;\n if (r9 >= r0) goto L_0x04eb;\n L_0x04da:\n r17 = r8;\n r31 = r9 + -1;\n L_0x04de:\n r0 = r17;\n if (r0 >= r9) goto L_0x04eb;\n L_0x04e2:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x04de;\n L_0x04eb:\n r4 = r8 - r37;\n r5 = r38 - r9;\n if (r4 > r5) goto L_0x060c;\n L_0x04f1:\n r4 = r38 - r9;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x0571;\n L_0x04f7:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x051e;\n L_0x04fc:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r27] = r4;\n r38 = r8;\n r23 = r22;\n goto L_0x001a;\n L_0x051e:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x0538;\n L_0x0523:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r37 = r9;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0538:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x0549;\n L_0x053d:\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x0549:\n if (r28 != 0) goto L_0x054f;\n L_0x054b:\n r27 = r28;\n goto L_0x00f9;\n L_0x054f:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0571:\n r4 = r8 - r37;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x05c6;\n L_0x0577:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x059e;\n L_0x057c:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r27] = r4;\n r38 = r8;\n r23 = r22;\n goto L_0x001a;\n L_0x059e:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x05c0;\n L_0x05a3:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x05c0:\n r37 = r9;\n r23 = r22;\n goto L_0x001a;\n L_0x05c6:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x05f5;\n L_0x05cb:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r27] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x05f5:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r38 = r8;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x060c:\n r4 = r8 - r37;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x067b;\n L_0x0612:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x0639;\n L_0x0617:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r27] = r4;\n r37 = r9;\n r23 = r22;\n goto L_0x001a;\n L_0x0639:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x0653;\n L_0x063e:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r38 = r8;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0653:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x0664;\n L_0x0658:\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x0664:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r38;\n r3 = r22;\n r4.<init>(r0, r1, r2, r3);\n r29[r28] = r4;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x067b:\n r4 = r38 - r9;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x06d0;\n L_0x0681:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x06a8;\n L_0x0686:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r27] = r4;\n r37 = r9;\n r23 = r22;\n goto L_0x001a;\n L_0x06a8:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x06ca;\n L_0x06ad:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x06ca:\n r38 = r8;\n r23 = r22;\n goto L_0x001a;\n L_0x06d0:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x06ff;\n L_0x06d5:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r27] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x06ff:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r37 = r9;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0716:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 == 0) goto L_0x002f;\n L_0x0722:\n r22 = r22 + 1;\n r35 = r35 + 1;\n r23 = r22;\n goto L_0x001a;\n L_0x072a:\n r27 = r28;\n goto L_0x00f9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.netty.handler.codec.compression.Bzip2DivSufSort.trIntroSort(int, int, int, int, int, io.netty.handler.codec.compression.Bzip2DivSufSort$TRBudget, int):void\");\n }", "public void sort()\n\t{\n\t\tfor(int i=0;i<bowlers.size()-1;i++)\n\t\t{\n\t\t\tfor(int j=i+1;j<bowlers.size();j++)\n\t\t\t{\n\t\t\t\tif(bowlers.get(i).getBall()<bowlers.get(j).getBall())\n\t\t\t\t{\n\t\t\t\t\tBowler bowler=bowlers.get(i);\n\t\t\t\t\tbowlers.set(i,bowlers.get(j));\n\t\t\t\t\tbowlers.set(j,bowler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<bowlers.size();i++)\n\t\t{\n\t\tSystem.out.println(bowlers.get(i).getBall());\n\t\t}\n\t}", "@Override\r\n\tpublic void editSort() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void addSort() {\n\t\t\r\n\t}", "@Override\n protected void runAlgorithm() {\n for (int i = 0; i < getArray().length; i++) {\n for (int j = i + 1; j < getArray().length; j++) {\n if (applySortingOperator(getValue(j), getValue(i))) {\n swap(i, j);\n }\n }\n }\n }", "@Override\n\tvoid sort(int[] array, SortingVisualizer display) {\n\t\tSystem.out.println(\"a\");\n\t\tboolean sorted = false;\n\t\tboolean h = true;\n\t\twhile (sorted == false) {\nh=true;\n\t\t\t// System.out.println(\"1\");\n\t\t\tRandom x = new Random();\n\t\t\tint y = x.nextInt(array.length);\n\n\t\t\tint el1 = array[y];\n\t\t\tint z = x.nextInt(array.length);\n\t\t\tint el2 = array[z];\n\n\t\t\tarray[y] = el2;\n\t\t\tarray[z] = el1;\n\t\t\tfor (int i = 0; i < array.length - 1; i++) {\n/*\n\t\t\t\tif (array[i] < array[i + 1]) {\n\n\t\t\t\t\th = true;\n\n\t\t\t\t}*/\n\n\t\t\t\tif (array[i] > array[i + 1]) {\n\t\t\t\t\th = false;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (h == true) {\n\n\t\t\t\tsorted = true;\n\t\t\t}\n\n\t\t\tdisplay.updateDisplay();\n\t\t\t\n\t\t}\n\t}", "public List<SimulinkBlock> generateBlockOrder(UnmodifiableCollection<SimulinkBlock> unmodifiableCollection,\n\t\t\tSet<SimulinkBlock> unsortedBlocks) {\n\t\tSet<SimulinkBlock> unsorted = new HashSet<SimulinkBlock>();\n\t\tSet<SimulinkBlock> unsortedRev = new HashSet<SimulinkBlock>();\n\t\tList<SimulinkBlock> sorted = new LinkedList<SimulinkBlock>();\n\n\t\t// start with source blocks without input\n\t\tfor (SimulinkBlock block : unmodifiableCollection) {\n\t\t\tif (block.getInPorts().isEmpty()) {\n\t\t\t\tsorted.add(block);\n\t\t\t} else {\n\t\t\t\tunsorted.add(block);\n\t\t\t}\n\t\t}\n\n\t\tint sizeBefore = 0;\n\t\tint sizeAfter = 0;\n\t\tdo {\n\t\t\tsizeBefore = unsorted.size();\n\t\t\tfor (SimulinkBlock myBlock : unsorted) {\n\t\t\t\tunsortedRev.add(myBlock);\n\t\t\t}\n\t\t\tunsorted.clear();\n\t\t\tfor (SimulinkBlock block : unsortedRev) {\n\t\t\t\tboolean allPredeccesorsAvailable = specialBlockChecking(block, sorted);\n\t\t\t\tif (allPredeccesorsAvailable) {\n\t\t\t\t\tsorted.add(block);\n\t\t\t\t} else {\n\t\t\t\t\tunsorted.add(block);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsizeAfter = unsorted.size();\n\t\t\tunsortedRev.clear();\n\t\t} while ((!(unsorted.isEmpty())) && (!(sizeBefore == sizeAfter)));\n\n\t\tfor (SimulinkBlock block : unsorted) {\n\t\t\t// TODO sort the last unsorted blocks\n\t\t\tPluginLogger\n\t\t\t\t\t.info(\"Currently unsorted after sorting : \" + block.getName() + \" of type \" + block.getType());\n\t\t\tsorted.add(block);\n\t\t\tunsortedBlocks.add(block);\n\t\t}\n\t\treturn sorted;\n\t}", "@Test\n public void doubleSortWithExchangeUnbalancedNodes() {\n ExternalSort es1 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), ARBTRIARY_LEAF, Collections.emptyList(), false);\n SingleSender ss = new SingleSender(OpProps.prototype(1, Long.MAX_VALUE).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), Mockito.mock(BatchSchema.class), es1, 0,\n MinorFragmentIndexEndpoint.newBuilder().setMinorFragmentId(0).build());\n Fragment f1 = new Fragment();\n f1.addOperator(ss);\n Wrapper w1 = new Wrapper(f1, 0);\n w1.overrideEndpoints(Arrays.asList(N1, N2));\n\n UnorderedReceiver or = new UnorderedReceiver(OpProps.prototype(1, Long.MAX_VALUE), Mockito.mock(BatchSchema.class), 0, Collections.emptyList(), false);\n ExternalSort es2 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), or, Collections.emptyList(), false);\n Fragment f2 = new Fragment();\n f2.addOperator(es2);\n Wrapper w2 = new Wrapper(f2, 0);\n w2.overrideEndpoints(Collections.singletonList(N1));\n\n\n MemoryAllocationUtilities.setMemory(options, ImmutableMap.of(f1, w1, f2, w2), 10 + adjustReserve);\n assertEquals(3L, es1.getProps().getMemLimit());\n assertEquals(3L, es2.getProps().getMemLimit());\n }", "@Override\n\t\tpublic void run() {\n\t\t\tfor (int i = 0; i < 1000000; i++) {\n\t\t\t\tint[] a = Util.generateRandomArray(500, 200000);\n\t\t\t\tint[] b = a.clone();\n\t\t\t\t\n\t\t\t\ta = sort(a);\n\t\t\t\tArrays.sort(b);\n\t\t\t\t\n\t\t\t\tfor (int j = 0; j < b.length; j++) {\n\t\t\t\t\tUtil.Assert(a[j] == b[j], \"shit\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Heap sort ok\");\n\t\t}", "private Sort() { }", "public void sort() {\n\t\tSystem.out.println(\"Quick Sort Algorithm invoked\");\n\n\t}", "@Override\n public void sortCurrentList(FileSortHelper sort) {\n }", "public String doSort();", "public void sortArray() {\n\t\tSystem.out.println(\"QUICK SORT\");\n\t}", "@Override\n public void sort() throws IOException {\n long i = 0;\n // j represents the turn of writing the numbers either to g1 or g2 (or viceversa)\n long j = 0;\n long runSize = (long) Math.pow(2, i);\n long size;\n\n long startTime = System.currentTimeMillis();\n\n System.out.println(\"Strart sorting \"+ this.inputFileName);\n\n while(i <= Math.ceil(Math.log(this.n) / Math.log(2))){\n j = 0;\n do{\n size = merge(runSize, destinationFiles[(int)j % 2]);\n j += 1;\n }while (size/2 == runSize);\n\n System.out.println(\"iteration: \" + i + \", Run Size:\" + runSize + \", Total time elapsed: \" + (System.currentTimeMillis() - startTime));\n i += 1;\n runSize = (long) Math.pow(2, i);\n swipe();\n }\n System.out.println(\"The file has been sorted! Total time elapsed: \"+(System.currentTimeMillis() - startTime));\n\n destinationFiles[0].close();\n destinationFiles[1].close();\n originFiles[0].close();\n originFiles[1].close();\n\n createFile(OUT_PATH +inputFileName);\n copyFile(new File(originFileNames[0]), new File(\"out/TwoWayMergesort/OUT_\"+inputFileName));\n\n }", "private void updateOrder() {\n Arrays.sort(positions);\n }", "@Override\n public void sort() {\n for (int i = 0; i < size; i++) {\n for (int j = i + 1; j < size; j++) {\n if (((Comparable) data[i]).compareTo(data[j]) > 0) {\n E c = data[i];\n data[i] = data[j];\n data[j] = c;\n\n }\n }\n }\n }", "void order() {\n for (int i = 0; i < numVertices; i++) {\n if (simp[i][numParams] < simp[best][numParams]) {\n best = i;\n }\n if (simp[i][numParams] > simp[worst][numParams]) {\n worst = i;\n }\n }\n nextWorst = best;\n for (int i = 0; i < numVertices; i++) {\n if (i != worst) {\n if (simp[i][numParams] > simp[nextWorst][numParams]) {\n nextWorst = i;\n }\n }\n }\n }", "public void shellSort(int[] a) \n {\n int increment = a.length / 2;\n while (increment > 0) \n {\n \n for (int i = increment; i < a.length; i++) //looping over the array\n {\n int j = i;\n int temp = a[i]; // swapping the values to a temporary array\n try\n {\n if(!orderPanel) // checking for Descending order\n {\n while (j >= increment && a[j - increment] > temp) \n {\n a[j] = a[j - increment]; //swapping the values\n thread.sleep(100);\n repaint();\n this.setThreadState();\n j = j - increment;\n }\n }\n \n else\n {\n while (j >= increment && a[j - increment] < temp) //checking for Ascending order\n {\n a[j] = a[j - increment];\n thread.sleep(200);\n repaint();\n this.setThreadState();\n j = j - increment;\n }\n \n }\n }\n catch(Exception e)\n {\n System.out.println(\"Exception occured\" + e);\n }\n a[j] = temp;\n }\n \n if (increment == 2) \n {\n increment = 1;\n } \n else \n {\n increment *= (5.0 / 11);\n }\n }\n }", "void sort();", "void sort();", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif (currentSize >= size)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"MERGESORT END\");\n\t\t\t\t\ttimer.stop();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// deciding the block to to merged\n\t\t\t\telse if (mergeSortCodeFlag == 1)\n\t\t\t\t{\n\t\t\t\t\tif (leftStart >= size - 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentSize = currentSize * 2;\n\t\t\t\t\t\tleftStart = 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tmid = leftStart + currentSize - 1;\n\t\t\t\t\t\tif (leftStart + 2 * currentSize - 1 >= size - 1)\n\t\t\t\t\t\t\trightEnd = size - 1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\trightEnd = leftStart + 2 * currentSize - 1;\n\t\t\t\t\t\tbox.setBaseColor(BASE_COLOR);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tmergeSortDelayFlag1 = 1;\n\t\t\t\t\t\tmergeSortdelay1 = 0;\n\t\t\t\t\t\tmergeSortCodeFlag = 0;\n\t\t\t\t\t\tif(mid >= rightEnd)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tleftStart += 2 * currentSize;\n\t\t\t\t\t\t\tmergeSortDelayFlag1 = 0;\n\t\t\t\t\t\t\tmergeSortCodeFlag = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (mergeSortDelayFlag1 == 1)\n\t\t\t\t{\n\t\t\t\t\tmergeSortdelay1++;\n\t\t\t\t\tif (mergeSortdelay1 >= DELAY)\n\t\t\t\t\t{\n\t\t\t\t\t\tl = leftStart;\n\t\t\t\t\t\tm = mid;\n\t\t\t\t\t\tr = rightEnd;\n\t\t\t\t\t\tmergeSortDelayFlag1 = 0;\n\t\t\t\t\t\tmergeInitializeFlag = 1;\n\t\t\t\t\t\tleftStart += 2 * currentSize;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Merging the block selected\n\t\t\t\t\n\t\t\t\t// initializing the variables needed by the merge block \n\t\t\t\telse if (mergeInitializeFlag == 1)\n\t\t\t\t{\n\t\t\t\t\ti = l;\n\t\t\t\t\tj = m + 1;\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tcurrentDownCount = 0;\n\t\t\t\t\tindexRightCount = 0;\n\t\t\t\t\tcurrentLeftCount = 0;\n\t\t\t\t\tcurrentUpCount = 0;\n\t\t\t\t\tcodeFlag = 1;\n\t\t\t\t\trightFlag = 0;\n\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\tdownFlag = 0;\n\t\t\t\t\tupFlag = 0;\n\t\t\t\t\tleftFlag = 0;\n\t\t\t\t\tdelay1 = 0;\n\t\t\t\t\tdelayFlag1 = 0;\n\t\t\t\t\tdelay2 = 0;\n\t\t\t\t\tdelayFlag2 = 0;\n\t\t\t\t\tcolorFlag1 = 1;\n\t\t\t\t\tcolorDelayFlag1 = 0;\n\t\t\t\t\tcolorDelay1 = 0;\n\t\t\t\t\tcolorFlag2 = 1;\n\t\t\t\t\tcolorDelayFlag2 = 0;\n\t\t\t\t\tcolorDelay2 = 0;\n\t\t\t\t\tbox.setBaseColor(BASE_COLOR);\n\t\t\t\t\tbox.setColorRange(l, m, BLOCK_COLOR1);\n\t\t\t\t\tbox.setColorRange(m + 1, r, BLOCK_COLOR2);\n\t\t\t\t\tpaintBox();\n\t\t\t\t\t\n\t\t\t\t\tmergeFlag = 1;\n\t\t\t\t\tmergeInitializeFlag = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// actual merging starts here\n\t\t\t\telse if (mergeFlag == 1)\n\t\t\t\t{\n\t\t\t\t\t// step zero check whether to continue merging or not\n\t\t\t\t\tif (j > r)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (i >= j)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmergeFlag = 0;\n\t\t\t\t\t\t\tmergeSortCodeFlag = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (colorFlag1 == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbox.getRectangle(i).setColor(END_COLOR);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\tcolorDelay1 = 0;\n\t\t\t\t\t\t\tcolorDelayFlag1 = 1;\n\t\t\t\t\t\t\tcolorFlag1 = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (colorDelayFlag1 == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcolorDelay1++;\n\t\t\t\t\t\t\tif (colorDelay1 >= DELAY)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t\tcolorDelayFlag1 = 0;\n\t\t\t\t\t\t\t\tcolorFlag1 = 1;\n\t\t\t\t\t\t\t\tcolorDelay1 = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (i >= j)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (j > r)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmergeFlag = 0;\n\t\t\t\t\t\t\tmergeSortCodeFlag = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (colorFlag2 == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbox.getRectangle(j).setColor(END_COLOR);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\tcolorDelay2 = 0;\n\t\t\t\t\t\t\tcolorDelayFlag2 = 1;\n\t\t\t\t\t\t\tcolorFlag2 = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (colorDelayFlag2 == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcolorDelay2++;\n\t\t\t\t\t\t\tif (colorDelay2 >= DELAY)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\t\tcolorDelayFlag2 = 0;\n\t\t\t\t\t\t\t\tcolorFlag2 = 1;\n\t\t\t\t\t\t\t\tcolorDelay2 = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Step one Check whether a[i] <= a[j]\n\t\t\t\t\telse if (codeFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tRectangle currRect = box.getRectangle(i);\n\t\t\t\t\t\tRectangle scanRect = box.getRectangle(j);\n\t\t\t\t\t\tcurrRect.setColor(FOCUS_COLOR1);\n\t\t\t\t\t\tscanRect.setColor(FOCUS_COLOR2);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tdelayFlag2 = 1;\n\t\t\t\t\t\tcodeFlag = 0;\n\t\t\t\t\t\tdelay2 = 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (delayFlag2 == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelay2++;\n\t\t\t\t\t\tif (delay2 >= DELAY)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRectangle currRect = box.getRectangle(i);\n\t\t\t\t\t\t\tRectangle scanRect = box.getRectangle(j);\n\t\t\t\t\t\t\tif (currRect.getData() < scanRect.getData())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbox.getRectangle(i).setColor(END_COLOR);\n\t\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\t\tdelay1 = 0;\n\t\t\t\t\t\t\t\tdelayFlag2 = 0;\n\t\t\t\t\t\t\t\tdelayFlag1 = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbox.getRectangle(j).setColor(END_COLOR);\n\t\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\t\tdelayFlag2 = 0;\n\t\t\t\t\t\t\t\tdownFlag = 1;\n\t\t\t\t\t\t\t\tcurrentDownCount = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (delayFlag1 == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelay1++;\n\t\t\t\t\t\tif (delay1 >= DELAY)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcodeFlag = 1;\n\t\t\t\t\t\t\tdelayFlag1 = 0;\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Moving the first rectangle on right down (if it was smaller than the first one on the left)\n\t\t\t\t\telse if (downFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.addOffsetRectangle(j, 0, YCHANGE);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tcurrentDownCount += YCHANGE;\n\t\t\t\t\t\tif (currentDownCount >= DOWN)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint excess = currentDownCount - DOWN;\n\t\t\t\t\t\t\tbox.addOffsetRectangle(j, 0, -excess);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\tdownFlag = 0;\n\t\t\t\t\t\t\trightBlockFlag = 1;\n\t\t\t\t\t\t\tindexRightCount = 0;\n\t\t\t\t\t\t\tindex = j - 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// moving each of the rectangles in the block to the right(between the two smallest rectangle on both side)\n\t\t\t\t\t// including the first rectangle\n\t\t\t\t\telse if (rightBlockFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (index < i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\t\t\tleftFlag = 1;\n\t\t\t\t\t\t\tcurrentLeftCount = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trightFlag = 1;\n\t\t\t\t\t\t\trightBlockFlag = 0;\n\t\t\t\t\t\t\tindexRightCount = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// moving a rectangle in the block to the right\n\t\t\t\t\telse if (rightFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.addOffsetRectangle(index, XCHANGE, 0);\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tindexRightCount += XCHANGE;\n\t\t\t\t\t\tif (indexRightCount >= width)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint excess = indexRightCount - width;\n\t\t\t\t\t\t\tbox.addOffsetRectangle(index, -excess, 0);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\trightFlag = 0;\n\t\t\t\t\t\t\trightBlockFlag = 1;\n\t\t\t\t\t\t\tindex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// moving the rectangle left (the smallest in the un-merged block)\n\t\t\t\t\telse if (leftFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.addOffsetRectangle(j, -XCHANGE, 0);\n\t\t\t\t\t\tcurrentLeftCount += XCHANGE;\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tif (currentLeftCount >= width * (j - i))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint excess = currentLeftCount - width * (j - i);\n\t\t\t\t\t\t\tbox.addOffsetRectangle(j, excess, 0);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tleftFlag = 0;\n\t\t\t\t\t\t\tupFlag = 1;\n\t\t\t\t\t\t\tcurrentUpCount = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// moving the rectangle up (the smallest in the un-merged block)\n\t\t\t\t\telse if (upFlag == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbox.addOffsetRectangle(j, 0, -YCHANGE);\n\t\t\t\t\t\tcurrentUpCount += YCHANGE;\n\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\tif (currentUpCount >= DOWN)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint excess = currentUpCount - DOWN;\n\t\t\t\t\t\t\tbox.addOffsetRectangle(j, 0, excess);\n\t\t\t\t\t\t\tpaintBox();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tRectangle smallestRect = box.getRectangle(j);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int t = j - 1; t >= i; t--)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbox.setRectangle(box.getRectangle(t), t + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbox.setRectangle(smallestRect, i);\n\t\t\t\t\t\t\tupFlag = 0;\n\t\t\t\t\t\t\tcodeFlag = 1;\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "private void externalSort() throws IOException{\n\t\t/*\n\t\t * Pass 0: internal sort\n\t\t */\n\t\t// Read in from child;Write out runs of B pages;\n\t\t\n\t\tint numPerRun = B * 4096 / (schema.size() * 4); // # of tuples per run given in Pass0\n\t\tboolean buildMore;\n\t\tint numRuns = 0;\n\t\tif(sortAttrsIndex == null) {\n\t\t\tthis.buildAttrsIndex();\n\t\t}\n\t\texComparator myComp = new exComparator();\n\t\tinternal = new PriorityQueue<Tuple>(myComp);\n\t\tdo {\n\t\t\tbuildMore = this.buildHeap(numPerRun);\n\t\t\tnumRuns++;\n\t\t\t\n\t\t\t// write out the (numRuns)th run\n\t\t\tTupleWriter TW;\n\t\t\tif(!buildMore && numRuns == 1) {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"sortResult\"));\n\t\t\t} else {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"0_\" + numRuns));\n\t\t\t}\n\t\t\twhile(!internal.isEmpty()) {\n//\t\t\t\tSystem.out.println(internal.peek().data);\n\t\t\t\tTW.setNextTuple(internal.poll()); \n\t\t\t}\n\t\t\t// leftover, fill with zero and write out\n\t\t\tif(!TW.bufferEmpty()) { // TW would never know the end of writing\n\t\t\t\tTW.fillFlush(); \n\t\t\t}\n\t\t\tTW.close();\n\t\t\t// internal must be empty until this point\n\t\t}while (buildMore);\n\t\t\n\t\t/*\n\t\t * Pass 1 and any following\n\t\t */\n\t\tif(numRuns > 1) { // if numRuns generated in Pass 0 is 1 already, file sorted already, no need to merge\n\t\t\tthis.merge(numRuns, myComp);\n\t\t}\n\t\t\n\t}", "public void sortByLength()\n {\n boolean swapMade;//has a swap been made in the most recent pass?\n \n //repeat looking for swaps\n do\n {\n swapMade=false;//just starting this pass, so no swap yet\n \n //go through entire array. looking for swaps that need to be done\n for(int i = 0; i<currentRide-1; i++)\n {\n //if the other RideLines has less people\n if(rides[i].getCurrentPeople()<rides[i+1].getCurrentPeople())\n {\n // standard swap, using a temporary. swap with less people\n RideLines temp = rides[i];\n rides[i]=rides[i+1];\n rides[i+1]=temp;\n \n swapMade=true;//remember this pass made at least one swap\n }\n \n } \n }while(swapMade);//until no swaps were found in the most recent past\n \n redrawLines();//redraw the image\n \n }", "private void sortByAmount(){\n int stopPos = 0;\n while(colours.size()-stopPos > 0){\n int inARow = 1;\n for(int i = colours.size() - 1; i > stopPos; i--){\n if(colours.get(i-1).getAmount() < colours.get(i).getAmount()){\n rgb temp = new rgb(colours.get(i-1));\n colours.set(i-1, colours.get(i));\n colours.set(i, temp);\n }else{\n inARow++;\n }\n }\n stopPos++;\n if(inARow == colours.size()){\n break;\n }\n }\n }", "public static void specialSets() {\n\t\tSystem.out.printf(\"%12s%15s%15s%10s%10s%10s%10s%n\",\"Size\",\"Range\",\"Pre-Sort Type\",\"Insertion\",\"Selectuon\",\"Quick\",\"Merge\");\n\t\tint[] array;\n\t\t//200K\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 200000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Sorted array\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Sorted\");\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Reverse Sorted\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Reverse Sorted\");\n\t\tint[] temp = new int[array.length];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\ttemp[i] = array[array.length -1 -i];\n\t\t}\n\t\tfourSorts(temp);\n\t\tSystem.out.println();\n\t\t//Range 1-20\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-20\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 20);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }", "public void sortCompetitors(){\n\t\t}", "public void sortPassing(){\n\t\tpassing.sort(PlayingCard.PlayingCardComparator_ACEHIGH);\n\t}", "@Override\n\tvoid sort(int[] arr, SortingVisualizer display) {\n\t\tint current = 0;\n\t\tint x;\n\t\tint y;\n\t\tboolean complete = false;\n\t\twhile(complete == false) {\n\t\t\tcurrent = 0;\n\t\t\tcomplete = true;\n\t\t\tfor(int i = 0 ; i < arr.length; i ++) {\n\t\t\t\tdisplay.updateDisplay();\n\t\t\t\tif(arr[current] > arr[i]) {\n\t\t\t\t\tx = arr[i];\n\t\t\t\t\ty = arr[current];\n\t\t\t\t\tarr[i] = y;\n\t\t\t\t\tarr[current] = x;\n\t\t\t\t\tcomplete = false;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\tcurrent = i;\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public BucketSort()\n {\n for(int i = 0; i < 30; i++)\n {\n a[i] = generator.nextInt(50)+1;\n b[i] = a[i];\n }\n }", "@Override\n\tpublic void setSortCounters(boolean sortCounters) {\n\t\t\n\t}", "public void sort() {\n /*int jokers = this.getJokers();\n\t\tif (jokers > 0 && this.size() > 2) {\n\t\t\tArrayList<Tile> list = new ArrayList<>();\n for (int i=0; i<this.size(); i++) {\n\t\t\t\tif (this.get(i).getColour() == 'J') {\n\t\t\t\t\tTile joker = this.remove(this.get(i));\n\t\t\t\t\tlist.add(joker);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Tile j : list) {\n\t\t\t\tthis.addInSort(j);\n\t\t\t}\n }*/\n \n\n //may need something in here to accomodate a joker changing its form\n\n if (tiles.size() > 1) { //will only sort a meld with any tiles in it\n //Override default comparator to compare by tile value (ints)\n Collections.sort(tiles, new Comparator<Tile>() {\n @Override \n public int compare(Tile t1, Tile t2) { \n if (t1.getColour() > t2.getColour()) {\n return 1;\n } else if (t1.getColour() < t2.getColour()) {\n return -1;\n }\n if (t1.getValue() > t2.getValue()) {\n return 1;\n } else if (t1.getValue() < t2.getValue()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n }\n\n }", "public void sort() {\n\n // Fill in the blank here.\n\tfor(int i = 0; i < size; i++){\n\t\tint currentLowest, cLIndex, temp;\n\t\tcurrentLowest = elements[i];\n\t\tcLIndex = i; \n\t\tfor(int c = i+1; c < size; c++){\n\t\t\tif(currentLowest > elements[c]){\n\t\t\t\tcurrentLowest = elements[c];\n\t\t\t\tcLIndex = c;\n\t\t\t} \n\t\t}\n\t\ttemp = elements[i];\n\t\telements[i] = elements[cLIndex];\n\t\telements[cLIndex] = temp;\n\t\t\n\t}\n System.out.println(\"Sorting...\");\n }", "private void setup() {\r\n final int gsz = _g.getNumNodes();\r\n if (_k==2) {\r\n\t\t\tNodeComparator2 comp = new NodeComparator2();\r\n\t\t\t_origNodesq = new TreeSet(comp);\r\n\t\t} else { // _k==1\r\n\t\t\tNodeComparator4 comp = new NodeComparator4();\r\n\t\t\t_origNodesq = new TreeSet(comp);\r\n\t\t}\r\n for (int i=0; i<gsz; i++) {\r\n _origNodesq.add(_g.getNodeUnsynchronized(i)); // used to be _g.getNode(i)\r\n }\r\n _nodesq = new TreeSet(_origNodesq);\r\n //System.err.println(\"done sorting\");\r\n }", "public void changeSortOrder();", "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }", "private static void selectionSort(ArrayList<Box> BoxArray) { \n\n\t\tfor ( int i = 0; i < BoxArray.size(); i++ ) { \n\t\t\tint lowPos = i; \n\t\t\tfor ( int j = i + 1; j < BoxArray.size(); j++ ) \n\t\t\t\tif ( BoxArray.get(j).volume() < BoxArray.get(lowPos).volume() ) \n\t\t\t\t\tlowPos = j;\n\t\t\tif ( BoxArray.get(lowPos) != BoxArray.get(i) ) { \n\t\t\t\tBox temp = BoxArray.get(lowPos);\n\t\t\t\tBoxArray.set(lowPos, BoxArray.get(i));\n\t\t\t\tBoxArray.set(i, temp);\n\t\t\t}\n\t\t}\n\t}", "public void sort() {\n\t\t\tfor (int j = nowLength - 1; j > 1; j--) {\n\t\t\t\tfor (int i = 0; i < j; i++) {\n\t\t\t\t\tif (ray[i] > ray[i+1]) {\n\t\t\t\t\t\tint tmp = ray [i];\n\t\t\t\t\t\tray[i] = ray[i+1];\n\t\t\t\t\t\tray[i+1] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprint();\n\t\t\t}\n\t}", "public BubSortList() {\n\t\tray = new int[MAXSIZE];\n\t\tnowLength = 0;\n\t}", "public static void s1AscendingTest() {\n int key = 903836722;\n SortingLab<Integer> sli = new SortingLab<Integer>(key);\n int M = 600000;\n int N = 1000;\n double start;\n double elapsedTime;\n System.out.print(\"Sort 1 Ascending\\n\");\n for (; N < M; N *= 2) {\n Integer[] ai = getRandomArray(N, Integer.MAX_VALUE);\n Arrays.sort(ai);\n start = System.nanoTime();\n sli.sort1(ai);\n elapsedTime = (System.nanoTime() - start) / 1_000_000_000d;\n System.out.print(N + \"\\t\");\n System.out.printf(\"%4.3f\\n\", elapsedTime);\n }\n }", "public void sortByDefault() {\r\n\t\tcomparator = null;\r\n\t}", "public static int[] partialSort(int[] a) {\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < 2 - i; j++) {\n if (a[j] > a[j+1]) {\n int temp = a[j+1];\n a[j+1] = a[j];\n a[j] = temp;\n }\n }\n }\n return a;\n}", "public void setSortOnCPUTime() {\n this.sortedJobList = new TreeSet<Job>(new Comparator<Job>() {\n @Override\n public int compare(Job a, Job b) {\n\n int aCPUUsed = 0;\n int bCPUUsed = 0;\n\n try {\n aCPUUsed = a.getCPUUsed();\n bCPUUsed = b.getCPUUsed();\n } catch (AS400SecurityException e) {\n e.printStackTrace();\n } catch (ErrorCompletingRequestException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ObjectDoesNotExistException e) {\n e.printStackTrace();\n }\n\n if (aCPUUsed == bCPUUsed) return 0;\n else return bCPUUsed - aCPUUsed;\n }\n });\n }", "@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}", "public void sortOccurred() {\n //SET ALL THE ROWS TO -1, (THEY INITIALIZE TO 0).\n \tfor(int i = 0; i < data.length; i++) {\n \t\tdata[i] = null;\n \t\trowIndexLookup[i] = -1;\n \t}\t\t\n }", "public void doTheAlgorithm() {\n this.swapCount = 0;\n this.compCount = 0;\n \n\t\tdoQuickSort(0, this.sortArray.length - 1);\n\t}", "@VTID(28)\n boolean getSortUsingCustomLists();", "private void sort()\n {\n // This implements Shell sort.\n // Unfortunately we cannot use the sorting functions from the library\n // (e.g. java.util.Arrays.sort), since the ones that work on int\n // arrays do not accept a comparison function, but only allow\n // sorting into natural order.\n int jump = length;\n boolean done;\n \n while( jump>1 ){\n jump /= 2;\n \n do {\n done = true;\n \n for( int j = 0; j<(length-jump); j++ ){\n int i = j + jump;\n \n if( !areCorrectlyOrdered( indices[j], indices[i] ) ){\n // Things are in the wrong order, swap them and step back.\n int tmp = indices[i];\n indices[i] = indices[j];\n indices[j] = tmp;\n done = false;\n }\n }\n } while( !done );\n }\n \n // TODO: integrate this with the stuff above.\n for( int i=1; i<length; i++ ){\n commonality[i] = commonLength( indices[i-1], indices[i] );\n }\n commonality[0] = -1;\n }", "public void sort() {\n Collections.sort(jumpers, new SortJumperByPoints()); \n }", "private static void sort2(int[] a) {\n for(int i=0; i<a.length; i++){\n //find smallest from i to end \n int minIndex=i;\n for(int j=i ; j<a.length; j++)\n if(a[j]<a[minIndex])\n minIndex=j;\n //swap\n int t = a[i];\n a[i] = a[minIndex];\n a[minIndex] = t;\n }\n }", "void sortV();", "private void sortAndEmitUpTo(double maxX)\n {\n /**\n * Heuristic: Check if there are no obvious segments to process\n * and skip sorting & processing if so\n * \n * This is a heuristic only.\n * There may be new segments at the end of the buffer\n * which are less than maxx. But this should be rare,\n * and they will all get processed eventually.\n */\n if (bufferHeadMaxX() >= maxX)\n return;\n \n // this often sorts more than are going to be processed.\n //TODO: Can this be done faster? eg priority queue?\n \n // sort segs in buffer, since they arrived in potentially unsorted order\n Collections.sort(segmentBuffer, ORIENT_COMPARATOR);\n int i = 0;\n int n = segmentBuffer.size();\n LineSeg prevSeg = null;\n \n //reportProcessed(maxX);\n \n while (i < n) {\n LineSeg seg = (LineSeg) segmentBuffer.get(i);\n if (seg.getMaxX() >= maxX)\n \tbreak;\n \n i++;\n if (removeDuplicates) {\n if (prevSeg != null) {\n // skip this segment if it is a duplicate\n if (prevSeg.equals(seg)) {\n // merge in side label of dup seg\n prevSeg.merge(seg);\n continue;\n }\n }\n prevSeg = seg;\n }\n // remove interior segments (for dissolving)\n if (removeInteriorSegs\n && seg.getTopoLabel() == TopologyLabel.BOTH_INTERIOR)\n continue;\n \n segSink.process(seg);\n }\n //System.out.println(\"SegmentStreamSorter: total segs = \" + n + \", processed = \" + i);\n removeSegsFromBuffer(i);\n }", "public void sort(){\n for(int i = array.length-1;i >= 0;i--){\n sink(i);\n }\n while(size > 0){\n swap(0, size-1);\n size -= 1;\n sink(0);\n }\n }", "public static void main(String[] args) throws FileNotFoundException{\n int[] quicktimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes1[i] = (int)endTime;\n }\n \n int[] mergetimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes1[i] = (int)endTime;\n }\n \n int[] heaptimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes1[i] = (int)endTime;\n }\n \n int[] quicktimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[i] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes2[i] = (int)endTime;\n }\n \n int[] mergetimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes2[i] = (int)endTime;\n }\n \n int[] heaptimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes2[i] = (int)endTime;\n }\n \n int[] quicktimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes3[i] = (int)endTime;\n }\n \n int[] mergetimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes3[i] = (int)endTime;\n }\n \n int[] heaptimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes3[i] = (int)endTime;\n }\n \n int[] quicktimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes4[i] = (int)endTime;\n }\n \n int[] mergetimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes4[i] = (int)endTime;\n }\n \n int[] heaptimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes4[i] = (int)endTime;\n }\n \n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE REVERSE SORTED ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes5[i] = (int)endTime;\n }\n \n int[] mergetimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes5[i] = (int)endTime;\n }\n \n int[] heaptimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes5[i] = (int)endTime;\n }\n \n int[] quicktimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes6[i] = (int)endTime;\n }\n \n int[] mergetimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes6[i] = (int)endTime;\n }\n \n int[] heaptimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes6[i] = (int)endTime;\n }\n \n int[] quicktimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes7[i] = (int)endTime;\n }\n \n int[] mergetimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes7[i] = (int)endTime;\n }\n \n int[] heaptimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes7[i] = (int)endTime;\n }\n \n int[] quicktimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes8[i] = (int)endTime;\n }\n \n int[] mergetimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes8[i] = (int)endTime;\n }\n \n int[] heaptimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes8[i] = (int)endTime;\n }\n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE RANDOM ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes9[i] = (int)endTime;\n }\n \n int[] mergetimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes9[i] = (int)endTime;\n }\n \n int[] heaptimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes9[i] = (int)endTime;\n }\n \n int[] quicktimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes10[i] = (int)endTime;\n }\n \n int[] mergetimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes10[i] = (int)endTime;\n }\n \n int[] heaptimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes10[i] = (int)endTime;\n }\n \n int[] quicktimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes11[i] = (int)endTime;\n }\n \n int[] mergetimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes11[i] = (int)endTime;\n }\n \n int[] heaptimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);;\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes11[i] = (int)endTime;\n }\n \n int[] quicktimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes12[i] = (int)endTime;\n }\n \n int[] mergetimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes12[i] = (int)endTime;\n }\n \n int[] heaptimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes12[i] = (int)endTime;\n }\n \n //PRINTING THE RESULTS OUT INTO FILE\n File f = new File(\"Results.txt\");\n FileOutputStream fos = new FileOutputStream(f);\n PrintWriter pw = new PrintWriter(fos);\n pw.println(\"SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes1), medVal(quicktimes1), varVal(quicktimes1, meanVal(quicktimes1)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes2), medVal(quicktimes2), varVal(quicktimes2, meanVal(quicktimes2)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes3), medVal(quicktimes3), varVal(quicktimes3, meanVal(quicktimes3)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes4), medVal(quicktimes4), varVal(quicktimes4, meanVal(quicktimes4)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes1), medVal(mergetimes1), varVal(mergetimes1, meanVal(mergetimes1)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes2), medVal(mergetimes2), varVal(mergetimes2, meanVal(mergetimes2)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes3), medVal(mergetimes3), varVal(mergetimes3, meanVal(mergetimes3)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes4), medVal(mergetimes4), varVal(mergetimes4, meanVal(mergetimes4)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes1), medVal(heaptimes1), varVal(heaptimes1, meanVal(heaptimes1)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes2), medVal(heaptimes2), varVal(heaptimes2, meanVal(heaptimes2)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes3), medVal(heaptimes3), varVal(heaptimes3, meanVal(heaptimes3)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes4), medVal(heaptimes4), varVal(heaptimes4, meanVal(heaptimes4)));\n pw.println(\"REVERSE SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes5), medVal(quicktimes5), varVal(quicktimes5, meanVal(quicktimes5)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes6), medVal(quicktimes6), varVal(quicktimes6, meanVal(quicktimes6)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes7), medVal(quicktimes7), varVal(quicktimes7, meanVal(quicktimes7)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes8), medVal(quicktimes8), varVal(quicktimes8, meanVal(quicktimes8)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes5), medVal(mergetimes5), varVal(mergetimes5, meanVal(mergetimes5)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes6), medVal(mergetimes6), varVal(mergetimes6, meanVal(mergetimes6)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes7), medVal(mergetimes7), varVal(mergetimes7, meanVal(mergetimes7)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes8), medVal(mergetimes8), varVal(mergetimes8, meanVal(mergetimes8)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes5), medVal(heaptimes5), varVal(heaptimes5, meanVal(heaptimes5)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes6), medVal(heaptimes6), varVal(heaptimes6, meanVal(heaptimes6)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes7), medVal(heaptimes7), varVal(heaptimes7, meanVal(heaptimes7)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes8), medVal(heaptimes8), varVal(heaptimes8, meanVal(heaptimes8)));\n pw.println(\"RANDOM ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes9), medVal(quicktimes9), varVal(quicktimes9, meanVal(quicktimes9)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes10), medVal(quicktimes10), varVal(quicktimes10, meanVal(quicktimes10)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes11), medVal(quicktimes11), varVal(quicktimes11, meanVal(quicktimes11)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes12), medVal(quicktimes12), varVal(quicktimes12, meanVal(quicktimes12)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes9), medVal(mergetimes9), varVal(mergetimes9, meanVal(mergetimes9)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes10), medVal(mergetimes10), varVal(mergetimes10, meanVal(mergetimes10)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes11), medVal(mergetimes11), varVal(mergetimes11, meanVal(mergetimes11)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes12), medVal(mergetimes12), varVal(mergetimes12, meanVal(mergetimes12)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes9), medVal(heaptimes9), varVal(heaptimes9, meanVal(heaptimes9)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes10), medVal(heaptimes10), varVal(heaptimes10, meanVal(heaptimes10)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes11), medVal(heaptimes11), varVal(heaptimes11, meanVal(heaptimes11)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes12), medVal(heaptimes12), varVal(heaptimes12, meanVal(heaptimes12)));\n pw.close();\n }", "public void sort() {\r\n lang.setInteractionType(Language.INTERACTION_TYPE_AVINTERACTION);\r\n\r\n int nrElems = array.getLength();\r\n ArrayMarker iMarker = null, jMarker = null;\r\n // highlight method header\r\n code.highlight(\"header\");\r\n lang.nextStep();\r\n\r\n // check if array is null\r\n code.toggleHighlight(\"header\", \"ifNull\");\r\n incrementNrComparisons(); // if null\r\n lang.nextStep();\r\n\r\n // switch to variable declaration\r\n\r\n code.toggleHighlight(\"ifNull\", \"variables\");\r\n lang.nextStep();\r\n\r\n // initialize i\r\n code.toggleHighlight(\"variables\", \"initializeI\");\r\n iMarker = installArrayMarker(\"iMarker\", array, nrElems - 1);\r\n incrementNrAssignments(); // i =...\r\n lang.nextStep();\r\n\r\n // switch to outer loop\r\n code.unhighlight(\"initializeI\");\r\n\r\n while (iMarker.getPosition() >= 0) {\r\n code.highlight(\"outerLoop\");\r\n lang.nextStep();\r\n\r\n code.toggleHighlight(\"outerLoop\", \"innerLoop\");\r\n if (jMarker == null) {\r\n jMarker = installArrayMarker(\"jMarker\", array, 0);\r\n } else\r\n jMarker.move(0, null, DEFAULT_TIMING);\r\n incrementNrAssignments();\r\n while (jMarker.getPosition() <= iMarker.getPosition() - 1) {\r\n incrementNrComparisons();\r\n lang.nextStep();\r\n code.toggleHighlight(\"innerLoop\", \"if\");\r\n array.highlightElem(jMarker.getPosition() + 1, null, null);\r\n array.highlightElem(jMarker.getPosition(), null, null);\r\n incrementNrComparisons();\r\n lang.nextStep();\r\n\r\n if (array.getData(jMarker.getPosition()) > array.getData(jMarker\r\n .getPosition() + 1)) {\r\n // swap elements\r\n code.toggleHighlight(\"if\", \"swap\");\r\n array.swap(jMarker.getPosition(), jMarker.getPosition() + 1, null,\r\n DEFAULT_TIMING);\r\n incrementNrAssignments(3); // swap\r\n lang.nextStep();\r\n code.unhighlight(\"swap\");\r\n } else {\r\n code.unhighlight(\"if\");\r\n }\r\n // clean up...\r\n // lang.nextStep();\r\n code.highlight(\"innerLoop\");\r\n array.unhighlightElem(jMarker.getPosition(), null, null);\r\n array.unhighlightElem(jMarker.getPosition() + 1, null, null);\r\n if (jMarker.getPosition() <= iMarker.getPosition())\r\n jMarker.move(jMarker.getPosition() + 1, null, DEFAULT_TIMING);\r\n incrementNrAssignments(); // j++ will always happen...\r\n }\r\n lang.nextStep();\r\n code.toggleHighlight(\"innerLoop\", \"decrementI\");\r\n array.highlightCell(iMarker.getPosition(), null, DEFAULT_TIMING);\r\n if (iMarker.getPosition() > 0)\r\n iMarker.move(iMarker.getPosition() - 1, null, DEFAULT_TIMING);\r\n else\r\n iMarker.moveBeforeStart(null, DEFAULT_TIMING);\r\n incrementNrAssignments();\r\n lang.nextStep();\r\n code.unhighlight(\"decrementI\");\r\n }\r\n\r\n // some interaction...\r\n TrueFalseQuestionModel tfQuestion = new TrueFalseQuestionModel(\"tfQ\");\r\n tfQuestion.setPrompt(\"Did this work?\");\r\n tfQuestion.setPointsPossible(1);\r\n tfQuestion.setGroupID(\"demo\");\r\n tfQuestion.setCorrectAnswer(true);\r\n tfQuestion.setFeedbackForAnswer(true, \"Great!\");\r\n tfQuestion.setFeedbackForAnswer(false, \"argh!\");\r\n lang.addTFQuestion(tfQuestion);\r\n\r\n lang.nextStep();\r\n HtmlDocumentationModel link = new HtmlDocumentationModel(\"link\");\r\n link.setLinkAddress(\"http://www.heise.de\");\r\n lang.addDocumentationLink(link);\r\n\r\n lang.nextStep();\r\n MultipleChoiceQuestionModel mcq = new MultipleChoiceQuestionModel(\"mcq\");\r\n mcq.setPrompt(\"Which AV system can handle dynamic rewind?\");\r\n mcq.setGroupID(\"demo\");\r\n mcq.addAnswer(\"GAIGS\", -1, \"Only static images, not dynamic\");\r\n mcq.addAnswer(\"Animal\", 1, \"Good!\");\r\n mcq.addAnswer(\"JAWAA\", -2, \"Not at all!\");\r\n lang.addMCQuestion(mcq);\r\n\r\n lang.nextStep();\r\n MultipleSelectionQuestionModel msq = new MultipleSelectionQuestionModel(\r\n \"msq\");\r\n msq.setPrompt(\"Which of the following AV systems can handle interaction?\");\r\n msq.setGroupID(\"demo\");\r\n msq.addAnswer(\"Animal\", 2, \"Right - I hope!\");\r\n msq.addAnswer(\"JHAVE\", 2, \"Yep.\");\r\n msq.addAnswer(\"JAWAA\", 1, \"Only in Guido's prototype...\");\r\n msq.addAnswer(\"Leonardo\", -1, \"Nope.\");\r\n lang.addMSQuestion(msq);\r\n lang.nextStep();\r\n // Text text = lang.newText(new Offset(10, 20, \"array\", \"S\"), \"Hi\", \"hi\",\r\n // null);\r\n // lang.nextStep();\r\n }", "public void shellSort(){\n int increment = list.size() / 2;\n while (increment > 0) {\n for (int i = increment; i < list.size(); i++) {\n int j = i;\n int temp = list.get(i);\n while (j >= increment && list.get(j - increment) > temp) {\n list.set(j, list.get(j - increment));\n j = j - increment;\n }\n list.set(j, temp);\n }\n if (increment == 2) {\n increment = 1;\n } else {\n increment *= (5.0 / 11);\n }\n }\n }", "public void sort() {\n\t\tif (data.size() < 10) {\n\t\t\tbubbleSort();\n\t\t\tSystem.out.println(\"Bubble Sort\");\n\t\t} else {\n\t\t\tquickSort();\n\t\t\tSystem.out.println(\"Quick Sort\");\n\t\t}\n\t}", "public void insertReorderBarrier() {\n\t\t\n\t}", "private static void allSorts(int[] array) {\n\t\tSystem.out.printf(\"%12d\",array.length);\n\t\tint[] temp;\n\t\tStopWatch1 timer;\n\t\t\n\t\t//Performs bubble sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.bubbleSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"\\tSelection\\tBubble\\tInsertion\\tCollections\\tQuick\\tinPlaceQuick\\tMerge\");\r\n\t\tfor (int n = 1000; n <= 7000; n += 500) {\r\n\t\t\tAPArrayList<Double> lists = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listb = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listi = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listc = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listipq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listm = new APArrayList<Double>();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tDouble val = Math.random();\r\n\t\t\t\tlists.add(val);\r\n\t\t\t\tlistb.add(val);\r\n\t\t\t\tlisti.add(val);\r\n\t\t\t\tlistc.add(val);\r\n\t\t\t\tlistq.add(val);\r\n\t\t\t\tlistipq.add(val);\r\n\t\t\t\tlistm.add(val);\r\n\t\t\t}\r\n\r\n\t\t\tlong selStartTime = System.nanoTime();\r\n\t\t\tlists.selectionSort();\r\n\t\t\tlong selEndTime = System.nanoTime();\r\n\t\t\tlong selSortTime = selEndTime - selStartTime;\r\n\t\t\tlists.clear();\r\n\t\t\t\r\n\t\t\tlong bubStartTime = System.nanoTime();\r\n\t\t\tlistb.bubbleSort();\r\n\t\t\tlong bubEndTime = System.nanoTime();\r\n\t\t\tlong bubSortTime = bubEndTime - bubStartTime;\r\n\t\t\tlistb.clear();\r\n\t\t\t\r\n\t\t\tlong insStartTime = System.nanoTime();\r\n\t\t\tlisti.insertionSort();\r\n\t\t\tlong insEndTime = System.nanoTime();\r\n\t\t\tlong insSortTime = insEndTime - insStartTime;\r\n\t\t\tlisti.clear();\r\n\t\t\t\r\n\t\t\tlong CollStartTime = System.nanoTime();\r\n\t\t\tlistc.sort();\r\n\t\t\tlong CollEndTime = System.nanoTime();\r\n\t\t\tlong CollSortTime = CollEndTime - CollStartTime;\r\n\t\t\tlistc.clear();\r\n\t\t\t\r\n\t\t\tlong quickStartTime = System.nanoTime();\r\n\t\t\tlistq.simpleQuickSort();\r\n\t\t\tlong quickEndTime = System.nanoTime();\r\n\t\t\tlong quickSortTime = quickEndTime - quickStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\tlong inPlaceQuickStartTime = System.nanoTime();\r\n\t\t\tlistipq.inPlaceQuickSort();\r\n\t\t\tlong inPlaceQuickEndTime = System.nanoTime();\r\n\t\t\tlong inPlaceQuickSortTime = inPlaceQuickEndTime - inPlaceQuickStartTime;\r\n\t\t\tlistipq.clear();\r\n\t\t\t\r\n\t\t\tlong mergeStartTime = System.nanoTime();\r\n\t\t\tlistm.mergeSort();\r\n\t\t\tlong mergeEndTime = System.nanoTime();\r\n\t\t\tlong mergeSortTime = mergeEndTime - mergeStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(n + \"\\t\" + selSortTime + \"\\t\" + bubSortTime + \"\\t\" + insSortTime + \"\\t\" + CollSortTime + \"\\t\" + quickSortTime + \"\\t\" + inPlaceQuickSortTime + \"\\t\" + mergeSortTime);\r\n\t\t}\r\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic void sort() {\n\t\t\n\t\t// create maxHeap\n\t\tHeap<E> maxHeap = new MaxHeap<E>(arr);\n\t\t\n\t\telapsedTime = System.nanoTime(); // get time of start\n\t\t\n\t\tfor (int i = length - 1; i > 0; i--) {\n\n\t\t\tmaxHeap.swap(arr, 0, i);\n\t\t\tmaxHeap.heapSize--;\n\t\t\t((MaxHeap) maxHeap).maxHeapify(arr, 0);\n\n\t\t}\n\t\t\n\t\telapsedTime = System.nanoTime() - elapsedTime; // get elapsed time\n\t\t\n\t\tprint(); // print sorted array\n\t\tprintElapsedTime(); // print elapsed time\n\t\t\n\t\t\n\t}", "private void collapseIgloo() {\n blocks.sort(Comparator.comparing(a -> a.center.getY()));\n\n double minDistance, distance;\n Point3D R = new Point3D(0, -1, 0);\n for (int i = 0; i < blocks.size(); i++) {\n minDistance = Double.MAX_VALUE;\n for (int j = i - 1; j >= 0; j--) {\n if (boundingSpheresIntersect(blocks.get(i), blocks.get(j))) {\n distance = minDistance(blocks.get(i), blocks.get(j), R);\n if (distance < minDistance) {\n minDistance = distance;\n }\n }\n }\n if (minDistance != Double.MAX_VALUE) {\n blocks.get(i).move(R.multiply(minDistance));\n }\n }\n }", "public void sortAllRows(){\n\t\t/* code goes here */ \n\t\t\n\t\t\n\t\t//WHY SHOULD THEY BE SORTED LIKE THE EXAMPLE SAYS???????\n\t\t\n\t}", "private void sortGallery_10_Runnable() {\r\n\r\n\t\tif (_allPhotos == null || _allPhotos.length == 0) {\r\n\t\t\t// there are no files\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfinal GalleryMT20Item[] virtualGalleryItems = _galleryMT20.getAllVirtualItems();\r\n\t\tfinal int virtualSize = virtualGalleryItems.length;\r\n\r\n\t\tif (virtualSize == 0) {\r\n\t\t\t// there are no items\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// sort photos with new sorting algorithm\r\n\t\tArrays.sort(_sortedAndFilteredPhotos, getCurrentComparator());\r\n\r\n\t\tupdateUI_GalleryItems(_sortedAndFilteredPhotos, null);\r\n\t}", "private static long sortingTime(String[] array, boolean isStandardSort) {\n long start = System.currentTimeMillis(); // starting time\n if (isStandardSort) \n Arrays.sort(array);\n selectionSort(array);\n return System.currentTimeMillis() - start; // measure time consumed\n }", "@Override // java.util.Comparator\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public int compare(androidx.recyclerview.widget.GapWorker.Task r6, androidx.recyclerview.widget.GapWorker.Task r7) {\n /*\n r5 = this;\n androidx.recyclerview.widget.GapWorker$Task r6 = (androidx.recyclerview.widget.GapWorker.Task) r6\n androidx.recyclerview.widget.GapWorker$Task r7 = (androidx.recyclerview.widget.GapWorker.Task) r7\n androidx.recyclerview.widget.RecyclerView r5 = r6.view\n r0 = 0\n r1 = 1\n if (r5 != 0) goto L_0x000c\n r2 = r1\n goto L_0x000d\n L_0x000c:\n r2 = r0\n L_0x000d:\n androidx.recyclerview.widget.RecyclerView r3 = r7.view\n if (r3 != 0) goto L_0x0013\n r3 = r1\n goto L_0x0014\n L_0x0013:\n r3 = r0\n L_0x0014:\n r4 = -1\n if (r2 == r3) goto L_0x001d\n if (r5 != 0) goto L_0x001b\n L_0x0019:\n r0 = r1\n goto L_0x0037\n L_0x001b:\n r0 = r4\n goto L_0x0037\n L_0x001d:\n boolean r5 = r6.immediate\n boolean r2 = r7.immediate\n if (r5 == r2) goto L_0x0026\n if (r5 == 0) goto L_0x0019\n goto L_0x001b\n L_0x0026:\n int r5 = r7.viewVelocity\n int r1 = r6.viewVelocity\n int r5 = r5 - r1\n if (r5 == 0) goto L_0x002f\n L_0x002d:\n r0 = r5\n goto L_0x0037\n L_0x002f:\n int r5 = r6.distanceToItem\n int r6 = r7.distanceToItem\n int r5 = r5 - r6\n if (r5 == 0) goto L_0x0037\n goto L_0x002d\n L_0x0037:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: androidx.recyclerview.widget.GapWorker.AnonymousClass1.compare(java.lang.Object, java.lang.Object):int\");\n }", "private static void performSort(TestApp testApp) {\n testApp.testPartition();\n\n /*\n Date end = new Date();\n System.out.println(\"Sort ended @ \" + end.getTime());\n System.out.println(\"Total time = \" + (end.getTime() - start.getTime())/1000.0 + \" seconds...\");\n */\n }", "public void sort() {\n\t\tfor (int i = 1; i < this.dataModel.getLength(); i++) {\n\t\t\tfinal int x = this.dataModel.get(i);\n\n\t\t\t// Find location to insert using binary search\n\t\t\tfinal int j = Math.abs(this.dataModel.binarySearch(0, i, x) + 1);\n\n\t\t\t// Shifting array to one location right\n\t\t\tthis.dataModel.arrayCopy(j, j + 1, i - j);\n\n\t\t\t// Placing element at its correct location\n\t\t\tthis.dataModel.set(j, x);\n\t\t\tthis.repaint(this.count++);\n\t\t}\n\t}", "public void sortieBloc() {\n this.tableLocaleCourante = this.tableLocaleCourante.getTableLocalPere();\n }", "private static void fourSorts(int[] array) {\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\t//Performs insertion sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.insertionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\n\t\t//Performs selection sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.selectionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t}", "private void orderSegments() {\n //insert numOrder for the db\n int i = 0;\n for(TransportSegmentLogic transportSegment: transportSegments){\n transportSegment.setOrder(i);\n i++;\n }\n\n\n\n /*int i = 0;\n int j = 1;\n\n\n TransportSegmentLogic swapSegment;\n\n while(j < transportSegments.size()){\n if(transportSegments.get(j).getOrigin().equals(transportSegments.get(i).getDestination())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(i +1, swapSegment);\n i = i + 1;\n j = i + 1;\n }\n j++;\n }\n\n j = transportSegments.size() -1;\n\n while(j > i){\n if(transportSegments.get(j).getDestination().equals(transportSegments.get(0).getOrigin())){\n swapSegment = transportSegments.get(j);\n transportSegments.remove(swapSegment);\n transportSegments.add(0, swapSegment);\n i = i + 1;\n j = transportSegments.size();\n }\n j--;\n } */\n }", "public void run()\n { // checking for appropriate sorting algorithm\n \n if(comboAlgorithm.equals(\"Shell Sort\"))\n {\n this.shellSort(randInt);\n }\n \n if(comboAlgorithm.equals(\"Selection Sort\"))\n {\n this.selectionSort(randInt);\n }\n \n if(comboAlgorithm.equals(\"Insertion Sort\"))\n {\n this.insertionSort(randInt);\n }\n if(comboAlgorithm.equals(\"Bubble Sort\"))\n {\n this.bubbleSort(randInt);\n }\n \n }", "private synchronized void freshSort(){\n Process[] newQueue = new Process[pros.proSize()];\n for(int i = 0; i <queue.length; i++){\n if(pros.isInList(queue[i])){\n newQueue[i] = queue[i];\n }\n }\n queue = new Process[pros.proSize()];\n queue = newQueue;\n }", "public void sortFullList()\r\n {\r\n if (log.isDebugEnabled())\r\n {\r\n log.debug(\"[\" + this.id + \"] sorting full data\");\r\n }\r\n sortRowList(this.getRowListFull());\r\n }", "private void updateFilteringAndSorting() {\n log.debug(\"update filtering of adapter called\");\n if (lastUsedComparator != null) {\n sortWithoutNotify(lastUsedComparator, lastUsedAsc);\n }\n Filter filter = getFilter();\n if (filter instanceof UpdateableFilter){\n ((UpdateableFilter)filter).updateFiltering();\n }\n }", "private static void evaluateMergesortVogellaThreaded() {\n\n // LOGGER.info(\"evaluating parallel mergesort with Java Threads based on the Vogella version\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort\n msVogellaJThreads.sort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: Java Threads (Vogella) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "public void sortSpeeds() {\n\n//\t\tSystem.out.println(\"BEGIN: SORT SPEEDS\");\n\t\tthis.printMoves();\n\n\t\tArrayList<Move> temp = new ArrayList<Move>();\n\t\tint i = 1;\n\t\tint x = 0;\n\t\tboolean y = true;\n\n\t\ttemp.add(niceMoves.get(0));\n\t\tint size = niceMoves.size();\n\n\t\twhile (i < niceMoves.size()) {\n\n//\t\t\tSystem.out.println(\"Reiterating.\");\n\t\t\ty = true;\n\n\t\t\twhile (y) {\n\n\t\t\t\t//System.out.println(\"I: \" + i + \" X: \" + x);\n\n\t\t\t\ttry {\n\n\t\t\t\t\tif (niceMoves.get(i).getSpeed() > temp.get(x).getCalcedSpeed()) {\n\n//\t\t\t\t\t\tSystem.out.println(\"Adding \" + niceMoves.get(i).getCaster() + \" to spot \" + x);\n\t\t\t\t\t\ttemp.add(x, niceMoves.get(i));\n\t\t\t\t\t\ty = false;\n\t\t\t\t\t}\n\t\t\t\t\t//X has cycled through temp, meaning nicemoves.i should be added to the end\n\t\t\t\t\t//The only way to check for this is to let it overflow lol\n\t\t\t\t} catch (Exception E) {\n//\t\t\t\t\tSystem.out.println(\"Adding \" + niceMoves.get(i).getCaster() + \" to spot \" + x);\n\t\t\t\t\ttemp.add(x, niceMoves.get(i));\n\t\t\t\t\ty = false;\n\n\t\t\t\t}\n\n\t\t\t\tx += 1;\n\t\t\t}\n\n\t\t\ti += 1;\n\t\t\tx = 0;\n\t\t}\n\n\t\tniceMoves = temp;\n\n//\t\tSystem.out.println();\n//\t\tSystem.out.println(\"Sorting Complete! New Order: \");\n//\t\tthis.printMoves();\n\t\t//end of sort speeds\n\t}", "public void sort() {\r\n // sort the process variables\r\n Arrays.sort(pvValues, categoryComparator);\r\n fireTableDataChanged();\r\n }", "public void sort() throws IOException {\n for(int i = 0; i < 32; i++)\n {\n if(i%2 == 0){\n filePointer = file;\n onePointer = one;\n }else{\n filePointer = one;\n onePointer = file;\n }\n filePointer.seek(0);\n onePointer.seek(0);\n zero.seek(0);\n zeroCount = oneCount = 0;\n for(int j = 0; j < totalNumbers; j++){\n int n = filePointer.readInt();\n sortN(n,i);\n }\n //Merging\n onePointer.seek(oneCount*4);\n zero.seek(0L);\n for(int j = 0; j < zeroCount; j++){\n int x = zero.readInt();\n onePointer.writeInt(x);\n }\n //One is merged\n }\n }", "void sortUI();", "private static long sortingTime(double[] array, boolean isStandardSort) {\n long start = 0; // starting time\n if (isStandardSort) { \n start = System.currentTimeMillis(); \n Arrays.sort(array);\n } else {\t\n start = System.currentTimeMillis();\n selectionSort(array);\n }\n return System.currentTimeMillis() - start; // measure time consumed\n }", "private void compressBlocks(final int phaseId) {\n // 1. uncross all crossing blocks: O(|G|)\n popBlocks(head -> head.isTerminal() && head.getPhaseId() < phaseId,\n tail -> tail.isTerminal() && tail.getPhaseId() < phaseId);\n\n List<BlockRecord<N, S>> shortBlockRecords = new ArrayList<>();\n List<BlockRecord<N, S>> longBlockRecords = new ArrayList<>();\n\n // 2. get all blocks: O(|G|)\n slp.getProductions().stream().forEach(rule -> consumeBlocks(rule.getRight(), shortBlockRecords::add, longBlockRecords::add, letter -> true));\n\n // 3.1 sort short blocks using RadixSort: O(|G|)\n sortBlocks(shortBlockRecords);\n\n // 3.2 sort long blocks O((n+m) log(n+m))\n Collections.sort(longBlockRecords, blockComparator);\n List<BlockRecord<N, S>> blockRecords = mergeBlocks(shortBlockRecords, longBlockRecords);\n\n // compress blocks\n BlockRecord<N, S> lastRecord = null;\n S letter = null;\n\n // 4. compress blocks: O(|G|)\n for(BlockRecord<N, S> record : blockRecords) {\n\n // check when it is the correct time to introduce a fresh letter\n if(lastRecord == null || !lastRecord.equals(record)) {\n letter = terminalAlphabet.createTerminal(phase, 1L, record.node.getElement().getLength() * record.block.getLength(), record.block);\n lastRecord = record;\n }\n replaceBlock(record, letter);\n }\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testAdaptiveInsertionSort() {\n //Test adaptiveness of completely ordered sort\n\n //Generate sorted array\n toSort = randArrDuplicates(MAX_ARR_SIZE, new Random(2110));\n Arrays.parallelSort(toSort, comp);\n sortedInts = cloneArr(toSort);\n\n comp.resetCount();\n Sorting.insertionSort(sortedInts, comp);\n int numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n //Should require only 1 pass through array, for n-1 comparisons\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= MAX_ARR_SIZE - 1);\n\n //Check adaptiveness with 1 item out-of-order\n\n //Set up list\n toSort = new IntPlus[6];\n for (int i = 0; i < toSort.length; i++) {\n toSort[i] = new IntPlus(2 * i);\n }\n toSort[3] = new IntPlus(-1);\n\n sortedInts = cloneArr(toSort);\n\n /*\n Initial Array: [0, 2, 4, -1, 8, 10]\n Should require 7 comparisons to sort\n */\n comp.resetCount();\n Sorting.insertionSort(sortedInts, comp);\n numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= 7);\n }", "public static void main(String[] args) {\n\r\n\t\t int[] arr = generateRandomArrayWithRandomNum();\r\n\t int checksSelectionSort = 0;\r\n\t int checksBubbleSort = 0;\r\n\t int checksMergeSort = 0;\r\n\t int checksQuickSort = 0;\r\n\t int[] copyArr = new int[1000];\r\n\t for (int x = 0; x < 20; x++) {\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksSelectionSort += doSelectionSort(arr);\r\n\r\n\t \r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksBubbleSort += bubbleSort(copyArr);\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksMergeSort += new mergeSort().sort(arr);\r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksQuickSort += new quickSort().sort(copyArr);\r\n\t }\r\n\t System.out.println(\"Analysis Of Sorting algorithms \");\r\n\t System.out.println(\"Selection Sort : \"+checksSelectionSort/20);\r\n\t System.out.println(\"Bubble Sort : \"+checksBubbleSort/20);\r\n\t System.out.println(\"Merge Sort : \"+checksMergeSort/20);\r\n\t System.out.println(\"Quick Sort : \"+checksQuickSort/20);\r\n\r\n\t \r\n\t }", "public void sort(){\n ListNode t, x, b = new ListNode(null, null);\n while (firstNode != null){\n t = firstNode; firstNode = firstNode.nextNode;\n for (x = b; x.nextNode != null; x = x.nextNode) //b is the first node of the new sorted list\n if (cmp.compare(x.nextNode.data, t.data) > 0) break;\n t.nextNode = x.nextNode; x.nextNode = t;\n if (t.nextNode==null) lastNode = t;\n }\n firstNode = b.nextNode;\n }" ]
[ "0.719662", "0.6253113", "0.6209965", "0.60641325", "0.6062344", "0.60514784", "0.6039714", "0.6020895", "0.6018125", "0.6015914", "0.59652436", "0.5950544", "0.5932971", "0.5900926", "0.58313674", "0.5802383", "0.5788351", "0.57315594", "0.56716985", "0.56670487", "0.5629508", "0.5613598", "0.5612099", "0.5611703", "0.5592451", "0.55917716", "0.5588461", "0.55848163", "0.5554659", "0.5554079", "0.5549377", "0.55441636", "0.5537118", "0.5532984", "0.5532803", "0.5532803", "0.55292463", "0.55275965", "0.5522279", "0.5519424", "0.551642", "0.5511716", "0.55057514", "0.5502017", "0.54939586", "0.5476436", "0.54741585", "0.5473029", "0.5441123", "0.54384875", "0.54355913", "0.5428854", "0.5424462", "0.5404587", "0.54042906", "0.5398141", "0.53981346", "0.5394633", "0.5393649", "0.53902", "0.538549", "0.53852785", "0.5384685", "0.53686666", "0.5345649", "0.5341686", "0.53390706", "0.53294265", "0.53148216", "0.53070915", "0.53057426", "0.5305577", "0.5304475", "0.5292254", "0.52918285", "0.5290364", "0.5287865", "0.52842516", "0.52834797", "0.52813774", "0.5267899", "0.52645266", "0.5263191", "0.5262101", "0.5261538", "0.5259155", "0.52528334", "0.5249513", "0.524533", "0.5243381", "0.5239559", "0.5239141", "0.5237668", "0.52372295", "0.5224401", "0.5223193", "0.5222278", "0.522134", "0.5221159", "0.5217173", "0.52171165" ]
0.0
-1
gets image data from an episode
public List<PageInfoDTO> getEpisode(String url, int episodeNumber, Long cartoonId) throws IOException { String urlToEpisode = url + episodeNumber + "/?all"; Document document = Jsoup.connect(urlToEpisode).get(); Elements pictures = document.select("img"); int pageNumber = 0; ArrayList<PageInfoDTO> pages = new ArrayList<>(); for(Element pictureElement : pictures){ PageInfoDTO pageInfoDTO = new PageInfoDTO(); pageInfoDTO.setCartoonId(cartoonId); pageInfoDTO.setPageNumber(pageNumber); pageInfoDTO.setPageUrl(pictureElement.attr("src")); pages.add(pageInfoDTO); pageNumber++; } return pages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.protobuf.ByteString getImgData(int index);", "@Override\r\n\tpublic Image getImg(int code) {\n\t\treturn seasons[myTime.getDate()[1]][code].getImage();\r\n\t}", "byte[] getRecipeImage(CharSequence query);", "java.lang.String getImage();", "private byte[] getImageData(DatagramPacket receivedPacket) {\r\n final byte[] udpData = receivedPacket.getData();\r\n // The camera adds some kind of header to each packet, which we need to ignore\r\n int videoDataStart = getImageDataStart(receivedPacket, udpData);\r\n return Arrays.copyOfRange(udpData, videoDataStart, receivedPacket.getLength());\r\n }", "Object getChannelData() {\r\n return imageData;\r\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"pic\", new DataPart(imagename + \".jpg\", getFileDataFromDrawable(bitmap)));\n return params;\n }", "public BufferedImage readImage(String id) {\n BufferedImage bufImg = null;\n try {\n PreparedStatement pstmt = conn.prepareStatement(\n \"SELECT photo FROM vehicles WHERE veh_reg_no = ?\");\n pstmt.setString(1, id);\n System.out.println(pstmt); // for debugging\n ResultSet rset = pstmt.executeQuery();\n // Only one result expected\n rset.next();\n // Read image via InputStream\n InputStream in = rset.getBinaryStream(\"photo\"); \n // Decode the inputstream as BufferedImage\n bufImg = ImageIO.read(in); \n } catch(Exception ex) {\n ex.printStackTrace();\n }\n return bufImg;\n }", "public Image getQuaverRest();", "String getItemImage();", "String getImage();", "public void getImage(){\n Cursor c = db.rawQuery(\"SELECT * FROM Stories\",null);\n if(c.moveToNext()){\n byte[] image = c.getBlob(0);\n Bitmap bmp = BitmapFactory.decodeByteArray(image,0,image.length);\n }\n}", "private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }", "public String getImage() { return image; }", "private void getSampleImage() {\n\t\t_helpingImgPath = \"Media\\\\\"+_camType.toString()+_downStream.toString()+_camProfile.toString()+\".bmp\";\n//\t\tswitch( _downStream ){\n//\t\tcase DownstreamPage.LEVER_NO_DOWNSTREAM:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.LEVER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_OUTER_CAM:\n//\t\t\t\tbreak;\t\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_CRANK:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_FOUR_JOIN:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_PUSHER_TUGS:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_CRANK:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.SLIDER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_OUTER_CAM:\n//\t\t\t\tbreak;\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_DOUBLE_SLIDE:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_NO_DOWNSTREAM:\n//\t\t\tbreak;\n//\t\t}\n\t\t\n\t}", "private void decodeImageData() throws IOException {\n\t\t\tfinal int nullCode = -1;\n\t\t\tfinal int npix = getMetadata().getIw() * getMetadata().getIh();\n\n\t\t\tbyte[] pixels = getMetadata().getPixels();\n\n\t\t\tif (pixels == null || pixels.length < npix) pixels = new byte[npix];\n\n\t\t\tshort[] prefix = getMetadata().getPrefix();\n\t\t\tbyte[] suffix = getMetadata().getSuffix();\n\t\t\tbyte[] pixelStack = getMetadata().getPixelStack();\n\n\t\t\tif (prefix == null) prefix = new short[MAX_STACK_SIZE];\n\t\t\tif (suffix == null) suffix = new byte[MAX_STACK_SIZE];\n\t\t\tif (pixelStack == null) pixelStack = new byte[MAX_STACK_SIZE + 1];\n\n\t\t\tgetMetadata().setPrefix(prefix);\n\t\t\tgetMetadata().setSuffix(suffix);\n\t\t\tgetMetadata().setPixelStack(pixelStack);\n\n\t\t\t// initialize GIF data stream decoder\n\n\t\t\tfinal int read = getSource().read();\n\t\t\tfinal int dataSize = read & 0xff;\n\n\t\t\tfinal int clear = 1 << dataSize;\n\t\t\tfinal int eoi = clear + 1;\n\t\t\tint available = clear + 2;\n\t\t\tint oldCode = nullCode;\n\t\t\tint codeSize = dataSize + 1;\n\t\t\tint codeMask = (1 << codeSize) - 1;\n\t\t\tint code = 0, inCode = 0;\n\t\t\tfor (code = 0; code < clear; code++) {\n\t\t\t\tprefix[code] = 0;\n\t\t\t\tsuffix[code] = (byte) code;\n\t\t\t}\n\n\t\t\t// decode GIF pixel stream\n\n\t\t\tint datum = 0, first = 0, top = 0, pi = 0, bi = 0, bits = 0, count = 0;\n\t\t\tint i = 0;\n\n\t\t\tfor (i = 0; i < npix;) {\n\t\t\t\tif (top == 0) {\n\t\t\t\t\tif (bits < codeSize) {\n\t\t\t\t\t\tif (count == 0) {\n\t\t\t\t\t\t\tcount = readBlock();\n\t\t\t\t\t\t\tif (count <= 0) break;\n\t\t\t\t\t\t\tbi = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdatum += (getMetadata().getdBlock()[bi] & 0xff) << bits;\n\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\tbi++;\n\t\t\t\t\t\tcount--;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// get the next code\n\t\t\t\t\tcode = datum & codeMask;\n\t\t\t\t\tdatum >>= codeSize;\n\t\t\t\t\tbits -= codeSize;\n\n\t\t\t\t\t// interpret the code\n\n\t\t\t\t\tif ((code > available) || (code == eoi)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (code == clear) {\n\t\t\t\t\t\t// reset the decoder\n\t\t\t\t\t\tcodeSize = dataSize + 1;\n\t\t\t\t\t\tcodeMask = (1 << codeSize) - 1;\n\t\t\t\t\t\tavailable = clear + 2;\n\t\t\t\t\t\toldCode = nullCode;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (oldCode == nullCode) {\n\t\t\t\t\t\tpixelStack[top++] = suffix[code];\n\t\t\t\t\t\toldCode = code;\n\t\t\t\t\t\tfirst = code;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tinCode = code;\n\t\t\t\t\tif (code == available) {\n\t\t\t\t\t\tpixelStack[top++] = (byte) first;\n\t\t\t\t\t\tcode = oldCode;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (code > clear) {\n\t\t\t\t\t\tpixelStack[top++] = suffix[code];\n\t\t\t\t\t\tcode = prefix[code];\n\t\t\t\t\t}\n\t\t\t\t\tfirst = suffix[code] & 0xff;\n\n\t\t\t\t\tif (available >= MAX_STACK_SIZE) break;\n\t\t\t\t\tpixelStack[top++] = (byte) first;\n\t\t\t\t\tprefix[available] = (short) oldCode;\n\t\t\t\t\tsuffix[available] = (byte) first;\n\t\t\t\t\tavailable++;\n\n\t\t\t\t\tif (((available & codeMask) == 0) && (available < MAX_STACK_SIZE)) {\n\t\t\t\t\t\tcodeSize++;\n\t\t\t\t\t\tcodeMask += available;\n\t\t\t\t\t}\n\t\t\t\t\toldCode = inCode;\n\t\t\t\t}\n\t\t\t\ttop--;\n\t\t\t\tpixels[pi++] = pixelStack[top];\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\tfor (i = pi; i < npix; i++)\n\t\t\t\tpixels[i] = 0;\n\t\t\tgetMetadata().setPixels(pixels);\n\t\t\tsetPixels();\n\t\t}", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "private byte[] getImageOne() {\n Bitmap icon = BitmapFactory.decodeResource(getApplicationContext().getResources(),\n R.drawable.image0);\n return ImageConvert.convertImage2ByteArray(icon);\n }", "public int getImage();", "private byte[] queryImageAnswer() throws IOException\r\n {\r\n assertEquals(TimeSpan.get(myQueryTime, Milliseconds.ONE), EasyMock.getCurrentArguments()[1]);\r\n ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n ImageIO.write(ImageUtil.LOADING_IMAGE, \"png\", out);\r\n\r\n return out.toByteArray();\r\n }", "public PImage getImage() {\n return this.image;\n }", "WorldImage getImage();", "ArrayList<Episode> getEpisodes(){\n\n\n Uri builtUri = Uri.parse(episodesURL)\n .buildUpon()\n .build();\n String url = builtUri.toString();\n\n return doCallEpisode(url);\n\n }", "private byte[] getImage(){\n byte image[] = null;\n try {\n if(isImageGiven()) {\n image = getImageBytes();\n }\n }catch (IOException e){\n Toast.makeText(this,\"Error in Creating the image \"+e, Toast.LENGTH_SHORT).show();\n }\n return image;\n }", "public BufferedImage getDati()\n { \n return imgDati;\n }", "public abstract Image getImage();", "public abstract Image getImage();", "@Override\n protected Map<String, DataPart> getByteData()\n {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(Keys.message, new DataPart(imagename + \".png\", getFileDataFromDrawable(bitmap)));\n return params;\n }", "java.util.List<com.google.protobuf.ByteString> getImgDataList();", "@Override\n\tpublic void readImages() {\n\t\t\n\t}", "private byte[] getData() {\n\t\tStorage storage;\n\t\tint cont = 0;\n\t\tbyte[] data = null;\n\t\tsynchronized (store) {\n\t\t\tstorage = (Storage) store.getContents();\n\t\t\tif (storage != null && storage.data != null) {\n\t\t\t\tdata = storage.data;\n\t\t\t\tcont = storage.cont;\n\t\t\t}\n\t\t}\n\t\tif (cont == 0 || data == null) {\n\t\t\tdata = getImage();\n\t\t\tif (data == null)\n\t\t\t\treturn null;\n\t\t\tcont++;// It increments twice so on the next run it doesn't get\n\t\t\t// updated again\n\t\t}\n\t\tif (cont > 5)\n\t\t\tcont = 0; // it increments just next, so it never stays 0 (wich\n\t\t// is only initial state)\n\t\tcont++;\n\t\tsynchronized (store) {\n\t\t\tif (storage == null) {\n\t\t\t\tstorage = new Storage();\n\t\t\t}\n\t\t\tstorage.cont = cont;\n\t\t\tstore.setContents(storage);\n\t\t\tstore.commit();\n\t\t}\n\n\t\treturn data;\n\t}", "@Override\n public IIOMetadata getImageData() {\n return super.imageData;\n }", "public String printImage() {\n StringBuilder builder = new StringBuilder();\n builder.append(\"ID:\" + this.id + \"; Data:\\n\");\n\n for (int i = 1; i <= this.data.length; i++) {\n T t = data[i - 1];\n builder.append(t.toString() + \" \");\n if (i % 28 == 0) {\n builder.append(\"\\n\");\n }\n }\n return builder.toString().replace('0', ' ');\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();", "public Image getImage() {\n if (tamagoStats.getAge() <= 0) {\n return images.get(\"oeuf\").get(\"noeuf\");\n } else if (tamagoStats.getAge() <= 3) {\n return images.get(\"bebe\").get(\"metamorph\");\n } else if (tamagoStats.getAge() <= 7) {\n return images.get(\"enfant\").get(\"evoli\");\n } else {\n return images.get(\"adulte\").get(\"noctali\");\n }\n }", "public String getImage()\n {\n return image;\n }", "public String getImage() {\n return image;\n }", "public ImageDescriptor getImageDescriptor();", "public BufferedImage getImage ( ) {\n\n BufferedImage img =\n param.Parameters.PROBLEM.getData(param.Parameters.STATE, program, 0, 0);\n\n System.gc();\n\n return img;\n \n }", "private Episode getTestEpisode() {\n Episode testEpisode = new Episode();\n testEpisode.setTvShow(testTvShow);\n testEpisode.setTitle(testTitle);\n return testEpisode;\n }", "ImageContentData findContentData(String imageId);", "public Bitmap getImage(){\n return images[currentFrame];\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public static String getEventImage(String image) {\n return EVENT_IMAGE_URL + image;\n }", "public void movieDetailes (Movie movie) throws IOException, JSONException{\n\t\t\n\t MovieImages poster= movie.getImages(movie.getID());\n\t System.out.println(poster.posters);\n\t \n\t Set<MoviePoster> temp = new HashSet<MoviePoster>();\n\t for(MoviePoster a: poster.posters) {\n\t \t \n\t \t posterurl = \"\";\n\t \t largerposterurl = \"\";\n\t \t if(a.getSmallestImage() != null){\n\t \t\t posterurl = a.getSmallestImage().toString();\n\t \t }\n\t \t if(a.getImage(Size.MID) != null){\n\t \t\t largerposterurl = a.getImage(Size.MID).toString();\n\t \t }\n\t \t //System.out.println(a.getSmallestImage());\n\t \t break;\n\t }\n\n\t System.out.println(\"Cast:\");\n\t // Get the full decsription of the movie.\n\t Movie moviedetail = Movie.getInfo(movie.getID());\n\t if(moviedetail != null){\n\t \tmovieName = moviedetail.getOriginalName();\n\t\t overview = moviedetail.getOverview();\n\t\t if(moviedetail.getTrailer() != null){\n\t\t \ttrailerURL = moviedetail.getTrailer().toString();\n\t\t }\n\t\t if(moviedetail.getReleasedDate() != null){\n\t\t \treleaseDate = moviedetail.getReleasedDate().toString();\n\t\t }\n\t\t rating = moviedetail.getRating();\n\t\t cast = \"\\n\\nCast: \\n\";\n\t\t for (CastInfo moviecast : moviedetail.getCast()) {\n\t\t\t System.out.println(\" \" + moviecast.getName() + \" as \"\n\t\t\t + moviecast.getCharacterName()\t);\n\t\t\t cast = cast + \" \" + moviecast.getName() + \"\\n\";\n\t\t\t }\n\t\t \n\t\t ID = moviedetail.getID();\n\t }\n\t \n\t}", "private void programImgRetriever(Program p) {\n\n SwingWorker<ImageIcon, Void> sw = new SwingWorker<>() {\n @Override\n protected ImageIcon doInBackground() {\n\n return p.getImage();\n }\n\n @Override\n protected void done() {\n\n try {\n var tmp = get();\n view.setOptionDialog(p.getDescription(), tmp);\n isUpdating.set(false);\n\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n }\n };\n sw.execute();\n\n }", "public Image getImage(long offset) throws IOException {\r\n String image = getFilename() + \"_\" + offset + \".jpg\";\r\n System.err.println(\"File = \" + image);\r\n\r\n File file = new File(image);\r\n if (file.exists()) {\r\n return ImageIO.read(file);\r\n }\r\n\r\n // Find the nearest frame to the offset\r\n streamSeek(offset - getOffsetShift());\r\n\r\n // Pass frames into the codec one at a time until buffer contains the\r\n // frame\r\n boolean isData = readNextPacket();\r\n int status = PlugIn.OUTPUT_BUFFER_NOT_FILLED;\r\n while ((status == PlugIn.OUTPUT_BUFFER_NOT_FILLED) && isData\r\n && (!processor.getOutputBuffer().isDiscard())) {\r\n\r\n // Read the frame into the buffer\r\n Buffer inputBuffer = getBuffer();\r\n status = processor.process(inputBuffer);\r\n\r\n if (status == PlugIn.BUFFER_PROCESSED_OK\r\n && (getOffset() < offset)) {\r\n status = PlugIn.OUTPUT_BUFFER_NOT_FILLED;\r\n }\r\n if (status == PlugIn.OUTPUT_BUFFER_NOT_FILLED) {\r\n isData = readNextPacket();\r\n }\r\n }\r\n\r\n if (status != PlugIn.BUFFER_PROCESSED_OK) {\r\n throw new IOException(\"Error processing frame\");\r\n }\r\n\r\n // Convert the buffer to an image and return it\r\n BufferToImage convertor = new BufferToImage((VideoFormat)\r\n processor.getOutputBuffer().getFormat());\r\n return convertor.createImage(processor.getOutputBuffer());\r\n }", "public Result getFromDrawable() throws Exception{\n\n // edit the following line with the desired resource you want to test\n Uri uri= Uri.parse((\"android.resource://cepheustheapp.com.cepheus/\"+ R.drawable.back));\n InputStream inputStream= getContentResolver().openInputStream(uri);\n Bitmap bitmap = BitmapFactory.decodeStream(inputStream);\n if (bitmap == null)\n {\n // not a bitmap\n return null;\n }\n int width = bitmap.getWidth(), height = bitmap.getHeight();\n int[] pixels = new int[width * height];\n bitmap.getPixels(pixels, 0, width, 0, 0, width, height);\n bitmap.recycle();\n bitmap = null;\n RGBLuminanceSource source = new RGBLuminanceSource(width, height, pixels);\n BinaryBitmap bBitmap = new BinaryBitmap(new HybridBinarizer(source));\n MultiFormatReader reader = new MultiFormatReader();\n\n // result will hold the actual content\n Result result= reader.decode(bBitmap);\n\n\n return result;\n\n }", "private void putEpisodeData(ApiResponseEpisode response) {\n epAdapter = new EpisodeAdapter(response, this);\n recyclerView.setAdapter(epAdapter);\n }", "public abstract BufferedImage getSnapshot();", "public String getEpisodeNum(){\r\n\t\treturn episodeNumber;\r\n\t}", "public String getRtPic() { return rtPic; }", "private BufferedImage getImage(ExternalGraphic eg) {\n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"got a \" + eg.getFormat());\n }\n \n if (supportedGraphicFormats.contains(eg.getFormat().toLowerCase())) {\n if (eg.getFormat().equalsIgnoreCase(\"image/gif\")\n || eg.getFormat().equalsIgnoreCase(\"image/jpg\")\n || eg.getFormat().equalsIgnoreCase(\"image/png\")) {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"a java supported format\");\n }\n \n try {\n BufferedImage img = imageLoader.get(eg.getLocation(), isInteractive());\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"Image return = \" + img);\n }\n \n return img;\n } catch (MalformedURLException e) {\n LOGGER.warning(\"ExternalGraphicURL was badly formed\");\n }\n }\n }\n \n return null;\n }", "public Object parseImage(int rssType, Document doc) throws Exception;", "public Image getSeven();", "public byte[] getImageData() {\r\n return imageData;\r\n }", "private ImageView getAlbumArt () {\n ImageView iv = new ImageView((Image) this.playlist.getCurrentMedia().getMetadata().get(\"image\"));\n // Future implementations:\n // * store in cache for faster loading\n // * be sure to give an option to empty cache\n return iv;\n }", "public ImageInfo getImage() {\n return image;\n }", "void seTubeDownImage(String image);", "byte[] getProfileImage();", "@Nullable\n public Single<Media> getPictureOfTheDay() {\n String date = CommonsDateUtil.getIso8601DateFormatShort().format(new Date());\n Timber.d(\"Current date is %s\", date);\n String template = \"Template:Potd/\" + date;\n return getMedia(template, true);\n }", "public TE doInBackground(byte[]... data) {\n return PhotoModule.this.convertN21ToBitmap(data[0]);\n }", "public byte[] getImageBytes()\n {\n byte[] buff = null;\n \n try\n {\n ByteArrayOutputStream bos = new ByteArrayOutputStream() ;\n ImageIO.write(img, \"jpg\", bos);\n buff = bos.toByteArray();\n bos.flush();\n bos.close();\n }\n catch(Exception ex)\n {\n System.out.println(\"Problem Serializeing PicNode\");\n ex.printStackTrace();\n }\n return buff;\n }", "public String getImage(){\n StringBuilder sb = new StringBuilder();\n for (char[] subArray : hidden) {\n sb.append(subArray);\n sb.append(\"\\n\");\n }\n return sb.toString();\n }", "public static void readImageRGB(int width, int height, String imgPath, BufferedImage img) {\n try {\n int frameLength = width * height * 3;\n\n File file = new File(imgPath);\n RandomAccessFile raf = new RandomAccessFile(file, \"r\");\n raf.seek(0);\n\n long len = frameLength;\n byte[] bytes = new byte[(int) len];\n\n\n synchronized (lock) {\n\n int frame = 0;\n while (raf.read(bytes) != -1) {\n /* if(controller.jumpButtonClicked){\n raf.seek(Integer.parseInt(controller.frameTextField.getText())*len);\n frame = Integer.parseInt(controller.frameTextField.getText());\n }*/\n int ind = 0;\n frame++;\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n\n byte r = bytes[ind];\n byte g = bytes[ind + height * width];\n byte b = bytes[ind + height * width * 2];\n int yv = (int) ((int) (r & 0xff) * 0.3 + (int) (g & 0xff) * 0.59 + (int) (b & 0xff) * 0.11);\n P.addDataPoint(yv);\n int pix = 0xff000000 | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff);\n //int pix = ((a << 24) + (r << 16) + (g << 8) + b);\n imgOne.setRGB(x, y, pix);\n ind++;\n }\n }\n if (isDetect) {\n detectAdsDisplay(frame);\n } else {\n showIms();\n }\n\n lock.notify();\n lock.wait(1000); //todo: warning unknown exception\n\n\n }\n if (isDetect) {\n processArrayIsAds();\n getAdsLocation();\n System.out.println(\"::: result :::\");\n for (int i = 0; i < adsStart.size(); i++)\n System.out.println(\"adsStart: \" + adsStart.get(i));\n\n for (int i = 0; i < adsEnd.size(); i++)\n System.out.println(\"adsEnd: \" + adsEnd.get(i));\n }\n\n lock.notify();\n }\n\n raf.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n\n }", "public ImageData getImageData() {\n\t\treturn this.data.getImageData();\n\t}", "void imageData(int width, int height, int[] rgba);", "private void getNewImage() {\n try {\n URL imageUrl = new URL(path);\n URLConnection uc = imageUrl.openConnection();\n\n InputStream is = uc.getInputStream();\n BufferedInputStream bis = new BufferedInputStream(is);\n\n ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n int current;\n while ((current = bis.read()) != -1) {\n buffer.write((byte) current);\n }\n final byte[] data = buffer.toByteArray();\n // enqueue UI update as a priority\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n public void run() {\n view.setImageBitmap(BitmapFactory.decodeByteArray(\n data, 0, data.length));\n }\n });\n // update database while that is queueing\n ContentValues values = new ContentValues();\n values.put(MovieEntry.COLUMN_POSTER, data);\n context.getContentResolver().update(MovieEntry.buildMovieUriWithId(movieId),\n values, null, null);\n } catch (Exception E) {\n Log.i(TAG, E.toString());\n E.printStackTrace();\n }\n }", "public int getVideoDscp();", "private void downloadPoster() {\n\n try {\n // Downloading the image from URL\n URL url = new URL(Constants.MOVIE_MEDIA_URL + cbPosterQuality.getSelectionModel().getSelectedItem().getKey() + movie.getPosterURL());\n Image image = new Image(url.toExternalForm(), true);\n\n // Adding the image to the ImageView\n imgPoster.setImage(image);\n\n // Adding the ImageView to the custom made ImageViewPane\n imageViewPane.setImageView(imgPoster);\n\n // Binding the image download progress to the progress indicator\n imageProgressIndicator.visibleProperty().bind(image.progressProperty().lessThan(1));\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n }", "public StreamedContent getPhoto(Patient p) {\n FacesContext context = FacesContext.getCurrentInstance();\n if (context.getRenderResponse()) {\n return new DefaultStreamedContent();\n } else if (p == null) {\n return new DefaultStreamedContent();\n } else {\n if (p.getId() != null && p.getBaImage() != null) {\n //////System.out.println(\"giving image\");\n InputStream targetStream = new ByteArrayInputStream(p.getBaImage());\n StreamedContent str = DefaultStreamedContent.builder().contentType(p.getFileType()).name(p.getFileName()).stream(() -> targetStream).build();\n return str;\n// return new DefaultStreamedContent(new ByteArrayInputStream(p.getBaImage()), p.getFileType(), p.getFileName());\n } else {\n return new DefaultStreamedContent();\n }\n }\n\n }", "public String getImage() {\n return image;\n }", "public String getImage() {\n return image;\n }", "public String getImage() {\n return image;\n }", "public String getImage() {\n return image;\n }", "public Image getPunch1(int player, boolean ep) {if (player==1) return punchP11; else return punchP21;}", "public Image getInstanceImage() {\r\n return this.image;\r\n }", "public String getPd_img() {\n\t\treturn pd_img;\n\t}", "public byte[] getPhoto(String rpiId, String time) throws SQLException, IOException;", "public Image getImage() {\r\n return image;\r\n }", "public Img getImage(long id){\n\n Img imageObj = null;\n\n List<Img> imgList = null;\n imgList = Img.getImageList(id);\n if(imgList!=null && imgList.size()>0) {\n\n imageObj = imgList.get(0);\n }\n return imageObj;\n }", "@Override\r\n\tpublic Image getImg() {\n\t\treturn img.getImage();\r\n\t}", "public AgentMovementLocation loadAgentMoventImages(String id);", "public Image getImage() {\n return image;\n }", "public java.lang.String getEatImage() {\n return localEatImage;\n }", "public Image getImage() {\n\t\t// Check we have frames\n\t\tif(frames.size() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn getFrame(currentFrameIndex).image;\n\t\t}\n\t}", "private void readBytes() {\n byte[] emgBytes = new byte[EMG_BYTE_BUFFER];\n\n while(running) {\n try {\n // Wait until a complete set of data is ready on the socket. The\n while (running && emgSock.getInputStream().available() < EMG_BYTE_BUFFER) {\n Thread.sleep(50);\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n // Read a complete group of multiplexed samples\n emgSock.getInputStream().read(emgBytes, 0, EMG_BYTE_BUFFER);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n synchronized (this) {\n // Demultiplex, parse the byte array, and add the appropriate samples to the history buffer.\n\n for (int i = 0; i < EMG_BYTE_BUFFER / 4; i++) {\n if (i % 16 == (m1.getSensorNr()-1)) {\n float f = ByteBuffer.wrap(emgBytes, 4 * i, 4).getFloat();\n emgHistory.add(f * 1000); // convert V -> mV\n } else if (i % 16 == (m2.getSensorNr()-1)) {\n float f = ByteBuffer.wrap(emgBytes, 4 * i, 4).getFloat();\n emgHistory2.add(f * 1000); // convert V -> mV\n }\n }\n }\n\n // If there is no touch zoom action in progress, update the plots with the newly acquired data.\n if (mode == NONE && running) {\n runOnUiThread(new Runnable() {\n public void run() {\n UpdatePlots();\n }\n });\n }\n }\n }", "public void filmAgeRestImage() {\n\t\tif (ageAll == ageFilm) {\n\t\t\ttry {\n\t\t\t\tURL url = new URL(\"https://upload.wikimedia.org/wikipedia/commons/6/68/Edad_TP.png\");\n\t\t\t\tageFilmIconResize(url);\n\t\t\t} catch (IOException e7) {\n\t\t\t}\n\t\t} else if (age7 == ageFilm) {\n\t\t\ttry {\n\t\t\t\tURL url = new URL(\"https://upload.wikimedia.org/wikipedia/commons/5/55/Edad_7.png\");\n\t\t\t\tageFilmIconResize(url);\n\t\t\t} catch (IOException e7) {\n\t\t\t}\n\n\t\t} else if (age13 == ageFilm) {\n\t\t\ttry {\n\t\t\t\tURL url = new URL(\"https://upload.wikimedia.org/wikipedia/commons/b/bd/Edad_13.png\");\n\t\t\t\tageFilmIconResize(url);\n\t\t\t} catch (IOException e7) {\n\t\t\t}\n\n\t\t} else if (age16 == ageFilm) {\n\t\t\ttry {\n\t\t\t\tURL url = new URL(\"https://upload.wikimedia.org/wikipedia/commons/4/4b/Edad_16.png\");\n\t\t\t\tageFilmIconResize(url);\n\t\t\t} catch (IOException e7) {\n\t\t\t}\n\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tURL url = new URL(\"https://upload.wikimedia.org/wikipedia/commons/c/ca/Edad_18.png\");\n\t\t\t\tageFilmIconResize(url);\n\t\t\t} catch (IOException e7) {\n\t\t\t}\n\t\t}\n\t}", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();", "public Image getOne();", "public String getImage() {\n\t\treturn image;\n\t}", "public String getImage() {\n\t\treturn image;\n\t}", "private void getTransferDataFromActivity() {\n Gson gson = new Gson();\n manageRest_manageDish = getIntent();\n transferData = manageRest_manageDish.getExtras();\n\n rest_id = transferData.getInt(\"restID\");\n String dishJSON = transferData.getString(\"dishJSON\");\n dish = gson.fromJson(dishJSON, Dish.class);\n\n // Check null pointer and shut down activity\n if (dish == null) {\n Toast.makeText(this,\n \"Dish object is null. Are you forgot to create it?\",\n Toast.LENGTH_LONG).show();\n finish();\n }\n\n if (!dish.getUrlImage().isEmpty())\n imagesUri.add(Uri.parse(dish.getUrlImage()));\n }", "public String getImage() {\n return this.Image;\n }", "@Override\n public String getThumbData() {\n throw new RuntimeException( \"Not yet implemented.\" );\n }", "private static final byte[] xfdm_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -52,\n\t\t\t\t100, 26, -83, 89, 0, 0, -79, -24, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 3, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t55, -100, -113, 121, 0, 106, 17, 16, 107, 9, 70, -55, -112,\n\t\t\t\t117, -13, 65, 103, 76, 27, 24, -114, -122, 32, 40, 22, 117,\n\t\t\t\t-90, -125, -69, 102, -19, -117, -114, 29, -115, -42, 87, -56,\n\t\t\t\t-96, 120, -98, 0, 0, 115, 68, 4, -16, -25, 59, 28, -111, -83,\n\t\t\t\t36, -23, 89, 0, 0, 59 };\n\t\treturn data;\n\t}", "public BufferedImage readImage() throws IOException{\n\t\tFile read = new File(\"src/blue_plate.png\");\n\t\t//decodes a supplied File and returns a BufferedImage\n\t\tBufferedImage master = ImageIO.read(read);\n\t\treturn master;\n\t\t\n\t}", "public Image getPunch2(int player, boolean ep) {if (player==1) return punchP12; else return punchP22;}" ]
[ "0.57466596", "0.5721237", "0.5389036", "0.5344645", "0.5301289", "0.5273765", "0.52152663", "0.51991254", "0.51787215", "0.51728094", "0.5172379", "0.51616466", "0.5157368", "0.51482576", "0.5124359", "0.5115054", "0.51035726", "0.5099435", "0.5025012", "0.5017611", "0.50032973", "0.4989534", "0.4983617", "0.49631342", "0.49576452", "0.49516943", "0.49516943", "0.49450308", "0.49353915", "0.49348187", "0.49336725", "0.49086693", "0.489435", "0.4885905", "0.48744735", "0.4872729", "0.48659384", "0.48608303", "0.48493797", "0.48492956", "0.4844862", "0.48448315", "0.48423517", "0.48423517", "0.48423517", "0.4841571", "0.483743", "0.4836317", "0.48328954", "0.48320067", "0.48318192", "0.4827939", "0.4821933", "0.48184556", "0.48183224", "0.47996005", "0.47994974", "0.47982225", "0.4795964", "0.47956166", "0.47868776", "0.47866634", "0.47836572", "0.4781962", "0.47674826", "0.47592247", "0.47591937", "0.475822", "0.47543436", "0.47483373", "0.47479033", "0.47459054", "0.47419542", "0.47311145", "0.47311145", "0.47311145", "0.47311145", "0.4730954", "0.47278067", "0.47106513", "0.47095028", "0.47018647", "0.4700319", "0.46987635", "0.46956384", "0.46889246", "0.46847665", "0.46795917", "0.46776858", "0.4675458", "0.46753147", "0.4673177", "0.46709597", "0.46709597", "0.4669474", "0.46667328", "0.46660292", "0.46577832", "0.46568695", "0.46560398" ]
0.4707844
81
Constructor que coloca la imagen nwn
public Mesita() { super("mesa.png"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Coloca_imagen(){\n \n \n }", "public void setImag(double imag) {this.imag = imag;}", "public Imagen(){\n \n }", "public Complex() {\r\n real = 0;\r\n imaginary = 0;\r\n }", "public Pixel() {\r\n\t\t}", "public ImageProcessor(Pic a) {\n image = a;\n }", "public ComplexNumber(double re, double im) {\n\t\treal = re;\n\t\timag = im;\n\t}", "public ComplexNumber(double re, double im) {\r\n this.re = re;\r\n this.im = im;\r\n }", "public HSIImage()\r\n {\r\n }", "public ImagenLogica(){\n this.objImagen=new Imagen();\n //Creacion de rutas\n this.creaRutaImgPerfil();\n this.crearRutaImgPublicacion();\n \n }", "Complex() {\n real = 0.0;\n imag = 0.0;\n }", "private Images() {}", "public ComplexNumber(ComplexNumber cn) {\n\t\treal = cn.getReal();\n\t\timag = cn.getImag();\n\t}", "public Complex(double re, double im) {\n this.re = re;\n this.im = im;\n }", "public Picture(BufferedImage image)\n {\n super(image);\n }", "public Picture(BufferedImage image)\n {\n super(image);\n }", "public Complex(float real, float imag) {\n this.re = real;\n this.im = imag;\n }", "public Rotation(){\n\t\timageData = new int[][] {{1,2,3,4}, {5,6,7,8},{9, 10, 11, 12},{13, 14, 15 ,16}};\n\t\tn = 4;\n\t}", "public Image()\r\n {\r\n super();\r\n setBounds( 0, 0, 10, 10 );\r\n }", "public Circle(double jejari){\r\n\t\t// this();//panggil default constructor\r\n\t\t this.jejari = jejari;\r\n\t\t x = 5;\r\n\t\t// this(jejari, 59); //panggil constructor 2 parameter\r\n\t\tbilObjekWujud++;\r\n\t}", "public double getImag() {return this.imag;}", "public Sprite(Image img){\n\t\tsuper();\n\t\t_img = img;\n\t\tsetOrigin(_img.getWidth()/2,_img.getHeight()/2);\n\t\ttranslate(0, 0);\n\t}", "public Ogre(int x, int y) {\r\n\t\tsuper(\"resources/ogre.gif\", x, y);\r\n\t}", "public Image() {\n\t\t\tthis(Color.white, 0);\n\t\t}", "public Picture(int width, int height)\n {\n // let the parent class handle this width and height\n super(width,height);\n }", "public Picture(int width, int height)\n {\n // let the parent class handle this width and height\n super(width,height);\n }", "public PgmImage() {\r\n int[][] defaultPixels = {{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}};\r\n pixels = new int[defaultPixels.length][defaultPixels[0].length];\r\n for (int row = 0; row < pixels.length; ++row) {\r\n for (int col = 0; col < pixels[0].length; ++col) {\r\n pixels[row][col] = (int) (defaultPixels[row][col] * 255.0 / 12);\r\n }\r\n }\r\n pix2img();\r\n }", "public Moto(float cilindrada,String _patente, int _cantRuedas)\n {\n super(_patente, _cantRuedas, eMarca.ZANELLA);\n this._cilindrada=cilindrada;\n }", "public imageAlphaClass()\n {\n array_lineas = new ArrayList<>();\n array_modelos = new ArrayList<>();\n array_productos = new ArrayList<>();\n }", "public Thumbnail() {\n this(100, 100);\n }", "public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }", "public RawImage(int[][] img, int res) {\n if (img == null) {\n throw new IllegalArgumentException(\"img is null\");\n }\n m_img = img;\n m_hasAlpha = false;\n m_height = m_img.length;\n m_width = m_height > 0 ? m_img[0].length : 0;\n m_res = res;\n }", "public Complex(){\r\n\t this(0,0);\r\n\t}", "public Pilas(int cap) { // el constructor, de parametro la capacidad de la pila\r\n capacidad = cap; // le asignamos a capacidad lo que se pase por parametro\r\n array = new int[capacidad]; // al arreglo le decimos (asignamos) su longitud\r\n top = -1; // inicializamos la cima (como no hay aun nada, la cima es -1)\r\n }", "@Override\r\n\tpublic void init() {\n\t\timg = new ImageClass();\r\n\t\timg.Init(imgPath);\r\n\t}", "ImageComponent3D() {}", "public Image() {\n }", "public Scania(double x, double y) {\n super(2, Color.WHITE, 300, \"Scania\", x, y);\n try{icon = ImageIO.read(DrawPanel.class.getResourceAsStream(\"/pics/Scania.jpg\"));\n }catch (IOException ex)\n {\n ex.printStackTrace();\n icon = null;\n }\n }", "public JefeAvion() {\r\n\t\tsuper(2000, 2, new ImageIcon(url), 1275, 636);\r\n\t\trn = new Random();\r\n\t\tx = 400 - defaultWidth/2;\r\n\t\ty = - defaultHeight;\r\n\t\tdelay = 2;\r\n\t\tint cantTorretasDobles = 8;\r\n\t\tint cantTorretasSimples = 3;\r\n\t\tint cantTorretasInvisibles = 12;\r\n\t\tint cantTorretasGrandes = 6;\r\n\t\t\r\n\t\tString boundsDouble = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasDobles.txt\";\r\n\t\tString boundsSimple = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasSimples.txt\";\r\n\t\tString boundsInvisible = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasInvisibles.txt\";\r\n\t\tString boundsGrande = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasGrandes.txt\";\r\n\t\t\r\n\t\tinit = System.currentTimeMillis();\r\n\t\tcargarArchivoTorretas(boundsDouble, new FabricaTorretasDobles(), cantTorretasDobles);\r\n\t\tcargarArchivoTorretas(boundsSimple, new FabricaTorretasSimples(), cantTorretasSimples);\r\n\t\tcargarArchivoTorretas(boundsInvisible,new FabricaTorretasInvisibles(), cantTorretasInvisibles);\r\n\t\tcargarArchivoTorretas(boundsGrande,new FabricaTorretasGrandes(), cantTorretasGrandes);\r\n\t\tpuntaje = 500;\r\n\t\tsetearParametrosDefecto(2000, 2, 1275, 636);\r\n\t\t\r\n\t\t\r\n\t}", "public Laberinto(int N) {\n this.N = N;\n StdDraw.setCanvasSize(700,700);\n StdDraw.setXscale(0, N+2);\n StdDraw.setYscale(0, N+2);\n init();\n generar();\n }", "public ImagePicture(ImageIcon img) { \r\n\t\tsuper();\r\n\t\tsetxPos(0);\r\n\t\tsetyPos(0);\r\n\t\tthis.image = img;\r\n\t\trepaint();\r\n\t}", "public Triagem() {\n ImageIcon logo = new ImageIcon(\"src/Imagens/icone.png\");\n setIconImage(logo.getImage());\n initComponents();\n setLocationRelativeTo(null);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n }", "public ImageCanvas() {\r\n super();\r\n }", "public Image() {\n \n }", "Ion(double x,double y){\r\n\t\tthis.x=x;\r\n\t\tthis.y=y;\r\n\t}", "public Figure (){\n\t\tthis.simple = 0;\n\t\tthis.paire = 0;\n\t\tthis.berlan = 0;\n\t\tthis.carre = 0;\n\t}", "public YonetimliNesne() {\n }", "public ImageDisplay()\n\t{\n initComponents();\n }", "public Picture()\n {\n // nothing to do... instance variables are automatically set to null\n }", "public Picture()\n {\n // nothing to do... instance variables are automatically set to null\n }", "public Picture()\n {\n // nothing to do... instance variables are automatically set to null\n }", "public Picture()\n {\n // nothing to do... instance variables are automatically set to null\n }", "public FloatImage(int cWidth, int cHeight, float nValue) {\n super(cWidth, cHeight);\n this.pixels = new float[getWidth()*getHeight()];\n for (int i=0; i<this.getWidth()*this.getHeight();i++) {\n this.pixels[i] = nValue;\n }\n }", "public Complex(double real, double imaginary) {\n r = real;\n i = imaginary;\n }", "public Boton(){\r\n \r\n band = 1;\r\n jugar = new JLabel(new ImageIcon(getClass().getResource(\"/Imagenes/Jugar\" + band +\".jpg\")));\r\n ayuda = new JLabel(new ImageIcon(getClass().getResource(\"/Imagenes/Ayuda\" + band +\".jpg\")));\r\n creditos = new JLabel(new ImageIcon(getClass().getResource(\"/Imagenes/Creditos\" + band +\".jpg\")));\r\n salir = new JLabel(new ImageIcon(getClass().getResource(\"/Imagenes/Salir\" + band +\".jpg\")));\r\n \r\n }", "public void setIm(double im) {\r\n this.im = im;\r\n }", "public Hahmo(int x, int y, int koko, String id, String imgFile) {\n super(x, y, koko, id, imgFile);\n super.img = luoKuva(getImage());\n }", "public Espacio() {\n dib=new Dibujo(\"Simulacion de satelites\", 800,800);\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta();\n }", "public FloatImage(int cWidth, int cHeight) {\n super(cWidth, cHeight);\n this.pixels = new float[getWidth()*getHeight()];\n }", "public void rellenaImagen()\n {\n rellenaDatos(\"1\",\"Samsung\", \"cv3\", \"blanco\" , \"50\", 1200,2);\n rellenaDatos(\"2\",\"Samsung\", \"cv5\", \"negro\" , \"30\", 600,5);\n }", "public Grid(FourInARow fur) {\n System.out.println(\"grid créer\");\n this.grid = new GridPane();\n this.p4 = fur;\n this.matrice = new Matrice(7, 7, this.p4);\n\n// File imgEm = new File(\"./img/tokenE.png\");\n// File imgEmptyD = new File(\"./img/tokenEDark.png\");\n// File imgRed = new File(\"./img/tokenR.png\");\n// File imgRedD = new File(\"./img/tokenRDark.png\");\n// File imgYellow = new File(\"./img/tokenY.png\");\n// File imgYellowD = new File(\"./img/tokenYDark.png\");\n\n this.placerImage();\n this.majAffichage();\n //this.greyColumn(0,false);\n }", "public RoadSign() {\n super(0, 0, \"roadsign_speed_50.png\");\n }", "public ImagePanel() {\n\t\ttry {\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigorest.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigono.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigolow.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigohigh.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigocondensation.png\").getPath())));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ComplexSprite(double x, double y, double width, double height) {\r\n\t\tthis.factory = SpriteFactory.getInstance();\r\n\t\tthis.dx = factory.getDX();\r\n\t\tthis.dy = factory.getDY();\r\n\t\tthis.sprites = new ArrayList<>();\r\n\t}", "public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }", "public ComplexVariable(double re, double im) {\n\t\tthis.re = re;\n\t\tthis.im = im;\n\t}", "public EcouteurPixel(Modele m, int choix) {\n\t\tthis.m = m;\n\t\tthis.choix = choix; \n\t\t\n\t}", "public ImagePicture(ImageIcon img, int x, int y) { \r\n\t\tsuper();\r\n\t\tsetxPos(x);\r\n\t\tsetyPos(y); \r\n\t\tthis.image = img;\r\n\t\trepaint();\r\n\t}", "public Proyectil(){\n disparar=false;\n ubicacion= new Rectangle(0,0,ancho,alto);\n try {\n look = ImageIO.read(new File(\"src/Disparo/disparo.png\"));\n } catch (IOException ex) {\n System.out.println(\"error la imagen del proyectil no se encuentra en la ruta por defecto\");\n }\n }", "public Picture(String url) {\n\t\t//file naming convention: noOfTypos_image_imageNo\n\t\t//3_image_1\n\t\tnoTypos = Integer.parseInt(Character.toString(url.charAt(0)));\n\t\t//TODO: Finish generating imageFile\n\t}", "public MatteIcon() {\r\n this(32, 32, null);\r\n }", "public Number(double realPart, double imaginaryPart) {\n \n /* Initializes the real and imaginary values of the number*/\n this.realPart = realPart;\n this.imaginaryPart = imaginaryPart;\n }", "public void InitParam(Bitmap[] bm, int vitesse, int intru, int laserColor) {\n screenSizeX = getResources().getDisplayMetrics().widthPixels;\n screenSizeY = getResources().getDisplayMetrics().heightPixels;\n\n //On recupere toutes nos images\n this.bm = bm;\n\n //On recupere la couleur du laser\n this.laserColor = laserColor;\n\n //Et celui qui est l'intru\n this.intru = intru;\n\n //On creer nos tableau avec comme longueur notre nombre d'images\n pathMeasure = new PathMeasure[this.bm.length];\n pathLength = new float[this.bm.length];\n pos = new float[this.bm.length][2]; // ici 2 positions, x et y\n animPath = new Path[this.bm.length];\n distance = new float[this.bm.length];\n resultBitmap = new Bitmap[this.bm.length];\n\n //On boucle pour instancier chaque objets de nos tableaux\n for(int j=0;j<this.bm.length;j++){\n\n animPath[j]= getRandomPath();\n pathMeasure[j] = new PathMeasure(animPath[j],false);\n pathLength[j] = pathMeasure[j].getLength();\n\n resultBitmap[j] = Bitmap.createBitmap(bm[j], 0, 0,\n bm[j].getWidth() - 1, bm[j].getHeight() - 1);\n }\n\n //On definit le pas\n step = vitesse;\n\n // On creer la matrice\n matrix = new Matrix();\n\n //Parametre dans le cas ou l'ecran est touché / pour les laser\n fired=false;\n touchedPosition = new float[2];\n distGaucheRest = new float[2];\n distGaucheRest[0]=0;\n distGaucheRest[1]=screenSizeY;\n fireGauchePas = new float[2];\n fireGauchePas[0]=0;\n fireGauchePas[1]=0;\n\n distDroitRest = new float[2];\n distDroitRest[0]=screenSizeX;\n distDroitRest[1]=screenSizeY;\n fireDroitPas = new float[2];\n fireDroitPas[0]=0;\n fireDroitPas[1]=0;\n\n //Au cas ou le vaiseau explose\n xplosed=false;\n countBeforeXplose=0;\n\n }", "public Celda(int x, int y) {\n this.x=x;\n this.y=y;\n this.tipo=CAMINO;\n this.celdaSelec =false;\n\n indexSprite = 0; //indice que corresponde a una subimagen de frente\n\n try {\n jugador = ImageIO.read(new File(\"images/jugador.png\"));\n obstaculo = ImageIO.read(new File(\"images/obstaculo.png\"));\n obstaculo20 = ImageIO.read(new File(\"images/obstaculo-2.png\"));\n obstaculo21 = ImageIO.read(new File(\"images/obstaculo-3.png\"));\n obstaculo22 = ImageIO.read(new File(\"images/obstaculo-4.png\"));\n obstaculo23 = ImageIO.read(new File(\"images/obstaculo-5.png\"));\n obstaculo24 = ImageIO.read(new File(\"images/obstaculo-6.png\"));\n obstaculo25 = ImageIO.read(new File(\"images/obstaculo-7.png\"));\n adversario = ImageIO.read(new File(\"images/adversario.png\"));\n recompensa = ImageIO.read(new File(\"images/recompensa.png\"));\n casa = ImageIO.read(new File(\"images/casa.png\"));\n\n imagenSprites = ImageIO.read(new File(\"images/sprite_jugador.png\"));\n imagenSpritesAdversario = ImageIO.read(new File(\"images/sprite_adversario.png\"));\n //creo una array de 4 x 1\n sprites = new BufferedImage[4 * 1];\n spritesAdversario = new BufferedImage[4 * 1];\n //lo recorro separando las imagenes\n for (int i = 0; i < 1; i++) {\n for (int j = 0; j < 4; j++) {\n sprites[(i * 4) + j] = imagenSprites.getSubimage(i * PIXEL_CELDA, j * PIXEL_CELDA,PIXEL_CELDA, PIXEL_CELDA);\n spritesAdversario[(i * 4) + j] = imagenSpritesAdversario.getSubimage(i * PIXEL_CELDA, j * PIXEL_CELDA, PIXEL_CELDA, PIXEL_CELDA);\n }\n }\n //adversario = spritesAdversario[indexSprite];\n } catch (IOException error) {\n System.out.println(\"Error: \" + error.toString());\n }\n }", "public Enemie(){\r\n \r\n r=new Random();\r\n try{\r\n \r\n //cargamos imagenes del barco, ambos helicopteros y damos valores\r\n imgHeli=ImageIO.read(new File(\"src/Images/1.png\"));\r\n imgHeli2=ImageIO.read(new File(\"src/Images/2.png\"));\r\n imgShip=ImageIO.read(new File(\"src/Images/barquito.png\"));\r\n imgBarril=ImageIO.read(new File(\"src/Images/barril.png\"));\r\n \r\n }catch(IOException ex){\r\n System.out.println(\"Imagen no encontrada.\");\r\n }\r\n //Generamos posiciones aleatorias\r\n Bx=(r.nextInt(260)+140);\r\n By=1;\r\n \r\n Bx2=(r.nextInt(260)+140);\r\n By2=1;\r\n \r\n Hx=(r.nextInt(260)+140);\r\n Hy=1;\r\n \r\n Hx2=(r.nextInt(260)+140);\r\n Hy2=1;\r\n //Cargamos altos y anchos para todas las imagenes\r\n Bwidth=imgShip.getWidth(null);\r\n Bheight=imgShip.getHeight(null);\r\n \r\n Bwidth2=imgBarril.getWidth(null);\r\n Bheight2=imgBarril.getHeight(null);\r\n \r\n Hwidth=imgHeli.getWidth(null);\r\n Hheight=imgHeli.getHeight(null);\r\n \r\n Hwidth2=imgHeli2.getWidth(null);\r\n Hheight2=imgHeli2.getHeight(null);\r\n \r\n }", "public Complex(double r, double i){\r\n\t\tthis.setReal(r);\r\n\t\tthis.setImag(i);\r\n setCounter();\r\n\t}", "public Generator(int x, int y, int length){\r\n super(x, y, length, 30);\r\n setOn(true);\r\n try{setImage(ImageIO.read(new File(\"Resources/Blocks/grey.png\")));}catch(IOException e){e.printStackTrace();}\r\n }", "public RoadSign(int x, int y, String imageFileName) {\n super(x, y, imageFileName);\n }", "private void initImage() {\n this.image = (BufferedImage)this.createImage(DisplayPanel.COLS, DisplayPanel.ROWS);\n this.r.setRect(0, 0, DisplayPanel.ROWS, DisplayPanel.COLS);\n this.paint = new TexturePaint(this.image,\n this.r);\n }", "public ImageProcessor(ImageArray im) {\n originalIm= im;\n currentIm= originalIm.copy();\n }", "public Porteur_img_eau(int x, int y, int rayon){\n Circle fond_eau = new Circle(x,y, rayon);\n fond_eau.setFill(Color.BLUE);\n this.getChildren().add(fond_eau);\n this.setLayoutX(x);\n this.setLayoutY(y);\n\n }", "public Complex_Number(double realPart,double imaginaryPart)\n {\n this(realPart,imaginaryPart,1);\n }", "public Photo() {\n super();\n }", "public ImagePane() {\r\n\t\tsuper();\r\n\t}", "ImageProcessor(int width, int height) {\n this.width = width;\n this.height = height;\n centroids = new LinkedList<>();\n centroids.add(0);\n foregroundMovement = new LinkedList<>();\n foregroundMovement.add(0);\n foregroundMovement.add(0);\n tempForegroundMovement = new LinkedList<>();\n tempForegroundMovement.add(0);\n tempForegroundMovement.add(0);\n boxMovement = new LinkedList<>();\n boxMovement.add(0);\n boxMovement.add(0);\n\n // Used to communicate with game engine\n change = new PropertyChangeSupport(this);\n }", "public ImageRotator(int receivedAngle){angle = receivedAngle;}", "public EvenementSignal(String nom, Integer image, double longitude, double latitude, int noLigne) {\n this.nom = nom;\n this.image = image;\n this.longitude = longitude;\n this.latitude = latitude;\n this.noLigne = noLigne;\n }", "public void initialize()\r\n {\r\n ceresImage = new Image(\"Ceres.png\");\r\n erisImage = new Image(\"Eris.png\");\r\n haumeaImage = new Image(\"Haumea.png\");\r\n makemakeImage = new Image(\"MakeMake.png\");\r\n plutoImage = new Image(\"Pluto.png\");\r\n }", "public Bassin(){\r\n\t\tImage i = Toolkit.getDefaultToolkit().getImage(\"fondmarin.jpg\");\r\n\t\tJLabel l = new JLabel(new ImageIcon(i));\r\n\t\tl.setBounds(0, 0, 600, 600);\r\n\t\tl.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));\r\n\t\tthis.add(l,new Integer(1));\r\n\t}", "public void pone_imagen(Image imagen) {\n if (imagen != null) {\n this.imagen = imagen;\n } else {\n this.imagen = null;\n }\n repaint();\n }", "public MatteIcon(int width, int height) {\r\n this(width, height, null);\r\n }", "Sprite(float x, float y, float w, float h) {\n _img = createImage(1, 1, RGB);\n _x = x;\n _y = y;\n _w = w;\n _h = h;\n _rotVector = new PVector(1, 0, 0);\n resetRectHitbox();\n }", "public Cow(int x, int y) {\n\t\tsuper(x, y);\n\t\tloadImages();\n\t}", "public Rectangulo(){}", "private void paintTheImage() {\n SPainter bruhmoment = new SPainter(\"Kanizsa Square\" ,400,400);\n\n SCircle dot = new SCircle(75);\n paintBlueCircle(bruhmoment,dot);\n paintRedCircle(bruhmoment,dot);\n paintGreenCircles(bruhmoment,dot);\n\n SSquare square= new SSquare(200);\n paintWhiteSquare(bruhmoment,square);\n\n\n }", "public ImageConverter() {\n\t}", "public Complex(double real, double imag) {\r\n this.real_part = real;\r\n this.imaginary_part = imag;\r\n }", "public Boton(int num)\n {\n switch(num)\n {\n case 1:setImage(\"BotonPlay.png\");break;\n case 2:setImage(\"BotonScore.png\");break;\n case 3:setImage(\"BotonHelp.png\");break;\n case 4:setImage(\"BotonMenuCh.png\");break;\n case 5:setImage(\"BotonReturn.png\");break;\n }\n }", "public void crearImagenes() {\n try {\n fondoJuego1 = new Imagenes(\"/fondoJuego1.png\",39,-150,-151);\n fondoJuego2 = new Imagenes(\"/fondoJuego2.png\",40,150,149);\n regresar = new Imagenes(\"/regresar.png\",43,90,80);\n highLight = new Imagenes(\"/cursorSubmenus.png\",43,90,80);\n juegoNuevo = new Imagenes(\"/juegoNuevo.png\",44,90,80);\n continuar = new Imagenes(\"/continuar.png\",45,90,80);\n tituloJuegoNuevo = new Imagenes(\"/tituloJuegoNuevo.png\",200,100,165);\n tituloContinuar = new Imagenes(\"/tituloContinuar.png\",201,100,40);\n tituloRegresar = new Imagenes(\"/tituloRegresar.png\",202,20,100);\n\t} catch(IOException e){\n e.printStackTrace();\n }\n }", "public Cow() {\n\t\tsuper();\n\t\tloadImages();\n\t}" ]
[ "0.7033958", "0.6328331", "0.624313", "0.61703026", "0.6138054", "0.6121221", "0.6087426", "0.60832155", "0.60692126", "0.60564053", "0.6045634", "0.5997707", "0.5989967", "0.5963707", "0.5958716", "0.5958716", "0.5929694", "0.5917367", "0.5885448", "0.5876143", "0.5847483", "0.5844918", "0.58265024", "0.58023757", "0.5799424", "0.5799424", "0.5798915", "0.5796587", "0.5787213", "0.57693964", "0.5757163", "0.5741462", "0.57355833", "0.57325846", "0.5730846", "0.5718854", "0.5708027", "0.5697918", "0.56853396", "0.56798065", "0.5664897", "0.566161", "0.5650168", "0.5647898", "0.56342727", "0.56333953", "0.5624422", "0.561873", "0.5617651", "0.5617651", "0.5617651", "0.5617651", "0.5616722", "0.5613688", "0.56101567", "0.56092685", "0.5605096", "0.55921423", "0.5587881", "0.5584694", "0.5582823", "0.55745757", "0.55742586", "0.55655617", "0.5554487", "0.55510455", "0.5546368", "0.5546041", "0.55365676", "0.5529753", "0.5529608", "0.55176806", "0.55170363", "0.5512209", "0.5511934", "0.5511356", "0.54941976", "0.54931504", "0.5492995", "0.5492738", "0.54888403", "0.54852045", "0.5480867", "0.54779446", "0.5474223", "0.5473921", "0.54724324", "0.54720247", "0.54715645", "0.5470495", "0.54685783", "0.54624975", "0.54618055", "0.5459152", "0.5457741", "0.5456337", "0.5452808", "0.54512596", "0.5443291", "0.5437856" ]
0.5952177
16
Act do whatever the Silloncito wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment.
public void act() { // Add your action code here. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void act() \r\n {\r\n key();\r\n win();\r\n fall();\r\n lunch();\r\n }", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "public void act() {\n\t}", "public void act() \n {\n if (canGiveTestimony()) {\n giveTestimony();\n }\n }", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "public void act()\n {\n // handle key events\n String key = Greenfoot.getKey();\n if (key != null)\n {\n handleKeyPress(key);\n } \n\n // handle mouse events\n if (startGameButton.wasClicked())\n {\n handleStartGame();\n }\n }", "public void act();", "public void act() \n {\n // Add your action code here.\n klawisze();\n stawiaj();\n pobierzJablka();\n }", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "public void act() \n {\n // Add your action code here.\n MyWorld world = (MyWorld) getWorld();\n jefe = world.comprobarJefe();\n \n \n explotar();\n \n if(jefe)\n {\n girarHaciaEnemigo();\n movimientoPegadoAJefe();\n }\n }", "void act();", "public void act() {\r\n\t\tturn(steps[number % steps.length]);\r\n\t\tnumber++;\r\n\t\tsuper.act();\r\n\t}", "public void act() \r\n {\r\n \r\n // Add your action code here\r\n MovimientoNave();\r\n DisparaBala();\r\n Colisiones();\r\n //muestraPunto();\r\n //archivoTxt();\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n tembak();\r\n gerakKiri();\r\n gerakKanan();\r\n \r\n \r\n \r\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "@Override\n public void act() {\n }", "@Override\n protected void doAct() {\n }", "public void act() \n {\n // Add your action code here.\n tempoUp();\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n checkCollision();\n KeyMovements(); \n attackWeapon();\n //stopGame();\n \n }", "@Override\n public void act() {\n sleepCheck();\n if (!isAwake()) return;\n while (getActionTime() > 0f) {\n UAction action = nextAction();\n if (action == null) {\n this.setActionTime(0f);\n return;\n }\n if (area().closed) return;\n doAction(action);\n }\n }", "public void act() \n {\n movegas();\n \n atingido2(); \n \n }", "public void act()\n {\n // Make sure fish is alive and well in the environment -- fish\n // that have been removed from the environment shouldn't act.\n if ( isInEnv() ) \n move();\n }", "public void act() \n {\n frameCount++;\n animateFlying();\n if (getWorld() instanceof DreamWorld)\n {\n dream();\n }\n else if (getWorld() instanceof FinishScreen)\n {\n runEnd();\n }\n }", "public void act() \n {\n moveEnemy();\n checkHealth();\n attacked();\n }", "@Override\n public void run() {\n chosenActionUnit.run(getGame(), inputCommands);\n }", "public void act() \n {\n gravity();\n animate();\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void intialRun() {\n }", "public void doInteract()\r\n\t{\n\t}", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "public void interact() {\r\n\t\t\r\n\t}", "public void act() {\n\t\tif (canMove2()) {\n\t\t\tsteps += 2;\n\t\t\tmove();\n\t\t} else {\n\t\t\tturn();\n\t\t\tsteps = 0;\n\t\t}\n\t}", "public void act()\n {\n \n if (wait < 75)\n {\n wait = wait + 1;\n }\n \n \n \n \n \n \n if (wait == 75)\n {\n change();\n checkForBounce();\n checkForEdge();\n checkWin(); \n }\n \n \n }", "public void act()\n {\n trackTime();\n showScore();\n \n }", "public void act() \n {\n \n checkKey();\n platformAbove();\n \n animationCounter++;\n checkFall();\n }", "public void act() \r\n {\r\n super.mueve();\r\n super.tocaBala();\r\n super.creaItem();\r\n \r\n if(getMoveE()==0)\r\n {\r\n \r\n if(shut%3==0)\r\n {\r\n dispara();\r\n shut=shut%3;\r\n shut+=1;\r\n \r\n }\r\n else \r\n shut+=1;\r\n }\r\n super.vidaCero();\r\n }", "public void act() \r\n {\r\n if ( Greenfoot.isKeyDown( \"left\" ) )\r\n {\r\n turn( -5 );\r\n }\r\n\r\n else if ( Greenfoot.isKeyDown( \"right\" ) )\r\n {\r\n turn( 5 );\r\n }\r\n if ( Greenfoot.isKeyDown(\"up\") )\r\n {\r\n move(10);\r\n }\r\n else if ( Greenfoot.isKeyDown( \"down\") )\r\n {\r\n move(-10);\r\n }\r\n if ( IsCollidingWithGoal() )\r\n {\r\n getWorld().showText( \"You win!\", 300, 200 );\r\n Greenfoot.stop();\r\n }\r\n }", "@Override\n\tpublic void act(float dt){\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tRun();\n\t}", "public void act() \n {\n fall();\n }", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "public void act() \n {\n moveAround(); \n addBomb(); \n touchGhost(); \n }", "public void act() {\n\t\tif (canMove()) {\n\t\t\tif (isOnBase()) {\n\t\t\t\tif (steps < baseSteps) {\n\t\t\t\t\tmove();\n\t\t\t\t\tsteps++;\n\t\t\t\t} else {\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tsteps = 0;\n\t\t\t\t}\n\t\t\t} else if (steps == baseSteps / 2) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps++;\n\t\t\t} else if (steps == baseSteps + 1) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps = 0;\n\t\t\t} else {\n\t\t\t\tmove();\n\t\t\t\tsteps++;\n\t\t\t}\n\t\t} else {\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tsteps = 0;\n\t\t}\n\t}", "public void act() \n {\n move(5);\n turn(4);\n }", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "public void act()\n {\n displayBoard();\n Greenfoot.delay(10);\n \n if( checkPlayerOneWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player One!\", \"playerOne Win\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkPlayerTwoWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player Two!\", \"plauerTwo Win\",JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkBoardFilled() == true )\n {\n JOptionPane.showMessageDialog( null, \"It is a draw!\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( messageShown == false )\n {\n showTurn();\n \n messageShown = true;\n }\n \n checkMouseClick();\n }", "public void act() \r\n {\r\n move();\r\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\tif (startstopB.getText().equals(\"Continue\")){\n\t\t\t\tstartstopB.setText(\"Start\");\n\t\t\t\tsetupB.setEnabled(true);\n\t\t\t\texitB.setEnabled(true);\n\t\t\t\t\n\t\t\t\tif (TEM.runchtid!=TEM.prechtid && chtSelected.length>1) {\n\t\t\t\t\ticht++;\n\t\t\t\t\tTEM.prechtid = TEM.runchtid;\n\t\t\t\t} \n\t\t\t\t\t\t\t\t \n\t\t\t// 2) after all above, Start the run as defined\n\t\t\t} else if(startstopB.getText().equals(\"Start\")){\n\t\t\t\tstartstopB.setText(\"Continue\");\n\t\t\t\tsetupB.setEnabled(false);\n\t\t\t\texitB.setEnabled(false);\n\t\t\t\t\n\t\t\t\trunTEM();\n\t\t\t\t\n\t\t\t}\n\t\t}", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void act() \n {\n movement();\n }", "public void act()\r\n\t{\r\n\t\tyVel += gravity;\r\n\t\t//Resets the jump delay to when greater than 0\r\n\t\tif (jDelay > 0)\r\n\t\t{\r\n\t\t\tjDelay--;\r\n\t\t}\r\n\t\t//Sets the vertical velocity and jump delay of the bird after a jump\r\n\t\tif (alive == true && (Menu.keyPress == KeyEvent.VK_SPACE) && jDelay <= 0) \r\n\t\t{\r\n\t\t\tMenu.keyPress = 0;\r\n\t\t\tyVel = -10;\r\n\t\t\tjDelay = 10;\r\n\t\t}\r\n\t\ty += (int)yVel;\r\n\t}", "@FXML\n\tpublic void run(ActionEvent event){\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tif(combat == true && currentPos != finishCircle) {\t// Check if the player is in combat and they are not at the boss circle\n\t\t\n\t\t\tint runCalc = rand.nextInt(101);\n\t\t\n\t\t\tif(runCalc <= 25) {\t// Roll for ability to run\n\t\t\t\n\t\t\t\n\t\t\t\tevents.appendText(\"Run Successful! WOOSH\\n\");\n\t\t\t\t\n\t\t\t\tcombat=false;\n\t\t\t\n\t\t\t} else if(runCalc > 20) {\t\t\n\t\t\n\t\t\t\tevents.appendText(\"Run Failed! Prepare for pain!\\n\");\t\n\t\t\t\t\n\t\t\t\tenemyAttack();\n\t\t\t}\n\t\t\n\t\t}\n\t\telse if(combat == true && currentPos == finishCircle) {\t// Inform player they cannot run at boss\n\t\t\t\n\t\t\tevents.appendText(\"There is no escaping Morthar!\\n\");\n\t\t\t\n\t\t\tenemyAttack();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void performAction();", "public void act()\n {\n \n //move();\n //if(canSee(Worm.class))\n //{\n // eat(Worm.class);\n //}\n //else if( atWorldEdge() )\n //{\n // turn(15);\n //}\n\n }", "public void act() \n {\n canSeeAlex();\n }", "public void act()\n {\n mudaImagem();\n }", "@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}", "public void run(IAction action) {\n\t\tMessageDialog.openInformation(window.getShell(), \"AccTrace\",\n\t\t\t\t\"Hello, Eclipse world\");\n\t}", "public void doAction(){}", "public void act(){\n super.act();\n }", "public void act()\n { \n if(returnTime.millisElapsed() > 1000) { //time count down every second\n time --;\n }\n \n if (time == 0) { \n bgm.stop();\n Greenfoot.stop();\n }\n \n showCredit();\n }", "protected void execute() {\n \tif (isIntaking) {\n \t\tRobot.conveyor.forward();\n \t} else {\n \t\tRobot.conveyor.backward();\n \t}\n }", "public void act ()\n {\n checkScroll();\n checkPlatform();\n checkXAxis();\n checkDeath();\n // get the current state of the mouse\n MouseInfo m = Greenfoot.getMouseInfo();\n // if the mouse is on the screen...\n if (m != null)\n {\n // if the mouse button was pressed\n if (Greenfoot.mousePressed(null))\n {\n // shoot\n player.shoot(m.getX(), m.getY());\n }\n }\n }", "public void act() \n {\n moveAround();\n die();\n }", "public void act() \r\n {\r\n move(speed); //move at set speed\r\n \r\n if(actCounter < 2) //increases act counter if only 1 act has passed\r\n actCounter++;\r\n\r\n if(actCounter == 1) //if on the first act\r\n {\r\n targetClosestPlanet(); //will target closest planet depending on if it wants to find an unconquered planet, or just the closest one\r\n if(planet == null && findNearestPlanet)\r\n findNearestPlanet = false;\r\n }\r\n \r\n if(health > 0) //if alive\r\n {\r\n if(findNearestPlanet)\r\n targetClosestPlanet();\r\n if(planet != null && planet.getWorld() != null) //if planet exists\r\n moveTowards(); //move toward it\r\n else\r\n moveRandomly(); //move randomly\r\n }\r\n \r\n if(removeMe || atWorldEdge())\r\n getWorld().removeObject(this);\r\n }", "public void act() \r\n {\r\n addDrone();\r\n if(droneTimer>0)\r\n {\r\n droneTimer--;\r\n }\r\n }", "public void act() \n {\n if(isAlive)\n {\n move(2);\n if(isAtEdge())\n {\n turnTowards(300, 300);\n GreenfootImage img = getImage();\n img.mirrorVertically();\n setImage(img);\n }\n if (getY() <= 150 || getY() >= 395)\n {\n turn(50);\n }\n if(isTouching(Trash.class))\n {\n turnTowards(getX(), 390);\n move(1);\n setLocation(getX(), 390);\n die();\n }\n }\n }", "public void perform() {\n\t\tlog.info(\"begin to play the drum\");\n\t\tthrow new RuntimeException();\n\t}", "public void act() \n {\n playerMovement();\n }", "public void act() \n {\n // Add your action code here.\n \n //setRotation();\n setLocation(getX(),getY()+2);\n movement();\n \n }", "@Override\n\tpublic void doAction(String action) {\n\t\tthis.action = action;\n\t\t\n\t\tthis.gameController.pause();\n\t}", "public void act()\n {\n if(onSales == true)\n {\n calculateSale();\n }\n }", "public void act() \r\n {\r\n if (startTime > 0) {\r\n startTime--;\r\n }\r\n else {\r\n if (isScared()) {\r\n doScareMode();\r\n }\r\n else {\r\n if (counter == 0 || !canMove(currDirectionStr)) {\r\n counter = CELL_SIZE * 4;\r\n prevDirection = currDirection;\r\n do {\r\n currDirection = (int)(Math.random() * 10);\r\n if (currDirection == 0) {\r\n currDirectionStr = \"up\";\r\n }\r\n else if (currDirection == 1) {\r\n currDirectionStr = \"left\";\r\n }\r\n else if (currDirection == 2) {\r\n currDirectionStr = \"down\";\r\n }\r\n else if (currDirection == 3) {\r\n currDirectionStr = \"right\";\r\n }\r\n } while (!canMove(currDirectionStr));\r\n }\r\n \r\n if (canMove(currDirectionStr)) {\r\n move(currDirectionStr);\r\n }\r\n counter--;\r\n } \r\n }\r\n }", "public void act() \n {\n // Add your action code here.\n // get the Player's location\n if(!alive) return;\n \n int x = getX();\n int y = getY();\n \n // Move the Player. The setLocation() method will move the Player to the new\n // x and y coordinates.\n \n if( Greenfoot.isKeyDown(\"right\") ){\n setLocation(x+1, y);\n } else if( Greenfoot.isKeyDown(\"left\") ){\n setLocation(x-1, y);\n } else if( Greenfoot.isKeyDown(\"down\") ){\n setLocation(x, y+1);\n } else if( Greenfoot.isKeyDown(\"up\") ){\n setLocation(x, y-1);\n } \n \n removeTouching(Fruit.class);\n if(isTouching(Bomb.class)){\n alive = false;\n }\n \n }", "public void action() {\n action.action();\n }", "public void actionPerformed(ActionEvent e) {\r\n String ac = e.getActionCommand();\r\n if (Constants.CMD_RUN.equals(ac)) {\r\n try {\r\n stopOps = false;\r\n installAndRun(this, cfg);\r\n } catch (Exception ex) {\r\n // assume SecurityEx or some other problem...\r\n setStatus(\"Encountered problem:\\n\" + ex.toString()\r\n + \"\\n\\nPlease insure that all components are installed properly.\");\r\n } // endtry\r\n } // endif\r\n }", "@Override\n public void interact() {\n System.out.print(\"Halo aku ikan di bawah laut dalam lho, aku punya lampu supaya aku\" \n + \"bisa tetap melihat di kegelapan\");\n }", "public void act() \n {\n verificaClique();\n }", "public void execute() {\n\t\tString userID = clientMediator.getUserName();\n\t\tString id = reactToController.communicateWith(userID);\n\t\tif(id != null){\n\t\t\tclientMediator.setReactTo(id);\n\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tString message = reactToController.reactToEntity(id,userID);\n\t\t\tString result = \"You just interacted with \" + id + \", so you \" + message + \" at \" + df.format(new Date()).toString();\n\t\t\tclientMediator.setReactResult(result);\n\t\t\tclientMediator.getEventQueue().add(new ReactToEvent(id,userID));\n\t\t}\n\t}", "public void act() \r\n {\r\n GreenfootImage img = new GreenfootImage(500,500);\r\n img.setColor(Color.RED);\r\n float fontSize = 25.0f; \r\n Font font = img.getFont().deriveFont(fontSize);\r\n img.setFont(font); \r\n img.drawString(\"Press enter to retry\",50,50);\r\n setImage(img);\r\n }", "@Override\n public void doAction() {\n this.game.setComputerStartsFirst(false);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (runButton_.isSelected()) {\n runButton_.setText(\"Abort Acquisition\");\n runAcquisition();\n } else {\n runButton_.setText(\"Run Acquisition\");\n }\n }" ]
[ "0.71661246", "0.7103851", "0.70532775", "0.7048233", "0.70320755", "0.70003146", "0.6811513", "0.6767809", "0.6750942", "0.6735825", "0.6726687", "0.6717557", "0.668208", "0.66758645", "0.6663981", "0.6663981", "0.6663981", "0.664861", "0.66188323", "0.66103977", "0.6604538", "0.6604538", "0.6604538", "0.6604538", "0.6604538", "0.6604538", "0.6604538", "0.6604538", "0.65711164", "0.65710837", "0.65601355", "0.6538866", "0.65236723", "0.6473813", "0.644285", "0.642645", "0.6425839", "0.6425839", "0.6425839", "0.6425839", "0.6425839", "0.6425839", "0.6425839", "0.63900405", "0.63794905", "0.6371308", "0.63621116", "0.6360265", "0.6357216", "0.6345232", "0.63281703", "0.63254094", "0.63195044", "0.6313409", "0.6263552", "0.6262238", "0.62450486", "0.62442493", "0.6239181", "0.62375605", "0.6235086", "0.62128675", "0.62113637", "0.6180779", "0.6180331", "0.6174452", "0.6148933", "0.61481076", "0.613812", "0.61376905", "0.6121935", "0.61151385", "0.61132175", "0.61132175", "0.60886896", "0.6081533", "0.60726523", "0.60683674", "0.6054789", "0.6053559", "0.6053017", "0.6049042", "0.6028287", "0.6024734", "0.60140646", "0.60136586", "0.6002829", "0.59970295", "0.59966433", "0.59683096", "0.5960745", "0.5954475", "0.5945096", "0.5941336", "0.5931415", "0.59248376", "0.5923221", "0.5922381", "0.5905082" ]
0.67360806
10
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = inflater.inflate(R.layout.fragment_event_details_view, container, false); this.ctx = root.getContext(); this.tvDate = (TextView) root.findViewById(R.id.tv_date); this.tvTitle = (TextView) root.findViewById(R.id.tv_title); this.tvCreator = (TextView) root.findViewById(R.id.tv_creator); this.tvDescription = (TextView) root.findViewById(R.id.tv_description); this.tvStartTime = (TextView) root.findViewById(R.id.tv_start_time); this.tvEndTime = (TextView) root.findViewById(R.id.tv_end_time); this.btnAlarm = (Button) root.findViewById(R.id.btn_alarm); this.btnJoinEvent = (Button)root.findViewById(R.id.btn_join_event); this.lvParticipants = (ListView) root.findViewById(R.id.lv_participants); this.adapter = new ArrayAdapter<String>(this.getContext(),android.R.layout.simple_list_item_1,new ArrayList<String>()); lvParticipants.setAdapter(this.adapter); this.btnAlarm.setOnClickListener(this); this.btnJoinEvent.setOnClickListener(this); this.presenter.start(); return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
/ Constructor Bot Informasi diperoleh dari file state.json dengan menggunakan library gson Lalu dicari informasi per lane nya dengan metode getLaneInfoFromPlayer
public Bot(GameState gameState) { this.gameState = gameState; gameDetails = gameState.getGameDetails(); gameWidth = gameDetails.mapWidth; gameHeight = gameDetails.mapHeight; myself = gameState.getPlayers().stream().filter(p -> p.playerType == PlayerType.A).findFirst().get(); opponent = gameState.getPlayers().stream().filter(p -> p.playerType == PlayerType.B).findFirst().get(); buildings = gameState.getGameMap().stream() .flatMap(c -> c.getBuildings().stream()) .collect(Collectors.toList()); missiles = gameState.getGameMap().stream() .flatMap(c -> c.getMissiles().stream()) .collect(Collectors.toList()); myTotal = new ArrayList<Integer>(){{add(0);add(0);add(0);add(0);add(0);add(0);}}; enTotal = new ArrayList<Integer>(){{add(0);add(0);add(0);add(0);add(0);add(0);}}; myLaneInfo = new ArrayList<List<List<Integer>>>(); enLaneInfo = new ArrayList<List<List<Integer>>>(); for (int i = 0; i < gameHeight; i++) { myLaneInfo.add(getLaneInfoFromPlayer(PlayerType.A,i)); enLaneInfo.add(getLaneInfoFromPlayer(PlayerType.B,i)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BSState() {\n this.playerTurn=1;\n this.p1TotalHits=0;\n this.p2TotalHits=0;\n this.shipsAlive=10;\n this.shipsSunk=0;\n this.isHit=false;\n this.phaseOfGame=\"SetUp\";\n this.shotLocations=null;\n this.shipLocations=null;\n this.shipType=1;\n this.board=new String[10][20];\n //this.player1=new HumanPlayer;\n //this.player2=new ComputerPlayer;\n\n }", "public GameSummary(final com.google.gson.JsonObject infoFromServer) {\n\n data = infoFromServer;\n\n id = data.get(\"id\").getAsString();\n mode = data.get(\"mode\").getAsString();\n owner = data.get(\"owner\").getAsString();\n players = data.get(\"players\").getAsJsonArray();\n\n }", "public GameInfo getGameInfo() throws InterruptedException, IOException, URISyntaxException {\n String json = caller.GET(\"game/status\");\n\n GsonBuilder builder = new GsonBuilder();\n builder.registerTypeAdapter(GameInfo.class, new GameInfoDeserializer());\n\n Gson gson = builder.create();\n\n return gson.fromJson(json, GameInfo.class);\n }", "public static void init(game_service game) {\n String g = game.getGraph();\n String fs = game.getPokemons();\n directed_weighted_graph gg = loadgraph(g);\n arna = new Arena();\n arna.setGraph(gg);\n arna.setPokemons(Arena.json2Pokemons(fs));\n String info = game.toString();\n JSONObject line;\n try {\n line = new JSONObject(info);\n JSONObject json = line.getJSONObject(\"GameServer\");\n int num_agent = json.getInt(\"agents\");\n Comparator<CL_Pokemon> compi = new Comparator<CL_Pokemon>() {\n\n @Override\n public int compare(CL_Pokemon o1, CL_Pokemon o2) {\n return Double.compare(o2.getValue(), o1.getValue());\n }\n };\n PriorityQueue<CL_Pokemon> pokemons_val = new PriorityQueue<CL_Pokemon>(compi);\n ArrayList<CL_Pokemon> pokemons = Arena.json2Pokemons(game.getPokemons());\n for (int a = 0; a < pokemons.size(); a++) {\n Arena.updateEdge(pokemons.get(a), gg);\n pokemons_val.add(pokemons.get(a));\n }\n while (!pokemons_val.isEmpty() && num_agent != 0) {\n CL_Pokemon c = pokemons_val.poll();\n System.out.println(pokemons_val);\n int dest = c.get_edge().getDest();\n if (c.getType() < 0) {\n dest = c.get_edge().getSrc();\n }\n game.addAgent(dest);\n num_agent--;\n }\n arna.setAgents(Arena.getAgents(game.getAgents(), gg));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n window = new MyWindow(arna);\n\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n Gson gson = new Gson();\n // Random random = new Random(System.nanoTime());\n int banana = 3;\n int snowball = 3;\n int strategi = 0;\n while (true) {\n try {\n int roundNumber = sc.nextInt();\n\n String statePath = String.format(\"./%s/%d/%s\", ROUNDS_DIRECTORY, roundNumber, STATE_FILE_NAME);\n String state = new String(Files.readAllBytes(Paths.get(statePath)));\n\n GameState gameState = gson.fromJson(state, GameState.class);\n Bot bot = new Bot(gameState,banana,snowball,strategi);\n Command command = bot.run();\n banana = bot.BananaValue();\n snowball = bot.SnowballValue();\n strategi = bot.Strategi();\n \n\n System.out.println(String.format(\"C;%d;%s\", roundNumber, command.render()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public LevelInformation seperateLeveData() {\n try {\n // put the value of \"level_name\" in levelName\n String levelName = map.get(\"level_name\");\n // create a list of velocities\n List<Velocity> velocities = getVelocitiesForLevel();\n // find the speed of the paddle\n int paddleSpeed = Integer.parseInt(map.get(\"paddle_speed\"));\n // find the width of the paddle\n int paddleWidth = Integer.parseInt(map.get(\"paddle_width\"));\n // find the number of blocks\n int numOfBlocks = Integer.parseInt(map.get(\"num_blocks\"));\n // creating a list of blocks\n List<Block> blockList = createBlocks();\n String backround = map.get(\"background\");\n // create a level based on the Level Data\n LevelData oneLevel = new LevelData(levelName, velocities, paddleSpeed, paddleWidth, numOfBlocks, blockList);\n if (backround.contains(\"image\")) {\n backround = backround.replaceAll(\"[()]\", \"\");\n backround = backround.substring(5);\n // create an InputStream object\n InputStream imageIS = ClassLoader.getSystemClassLoader().getResourceAsStream(backround);\n Image image = null;\n // try to load the image\n try {\n image = ImageIO.read(imageIS);\n } catch (IOException e) {\n e.printStackTrace();\n } // set the backround\n oneLevel.setBackroundImage(image);\n imageIS.close();\n return oneLevel;\n } else {\n oneLevel.setBackroundColor(new ColorsParser().colorFromString(backround));\n return oneLevel;\n }\n } catch (Exception e) {\n messageToUser();\n }\n return null;\n }", "public static void readAndUpdateStates() {\n\t\tString states = state.toString();\n\t\tScanner scanner = new Scanner(states);\n\t\tscanner.useDelimiter(\"\\n\");\n\t\tString[] tmps;\n\t\twhile (scanner.hasNext()) {\n\t\t\tString oneLine = scanner.next();\n\t\t\tif (oneLine.equals(\"GLOBALS\")) {\n\t\t\t\tString turnLine = scanner.next();\n\t\t\t\tString playerLine = scanner.next();\n\t\t\t\tString IDLine = scanner.next();\n\t\t\t\ttmps = turnLine.split(\": \");\n\t\t\t\tglobalTurn = Integer.valueOf(tmps[1]);\n\t\t\t\ttmps = playerLine.split(\": \");\n\t\t\t\tplayerCount = Integer.valueOf(tmps[1]);\n\t\t\t\ttmps = IDLine.split(\": \");\n\t\t\t\tmyID = Integer.valueOf(tmps[1]);\n\t\t\t} else if (oneLine.equals(\"PLAYER SCORES\")) {\n\t\t\t\tString scoreLine = scanner.next();\n\t\t\t\ttmps = scoreLine.split(\": \");\n\t\t\t\tscore[0] = Float.valueOf(tmps[1]);\n\t\t\t\tscoreLine = scanner.next();\n\t\t\t\ttmps = scoreLine.split(\": \");\n\t\t\t\tscore[1] = Float.valueOf(tmps[1]);\n\n\t\t\t} else if (oneLine.equals(\"BOARD STATE\")) {\n\t\t\t\tString pointLine;\n\t\t\t\twhile ((pointLine = scanner.next()) != null) {\n\t\t\t\t\tif (pointLine.length() == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\ttmps = pointLine.split(\": \");\n\t\t\t\t\tint playerId = Integer.parseInt(tmps[0]);\n\t\t\t\t\ttmps = tmps[1].split(\" \");\n\t\t\t\t\tPoint newPoint = new Point(Integer.parseInt(tmps[0]),\n\t\t\t\t\t\t\tInteger.parseInt(tmps[1]));\n\t\t\t\t\tif (!map.containsKey(playerId)) {\n\t\t\t\t\t\tSet<Point> pointSet = new TreeSet<Point>();\n\t\t\t\t\t\tpointSet.add(newPoint);\n\t\t\t\t\t\tmap.put(playerId, pointSet);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSet<Point> pointSet = map.get(playerId);\n\t\t\t\t\t\tif (!pointSet.contains(newPoint)) {\n\t\t\t\t\t\t\tpointSet.add(newPoint);\n\t\t\t\t\t\t\tmap.put(playerId, pointSet);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public Player(JsonObject jsonPlayer) {\n this.nickname = jsonPlayer.get(\"nickname\").getAsString();\n this.nRedAmmo = jsonPlayer.get(\"nRedAmmo\").getAsInt();\n this.nBlueAmmo = jsonPlayer.get(\"nBlueAmmo\").getAsInt();\n this.nYellowAmmo = jsonPlayer.get(\"nYellowAmmo\").getAsInt();\n this.points = jsonPlayer.get(\"points\").getAsInt();\n\n this.weaponList = new ArrayList<>();\n JsonArray jsonWeaponList = jsonPlayer.get(\"weaponList\").getAsJsonArray();\n for (int i = 0; i < jsonWeaponList.size(); i++) {\n Weapon w = new Weapon(jsonWeaponList.get(i).getAsJsonObject());\n this.weaponList.add(w);\n }\n\n this.powerUpList = new ArrayList<>();\n JsonArray jsonPowerUpList = jsonPlayer.get(\"powerUpList\").getAsJsonArray();\n for (int i = 0; i < jsonPowerUpList.size(); i++) {\n PowerUp p = new PowerUp(jsonPowerUpList.get(i).getAsJsonObject());\n this.powerUpList.add(p);\n }\n\n this.damages = new ArrayList<>();\n JsonArray jsonDamages = jsonPlayer.get(\"damages\").getAsJsonArray();\n for (int i = 0; i < jsonDamages.size(); i++) {\n String s = jsonDamages.get(i).getAsString();\n this.damages.add(s);\n }\n\n this.marks = new ArrayList<>();\n JsonArray jsonMarks = jsonPlayer.get(\"marks\").getAsJsonArray();\n for (int i = 0; i < jsonMarks.size(); i++) {\n String s = jsonMarks.get(i).getAsString();\n this.marks.add(s);\n }\n\n this.nDeaths = jsonPlayer.get(\"nDeaths\").getAsInt();\n this.xPosition = jsonPlayer.get(\"xPosition\").getAsInt();\n this.yPosition = jsonPlayer.get(\"yPosition\").getAsInt();\n this.isDead = jsonPlayer.get(\"isDead\").getAsBoolean();\n this.nMoves = jsonPlayer.get(\"nMoves\").getAsInt();\n this.nMovesBeforeGrabbing = jsonPlayer.get(\"nMovesBeforeGrabbing\").getAsInt();\n this.nMovesBeforeShooting = jsonPlayer.get(\"nMovesBeforeShooting\").getAsInt();\n this.playerStatus = new PlayerStatus(jsonPlayer.get(\"playerStatus\").getAsJsonObject());\n }", "public void load(BSGameState state);", "private void getGameState(String version){\n\n }", "public void loadState() throws IOException, ClassNotFoundException {\n\t\tFile f = new File(workingDirectory() + File.separator + id() + FILE_EXTENSION);\n\t\t\n\t\t// load client state from file\n\t\tObjectInputStream is = new ObjectInputStream(new FileInputStream(f));\n\t\tTrackerDaemon client = (TrackerDaemon) is.readObject();\n\t\tis.close();\n\t\t\n\t\t// copy attributes\n\t\tthis.peerRecord = client.peerRecord();\n\t\t\n\t}", "public GameState(){\n this.gameResults = \"\";\n initVars();\n this.theme = DEFAULT_THEME;\n this.board = new Board(DEFAULT_BOARD);\n createSetOfPlayers(DEFAULT_PLAYERS, DEFAULT_AUTOPLAYER, DEFAULT_AUTOMODE);\n }", "public void getStateJson() throws JSONException {\n String json = null;\n try {\n InputStream inputStream = getAssets().open(\"states.json\");\n int size = inputStream.available();\n byte[] buffer = new byte[size];\n inputStream.read(buffer);\n inputStream.close();\n json = new String(buffer, \"UTF-8\");\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n \n \n JSONObject jsonObject = new JSONObject(json);\n JSONArray events = jsonObject.getJSONArray(\"states\");\n for (int j = 0; j < events.length(); j++) {\n JSONObject cit = events.getJSONObject(j);\n State stateData = new State();\n \n stateData.setStateId(Integer.parseInt(cit.getString(\"id\")));\n stateData.setStateName(cit.getString(\"name\"));\n stateData.setCountryId(Integer.parseInt(cit.getString(\"country_id\")));\n stateObject.add(stateData);\n }\n }", "private void parseStartData(Player player, Board board, BoardJSON bjson) {\n if (player == null) {\r\n return;\r\n }\r\n board.setStartXY(bjson.startX(), bjson.startY());\r\n board.startInventory = bjson.startInventory();\r\n \r\n // Does the player have a position (not -1/-1)\r\n int startX = player.getStartX(); \r\n int startY = player.getStartY();\r\n \r\n if (startX == -1 && startY == -1) {\r\n // No, use the start values\r\n startX = board.getStartX();\r\n startY = board.getStartY();\r\n if (board.startInventory != null) {\r\n String[] items = board.startInventory.split(\",\");\r\n for (int i=0; i < items.length; i++) {\r\n Item item = (Item)Registry.get().getPiece(items[i].trim());\r\n if (item != null) {\r\n player.getBag().add(item);\r\n }\r\n }\r\n }\r\n }\r\n // Place the player. Take note of the player's condition: he or she might be\r\n // paralyzed or turned to stone, and we want to represent that, recreating the \r\n // AgentProxy involved to do so. \r\n Cell cell = board.getCellAt(startX, startY);\r\n if (cell != null) {\r\n if (player.is(PARALYZED)) {\r\n cell.setAgent(new Paralyzed(player));\r\n } else if (player.is(TURNED_TO_STONE)) {\r\n cell.setAgent(new Statue(player, Color.NONE));\r\n } else {\r\n cell.setAgent(player); \r\n }\r\n }\r\n }", "private GameInformation() {\n }", "public void onEnable(){\n new File(getDataFolder().toString()).mkdir();\n playerFile = new File(getDataFolder().toString() + \"/playerList.txt\");\n commandFile = new File(getDataFolder().toString() + \"/commands.txt\");\n blockFile = new File(getDataFolder().toString() + \"/blockList.txt\");\n deathFile = new File(getDataFolder().toString() + \"/deathList.txt\");\n startupFile = new File(getDataFolder().toString() + \"/startupCommands.txt\");\n \n //Load the player file data\n playerCommandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(playerFile));\n StringTokenizer st;\n String input;\n String name;\n String command;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Player> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n command = st.nextToken();\n playerCommandMap.put(name, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original player command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading player command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted player command file\");\n }\n \n //Load the block file data\n blockCommandMap = new HashMap<Location, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(blockFile));\n StringTokenizer st;\n String input;\n String command;\n Location loc = null;\n \n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Block Location> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n loc = new Location(getServer().getWorld(UUID.fromString(st.nextToken())), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()));\n command = st.nextToken();\n blockCommandMap.put(loc, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original block command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading block command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted block command file\");\n }\n \n //Load the player death file data\n deathCommandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(deathFile));\n StringTokenizer st;\n String input;\n String name;\n String command;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Player> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n command = st.nextToken();\n deathCommandMap.put(name, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original player death command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading player death command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted player death command file\");\n }\n \n //Load the start up data\n startupCommands = \"\";\n try{\n BufferedReader br = new BufferedReader(new FileReader(startupFile));\n String input;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Command>\") == 0){\n continue;\n }\n startupCommands += \":\" + input;\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original start up command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading start up command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted start up command file\");\n }\n \n //Load the command file data\n commandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(commandFile));\n StringTokenizer st;\n String input;\n String args;\n String name;\n \n //Assumes that the name is only one token long\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Identifing name> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n args = st.nextToken();\n while(st.hasMoreTokens()){\n args += \" \" + st.nextToken();\n }\n commandMap.put(name, args);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted command file\");\n }\n \n placeBlock = false;\n startupDone = false;\n blockCommand = \"\";\n playerPosMap = new HashMap<String, Location>();\n \n //Set up the listeners\n PluginManager pm = this.getServer().getPluginManager();\n pm.registerEvent(Event.Type.PLAYER_INTERACT_ENTITY, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_JOIN, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Normal, this);\n \n log.info(\"Autorun Commands v2.3 is enabled\");\n }", "public void getStateJson() throws JSONException {\n String json = null;\n try {\n InputStream inputStream = getAssets().open(\"states.json\");\n int size = inputStream.available();\n byte[] buffer = new byte[size];\n inputStream.read(buffer);\n inputStream.close();\n json = new String(buffer, \"UTF-8\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n JSONObject jsonObject = new JSONObject(json);\n JSONArray events = jsonObject.getJSONArray(\"states\");\n for (int j = 0; j < events.length(); j++) {\n JSONObject cit = events.getJSONObject(j);\n State stateData = new State();\n\n stateData.setStateId(Integer.parseInt(cit.getString(\"id\")));\n stateData.setStateName(cit.getString(\"name\"));\n stateData.setCountryId(Integer.parseInt(cit.getString(\"country_id\")));\n stateObject.add(stateData);\n }\n }", "private GUIGameInfo() {\n this.board = new GUIBoard();\n this.logic = new regLogic();\n this.players = new Player[2];\n this.players[0] = new Player(Symbol.BLACK);\n this.players[1] = new Player(Symbol.WHITE);\n this.guiPlayers = new GUIPlayer[2];\n this.guiPlayers[0] = new GUIPlayer(this.players[0]);\n this.guiPlayers[1] = new GUIPlayer(this.players[1]);\n\n }", "@Override\n public void load() {\n File file = new File(path + \"/\" + \"rooms.txt\"); //Hold file of the riddles. riddles.txt should be placed in the root folder.\n Scanner scanner = null; //if the scanner can't load the file.\n\n try {\n scanner = new Scanner(file); // scanner for the file\n } catch (FileNotFoundException ex) {\n try {\n //if not such file exists create it.\n file.createNewFile();\n } catch (IOException ex1) {\n Logger.getLogger(LoadRooms.class.getName()).log(Level.SEVERE, null, ex1);\n return;\n }\n }\n while (scanner.hasNextLine()) { //if scanner har fundt next line of text in the file\n switch (scanner.nextLine()) {\n case \"[Room]:\": //if scanner fundt \"[Room]:\" case, get rooms attributes\n state = LOAD_ATTRIBUTES;\n break;\n case \"[Connections]:\"://if scanner fundt \"[Connections]:\" case, get connections from file\n state = LOAD_CONNECTIONS;\n break;\n\n default:\n break;\n }\n switch (state) {\n case LOAD_ATTRIBUTES: //case, that get rooms attributes and add them to room_list\n String name = scanner.nextLine();\n int timeToTravel = Integer.parseInt(scanner.nextLine());\n boolean isLocked = Boolean.parseBoolean(scanner.nextLine());\n boolean isTransportRoom = Boolean.parseBoolean(scanner.nextLine());\n Room newRoom = new Room(name, timeToTravel, isLocked, isTransportRoom);\n if (newRoom.isTransportRoom()) {\n newRoom.setExit(\"exit\", newRoom);\n newRoom.setExitDir(\"west\", newRoom);\n }\n rooms_list.add(newRoom);\n break;\n case LOAD_CONNECTIONS: //case that get connections betweem rooms in game\n while (scanner.hasNextLine()) {\n String[] string = scanner.nextLine().split(\",\");\n Room room = this.getRoomByName(string[0]);\n room.setExit(string[1], this.getRoomByName(string[1]));\n if (!this.getRoomByName(string[1]).isTransportRoom() && !room.isTransportRoom()) {\n room.setExitDir(string[2], getRoomByName(string[1]));\n }\n }\n break;\n default:\n break;\n }\n }\n }", "public playerStatParser(String teamName, String playerName) {\n\t\tthis.teamName = teamName;\n\t\tthis.playerName = playerName;\n\n\t\tif (!error) {\n\t\t\ttry { \n\t\t\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory\n\t\t\t\t\t\t.newInstance();\n\t\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\t\t\t\tDocument doc = db.parse(new URL(\n\t\t\t\t\t\t\"http://api.sportsdatallc.org/nba-t3/league/hierarchy.xml?api_key=\"\n\t\t\t\t\t\t\t\t+ api1).openStream());\n\t\t\t\tif (doc.hasChildNodes()) {\n\t\t\t\t\tprintNote(doc.getChildNodes());\n\t\t\t\t}\n\n\t\t\t\tif (teamNameList.contains(teamName)) {\n\t\t\t\t\tteamID = teamIDList.get(teamNameList.indexOf(teamName));\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Error Checkpoint 1: \" + e.getMessage());\n\t\t\t\terror = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!error) {\n\t\t\tif (!teamID.equals(\"\")) {\n\t\t\t\ttry {\n\t\t\t\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory\n\t\t\t\t\t\t\t.newInstance();\n\t\t\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\t\t\t\t\tDocument doc = db.parse(new URL(\n\t\t\t\t\t\t\t\"http://api.sportsdatallc.org/nba-t3/teams/\"\n\t\t\t\t\t\t\t\t\t+ teamID + \"/profile.xml?api_key=\" + api2)\n\t\t\t\t\t\t\t.openStream());\n\t\t\t\t\tif (doc.hasChildNodes()) {\n\t\t\t\t\t\tprintNote(doc.getChildNodes());\n\t\t\t\t\t}\n\n\t\t\t\t\tif (playerNameList.contains(playerName)) {\n\t\t\t\t\t\tplayerID = playerIDList.get(playerNameList\n\t\t\t\t\t\t\t\t.indexOf(playerName));\n\t\t\t\t\t}\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"Error Checkpoint 2: \" + e.getMessage());\n\t\t\t\t\terror = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!error) {\n\t\t\t\tplayerStatNameList.add(\"team\");\n\t\t\t\tplayerStatValueList.add(teamName);\n\n\t\t\t\tif (!playerID.equals(\"\")) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory\n\t\t\t\t\t\t\t\t.newInstance();\n\t\t\t\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\t\t\t\t\t\tDocument doc = db.parse(new URL(\n\t\t\t\t\t\t\t\t\"http://api.sportsdatallc.org/nba-t3/players/\"\n\t\t\t\t\t\t\t\t\t\t+ playerID + \"/profile.xml?api_key=\"\n\t\t\t\t\t\t\t\t\t\t+ api3).openStream());\n\t\t\t\t\t\tif (doc.hasChildNodes()) {\n\t\t\t\t\t\t\tprintNote(doc.getChildNodes());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(\"Error Checkpoint 3: \" + e.getMessage());\n\t\t\t\t\t\terror = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (error) {\n\t\t\tplayerStatNameList = null;\n\t\t\tplayerStatValueList = null;\n\t\t}\n\t}", "public GameState() {}", "public InitialData(String jsonString)\n {\n //convert JSON to GSON\n JsonObject jsonObject = new JsonParser().parse(jsonString.trim()).getAsJsonObject();\n JsonObject packet = jsonObject.getAsJsonObject(\"packet\");\n \n //convert GSON to this object\n this.agentsName = packet.get(\"agentsName\").getAsString();\n this.placesName = packet.get(\"placesName\").getAsString();\n this.placesX = packet.get(\"placesX\").getAsInt();\n this.placesY = packet.get(\"placesY\").getAsInt();\n this.numberOfPlaces = packet.get(\"numberOfPlaces\").getAsInt();\n this.numberOfAgents = packet.get(\"numberOfAgents\").getAsInt();\n this.placesX = packet.get(\"placesX\").getAsInt();\n this.placeOverloadsSetDebugData = packet.get(\"placeOverloadsSetDebugData\").getAsBoolean();\n this.placeOverloadsGetDebugData = packet.get(\"placeOverloadsGetDebugData\").getAsBoolean();\n this.agentOverloadsSetDebugData = packet.get(\"agentOverloadsSetDebugData\").getAsBoolean();\n this.agentOverloadsGetDebugData = packet.get(\"agentOverloadsGetDebugData\").getAsBoolean();\n \n //get object type of overloaded debug data for agents and places, must extend Number\n String pDataType = packet.get(\"placeDataType\").getAsString();\n String aDataType = packet.get(\"agentDataType\").getAsString();\n \n if(pDataType.trim().isEmpty())\n {\n this.placeDataType = null;\n }\n else\n {\n try \n {\n placeDataType = (Class<? extends Number>) Class.forName(\"java.lang.\" + pDataType);\n } \n catch (ClassNotFoundException | ClassCastException ex) \n {\n System.out.println(\"No such class: \" + pDataType);\n this.placeDataType = null;\n }\n }\n \n if(aDataType.trim().isEmpty())\n {\n this.agentDataType = null;\n }\n else\n {\n try \n {\n agentDataType = (Class<? extends Number>) Class.forName(\"java.lang.\" + pDataType);\n } \n catch (ClassNotFoundException | ClassCastException ex) \n {\n System.out.println(\"No such class: \" + aDataType);\n this.agentDataType = null;\n }\n }\n \n }", "public void loadGame() throws IOException\r\n\t{\r\n\t\tjava.io.BufferedReader reader;\r\n\t String line;\r\n\t String[] elements;\r\n\t int ammo = 0;\r\n\t String state = null;\r\n\t try\r\n\t {\r\n\t reader = new java.io.BufferedReader(new java.io.FileReader(\"Game.ser\"));\r\n\t line = reader.readLine();\r\n\t elements = line.split(\":\");\r\n\t state = elements[0];\r\n\t ammo = Integer.decode(elements[1]);\r\n\t \r\n\t reader.close();\r\n\t \r\n\t\t gamePanel.getView().getPlayer().setAmmo(ammo);\r\n\t\t gamePanel.getView().getPlayer().setState(state);\r\n\t }\r\n\t catch(Exception e)\r\n\t {\r\n\t System.out.println(\"Can't load this save\");\r\n\t }\r\n\t \r\n\t \r\n\r\n\t}", "public GameLevel LoadGame() throws IOException {\n FileReader fr = null;\n BufferedReader reader = null;\n\n try {\n System.out.println(\"Reading \" + fileName + \" data/saves.txt\");\n\n fr = new FileReader(fileName);\n reader = new BufferedReader(fr);\n\n String line = reader.readLine();\n int levelNumber = Integer.parseInt(line);\n\n //--------------------------------------------------------------------------------------------\n\n if (levelNumber == 1){\n gameLevel = new Level1();\n } else if(levelNumber == 2){\n gameLevel = new Level2();\n JFrame debugView = new DebugViewer(gameLevel, 700, 700);\n } else {\n gameLevel = new Level3();\n }\n\n //------------------------------------------------------------------------------------------\n\n\n while ((line = reader.readLine()) != null){\n String[] tokens = line.split(\",\");\n String className = tokens[0];\n float x = Float.parseFloat(tokens[1]);\n float y = Float.parseFloat(tokens[2]);\n Vec2 pos = new Vec2(x, y);\n Body platform = null;\n\n if (className.equals(\"PlayableCharacter\")){\n PlayableCharacter playableCharacter = new PlayableCharacter(gameLevel, PlayableCharacter.getItemsCollected(),PlayableCharacter.isSpecialGravity(),game);\n playableCharacter.setPosition(pos);\n gameLevel.setPlayer(playableCharacter);\n\n }\n\n if (className.equals(\"LogPlatform\")){\n Body body = new LogPlatform(gameLevel, platform);\n body.setPosition(pos);\n }\n\n if (className.equals(\"Coin\")){\n Body body = new Coin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new Pickup(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"ReducedGravityCoin\")){\n Body body = new ReducedGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupRGC(gameLevel.getPlayer(), game)\n\n );\n }\n\n if (className.equals(\"AntiGravityCoin\")){\n Body body = new AntiGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupAGC(gameLevel.getPlayer(), game) );\n }\n\n if (className.equals(\"Rock\")){\n Body body = new Rock(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new FallCollisionListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Pellet\")){\n Body body = new Pellet(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new AddLifeCollisionListener(gameLevel.getPlayer(), game));\n }\n\n if (className.equals(\"Branch\")){\n Body body = new Branch(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new BranchListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Portal\")){\n Body portal = new Portal(gameLevel);\n portal.setPosition(pos);\n portal.addCollisionListener(new DoorListener(game));\n }\n\n if (className.equals(\"DeathPlatform\")){\n float w = Float.parseFloat(tokens[3]);\n float h = Float.parseFloat(tokens[4]);\n float deg = Float.parseFloat(tokens[5]);\n\n Body body = new DeathPlatform(gameLevel, w, h);\n body.setPosition(pos);\n body.addCollisionListener(new FallCollisionListener(gameLevel.getPlayer(), game));\n body.setFillColor(Color.black);\n body.setAngleDegrees(deg);\n\n }\n\n }\n\n return gameLevel;\n } finally {\n if (reader != null) {\n reader.close();\n }\n if (fr != null) {\n fr.close();\n }\n }\n }", "private PlayerStateDataAccess() {\n }", "public MinecraftJson() {\n }", "public String getDroneState() {\n return \"mid:\" + mid +\n \";x:\" + x +\n \";y:\" + y +\n \";z:\" + z +\n \";pitch:\" + pitch +\n \";roll:\" + roll +\n \";yaw:\" + yaw +\n \";vgx:\" + speedX +\n \";vgy:\" + speedY +\n \";vgz:\" + speedZ +\n \";templ:\" + tempLow +\n \";temph:\" + tempHigh +\n \";tof:\" + tofDistance +\n \";h:\" + height +\n \";bat:\" + battery +\n \";baro:\" + barometer +\n \";time:\" + motorTime +\n \";agx:\" + accelerationX +\n \";agy:\" + accelerationY +\n \";agz:\" + accelerationZ +\n \";\";\n }", "public Player (String country, JSONObject json) throws JSONException, ParseException {\n super();\n\n setCountry(country);\n setName(json.getString(\"name\"));\n setBio(json.getString(\"bio\"));\n setPhotoDone(json.getString(\"photo done?\"));\n setSpecialPlayer(json.getString(\"special player? (eg. key player, promising talent, etc)\"));\n setPosition(json.getString(\"position\"));\n setNumber(json.getString(\"number\"));\n setCaps(json.getInt(\"caps\"));\n setGoalsForCountry(json.getInt(\"goals for country\"));\n setClub(json.getString(\"club\"));\n setLeague(json.getString(\"league\"));\n setDateOfBirth(dtformatter.parse(json.getString(\"date of birth\")));\n setRatingMatch1(json.getString(\"rating_match1\"));\n setRatingMatch2(json.getString(\"rating_match2\"));\n setRatingMatch3(json.getString(\"rating_match3\"));\n\n }", "public GameInfo gameInfoFromJSON(JSONObject gameCreateResponseJSON){\n\n String gameCreateResponseStr = gameCreateResponseJSON.toString();\n\n /*\n GameInfo newGameInfo = gsonConverter.fromJson(gameCreateResponseStr, GameInfo.class);\n System.out.println(\">>>JSONTRANSLATOR: gameCreateRespFromJSON: newGameInfo = \" + newGameInfo.toString());\n System.out.println(\">>>newGameInfoPlayersArr size= \" + newGameInfo.getPlayers().size());\n */\n\n //need to make sure that the players array is not counting empty players as spots\n\n //may do parse manually. trying here:\n GameInfo newGameInfo = new GameInfo();\n // System.out.println(\">>>JSONTRANSLATOR: gameCreateRespFromJSON: gameCreateRespStr= \" + gameCreateResponseStr);\n newGameInfo.setTitle(gameCreateResponseJSON.getString(\"title\"));\n newGameInfo.setId(gameCreateResponseJSON.getInt(\"id\"));\n\n ArrayList<PlayerInfo> tempPIArrayList = new ArrayList<>();\n //we're checking on login that they don't have any blank names, null strings, etc.\n //so we can use the player Name to check if they're a real player or not.\n //only add players to the ArrayList if their name is NOT a null/empty string.\n //this should ensure that each GameInfo object's list of playerInfos only contains real players and not the default null PIs.\n JSONArray newGamePlayerInfosJSONArr = gameCreateResponseJSON.getJSONArray(\"players\");\n\n // System.out.println(\"\\t ******* picking out real playerInfos:\");\n //go through array result from JSON, and add each REAL player to the ArrayList\n for (int p = 0; p < newGamePlayerInfosJSONArr.length(); p++) {\n JSONObject currPlayerInfoJSON = newGamePlayerInfosJSONArr.getJSONObject(p);\n String currPlayerInfoStr = currPlayerInfoJSON.toString();\n // System.out.println(\"\\t\\tCurrPlayerInfo= \" + currPlayerInfoStr);\n\n //check if it's a real player or just blank\n if(!currPlayerInfoStr.equals(\"{}\")){\n //it's ok to make PlayerInfo object, since it's not blank\n PlayerInfo newPlayerInfo = gsonConverter.fromJson(currPlayerInfoStr, PlayerInfo.class);\n tempPIArrayList.add(newPlayerInfo);\n\n // System.out.println(\"\\t Player was good, added player: \" + newPlayerInfo);\n }\n else{\n //it was blank, so don't add it to the arraylist\n // System.out.println(\"\\t Player was null, skipping add\");\n }\n }\n\n newGameInfo.setPlayers(tempPIArrayList);\n\n // System.out.println(\"\\t *******>FINAL GAMEINFO: \" + newGameInfo + \", playersArr size= \" + newGameInfo.getPlayers().size());\n\n return newGameInfo;\n }", "public GameInput load() {\n int rows = 0;\n int columns = 0;\n char[][] arena = new char[rows][columns];\n int noPlayers = 0;\n LinkedList<Hero> heroList = new LinkedList<Hero>();\n LinkedList<String> moves = new LinkedList<String>();\n int noRounds = 0;\n try {\n FileSystem fs = new FileSystem(inputPath, outputPath);\n rows = fs.nextInt();\n columns = fs.nextInt();\n arena = new char[rows][columns];\n for (int i = 0; i < rows; i++) {\n String rowLandTypes = fs.nextWord();\n char[] landType = rowLandTypes.toCharArray();\n for (int j = 0; j < columns; j++) {\n arena[i][j] = landType[j];\n }\n }\n noPlayers = fs.nextInt();\n for (int i = 0; i < noPlayers; i++) {\n\n char playerType = fs.nextWord().charAt(0);\n int positionX = fs.nextInt();\n int positionY = fs.nextInt();\n\n Hero myHero = new Hero();\n\n if (playerType == 'W') {\n myHero = new Wizard(positionX, positionY, arena[positionX][positionY]);\n } else if (playerType == 'P') {\n myHero = new Pyromancer(positionX, positionY, arena[positionX][positionY]);\n } else if (playerType == 'R') {\n myHero = new Rogue(positionX, positionY, arena[positionX][positionY]);\n } else if (playerType == 'K') {\n myHero = new Knight(positionX, positionY, arena[positionX][positionY]);\n }\n\n heroList.add(myHero);\n }\n\n noRounds = fs.nextInt();\n\n for (int i = 0; i < noRounds; i++) {\n String listOfMoves = fs.nextWord();\n moves.add(listOfMoves);\n }\n\n fs.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return new GameInput(rows, columns, arena, noPlayers, heroList, noRounds, moves);\n }", "public void read(BoardView view, Player player, Board board, String json, Command command) {\r\n BoardJSON bjson = BoardJSON.parseJSON(json);\r\n board.music = bjson.music();\r\n board.outside = bjson.outside();\r\n board.scenarioName = bjson.scenarioName();\r\n board.creator = bjson.creator();\r\n board.description = bjson.description();\r\n for (int i=0, len = Direction.getMapDirections().size(); i < len; i++) {\r\n Direction dir = (Direction)Direction.getMapDirections().get(i);\r\n board.setAdjacentBoard(dir.getName(), bjson.adjacentBoard(dir.getName()));\r\n }\r\n parseDiagram(view, board, bjson);\r\n parsePieces(board, bjson);\r\n parseStartData(player, board, bjson);\r\n \r\n if (command != null) {\r\n command.execute();\r\n }\r\n\t}", "private PBZJHGameState(Builder builder) {\n super(builder);\n }", "public void fileReadGameHistory(String filename)\n {\n \t//ArrayList<GameObject> gameObject = new ArrayList<>();\n\t\tFileReader file = null;\n\t\ttry {\n\t\t\tfile = new FileReader(filename);\n\t\t} catch (FileNotFoundException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(filename);\n\t\tBufferedReader br = new BufferedReader(file);\n\t\tString s = \"\";\n\t\ttry\n\t\t{\n\t\t\twhile((s = br.readLine()) != null )\n\t\t\t{\n\t\t\t\tString[] prop1 = s.split(\"#\");\n\t\t\t\tSystem.out.println(prop1[0] + \" fgdfsgfds \" + prop1[1]);\n\t\t\t\tString indexOfList = prop1[0];\n\t\t\t\tString[] prop2 = prop1[1].split(\",\");\n\t\t\t\tString[] prop3;\n\t\t\t\tString[] prop4 = indexOfList.split(\";\");\n\t\t\t\t//gameObject.add(new GameObject(indexOfList));\n\t\t\t\tcount = count +1;\n\t\t\t\texistCount = existCount + 1;\n\t\t\t\tif (indexOfList.charAt(0) == 's')//when this line is data of a swimming game\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(prop4[0]);\n\t\t\t\t\tgames.add(new Swimming(prop4[1],\"Swimming\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'c')//when this line is data of a cycling game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Cycling(prop4[1],\"Cycling\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'r')//when this line is data of a running game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Running(prop4[1],\"Running\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "public Level3(Game game)\n {\n super(game);\n \n // set game var\n g = game;\n \n // set world\n world = game.getWorld();\n //set player\n player = game.getPlayer();\n // set default enemy exists state\n enemyExist = true;\n // set frame\n frame = g.getFrame();\n\n }", "@Override\n public Object loadFromJson(Context context) {\n Gson gson = new Gson();\n String json = FileManager.getInstance().loadFromFile(getFileName(), context);\n if(json.equals(\"\")) {\n return null;\n }\n\n return gson.fromJson(json, MatchStorage.class);\n\n }", "@Listener\n public void onServerStart(GameStartedServerEvent event) {\n\t\tgetLogger().info(\"Loading Lift\");\n\t\t//ConfigurationNode rootNode = configManager.createEmptyNode(ConfigurationOptions.defaults());\n configLoader = HoconConfigurationLoader.builder().setPath(defaultConfig).build();\n CommentedConfigurationNode rootNode;\n try {\n rootNode = configLoader.load();\n } catch(IOException e) {\n //error\n rootNode = configLoader.createEmptyNode(ConfigurationOptions.defaults());\n }\n SpongeConfig.debug = rootNode.getNode(\"debug\").getBoolean(true);\n SpongeConfig.redstone = rootNode.getNode(\"redstone\").getBoolean(true);\n SpongeConfig.liftArea = rootNode.getNode(\"liftArea\").getInt(16);\n SpongeConfig.maxHeight = rootNode.getNode(\"maxHeight\").getInt(256);\n SpongeConfig.autoPlace = rootNode.getNode(\"autoPlace\").getBoolean(false);\n SpongeConfig.checkFloor = rootNode.getNode(\"checkFloor\").getBoolean(false);\n SpongeConfig.serverFlight = false; // TODO: How to get from server config?\n SpongeConfig.liftMobs = rootNode.getNode(\"liftMobs\").getBoolean(false);\n SpongeConfig.preventEntry = rootNode.getNode(\"preventEntry\").getBoolean(false);\n SpongeConfig.preventLeave = rootNode.getNode(\"preventLeave\").getBoolean(false);\n SpongeConfig.stringDestination = rootNode.getNode(\"stringDestination\").getString(\"§1Dest\");\n SpongeConfig.stringCurrentFloor = rootNode.getNode(\"stringCurrentFloor\").getString(\"§4Current Floor\");\n SpongeConfig.stringOneFloor = rootNode.getNode(\"stringOneFloor\").getString(\"\");\n SpongeConfig.stringCantEnter = rootNode.getNode(\"stringCantEnter\").getString(\"\");\n SpongeConfig.stringCantLeave = rootNode.getNode(\"stringCantLeave\").getString(\"\");\n SpongeConfig.blockSpeeds.put(BlockTypes.IRON_BLOCK, 0.5);\n SpongeConfig.floorMaterials.add(BlockTypes.GLASS);\n\n boolean metricsbool = rootNode.getNode(\"metrics\").getBoolean(true);\n\n try {\n configLoader.save(rootNode);\n } catch(IOException e) {\n // error\n }\n\n if (SpongeConfig.preventEntry){\n Sponge.getEventManager().registerListeners(this, new SpongeMovePreventListener());\n }\n\n\n\t\tredstoneListener = new SpongeLiftRedstoneListener(this);\n playerListener = new SpongeLiftPlayerListener(this);\n manager = new SpongeElevatorManager(this);\n Sponge.getEventManager().registerListeners(this, redstoneListener);\n Sponge.getEventManager().registerListeners(this, playerListener);\n startListeners();\n debug(\"maxArea: \" + Integer.toString(BukkitConfig.liftArea));\n debug(\"autoPlace: \" + Boolean.toString(BukkitConfig.autoPlace));\n debug(\"checkGlass: \" + Boolean.toString(BukkitConfig.checkFloor));\n debug(\"baseBlocks: \" + BukkitConfig.blockSpeeds.toString());\n debug(\"floorBlocks: \" + BukkitConfig.floorMaterials.toString());\n getLogger().info(\"Started SpongeLift\");\n }", "public void run()\n {\n try\n {\n while (true)\n {\n String message = in.readLine();\n System.out.println(\"received: \" + message);\n String[] tokens = message.split(\" \");\n if(tokens[0].equals(\"update\"))\n {\n bothConnected = true;\n activeEnemy = Pokemon.pokemonList(tokens[1]);\n activeEnemy.setCurrentHealth(Integer.parseInt(tokens[2]));\n if (!tokens[3].equals(team[0].getName()))\n {\n Pokemon temp = team[0];\n team[0] = team[index];\n team[index] = temp;\n GUI.swapPokemon();\n }\n team[0].setCurrentHealth(Integer.parseInt(tokens[4])); //I changed this from team\n }\n else if(tokens[0].equals(\"faintSwap\"))\n {\n GUI.faintSwap();\n activeEnemy = Pokemon.pokemonList(tokens[1]);\n activeEnemy.setCurrentHealth(Integer.parseInt(tokens[2]));\n }\n else if(tokens[0].equals(\"fail\"))\n {\n \n }\n \n// if (tokens[0].equals(\"good\"))\n// {\n// display.goodGuess(tokens[1]);\n// }\n// else if (tokens[0].equals(\"bad\"))\n// {\n// display.badGuess(tokens[1]);\n// }\n }\n }\n catch(IOException e)\n {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }", "public Loader(){\n\t\tthis(PLANETS, NEIGHBOURS);\n\t}", "public GameState() {\n positionToPieceMap = new HashMap<Position, Piece>();\n }", "public static Level readJson(String jsonName) {\n\n InputStream levelInputStream;\n try {\n levelInputStream = new FileInputStream(jsonName);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n return null;\n }\n JsonReader levelReader = Json.createReader(levelInputStream);\n\n JsonObject fileObject = levelReader.readObject();\n JsonObject levelInfo = fileObject.getJsonObject(\"Level Info\");\n JsonObject tiles = fileObject.getJsonObject(\"Tiles\");\n JsonArray rows = (JsonArray) tiles.get(\"rows\");\n\n int rowCount = levelInfo.getInt(\"rowCount\");\n int colCount = levelInfo.getInt(\"columnCount\");\n JsonArray enemies = (JsonArray) levelInfo.get(\"Enemies\");\n Position playerStart = new Position(levelInfo.getInt(\"playerX\"), levelInfo.getInt(\"playerY\"));\n\n AbstractTile[][] tileArray = new AbstractTile[colCount][rowCount];\n\n Iterator<JsonValue> rowsIterator = rows.iterator();\n\n while (rowsIterator.hasNext()) {\n // Convert from jsonValue to jsonObject, then get the array of tiles\n JsonObject currentRowObject = (JsonObject) rowsIterator.next();\n JsonArray currentRow = (JsonArray) currentRowObject.get(\"objects\");\n\n // Iterate through each row of tiles\n Iterator<JsonValue> currentRowIterator = currentRow.iterator();\n while (currentRowIterator.hasNext()) {\n JsonObject currentTile = (JsonObject) currentRowIterator.next();\n JsonValue type = currentTile.get(\"Tile Type\");\n JsonValue row = currentTile.get(\"row\");\n JsonValue column = currentTile.get(\"column\");\n JsonValue rotated = currentTile.get(\"Rotation\");\n boolean isRotated = false;\n if (rotated.toString().equals(\"\\\"Horizontal\\\"\")) {\n isRotated = false;\n } else if (rotated.toString().equals(\"\\\"Vertical\\\"\")) {\n isRotated = true;\n }\n String tileName = type.toString();\n int tileRow = stringToInt(row.toString());\n int tileColumn = stringToInt(column.toString());\n AbstractTile tileObject;\n if (tileName.equals(\"\\\"Key\\\"\")) {\n JsonValue colour = currentTile.get(\"Colour\");\n String tileColour = colour.toString();\n tileColour = tileColour.substring(1, tileColour.length() - 1);\n tileObject = new Key(tileColour);\n } else if (tileName.equals(\"\\\"ExitPortal\\\"\")) {\n tileObject = new ExitPortal();\n } else if (tileName.equals(\"\\\"ExitLock\\\"\")) {\n tileObject = new ExitLock(isRotated);\n } else if (tileName.equals(\"\\\"InfoField\\\"\")) {\n JsonValue infoText = currentTile.get(\"InfoText\");\n String tileInfoText = infoText.toString();\n tileObject = new InfoField(tileInfoText);\n } else if (tileName.equals(\"\\\"LockedDoor\\\"\")) {\n JsonValue colour = currentTile.get(\"Colour\");\n String tileColour = colour.toString();\n tileColour = tileColour.substring(1, tileColour.length() - 1);\n tileObject = new LockedDoor(isRotated, tileColour);\n } else if (tileName.equals(\"\\\"Treasure\\\"\")) {\n tileObject = new Treasure();\n } else if (tileName.equals(\"\\\"DeathTile\\\"\")) {\n tileObject = new DeathTile();\n } else if (tileName.equals(\"\\\"Wall\\\"\")) {\n tileObject = new Wall();\n // Free tile\n } else {\n tileObject = new FreeTile();\n }\n tileArray[tileColumn][tileRow] = tileObject;\n }\n }\n\n ArrayList<AbstractActor> enemiesArrayList = new ArrayList<AbstractActor>();\n\n Iterator<JsonValue> enemiesIterator = enemies.iterator();\n JsonObject currentEnemyObject;\n\n while (enemiesIterator.hasNext()) {\n AbstractActor currentEnemy;\n currentEnemyObject = (JsonObject) enemiesIterator.next();\n int xstartPos = currentEnemyObject.getInt(\"startingX\");\n int ystartPos = currentEnemyObject.getInt(\"startingY\");\n JsonValue aiType = currentEnemyObject.get(\"AI Type\");\n int tickSpeed = currentEnemyObject.getInt(\"Tick Speed\");\n JsonValue movement = currentEnemyObject.get(\"Movement String\");\n\n Position aiStartPos = new Position(xstartPos, ystartPos);\n\n String aiTypeString = aiType.toString();\n String movementString = movement.toString();\n aiTypeString = aiTypeString.substring(1, aiTypeString.length() - 1);\n movementString = movementString.substring(1, movementString.length() - 1);\n\n if (aiTypeString.equals(\"PatternEnemy\")) {\n currentEnemy = new PatternEnemy(aiStartPos, tickSpeed, movementString);\n enemiesArrayList.add(currentEnemy);\n } else if (aiTypeString.equals(\"StalkerEnemy\")) {\n currentEnemy = new StalkerEnemy(aiStartPos, tickSpeed);\n enemiesArrayList.add(currentEnemy);\n }\n\n }\n\n Player returnPlayer = new Player(playerStart);\n Set<AbstractActor> returnEnemies = new HashSet<AbstractActor>();\n returnEnemies.addAll(enemiesArrayList);\n int maxTime = levelInfo.getInt(\"timeLimit\");\n Level returnLevel = new Level(maxTime, returnPlayer, tileArray, returnEnemies);\n return returnLevel;\n\n }", "public PlayerInfo(int playerID, boolean AI) {\r\n\t\tthis.playerID = playerID;\r\n\t\tthis.AI = AI;\r\n\t\tthis.robots = new ArrayList<Robot>(3);\r\n\t\t\r\n\t\t/* 0 = scout , 1 = sniper, 2 = tank */\r\n\t\tthis.robots.add(new Robot(playerID, 0));\r\n\t\tthis.robots.add(new Robot(playerID, 1));\r\n\t\tthis.robots.add(new Robot(playerID, 2));\r\n\t\t\r\n\t\tthis.curRobotType = 0;\r\n\t}", "public GamePlayStatus() {}", "public Laberinto parseToLaberinto (String rutaFichero) {\n String fichero = \"\";\n try (BufferedReader reader = new BufferedReader (new FileReader(rutaFichero))) { \n String line = reader.readLine();\n while (line != null) {\n fichero = fichero.concat(line);\n line = reader.readLine();\n }\n } catch (IOException ex) {\n System.out.println(\"ERROR AL LEER EL FICHERO JSON\");\n }\n \n \n JSONObject obj = new JSONObject (fichero);\n int filas = obj.getInt(\"rows\");\n int columnas = obj.getInt(\"cols\");\n int num_vecinos = obj.getInt(\"max_n\");\n \n JSONArray mov = obj.getJSONArray(\"mov\"); JSONArray movimiento_individual;\n int[][] movimientos = new int [mov.length()][mov.getJSONArray(0).length()];\n for (int i=0; i < mov.length(); i++) {\n movimiento_individual = mov.getJSONArray(i);\n for (int j=0; j < movimiento_individual.length(); j++) {\n movimientos[i][j] = movimiento_individual.getInt(j);\n }\n }\n \n JSONArray id_mov = obj.getJSONArray(\"id_mov\");\n char[] id_movimientos = new char[id_mov.length()];\n for (int i=0; i < id_mov.length(); i++) {\n id_movimientos[i] = id_mov.getString(i).charAt(0);\n }\n \n JSONObject celdas = obj.getJSONObject(\"cells\");\n JSONObject celdaAux; JSONArray vecinos; int value; \n \n Laberinto lab = new Laberinto (filas, columnas, num_vecinos, movimientos, id_movimientos);\n for (int i = 0; i < filas; i++) {\n for (int j = 0; j < columnas; j++) {\n celdaAux = celdas.getJSONObject(\"(\" + i + \", \" + j +\")\");\n value = celdaAux.getInt(\"value\");\n vecinos = celdaAux.getJSONArray(\"neighbors\");\n \n lab.getCells()[i][j].setValue(value);\n for (int k = 0; k < vecinos.length(); k++) {\n lab.getCells()[i][j].setPared(k, vecinos.getBoolean(k));\n }\n }\n }\n \n return lab;\n }", "public String getPlayerState() {\n String playerState = name + \" \" + actionArray[0] \n + \" \" + actionArray[1] + \" \" + actionArray[2] + \" \" + colorID + \" \";\n return playerState;\n }", "public Player2(State state){\n super(state);\n name=\"110\";\n }", "public Player() {\n fleetMap = new Map();\n battleMap = new Map();\n sunkShipNum = 0;\n }", "private DungeonRecord(Parcel in){\n _id = in.readLong();\n mDate = in.readString();\n mType = in.readString();\n mOutcome = in.readInt();\n mDistance = in.readInt();\n mTime = in.readInt();\n mReward = in.readString();\n mCoords = in.readString();\n mSkips = in.readString();\n\n }", "public Hallway01(Boolean gui){\n super(\n \"Hallway01\", \n \"Hallway connecting Personal, Laser and Net.\",\n new Exit('S', \"Personal\"),\n new Exit('E', \"Laser\"),\n new Exit('E', \"Net\"),\n null, \n \"hallway01Map.txt\");\n }", "public List<Pair<String, HLOInformation>> getHLOInformation() {\n if (! wasSuccessful()) {\n return List.of();\n }\n if (getArchitect() == null) {\n return List.of();\n }\n Result<GameLogsRecord> result = jooq.selectFrom(GAME_LOGS)\n .where(GAME_LOGS.GAMEID.equal(gameId))\n .orderBy(GAME_LOGS.ID.asc())\n .fetch();\n\n List<HLOGatherer> hloPlans;\n HashMultiset<Block> presentBlocks = HashMultiset.create();\n String scenario = getScenario();\n if (scenario.equals(\"house\")) {\n hloPlans = readHighlevelPlan(\"/de/saar/minecraft/domains/house-highlevel.plan\")\n .stream()\n .map(HLOGatherer::new)\n .collect(Collectors.toList());\n presentBlocks.addAll(readInitialWorld(\"/de/saar/minecraft/worlds/house.csv\"));\n } else if (scenario.equals(\"bridge\")) {\n hloPlans = readBlockPlan(\"/de/saar/minecraft/domains/bridge-block.plan\").stream()\n .map(HLOGatherer::new)\n .collect(Collectors.toList());\n presentBlocks.addAll(readInitialWorld(\"/de/saar/minecraft/worlds/bridge.csv\"));\n } else {\n throw new NotImplementedException(\"Scenario {} is not implemented\", scenario);\n }\n\n LocalDateTime firstInstructionTime = null;\n int numMistakes = 0;\n\n /* These two booleans implement a work-around for https://github.com/minecraft-saar/infrastructure/issues/19\n Sometimes, a delete message and a create message are in the wrong order. This workaround is for a specific\n game where the player did a put-delete-put sequence for one location. The result should be that there is a\n block, but for some reason the sequence ended up as put-put-delete, meaning the world as we capture it here\n does not have the block even though it was there during the game. If that happens, we disable tracking\n of deletions in that one game.\n */\n boolean dataExtracted = false;\n boolean ignoreDestroyMessages = false;\n while (! dataExtracted) {\n // go through the complete game and keep track of when instructions where given,\n // blocks placed an HLO completed.\n for (GameLogsRecord record : result) {\n switch (record.getMessageType()) {\n case \"BlockPlacedMessage\":\n presentBlocks.add(getBlockFromRecord(record));\n break;\n case \"BlockDestroyedMessage\":\n if (! ignoreDestroyMessages) {\n presentBlocks.remove(getBlockFromRecord(record));\n }\n break;\n case \"TextMessage\":\n if (firstInstructionTime == null) {\n // the first *instruction* has a derivation tree, otherwise it is\n // a welcome message or similar.\n if (record.getMessage().contains(\"\\\\\\\"tree\\\\\\\":\")) {\n firstInstructionTime = record.getTimestamp();\n }\n }\n if (record.getMessage().contains(\"Not there! please remove that block again\")\n || record.getMessage().contains(\"Please add this block again.\"))\n numMistakes += 1;\n break;\n case \"SuccessfullyFinished\": // the game is complete, i.e. the last HLO was completed.\n if (hloPlans.get(hloPlans.size() - 1).timestamp == null) {\n hloPlans.get(hloPlans.size() - 1).timestamp = record.getTimestamp();\n hloPlans.get(hloPlans.size() - 1).mistakes = numMistakes;\n }\n break;\n default:\n break;\n }\n // Check which HLOs are complete\n for (HLOGatherer hlo : hloPlans) {\n if (hlo.timestamp == null) {\n if (presentBlocks.containsAll(hlo.blocks)) {\n hlo.timestamp = record.getTimestamp();\n hlo.mistakes = numMistakes;\n }\n }\n }\n }\n // we are done when we either already had our second try or the data looks good.\n if (ignoreDestroyMessages || hloPlans.stream().noneMatch((x) -> x.timestamp == null)) {\n dataExtracted = true;\n } else {\n ignoreDestroyMessages = true;\n }\n }\n // As this was a successful game, all HLOs should have a time\n assert (hloPlans.stream().noneMatch((x) -> x.timestamp == null));\n\n if (firstInstructionTime == null) {\n logger.error(\"first instruction is null\");\n return List.of();\n }\n if (getScenario().equals(\"bridge\")) {\n return List.of(\n new Pair<>(\"floor\",\n new HLOInformation(\n (int)firstInstructionTime.until(hloPlans.get(0).timestamp, MILLIS),\n hloPlans.get(0).mistakes\n )\n ),\n new Pair<>(\"railing\",\n new HLOInformation(\n (int) hloPlans.get(0).timestamp.until(hloPlans.get(1).timestamp, MILLIS),\n hloPlans.get(1).mistakes - hloPlans.get(0).mistakes\n )\n ),\n new Pair<>(\"railing\",\n new HLOInformation(\n (int) hloPlans.get(1).timestamp.until(hloPlans.get(2).timestamp, MILLIS),\n hloPlans.get(2).mistakes - hloPlans.get(1).mistakes\n )\n )\n );\n } else if (getScenario().equals(\"house\")) {\n return List.of(\n new Pair<>(\"wall\",\n new HLOInformation((int) firstInstructionTime.until(hloPlans.get(0).timestamp, MILLIS),\n hloPlans.get(0).mistakes\n )\n ),\n new Pair<>(\"wall\",\n new HLOInformation((int) hloPlans.get(0).timestamp.until(hloPlans.get(1).timestamp, MILLIS),\n hloPlans.get(1).mistakes - hloPlans.get(0).mistakes\n )\n ),\n new Pair<>(\"wall\",\n new HLOInformation((int) hloPlans.get(1).timestamp.until(hloPlans.get(2).timestamp, MILLIS),\n hloPlans.get(2).mistakes - hloPlans.get(1).mistakes\n )\n ),\n new Pair<>(\"wall\",\n new HLOInformation((int) hloPlans.get(2).timestamp.until(hloPlans.get(3).timestamp, MILLIS),\n hloPlans.get(3).mistakes - hloPlans.get(2).mistakes\n )\n ),\n new Pair<>(\"row\",\n new HLOInformation((int) hloPlans.get(3).timestamp.until(hloPlans.get(4).timestamp, MILLIS),\n hloPlans.get(4).mistakes - hloPlans.get(3).mistakes\n )\n ),\n new Pair<>(\"row\",\n new HLOInformation((int) hloPlans.get(4).timestamp.until(hloPlans.get(5).timestamp, MILLIS),\n hloPlans.get(5).mistakes - hloPlans.get(4).mistakes\n )\n ),\n new Pair<>(\"row\",\n new HLOInformation((int) hloPlans.get(5).timestamp.until(hloPlans.get(6).timestamp, MILLIS),\n hloPlans.get(6).mistakes - hloPlans.get(5).mistakes\n )\n ),\n new Pair<>(\"row\",\n new HLOInformation((int) hloPlans.get(6).timestamp.until(hloPlans.get(7).timestamp, MILLIS),\n hloPlans.get(7).mistakes - hloPlans.get(6).mistakes\n )\n )\n );\n }\n return List.of();\n }", "public NetworkGame(String team){\n super();\n this.team = team;\n }", "public Flight() {//Initial flight\n status = \"正常\";\n }", "public PlayerEntered( ByteArray array ) {\n\n m_shipType = array.readByte( 1 );\n m_acceptsAudio = array.readByte( 2 ) == 1;\n m_playerName = array.readString( 3, 20 );\n m_squadName = array.readString( 23, 20 );\n m_killPoints = array.readLittleEndianInt( 43 );\n m_flagPoints = array.readLittleEndianInt( 47 );\n m_playerID = array.readLittleEndianShort( 51 );\n m_team = array.readLittleEndianShort( 53 );\n m_wins = array.readLittleEndianShort( 55 );\n m_losses = array.readLittleEndianShort( 57 );\n m_identTurretee = array.readLittleEndianShort( 59 );\n m_flagsCarried = array.readLittleEndianShort( 61 );\n m_hasKOTH = array.readByte( 63 ) == 1;\n }", "public void getInfo () {\n int[] info = elevator.getInfo ();\n currFloor = info[0];\n maxCap = info[2];\n numFloors = info[3];\n currCap = info[5];\n state = info[6];\n }", "@SuppressWarnings(\"unchecked\")\n public static void load() {\n\n System.out.print(\"Loading team data from file...\");\n\n try {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n\n FileInputStream fil = new FileInputStream(team_fil);\n ObjectInputStream in = new ObjectInputStream(fil);\n\n team_list = (ConcurrentHashMap<Integer, Team>) in.readObject();\n cleanTeams();\n\n fil.close();\n in.close();\n\n //Gå gjennom alle lagene og registrer medlemmene i team_members.\n Iterator<Team> lag = team_list.values().iterator();\n\n while (lag.hasNext()) {\n\n Team laget = lag.next();\n\n Iterator<TeamMember> medlemmer = laget.getTeamMembers();\n while (medlemmer.hasNext()) {\n registerMember(medlemmer.next().getCharacterID(), laget.getTeamID());\n }\n\n }\n\n System.out.println(\"OK! \" + team_list.size() + \" teams loaded.\");\n\n } catch (Exception e) {\n System.out.println(\"Error loading team data from file.\");\n }\n\n }", "public static BotData loadData()\n\t{\n\t\tBotData data = null;\n\t\ttry\n\t\t{\n\t\t\tFileInputStream fis = new FileInputStream(SAVE_DATA_FILENAME);\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tObject obj = ois.readObject();\n\t\t\tString json = (String)obj;\n\t\t\tdata = new Gson().fromJson(json, BotData.class);\n\t\t\tois.close();\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\t//error\n\t\t}\n\t\tif ( data == null )\n\t\t\tdata = new BotData();\n\t\treturn data;\n\t}", "public Battlefield() {\r\n\t\tshipTypeMap = new LinkedHashMap<Point, Integer>();\r\n\t\tshipStateMap = new LinkedHashMap<Point, Integer>();\r\n\t\tcreateMaps();\r\n\t\tnumberOfShips = 0;\r\n\t\tnumberOfAllowedShotsRemaining = 0;\r\n\t\tfor (int shipType = 0; shipType < 5; shipType++) {\r\n\t\t\tnumberOfAllowedShotsRemaining = numberOfAllowedShotsRemaining\r\n\t\t\t\t\t+ shipLengths[shipType];\r\n\t\t}\r\n\t\tuserName = \"\";\r\n\t}", "public GameLevel(KeyboardSensor keyboard, GUI gui, LevelInformation info, AnimationRunner runner, Counter score,\r\n Counter lives) {\r\n this.sprites = new SpriteCollection();\r\n this.environment = new GameEnvironment();\r\n this.score = score;\r\n this.numberOfLives = lives;\r\n this.ballsList = new ArrayList<>();\r\n this.runner = runner;\r\n this.keyboard = keyboard;\r\n this.gui = gui;\r\n this.info = info;\r\n this.remainingBlocks = new Counter(info.numberOfBlocksToRemove());\r\n\r\n }", "public Dungeon load() {\n int width = json.getInt(\"width\");\n int height = json.getInt(\"height\");\n\n Dungeon dungeon = new Dungeon(width, height);\n\n JSONArray jsonEntities = json.getJSONArray(\"entities\");\n Map<String, List<Entity>> entitiesMap = loadEntities(dungeon, jsonEntities);\n\n // Only try and greate a goal condition if it is specified in json.\n if (json.has(\"goal-condition\")) {\n JSONObject goals = json.getJSONObject(\"goal-condition\");\n Goal mainGoal = loadGoals(entitiesMap, dungeon, goals);\n dungeon.setMainGoal(mainGoal);\n }\n\n return dungeon;\n }", "public void managePlayOptions() {\n\n Object mySavedGameState = GameStateFileStore.ReadObjectFromFile(\"GameState.ser\");\n GameState castedGameState = GameState.class.cast(mySavedGameState);\n currentLocation = castedGameState.getSavedPlayerLocation();\n LocationData[][] storedGameStateMap = castedGameState.getMapState();\n descriptionText = storedGameStateMap[currentLocation.x][currentLocation.y].getDescriptionText();\n System.out.println(descriptionText);\n\n AvailableMovements myMoveSet = new AvailableMovements(currentLocation, storedGameStateMap);\n myMoveSet.printStringDirections();\n availableDirections = myMoveSet.getDirectionalMap();\n choice = sc.nextLine();\n if (availableDirections.containsKey(choice)) {\n currentLocation = availableDirections.get(choice); //refactor this into walkToNewLocation\n castedGameState.setSavedPlayerLocation(currentLocation);\n GameStateFileStore.WriteObjectToFile(castedGameState);\n managePlayOptions();\n } else {\n System.out.println(\"Invalid option\");\n managePlayOptions();\n }\n\n }", "private LevelInformation getLevelInfo(LevelCreator level, BlocksFromSymbolsFactory factoryB, int index) {\r\n List<Block> blocks = new ArrayList<>();\r\n String line;\r\n int blockX = level.getBlocksStartX();\r\n int blockY = level.getBlocksStartY();\r\n int rowHeight = level.getRowHeight();\r\n int rowsCounter = 0;\r\n boolean rowsFlag = false;\r\n for (int j = 0; j < this.blocksLayOut.get(index).size(); j++) { //reading blocksLayout\r\n\r\n line = this.blocksLayOut.get(index).get(j);\r\n if (line.isEmpty() || line.startsWith(\"#\")) { //empty or note lines.\r\n continue;\r\n } else {\r\n if (rowsFlag) {\r\n rowsCounter++;\r\n } else {\r\n rowsFlag = true;\r\n }\r\n }\r\n if (factoryB.isSpaceSymbol(line)) { // if its a space symbol , continue\r\n continue;\r\n }\r\n char[] charArr = line.toCharArray();\r\n for (char symbol : charArr) {\r\n if (factoryB.isSpaceSymbol(symbol + \"\")) {\r\n blockX = blockX + factoryB.getSpaceWidth(symbol + \"\");\r\n } else if (factoryB.isBlockSymbol(symbol + \"\")) {\r\n Block newBlock = factoryB.getBlock(symbol + \"\", blockX, blockY + (rowHeight * rowsCounter));\r\n blocks.add(newBlock);\r\n blockX += newBlock.getWidth();\r\n }\r\n }\r\n blockX = level.getBlocksStartX();\r\n }\r\n\r\n\r\n //get level information.\r\n LevelInformation information = new LevelInformation() {\r\n\r\n\r\n @Override\r\n public int numberOfBalls() {\r\n return 0;\r\n }\r\n\r\n @Override\r\n public List<Velocity> initialBallVelocities() {\r\n return level.getBallsVelocity();\r\n }\r\n\r\n @Override\r\n public int paddleSpeed() {\r\n return level.getPaddleSpeed();\r\n }\r\n\r\n @Override\r\n public int paddleWidth() {\r\n return level.getPaddleWidth();\r\n }\r\n\r\n @Override\r\n public String levelName() {\r\n return level.getLevelName();\r\n }\r\n\r\n\r\n @Override\r\n public Color getBackgroundColor() {\r\n return level.getBackgroundColor();\r\n }\r\n\r\n @Override\r\n public Image getBackgroundImg() {\r\n return level.getBackgroundImg();\r\n }\r\n\r\n @Override\r\n public List<Block> blocks() {\r\n return blocks;\r\n }\r\n\r\n @Override\r\n public int numberOfBlocksToRemove() {\r\n return level.getNumOfBlock();\r\n }\r\n\r\n @Override\r\n public void initialize() {\r\n\r\n }\r\n\r\n @Override\r\n public Ball[] ballsArray() {\r\n Ball[] ballsArray = new Ball[level.getBallsVelocity().size()];\r\n List<Velocity> ballsVelocity = level.getBallsVelocity();\r\n for (int i = 0; i < level.getBallsVelocity().size(); i++) {\r\n Ball ball = new Ball(400, 480, 5, Color.white);\r\n ball.setVelocity(ballsVelocity.get(i));\r\n ball.setColor(Color.red);\r\n ballsArray[i] = ball;\r\n }\r\n return ballsArray;\r\n }\r\n\r\n @Override\r\n public List<Sprite> getSprites() {\r\n List<Sprite> sprites = new ArrayList<>();\r\n return sprites;\r\n }\r\n\r\n @Override\r\n public Point paddleUpperLeft() {\r\n return new Point((400 - (this.paddleWidth() >> 1)), 505);\r\n }\r\n\r\n @Override\r\n public int paddleHeight() {\r\n return 10;\r\n }\r\n\r\n @Override\r\n public int ballsStartX() {\r\n return (400 + (this.paddleWidth() >> 1));\r\n }\r\n\r\n @Override\r\n public int ballsStartY() {\r\n return 480;\r\n }\r\n\r\n @Override\r\n public int flag() {\r\n return 0;\r\n }\r\n\r\n @Override\r\n public Color startingBallsColor() {\r\n return Color.white;\r\n }\r\n\r\n @Override\r\n public Velocity eachBallsVelocity() {\r\n return null;\r\n }\r\n\r\n };\r\n return information;\r\n }", "public void loadMap(){\n level= dataBase.getData(\"MAP\",\"PLAYER\");\n }", "@Override\r\n\tpublic Level LoadLevel(InputStream LevelLoad)throws IOException\r\n\t{\r\n\r\n\t\tBufferedReader read = new BufferedReader(new InputStreamReader(LevelLoad));\r\n\t\tString line;\r\n\t\tint column=0;\r\n\t\tint row=0;\r\n\t\tArrayList<String> ans= new ArrayList<String>();\r\n\t\twhile((line = read.readLine()) != null)\r\n\t\t{\r\n\t\t\tif (line.length() > row)\r\n\t\t\t{\r\n\t\t\t\trow = line.length();\r\n\t\t\t}\r\n\t\tcolumn++;\r\n\t\tans.add(line);\r\n\r\n\t\t}\r\n\t\tLevel level = new Level(column,row);\r\n\t\tcolumn = 0;\r\n\t\tfor(String resualt: ans)\r\n\t\t{\r\n\r\n\t\t\tfor(int i=0;i<resualt.length();i++)\r\n\t\t\t{\r\n\t\t\t\tswitch(resualt.charAt(i))\r\n\t\t\t\t{\r\n\t\t\t\t\tcase ' ':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive(' ');\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i,item);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase '#':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive('#');\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i,item);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase 'A':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive('A');\r\n\t\t\t\t\t\tlevel.setMoveableMap(column,i,item);\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i, new AbstractItems(new Position2D(column,i), ' '));\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase '@':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive('@');\r\n\t\t\t\t\t\tlevel.setMoveableMap(column,i,item);\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i, new AbstractItems(new Position2D(column,i), ' '));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcase 'o':\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItem item = new AbstractItems(new Position2D(column,i));\r\n\t\t\t\t\t\titem.setReprestive('o');\r\n\t\t\t\t\t\tlevel.setUnmoveableMap(column,i,item);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn++;\r\n\t\t}\r\n\r\n\r\n\t\treturn level;\r\n\t}", "public LevelFromFile() {\n this.velocityList = new ArrayList<Velocity>();\n this.blockList = new ArrayList<Block>();\n this.levelName = null;\n numberOfBalls = null;\n paddleSpeed = null;\n paddleWidht = null;\n levelName = null;\n background = null;\n numberOfBlocksToRemove = null;\n blockDef = null;\n startOfBloks = null;\n startOfBloksY = null;\n rowHight = null;\n }", "public static void load(){\n\t\tinbattle=true;\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tScanner s=new Scanner(f);\n\t\t\tturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tString curr=s.next();\n\t\t\tif(curr.equals(\"WildTrainer:\"))\n\t\t\t\topponent=WildTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"EliteTrainer:\"))\n\t\t\t\topponent=EliteTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"Trainer:\"))\n\t\t\t\topponent=Trainer.readInTrainer(s);\n\t\t\tSystem.out.println(\"Initializing previous battle against \"+opponent.getName());\n\t\t\tcurr=s.next();\n\t\t\tallunits=new ArrayList<Unit>();\n\t\t\tpunits=new ArrayList<Unit>();\n\t\t\tounits=new ArrayList<Unit>();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tpunits.add(Unit.readInUnit(null,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Player Units\n\t\t\tcurr=s.next();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tounits.add(Unit.readInUnit(opponent,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Opponent Units\n\t\t\tallunits.addAll(punits);\n\t\t\tallunits.addAll(ounits);\n\t\t\tpriorities=new ArrayList<Integer>();\n\t\t\tint[] temp=GameData.readIntArray(s.nextLine());\n\t\t\tfor(int i:temp){\n\t\t\t\tpriorities.add(i);\n\t\t\t}\n\t\t\txpgains=GameData.readIntArray(s.nextLine());\n\t\t\tspikesplaced=s.nextBoolean();\n\t\t\tnumpaydays=s.nextInt();\n\t\t\tactiveindex=s.nextInt();\n\t\t\tactiveunit=getUnitByID(s.nextInt());\n\t\t\tweather=Weather.valueOf(s.next());\n\t\t\tweatherturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tbfmaker=new LoadExistingBattlefieldMaker(s);\n\t\t\tinitBattlefield();\n\t\t\tplaceExistingUnits();\n\t\t\tMenuEngine.initialize(new UnitMenu(activeunit));\n\t\t}catch(Exception e){e.printStackTrace();System.out.println(e.getCause().toString());}\n\t}", "public BotPlayer(int ID) {\n super.setNick(\"Bot#\" + ID);\n playerID = ID;\n bestMove = new Field[2];\n destinationFields = new ArrayList<>();\n }", "@Override\n public void storeLiveEvents() {\n try {\n //Get today's date and convert to string\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n Date todayDate = new Date();\n String today = dateFormat.format(todayDate).replaceAll(\"/\", \"-\");\n\n //Retrieve live games json d1ata from APIFootball and convert to JSON array\n String data = httpTools.httpGetURL(\"https://apifootball.com/api/?action=get_events&from=\" + today + \"&to=\" + today + \"&match_live=1&APIkey=aec4fdc3c841ad7b08ac13242f6a6dfc229446b4408bf4a6cb2b7ebe2baef4cf\");\n JSONArray array = new JSONArray(data);\n\n //For every live match\n List<MatchStore> matchList = new ArrayList<>();\n for (int i = 0; i < array.length(); i++) {\n\n //Get the date from live game\n Date date;\n date = getDate(array, i);\n\n\n //Parse all goalscorers and store in a list\n List<Goalscorer> goalscorerList = new ArrayList<>();\n JSONArray goalscorerArray = array.getJSONObject(i).getJSONArray(\"goalscorer\");\n for (int y = 0; y < goalscorerArray.length(); y++) {\n goalscorerList.add(new Goalscorer(goalscorerArray.getJSONObject(y).getString(\"score\"),\n goalscorerArray.getJSONObject(y).getString(\"time\").substring(0, goalscorerArray.getJSONObject(y).getString(\"time\").length() - 1),\n goalscorerArray.getJSONObject(y).getString(\"away_scorer\"),\n goalscorerArray.getJSONObject(y).getString(\"home_scorer\")\n ));\n }\n\n //Home and Away lineup list declarations\n List<Player> startingHomeLineupList = new ArrayList<>();\n List<Player> substitutesHomeList = new ArrayList<>();\n List<Substitutions> substitutionsHomeList = new ArrayList<>();\n\n List<Player> startingAwayLineupList = new ArrayList<>();\n List<Player> substitutesAwayList = new ArrayList<>();\n List<Substitutions> substitutionsAwayList = new ArrayList<>();\n\n //Parse and store home team lineup\n JSONArray startingHomeLineupArray = array.getJSONObject(i).getJSONObject(\"lineup\").getJSONObject(\"home\").getJSONArray(\"starting_lineups\");\n for (int y = 0; y < startingHomeLineupArray.length(); y++) {\n startingHomeLineupList.add(new Player(startingHomeLineupArray.getJSONObject(y).getString(\"lineup_player\"),\n startingHomeLineupArray.getJSONObject(y).getString(\"lineup_number\"),\n startingHomeLineupArray.getJSONObject(y).getString(\"lineup_position\")));\n }\n\n //Parse and store away team lineup\n JSONArray startingAwayLineupArray = array.getJSONObject(i).getJSONObject(\"lineup\").getJSONObject(\"away\").getJSONArray(\"starting_lineups\");\n for (int y = 0; y < startingAwayLineupArray.length(); y++) {\n startingAwayLineupList.add(new Player(startingAwayLineupArray.getJSONObject(y).getString(\"lineup_player\"),\n startingAwayLineupArray.getJSONObject(y).getString(\"lineup_number\"),\n startingAwayLineupArray.getJSONObject(y).getString(\"lineup_position\")));\n }\n\n //Parse and store home team subs\n JSONArray subHomeLineupArray = array.getJSONObject(i).getJSONObject(\"lineup\").getJSONObject(\"home\").getJSONArray(\"substitutes\");\n for (int y = 0; y < subHomeLineupArray.length(); y++) {\n substitutesHomeList.add(new Player(subHomeLineupArray.getJSONObject(y).getString(\"lineup_player\"),\n subHomeLineupArray.getJSONObject(y).getString(\"lineup_number\"),\n subHomeLineupArray.getJSONObject(y).getString(\"lineup_position\")));\n }\n\n //Parse and store away team subs\n JSONArray subAwayLineupArray = array.getJSONObject(i).getJSONObject(\"lineup\").getJSONObject(\"away\").getJSONArray(\"substitutes\");\n for (int y = 0; y < subAwayLineupArray.length(); y++) {\n substitutesAwayList.add(new Player(subAwayLineupArray.getJSONObject(y).getString(\"lineup_player\"),\n subAwayLineupArray.getJSONObject(y).getString(\"lineup_number\"),\n subAwayLineupArray.getJSONObject(y).getString(\"lineup_position\")));\n }\n\n //Parse and store home team completed subs\n JSONArray subCompletedHomeArray = array.getJSONObject(i).getJSONObject(\"lineup\").getJSONObject(\"home\").getJSONArray(\"substitutions\");\n for (int y = 0; y < subCompletedHomeArray.length(); y++) {\n substitutionsHomeList.add(new Substitutions(subCompletedHomeArray.getJSONObject(y).getString(\"lineup_player\"),\n subCompletedHomeArray.getJSONObject(y).getString(\"lineup_time\")));\n }\n\n //Parse and store away team completed subs\n JSONArray subCompletedAwayArray = array.getJSONObject(i).getJSONObject(\"lineup\").getJSONObject(\"home\").getJSONArray(\"substitutions\");\n for (int y = 0; y < subCompletedAwayArray.length(); y++) {\n substitutionsAwayList.add(new Substitutions(subCompletedAwayArray.getJSONObject(y).getString(\"lineup_player\"),\n subCompletedAwayArray.getJSONObject(y).getString(\"lineup_time\")));\n }\n\n //Complete home and away team lineups\n Lineup homeLineup = new Lineup(startingHomeLineupList, substitutesHomeList, substitutionsHomeList);\n Lineup awayLineup = new Lineup(startingAwayLineupList, substitutesAwayList, substitutionsAwayList);\n\n //Add live match data to match list\n matchList.add(new MatchStore(Integer.parseInt(array.getJSONObject(i).getString(\"match_id\")),\n Integer.parseInt(array.getJSONObject(i).getString(\"country_id\")),\n Integer.parseInt(array.getJSONObject(i).getString(\"league_id\")),\n date,\n array.getJSONObject(i).getString(\"match_status\"),\n array.getJSONObject(i).getString(\"match_hometeam_name\"),\n array.getJSONObject(i).getString(\"match_awayteam_name\"),\n array.getJSONObject(i).getString(\"match_hometeam_score\"),\n array.getJSONObject(i).getString(\"match_awayteam_score\"),\n array.getJSONObject(i).getString(\"match_hometeam_halftime_score\"),\n array.getJSONObject(i).getString(\"match_awayteam_halftime_score\"),\n array.getJSONObject(i).getString(\"match_hometeam_extra_score\"),\n array.getJSONObject(i).getString(\"match_awayteam_extra_score\"),\n array.getJSONObject(i).getString(\"match_hometeam_penalty_score\"),\n array.getJSONObject(i).getString(\"match_awayteam_penalty_score\"),\n array.getJSONObject(i).getString(\"match_live\")\n ));\n }\n //Store live match updated data\n dataService.storeKeyEventsInUpdate(matchList);\n for (MatchStore m:matchList){\n gameDAO.storeLiveEvents(m);\n }\n\n } catch (JSONException j) {\n j.printStackTrace();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }", "public Building(String[] line){\n setId(Integer.parseInt(line[0]));\n setRank(Integer.parseInt(line[1]));\n setName(line[2]);\n setCity(line[3]);\n setCountry(line[4]);\n setHeight_m(Double.parseDouble(line[5]));\n setHeight_ft(Double.parseDouble(line[6]));\n setFloors(line[7]);\n setBuild(line[8]);\n setArchitect(line[9]);\n setArchitectual_style(line[10]);\n setCost(line[11]);\n setMaterial(line[12]);\n setLongitude(line[13]);\n setLatitude(line[14]);\n // setImage(line[15]);\n\n }", "private void retrieve() throws IOException {\n String data = fromServer.readUTF();\n// report(\"data: \" + data);\n String[] datas = data.split(COMMAND_DELIMITER);\n int isFull = Integer.parseInt(datas[0]);\n\n if(isFull == 1) {\n // points\n String[] points = datas[1].split(POINTS_DELIMITER);\n int[][] board = new int[SIDE][SIDE];\n for (int i = 0; i < points.length; i++) {\n board[i / SIDE][i % SIDE] = Integer.parseInt(points[i]);\n }\n boardComponent.setBoard(board);\n boardComponent.repaint();\n\n // players\n String[] players = datas[2].split(POINTS_DELIMITER);\n lbPl1.setText(players[0]);\n lbPl2.setText(players[1]);\n lbBlackStone.setIcon(blackIcon);\n lbWhiteStone.setIcon(whiteIcon);\n\n\n colorLabel.setText(\"You are a viewer.\");\n setButtons(false);\n btnNewGame.setEnabled(false);\n }\n\n // attendants\n try {\n String[] attendants = datas[3].split(POINTS_DELIMITER);\n for (String str : attendants) {\n listOfNames.add(str);\n nameListTextArea.append(str + \"\\n\");\n }\n// nameListTextArea.update(nameListTextArea.getGraphics());\n// atsScrollPane.setViewportView(nameListTextArea);\n }catch(Exception e){\n // when the first player enter the room, there is no existed attendants\n }\n\n }", "FighterInfo() {\r\n\t}", "public void onStartGameClicked() throws IOException {\n playerList.clear();\n MapBlackWhite currentMap;\n MapFull tournamentMap;\n Triple tournamentTriple;\n\n //Spielertypen hinzufügen\n addPlayerType(playerOneChooseCharakterComboBox.getValue(),\n isPlayerOneKiCheckBox.isSelected(),\n playerOneNameTextField.getText());\n addPlayerType(playerTwoChooseCharakterComboBox.getValue(), isPlayerTwoKiCheckBox.isSelected(), playerTwoNameTextField.getText());\n if (addPlayerThreeToggleButton.isSelected()) {\n addPlayerType(playerThreeChooseCharakterComboBox.getValue(), isPlayerThreeKiCheckBox.isSelected(), playerThreeNameTextField.getText());\n }\n if (addPlayerFourToggleButton.isSelected()) {\n addPlayerType(playerFourChooseCharakterComboBox.getValue(), isPlayerFourKiCheckBox.isSelected(), playerFourNameTextField.getText());\n }\n setDifficulty();\n\n //PLayerList muss mind. zwei Spieler enthalten\n if (!playerList.stream().map(Triple::getFirst).filter(playerType -> !playerType.equals(PlayerType.NONE)).allMatch(new HashSet<PlayerType>()::add)) {\n cannotStartGameLabel.setText(\"Mindestens zwei Spieler haben den gleichen Typ\");\n return;\n }\n if (playerList.isEmpty() || difficulty == null || isTextFieldEmpty()) {\n cannotStartGameLabel.setText(\"Es sind nicht alle Namensfelder ausgefüllt\");\n return;\n }\n \n playerOneNameTextField.clear();\n playerTwoNameTextField.clear();\n playerThreeNameTextField.clear();\n playerFourNameTextField.clear();\n \n playerOneChooseCharakterComboBox.getSelectionModel().select(playerTypesList.size() - 1);\n playerTwoChooseCharakterComboBox.getSelectionModel().select(playerTypesList.size() - 1);\n playerThreeChooseCharakterComboBox.getSelectionModel().select(playerTypesList.size() - 1);\n playerFourChooseCharakterComboBox.getSelectionModel().select(playerTypesList.size() - 1);\n editDifficultyComboBox.getSelectionModel().select(0);\n\n playerThreeNameTextField.setDisable(true);\n playerFourNameTextField.setDisable(true);\n playerThreeChooseCharakterComboBox.setDisable(true);\n playerFourChooseCharakterComboBox.setDisable(true);\n addPlayerThreeButton.setDisable(true);\n addPlayerFourButton.setDisable(true);\n isPlayerOneKiCheckBox.setSelected(false);\n isPlayerTwoKiCheckBox.setSelected(false);\n isPlayerThreeKiCheckBox.setSelected(false);\n isPlayerFourKiCheckBox.setSelected(false);\n isPlayerThreeKiCheckBox.setDisable(true);\n isPlayerFourKiCheckBox.setDisable(true);\n \n addPlayerThreeToggleButton.setSelected(false);\n addPlayerFourToggleButton.setSelected(false);\n\n if (!getGameWindow().getDeveloperSettings()) {\n \n if (chooseMapComboBox.getValue() == null) {\n cannotStartGameLabel.setText(\"Es ist keine Map ausgewählt\");\n return;\n } else if (chooseMapComboBox.getValue().equals(\"neu generieren\")) {\n currentMap = MapUtil.generateRandomIsland();\n debug(\"Map: random \\n\");\n } else {\n String mapString = new String(Files.readAllBytes(Paths.get(MapController.MAP_FOLDER + chooseMapComboBox.getValue() + \".map\")), StandardCharsets.UTF_8);\n currentMap = MapUtil.readBlackWhiteMapFromString(mapString);\n debug(\"Map:\" + chooseMapComboBox.getSelectionModel().getSelectedItem() + \"\\n\");\n }\n \n \n this.getGameWindow().getControllerChan().startNewGame(\"Coole Carte\", currentMap, playerList, difficulty);\n debug(chooseMapComboBox.getSelectionModel().getSelectedItem() );\n debug(chooseMapComboBox.getValue());\n debug(currentMap.toString());\n } else {\n \n if (chooseDeveloperMapComboBox.getValue() == null) {\n cannotStartGameLabel.setText(\"Es ist keine Map ausgewählt\");\n return;\n } else if (chooseArtifactCardStackComboBox.getValue() == null){\n cannotStartGameLabel.setText(\"Es ist kein Flutkartenstapel ausgewählt\");\n return;\n } else if (chooseFloodCardStackComboBox == null) {\n cannotStartGameLabel.setText(\"Es ist kein Artefaktkartenstapel ausgewählt\");\n return;\n } else {\n String devMapString = new String(Files.readAllBytes(Paths.get(DEV_MAP_FOLDER + chooseDeveloperMapComboBox.getSelectionModel().getSelectedItem() + \".extmap\")), StandardCharsets.UTF_8);\n tournamentMap = MapUtil.readFullMapFromString(devMapString);\n debug(\"Map:\" + chooseMapComboBox.getValue() + \"\\n\");\n \n String artifactStackString = new String(Files.readAllBytes(Paths.get(DEV_ARTIFACT_STACK_FOLDER + chooseArtifactCardStackComboBox.getSelectionModel().getSelectedItem() + \".csv\")), StandardCharsets.UTF_8);\n CardStack<ArtifactCard> artifactStack = CardStackUtil.readArtifactCardStackFromString(artifactStackString);\n \n String flooodStackString = new String(Files.readAllBytes(Paths.get(DEV_FLOOD_STACK_FOLDER + chooseFloodCardStackComboBox.getSelectionModel().getSelectedItem() + \".csv\")), StandardCharsets.UTF_8);\n CardStack<FloodCard> floodStack = CardStackUtil.readFloodCardStackFromString(flooodStackString);\n \n tournamentTriple = new Triple<>(tournamentMap, artifactStack, floodStack);\n }\n \n \n this.getGameWindow().getControllerChan().startNewGame(\"Coole Carte\", tournamentTriple, playerList, difficulty);\n getGameWindow().playBgm();\n }\n \n getGameWindow().getControllerChan().getInGameViewAUI().refreshHopefullyAll(getGameWindow().getControllerChan().getCurrentAction());\n changeState(ViewState.GAME_PREPARATIONS, ViewState.IN_GAME);\n getGameWindow().getControllerChan().getInGameViewAUI().refreshHopefullyAll(getGameWindow().getControllerChan().getCurrentAction());\n // this.getGameWindow().getControllerChan().startNewGame(\"vulcan_island\", new MapLoader().loadMap(\"vulcan_island\"), playerList, difficulty);\n\n getGameWindow().getControllerChan().getInGameViewAUI().refreshWaterLevel(getGameWindow().getControllerChan().getCurrentAction().getWaterLevel().getLevel());\n getGameWindow().getControllerChan().getAiController().setActive(true);\n }", "@Override\r\n\tpublic Level LoadLevel(InputStream LevelLoad) throws IOException {\r\n\t\tBufferedReader read = new BufferedReader(new InputStreamReader(LevelLoad));\r\n\t\tString line;\r\n\t\tint column = 0;\r\n\t\tint row = 0;\r\n\t\tArrayList<String> ans = new ArrayList<String>();\r\n\t\tString name = read.readLine();\r\n\t\twhile ((line = read.readLine()) != null) {\r\n\t\t\tif (line.length() > row) {\r\n\t\t\t\trow = line.length();\r\n\t\t\t}\r\n\t\t\tcolumn++;\r\n\t\t\tans.add(line);\r\n\r\n\t\t}\r\n\t\tLevel level = new Level(column, row);\r\n\t\tlevel.setName(name);\r\n\t\tcolumn = 0;\r\n\t\tfor (String resualt : ans) {\r\n\t\t\tfor (int i = 0; i < resualt.length(); i++) {\r\n\t\t\t\tswitch (resualt.charAt(i)) {\r\n\t\t\t\tcase ' ': {\r\n\t\t\t\t\tItem item = new AbstractItems(new Position2D(column, i));\r\n\t\t\t\t\titem.setReprestive(' ');\r\n\t\t\t\t\tlevel.setUnmoveableMap(column, i, item);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase '#': {\r\n\t\t\t\t\tItem item = new AbstractItems(new Position2D(column, i));\r\n\t\t\t\t\titem.setReprestive('#');\r\n\t\t\t\t\tlevel.setUnmoveableMap(column, i, item);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 'A': {\r\n\t\t\t\t\tItem item = new AbstractItems(new Position2D(column, i));\r\n\t\t\t\t\titem.setReprestive('A');\r\n\t\t\t\t\tlevel.setMoveableMap(column, i, item);\r\n\t\t\t\t\tlevel.setUnmoveableMap(column, i, new AbstractItems(new Position2D(column, i), ' '));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase '@': {\r\n\t\t\t\t\tItem item = new AbstractItems(new Position2D(column, i));\r\n\t\t\t\t\titem.setReprestive('@');\r\n\t\t\t\t\tlevel.setMoveableMap(column, i, item);\r\n\t\t\t\t\tlevel.setUnmoveableMap(column, i, new AbstractItems(new Position2D(column, i), ' '));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 'o': {\r\n\t\t\t\t\tItem item = new AbstractItems(new Position2D(column, i));\r\n\t\t\t\t\titem.setReprestive('o');\r\n\t\t\t\t\tlevel.setUnmoveableMap(column, i, item);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcolumn++;\r\n\t\t}\r\n\r\n\t\treturn level;\r\n\t}", "public void readCountries(){\n for ( i= 0;i<verticesNum;i++){\n vertices.add(new Country(i+1));\n // System.out.println(lines.get(edgesNum+4+i));\n countriesArmyLines.add(lines.get(edgesNum+4+i));\n }\n // Read the countries for AI agents\n for (int i = 0; i < verticesNum +1; i++) {\n SCountry cc = new SCountry(i);\n // cc.setNumberArmies( i * 2);\n allSCountries.add(cc);\n }\n\n // Read the players countries\n for (i = 1; i < player1Line.length; i++){\n int index = Integer.parseInt(player1Line[i])-1;\n // System.out.println(\"index \"+index);\n vertices.get(index).setOwner(Agent.player1);\n allSCountries.get(index+1).owner = 1;\n myCountries.add(index+1);\n }\n for (i = 1; i < player2Line.length; i++){\n int index = Integer.parseInt(player2Line[i])-1;\n // System.out.println(\"index \"+index);\n vertices.get(index).setOwner(Agent.player2);\n allSCountries.get(index+1).owner = 2;\n opponentCountris.add(index+1);\n\n }\n NState.globalState.myCountries = myCountries;\n NState.globalState.opponentCountris = opponentCountris;\n\n }", "public Game() \n {\n parser = new Parser();\n }", "public String getLane() {\r\n\t\treturn lane;\r\n\t}", "private synchronized void zzly() {\n String string = this.zztB.getString(\"save_data\", null);\n if (string != null) {\n try {\n JSONObject jSONObject = new JSONObject(string);\n if (this.zzTp.equals(jSONObject.getString(\"castSessionId\"))) {\n JSONObject jSONObject2 = jSONObject.getJSONObject(\"playerTokenMap\");\n Iterator<String> keys = jSONObject2.keys();\n while (keys.hasNext()) {\n String next = keys.next();\n this.zzTn.put(next, jSONObject2.getString(next));\n }\n this.zzTy = 0;\n }\n } catch (JSONException e) {\n zzQW.zzf(\"Error while loading data: %s\", e.getMessage());\n }\n }\n }", "public GameModel(){\n try {\n //System.out.println(\"Assuming dictionary file is with .jar or in bin/\");\n this.phraseBook = GameDictionaryReader.readDictionary(getRootDictionary());\n } catch (FileNotFoundException e){\n System.out.println(\"ERROR: Dictionary could not be found!\");\n System.exit(1);\n }\n }", "@Override\n\tpublic String toString(){\n\t\treturn \"com.jcdeck.adversary.State Turn: \"+this.getTurn()+\" Depth: \"+this.depth;\n\t}", "public State_MissionSelect(Game game,String username) {\r\n super(game);\r\n\r\n this.a1=0;\r\n this.a2=0;\r\n this.w = game.width;\r\n this.h = game.height;\r\n this.data = Users.loadStudentData(username);\r\n this.resetCursor = true;\r\n game.musicVolume = (int)((((double) Objects.requireNonNull(data).volume/100.0)*31)-25);\r\n PlayMusic.gainControl.setValue((int)((((double)data.volume/100.0)*31)-25)-8);\r\n buttons = new ArrayList<>();\r\n missionButtons = new ArrayList<>();\r\n wireColorU = new Color(50,200,40,100);\r\n wireColorL = new Color(180,50,40,100);\r\n wiresX = new int[Missions.NUMBER_OF_MISSIONS*3];\r\n wiresY = new int[Missions.NUMBER_OF_MISSIONS*3];\r\n wireLengths = new int[Missions.NUMBER_OF_MISSIONS*3];\r\n wireHeights = new int[Missions.NUMBER_OF_MISSIONS*3];\r\n wireDir = new int[Missions.NUMBER_OF_MISSIONS*3];\r\n moving = false;\r\n amtMoved = 0;\r\n adjust = 0;\r\n goButtonAdded = false;\r\n reAddButtons = false;\r\n\r\n currentMission = 1;\r\n currentWire = 0;\r\n makeWires();\r\n int offX = 0;\r\n int offY = 0;\r\n for(int i = 0; i < data.missionCompletion.length;i++){\r\n if(data.missionCompletion[i]>0){\r\n for(int j = 0; j < 3;j++){\r\n if(wireDir[(3*i)+j]==1){\r\n offX+=wireLengths[(3*i)+j];\r\n }else if(wireDir[(3*i)+j]==2){\r\n offY+=wireHeights[(3*i)+j];\r\n }else if(wireDir[(3*i)+j]==3){\r\n offX+=wireLengths[(3*i)+j];\r\n }else if(wireDir[(3*i)+j]==4){\r\n offY+=wireHeights[(3*i)+j];\r\n }\r\n currentWire++;\r\n }\r\n currentMission++;\r\n }\r\n }\r\n screenOffsetX -= offX;\r\n screenOffsetY -= offY;\r\n }", "public void loadMap(FlxState gameState, String jsonMapPath){\n\t\tHashMap<String, String> layers = new HashMap<String, String>();\n\t\tHashMap<String, Array<JsonValue>> objectsJson = new HashMap<String, Array<JsonValue>>();\n\n\t\t// Cargo las layers y objectsJson. También seteo la FlxG.camera para que tenga los bounds del mapa.\n\t\tparseMap(jsonMapPath, RmbsTiledManager.objectsLayerName, layers, objectsJson);\n\n\t\t// Delego el parseo de layers a algún RmbsLayerParser\n\t\tthis.layerParser.parseLayers(gameState, layers, objectsJson);\n\t}", "public GameManager(){\r\n init = new Initialisation();\r\n tower=init.getTower();\r\n courtyard=init.getCourtyard();\r\n kitchen=init.getKitchen();\r\n banquetHall=init.getBanquetHall();\r\n stock=init.getStock();\r\n throneHall=init.getThroneHall();\r\n vestibule=init.getVestibule();\r\n stables=init.getStables();\r\n\r\n this.player = new Player(tower);\r\n\r\n push(new IntroductionState());\r\n\t}", "interface GameState {\n String WAITING_FOR_SECOND_PLAYER = \"WAITING_FOR_SECOND_PLAYER\";\n String TURN_HARE = \"TURN_HARE\";\n String TURN_HOUND = \"TURN_HOUND\";\n String WIN_HARE_BY_ESCAPE = \"WIN_HARE_BY_ESCAPE\";\n String WIN_HARE_BY_STALLING = \"WIN_HARE_BY_STALLING\";\n String WIN_HOUND = \"WIN_HOUND\";\n }", "private FlightFileManager() {\n super(\"src/data/flights.json\");\n flightSet = this.read(Flight.class);\n this.currency = 0;\n }", "public Data() {\n\t\tif (flag == 0) {\n\t\t\tflag = 1;\n\t\t\tfloat def = 0;\n\t\t\tfor (int i = 0; i < 4; i++) {\n\n\t\t\t\tlocation.add(def);\n\t\t\t\tstate.add(0);\n\t\t\t\tboardsize.add(0);\n\n\t\t\t\tsystemid.add(\"\");\n\t\t\t\ttime.add(0);\n\t\t\t\tname.add(\"\");\n\t\t\t}\n\n\t\t\tball.add(def);\n\t\t\tball.add(def);\n\n\t\t\tballsize = 0;\n\t\t}\n\t}", "public void construct(Player player) throws IOException, URISyntaxException {\n builder.init();\n builder.buildTitle(player);\n builder.buildMapView(player);\n builder.buildMoves(player);\n builder.buildWinner(player);\n }", "public String getState() {\n StringBuilder builder = new StringBuilder();\n //builder.append(muteMusic.getBackground().getLevel());\n //builder.append(',');\n builder.append(muteClicked);\n builder.append(',');\n builder.append(gameOver);\n builder.append(',');\n builder.append(wordsDetectedByUser.size());\n builder.append(',');\n for(int i =0;i<wordsDetectedByUser.size();i++)\n { builder.append(wordsDetectedByUser.get(i));\n builder.append(',');}\n builder.append(notValidWord);\n builder.append(',');\n // m1Handler.removeCallbacks(m1Runnable);\n mHandler.removeCallbacks(mRunnable);\n builder.append(phaseTwo);\n builder.append(',');\n builder.append(currentScore); //storing current score\n builder.append(',');\n builder.append(t); //storing timer state\n builder.append(',');\n Object a[] = DoneTiles.toArray();\n builder.append(a.length);\n builder.append(',');\n for(int i=0;i<a.length;i++) {\n builder.append(a[i].toString());\n builder.append(',');\n }\n builder.append(mLastLarge);\n builder.append(',');\n builder.append(mLastSmall);\n builder.append(',');\n for (int large = 0; large < 9; large++) {\n for (int small = 0; small < 9; small++) {\n builder.append(mSmallTiles[large][small].getOwner().name());\n builder.append(',');\n builder.append((((Button)mSmallTiles[large][small].getView()).getText()).toString());\n builder.append(',');\n //Log.d(DoneTiles);\n }\n }\n return builder.toString();\n }", "public GameFrame(String title, int difficulty, String mapFileName) {\n super(title);\n setResizable(false);\n setSize(GAME_WIDTH, GAME_HEIGHT);\n this.difficulty = difficulty;\n mapObject = new Map(mapFileName, this);\n lastRender = -1;\n fpsHistory = new ArrayList<>(100);\n\n try {\n plantImage = ImageIO.read(new File(\"src/pictures/plant.png\"));\n gameOverImage = ImageIO.read(new File(\"src/pictures/gameOver.png\"));\n gameWonImage = ImageIO.read(new File(\"src/pictures/youWin.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public PlayerOverworldState() {\n\t\tsuper();\n\t\t\n\t\t\n\t}", "public static interface ServerRunningGame extends ServerCommon\n\t{\n\t\t/**\n\t\t * Return the entire game log for this player.\n\t\t * This log can be used to recreate a full player local game view.\n\t\t * @return List<IGameEvent> Ordered list of all game event for this player, from the beginning to the current game turn.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tList<IGameEvent> getEntireGameLog() throws RpcException, StateMachineNotExpectedEventException;\n\n\t\t/**\n\t\t * Send a message to the RunningGame Chat.\n\t\t * @param msg Message.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tvoid sendMessage(String msg) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Test if building type can be build on selected celestial body.\n\t\t * @param ceslestialBodyName Name of the celestial body where to build.\n\t\t * @param buildingType Building type.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canBuild(String celestialBodyName, Class<? extends IBuilding> buildingType) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order construction of a new building on the given celestial body.\n\t\t * @param ceslestialBodyName Name of the celestial body where to build.\n\t\t * @param buildingType Building type.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException If command is not expected or arguments are not corrects. \n\t\t */\n\t\t//void build(String ceslestialBodyName, Class<? extends IBuilding> buildingType) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if selected building can be demolished.\n\t\t * @param ceslestialBodyName Name of the celestial body the building is build on. \n\t\t * @param buildingType Building type to demolish.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canDemolish(String celestialBodyName, Class<? extends IBuilding> buildingType) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order demolition of a building on the given celestial body.\n\t\t * @param ceslestialBodyName Name of the celestial body the building is build on.\n\t\t * @param buildingType Building type.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//void demolish(String ceslestialBodyName, Class<? extends IBuilding> buildingType) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if starship can be made on the selected planet\n\t\t * @param starshipToMake\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canMakeStarships(String planetName, Map<StarshipTemplate, Integer> starshipsToMake) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Make given starships on the given planet.\n\t\t * @param planetName Planet where is the starship plant.\n\t\t * @param starshipType Startship type to make.\n\t\t * @param quantity Quantity to make.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException If command is not expected or arguments are not corrects.\n\t\t */\n\t\t//void makeStarships(String planetName, Map<StarshipTemplate, Integer> starshipsToMake) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if probe can be made on the selected planet with given name.\n\t\t * @param planetName\n\t\t * @param probeName\n\t\t * @return\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException\n\t\t */\n\t\t//CommandCheckResult canMakeProbes(String planetName, String probeName, int quantity) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Make the given quantity of probes on the given planet, named by probeName+unit_number.\n\t\t * @param planetName\n\t\t * @param probeName\n\t\t * @param quantity\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException\n\t\t */\n\t\t//void makeProbes(String planetName, String probeName, int quantity) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if probe can be made on the selected planet with given name.\n\t\t * @param planetName\n\t\t * @param antiProbeMissileName\n\t\t * @return\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException\n\t\t */\n\t\t//CommandCheckResult canMakeAntiProbeMissiles(String planetName, String antiProbeMissileName, int quantity) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Make the given quantity of probes on the given planet, named by probeName+unit_number.\n\t\t * @param planetName\n\t\t * @param antiProbeMissileName\n\t\t * @param quantity\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException\n\t\t */\n\t\t//void makeAntiProbeMissiles(String planetName, String antiProbeMissileName, int quantity) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if fleet can be formed on this planet (starship plant existence).\n\t\t * @param fleetToForm Planet where the fleet is supposed to be formed.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canFormFleet(String planetName, String fleetName, Map<StarshipTemplate, Integer> fleetToFormStarships, Set<String> fleetToFormSpecialUnits) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Form a new fleet from the given starships composition.\n\t\t * @param planetName Planet where is the starship plant.\n\t\t * @param composition Starships composition (number of each starship type).\n\t\t * @param fleetName New fleet name.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException If command is not expected or arguments are not corrects.\n\t\t */\n\t\t//void formFleet(String planetName, String fleetName, Map<StarshipTemplate, Integer> fleetToFormStarships, Set<String> fleetToFormSpeciaUnits) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if the given fleet can be dismantled.\n\t\t * @param fleetName\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canDismantleFleet(String fleetName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Dismantle the given fleet and land the starships in the starship plant.\n\t\t * @param fleetName\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void dismantleFleet(String fleetName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if the government can be embarked.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canEmbarkGovernment() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to embark the government (from government module) on a government starship.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void embarkGovernment() throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if the government can be settled according to the government starship current location.\n\t\t * @param planetName Planet where to test if government can settle.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canSettleGovernment(String planetName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to settle the government (from government starship) in the planet the government starship is currently landed.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//void settleGovernment(String planetName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if pulsar missile can be fired from the given celestial body.\n\t\t * @param celestialBodyName Celestial body to check.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canFirePulsarMissile(String celestialBodyName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to fire a pulsar missile from the given celestial body with the given bonus modifier.\n\t\t * @param celestialBodyName Celestial body where the pulsar launching pad are supposed to be.\n\t\t * @param bonusModifier Bonus modifier.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//void firePulsarMissile(String celestialBodyName, float bonusModifier) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Test if player can build a space road.\n\t\t */\n\t\t//CommandCheckResult canBuildSpaceRoad(String sourceName, String destinationName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to build a space road between the given celestial bodies.\n\t\t * @param celestialBodyNameA\n\t\t * @param celestialBodyNameB\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void buildSpaceRoad(String sourceName, String destinationName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if player can demolish a space road.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canDemolishSpaceRoad(String sourceName, String destinationName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to demolish a space road.\n\t\t * @param celestialBodyNameA\n\t\t * @param celestialBodyNameB\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void demolishSpaceRoad(String celestialBodyNameA, String celestialBodyNameB) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if player can modify a carbon order.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state. \n\t\t */\n\t\t//CommandCheckResult canModifyCarbonOrder(String originCelestialBodyName, Stack<CarbonOrder> nextCarbonOrders) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Modify/create a carbon order from two celestial bodies.\n\t\t * @param originCelestialBodyName\n\t\t * @param destinationCelestialBodyName\n\t\t * @param amount\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void modifyCarbonOrder(String originCelestialBodyName, Stack<CarbonOrder> nextCarbonOrders) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if fleet can be moved.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canMoveFleet() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order a fleet to move with optionnal delay and checkpoints list.\n\t\t * @param fleetName\n\t\t * @param delay\n\t\t * @param checkpoints\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void moveFleet(String fleetName, Stack<Fleet.Move> checkpoints) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if he given antiprobe missile can be fired on the given target.\n\t\t * @param antiProbeMissileName\n\t\t * @param targetProbeName\n\t\t * @return\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t */\n\t\t//CommandCheckResult canFireAntiProbeMissile(String antiProbeMissileName, String targetOwnerName, String targetProbeName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to fire the antiprobe missile onto the given probe target.\n\t\t * @param antiProbeMissileName\n\t\t * @param targetProbeName\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void fireAntiProbeMissile(String antiProbeMissileName, String targetOwnerName, String targetProbeName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if probe can be launched.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canLaunchProbe(String probeName, RealLocation destination) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order to launch a probe to the specified destination.\n\t\t * @param probeName\n\t\t * @param destination\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void launchProbe(String probeName, RealLocation destination) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if player can attack enemies fleet.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canAttackEnemiesFleet(String celestialBodyName) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Order a celestial body to attack enemies fleet.\n\t\t * @param celestialBodyName\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void attackEnemiesFleet(String celestialBodyName) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\t\t\n\t\t/**\n\t\t * Test if player can change its diplomaty.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\t//CommandCheckResult canChangeDiplomacy(Map<String,PlayerPolicies> newPolicies) throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Change the player domestic policy.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException \n\t\t */\n\t\t//void changeDiplomacy(Map<String,PlayerPolicies> newPolicies) throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\n\t\t/**\n\t\t * Test if turn can be reseted (not ended yet).\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t */\n\t\t//CommandCheckResult canResetTurn() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Reset current player turn (erase commands).\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t * @throws RunningGameCommandException If command is not expected or arguments are not corrects.\n\t\t */\n\t\t//void resetTurn() throws RpcException, StateMachineNotExpectedEventException, RunningGameCommandException;\n\n\t\t/**\n\t\t * Test if turn can be ended (not already ended).\n\t\t * @throws RpcException\n\t\t * @throws StateMachineNotExpectedEventException\n\t\t */\n\t\t//CommandCheckResult canEndTurn() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Terminate the current turn.\n\t\t * @param commands List of commands generated by the player during this turn.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tvoid endTurn(List<ICommand> commands) throws RpcException, StateMachineNotExpectedEventException, GameCommandException;\n\t}", "private void populateLevel() {\r\n\r\n\r\n\t\t// Setup Goal\r\n\t\tJsonValue goalVal = levelAssets.get(\"goal\");\r\n\t\tfloat gWidth = goalTile.getRegionWidth()/scale.x;\r\n\t\tfloat gHeight = goalTile.getRegionHeight()/scale.y;\r\n\t\tfloat gX = goalVal.get(\"pos\").getFloat(0) + gWidth / 2;\r\n\t\tfloat gY = goalVal.get(\"pos\").getFloat(1) + gHeight / 2;\r\n\t\tgoalDoor = new DoorModel(gX, gY, gWidth, gHeight);\r\n\t\tgoalDoor.setBodyType(BodyDef.BodyType.StaticBody);\r\n\t\tgoalDoor.setDensity(constants.get(\"goal\").getFloat(\"density\", 0));\r\n\t\tgoalDoor.setFriction(constants.get(\"goal\").getFloat(\"friction\", 0));\r\n\t\tgoalDoor.setRestitution(constants.get(\"goal\").getFloat(\"restitution\", 0));\r\n\t\tgoalDoor.setSensor(true);\r\n\t\tgoalDoor.setDrawScale(scale);\r\n\t\tgoalDoor.setTexture(goalTile);\r\n\t\tgoalDoor.setName(\"goal\");\r\n\t\taddObject(goalDoor);\r\n\t\taddObjectTo(goalDoor, LevelCreator.allTag);\r\n\r\n\t\t// Get default values\r\n\t\tJsonValue defaults = constants.get(\"defaults\");\r\n\t\tJsonValue objs = levelAssets.get(\"objects\");\r\n\r\n\t\t//group platform constants together for access in following for-loop\r\n\t\tTextureRegion[] xTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\tlightningLightTexture, lightningDarkTexture, lightningAllTexture,\r\n\t\t\trainLightTexture, rainDarkTexture, rainAllTexture,\r\n\t\t\t\tcrumbleLightTexture, crumbleDarkTexture, crumbleAllTexture};\r\n\r\n\t\tTextureRegion[] reducedXTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\t\tlightningLightTextureReduced, lightningDarkTextureReduced, lightningAllTextureReduced,\r\n\t\t\t\trainLightTextureReduced, rainDarkTextureReduced, rainAllTextureReduced,\r\n\t\t\t\tcrumbleLightTextureReduced, crumbleDarkTextureReduced, crumbleAllTextureReduced};\r\n\r\n\r\n\t\t// Setup platforms\r\n\t\tfor(int i=0; i < (objs != null ? objs.size : 0); i++)\r\n\t\t{\r\n\t\t\tJsonValue obj = objs.get(i);\r\n\r\n\t\t\t// Get platform attributes\r\n\t\t\tint platformType = obj.get(\"type\").asInt();\r\n\t\t\tint property = obj.get(\"property\") == null ? 0: obj.get(\"property\").asInt();\r\n\t\t\tJsonValue platformArgs = obj.get(\"positions\");\r\n\t\t\tJsonValue pathsArgs = obj.get(\"paths\");\r\n\r\n\t\t\tfor (int j = 0; j < platformArgs.size; j++) {\r\n\t\t\t\tfloat[] bounds = platformArgs.get(j).asFloatArray();\r\n\t\t\t\tfloat x = bounds[0], y = bounds[1], width = bounds[2], height = bounds[3];\r\n\t\t\t\tTextureRegion newXTexture;\r\n\t\t\t\tTextureRegion crumbleTexture = null;\r\n\t\t\t\tTexture originalTexture = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// temporary - need to refactor asset directory\r\n\t\t\t\t\tJsonValue assetName = obj.get(\"assetName\");\r\n\t\t\t\t\tint assetIndex = assetName.asInt();\r\n\t\t\t\t\tnewXTexture = new TextureRegion(tutorial_signs[assetIndex]);\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\tint platIdx = platformType-1+(property - 1)*3;\r\n\t\t\t\t\tint crumbleIdx = platIdx + 3;\r\n\t\t\t\t\tnewXTexture = new TextureRegion(xTexture[platIdx]);\r\n\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t// For crumble animation\r\n\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\tcrumbleTexture = new TextureRegion(xTexture[crumbleIdx]);\r\n//\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If the platform size is the same as the spritesheet size\r\n\t\t\t\t\tif (originalTexture.getWidth() > 32 && width%(originalTexture.getWidth()/32) == 0) {\r\n\t\t\t\t\t\tnewXTexture = new TextureRegion(reducedXTexture[platIdx]);\r\n\t\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\t\tcrumbleTexture = new TextureRegion(reducedXTexture[crumbleIdx]);\r\n//\t\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tnewXTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t}\r\n\t\t\t\tPlatformModel platformModel = new PlatformModel(bounds, platformType, property, newXTexture, scale,\r\n\t\t\t\t\t\tdefaults.getFloat( \"density\", 0.0f ), defaults.getFloat( \"friction\", 0.0f ) ,\r\n\t\t\t\t\t\tdefaults.getFloat( \"restitution\", 0.0f ), originalTexture, crumbleTexture);\r\n\t\t\t\tplatformModel.setTag(platformType);\r\n\t\t\t\tplatformModel.setProperty(property);\r\n\t\t\t\taddObject(platformModel);\r\n\t\t\t\taddObjectTo(platformModel, platformType);\r\n\t\t\t\t//TODO: Moving platforms\r\n\r\n\r\n\t\t\t\tif (pathsArgs != null) {\r\n\t\t\t\t\tfloat[] paths = pathsArgs.get(j).asFloatArray();\r\n\r\n\t\t\t\t\t//** Moving platform if > 1 path or different path from starting position\r\n\t\t\t\t\tif (hasValidPath(x, y, paths)) {\r\n\t\t\t\t\t\tplatformModel.setBodyType(BodyDef.BodyType.KinematicBody);\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\r\n\t\t\t\t\t\tPooledList<Vector2> pathList = new PooledList<>();\r\n\t\t\t\t\t\tfor (int k = 0; k < paths.length; k+=2) {\r\n\t\t\t\t\t\t\tpathList.add(new Vector2(paths[k], paths[k+1]));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfloat velocity = 3;\r\n\r\n\t\t\t\t\t\tplatformModel.setGravityScale(0);\r\n\t\t\t\t\t\tplatformModel.setPaths(pathList);\r\n\t\t\t\t\t\tplatformModel.setVelocity(velocity);\r\n\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// This world is heavier\r\n\t\tworld.setGravity( new Vector2(0,defaults.getFloat(\"gravity\",0)) );\r\n\r\n\t\t// Set level background index\r\n\t\tint backgroundTextureIndex = levelAssets.get(\"background\").asInt();\r\n\t\tbackgroundLightTexture = backgrounds[backgroundTextureIndex - 1];\r\n\t\tbackgroundDarkTexture = backgrounds[backgroundTextureIndex];\r\n\t\tbackgroundTexture = backgroundLightTexture;\r\n\r\n\t\t// Initialize background animations\r\n\t\tactualBackgroundTexture = backgroundTexture.getTexture();\r\n\t\tbackgroundEntirePixelWidth = actualBackgroundTexture.getWidth();\r\n\t\tbackgroundNumAnimFrames = (int)(backgroundEntirePixelWidth/backgroundFramePixelWidth);\r\n\t\tbackgroundAnimator = new FilmStrip(backgroundTexture,1, backgroundNumAnimFrames, backgroundNumAnimFrames);\r\n\t\tbackgroundAnimator.setFrame(0);\r\n\t\tbackgroundAnimeframe = 0;\r\n\t\tbackgroundOrigin = new Vector2(backgroundAnimator.getRegionWidth()/2.0f, backgroundAnimator.getRegionHeight()/2.0f);\r\n\r\n\t\t// Set level bounds\r\n\t\twidthUpperBound = levelAssets.get(\"dimensions\").getInt(0);\r\n\t\theightUpperBound = levelAssets.get(\"dimensions\").getInt(1);\r\n\r\n\t\t// Setup Somni\r\n\r\n\t\tJsonValue somniVal = levelAssets.get(\"somni\");\r\n\t\tfloat sWidth = somniTexture.getRegionWidth()/scale.x;\r\n\t\tfloat sHeight = somniTexture.getRegionHeight()/scale.y;\r\n\t\tfloat sX = somniVal.get(\"pos\").getFloat(0) + sWidth / 2;\r\n\t\tfloat sY = somniVal.get(\"pos\").getFloat(1) + sHeight / 2;\r\n\t\tsomni = new CharacterModel(constants.get(\"somni\"), sX, sY, sWidth, sHeight, platformController.somnif, CharacterModel.LIGHT);\r\n\t\tsomni.setDrawScale(scale);\r\n\t\tsomni.setTexture(somniIdleTexture);\r\n\t\tsomni.setFilterData(platformController.somnif);\r\n\t\tsomni.setActive(true);\r\n\t\taddObject(somni);\r\n\t\taddObjectTo(somni, LevelCreator.allTag);\r\n\r\n\r\n\t\t// Setup Phobia\r\n\r\n\t\tJsonValue phobiaVal = levelAssets.get(\"phobia\");\r\n\t\tfloat pWidth = phobiaTexture.getRegionWidth()/scale.x;\r\n\t\tfloat pHeight = phobiaTexture.getRegionHeight()/scale.y;\r\n\t\tfloat pX = phobiaVal.get(\"pos\").getFloat(0) + pWidth / 2;\r\n\t\tfloat pY = phobiaVal.get(\"pos\").getFloat(1) + pHeight / 2;\r\n\t\tphobia = new CharacterModel(constants.get(\"phobia\"), pX, pY, pWidth, pHeight, platformController.phobiaf, CharacterModel.DARK);\r\n\t\tphobia.setDrawScale(scale);\r\n\t\tphobia.setTexture(phobiaIdleTexture);\r\n\t\tphobia.setFilterData(platformController.phobiaf);\r\n\t\taddObject(phobia);\r\n\t\taddObjectTo(phobia, LevelCreator.allTag);\r\n\t\tphobia.setActive(true);\r\n\r\n\t\t// Setup Combined\r\n\r\n\t\tfloat cWidth = combinedTexture.getRegionWidth()/scale.x;\r\n\t\tfloat cHeight = combinedTexture.getRegionHeight()/scale.y;\r\n\r\n\t\tcombined = new CharacterModel(constants.get(\"combined\"), 0, 0, cWidth, cHeight, platformController.combinedf, CharacterModel.DARK);\r\n\t\tcombined.setDrawScale(scale);\r\n\t\tcombined.setTexture(somniPhobiaTexture);\r\n\t\t//combined.setTag();\r\n\t\tcombined.setFilterData(platformController.combinedf);\r\n\t\taddObject(combined);\r\n\t\taddObjectTo(combined, LevelCreator.allTag);\r\n\t\tcombined.setActive(true);\r\n\r\n\t\t//Remove combined\r\n\t\tobjects.remove(combined);\r\n\t\tsharedObjects.remove(combined);\r\n\t\tcombined.setActive(false);\r\n\r\n\t\taction = 0;\r\n\r\n\t\tPreferences prefs = GDXRoot.getPreferences();\r\n\t\tvolume = prefs.contains(\"volume\") ? prefs.getFloat(\"volume\") : defaults.getFloat(\"volume\",\r\n\t\t\t\t1.0f);\r\n//\t\tSystem.out.println(volume);\r\n\r\n\t\tplatformController.applyFilters(objects);\r\n\t}", "public void putState(String gameData) {\n String[] fields = gameData.split(\",\");\n //setPhaseTwoLogic();\n int index = 0;\n // Object n = (Object)fields[index++];\n //e=(TextView)n;\n\n //int availabletilessize = Integer.parseInt((fields[index++]));\n //for(int i =0;i<availabletilessize;i++){\n // mAvailable.add(fields[index++]);\n //}\n // muteMusic = (Button)getActivity().findViewById((R.id.mute));\n // int level = Integer.parseInt(fields[index++]);\n //muteMusic.getBackground().setLevel(level);\n muteClicked = Boolean.parseBoolean(fields[index++]);\n // if(muteClicked){\n\n // .mMediaPlayer.pause();\n // }\n gameOver = Boolean.parseBoolean(fields[index++]);\n\n\n int size = Integer.parseInt(fields[index++]);\n e = (TextView) getActivity().findViewById(R.id.scroggle_text_view);\n\n e.setText(\"\");\n\n for(int i = 0; i<size; i++){\n\n wordsDetectedByUser.put(i, fields[index++]);\n\n e.append(wordsDetectedByUser.get(i)+\" \");\n\n }\n notValidWord =Boolean.parseBoolean(fields[index++]);\n phaseTwo =Boolean.parseBoolean(fields[index++]);\n\n\n currentScore = Integer.parseInt(fields[index++]);\n t = Integer.parseInt(fields[index++]);\n int length = Integer.parseInt((fields[index++]));\n int a[ ]= new int[length];\n for(int i=0;i<length;i++){\n a[i]=Integer.parseInt(fields[index++]);\n DoneTiles.add(a[i]);\n }\n\n mLastLarge = Integer.parseInt(fields[index++]);\n mLastSmall = Integer.parseInt(fields[index++]);\n for (int large = 0; large < 9; large++) {\n for (int small = 0; small < 9; small++) {\n TileAssignment5.Owner owner = TileAssignment5.Owner.valueOf(fields[index++]);\n mSmallTiles[large][small].setOwner(owner);\n mSmallTiles[large][small].updateDrawableState(fields[index++].charAt(0), 1);\n //Log.d(DoneTiles.toString(), \"checkkk\");\n // mSmallTiles[large][small].updateDrawableState('a', 0);\n }\n }\n // setAvailableFromLastMove(mLastLarge, mLastSmall);\n // updateAllTiles();\n setAvailableAccordingToGamePhase(phaseTwo, mLastSmall, mLastLarge, DoneTiles);\n }", "public void playerDetailedInfo(Player p){\n System.out.println(\"Indicator: \" + indicator + \"\\nJoker: \"+joker);\n System.out.println(\"Winner: Player\" + p.getPlayerNo());\n System.out.println(\"Tile size: \" + p.getTiles().size());\n System.out.println(\"Joker count: \" + p.getJokerCount());\n System.out.println(\"Double score: \" + p.getDoubleCount()*2);\n System.out.println(\"All tiles in ascending order:\\t\" + p.getTiles());\n System.out.println(\"Clustered according to number: \\t\" + p.getNoClus());\n System.out.println(\"Total number clustering score: \" + p.totalNoClustering());\n System.out.println(\"Clustered according to color: \\t\" + p.getColClus());\n System.out.println(\"Total color clustering score: \" + p.totalColCluster());\n System.out.println(\"Final score of Player\"+p.getPlayerNo()+\": \" + p.getPlayerScore());\n }", "public static void main(String[] args) throws IOException {\n final dev.punchcafe.vngine.game.GameBuilder<NarrativeImp> gameBuilder = new dev.punchcafe.vngine.game.GameBuilder();\n final NarrativeAdaptor<Object> narrativeReader = (file) -> List.of();\n final var pom = PomLoader.forGame(new File(\"command-line/src/main/resources/vng-game-1\"), narrativeReader).loadGameConfiguration();\n final var narratives = NarrativeParser.parseNarrative(new File(\"command-line/src/main/resources/vng-game-1/narratives/narratives.yml\"));\n final var narrativeService = new NarrativeServiceImp(narratives);\n gameBuilder.setNarrativeReader(new NarrativeReaderImp());\n gameBuilder.setNarrativeService(narrativeService);\n gameBuilder.setPlayerObserver(new SimplePlayerObserver());\n gameBuilder.setProjectObjectModel(pom);\n final var game = gameBuilder.build();\n //game.startNewGame();\n final var saveFile = GameSave.builder()\n .nodeIdentifier(NodeIdentifier.builder()\n .chapterId(\"ch_01\")\n .nodeId(\"1_2_2\")\n .build())\n .savedGameState(SavedGameState.builder()\n .chapterStateSnapshot(StateSnapshot.builder()\n .booleanPropertyMap(Map.of())\n .integerPropertyMap(Map.of())\n .stringPropertyMap(Map.of())\n .build())\n .gameStateSnapshot(StateSnapshot.builder()\n .booleanPropertyMap(Map.of())\n .integerPropertyMap(Map.of())\n .stringPropertyMap(Map.of())\n .build())\n .build())\n .build();\n final var saveGame = game.loadGame(saveFile)\n .tick()\n .tick()\n .saveGame();\n System.out.println(\"checkpoint\");\n }", "public Game() {\n parser = new Parser();\n }", "com.rpg.framework.database.Protocol.MonsterStateOrBuilder getDataOrBuilder(\n int index);", "private ClientPlayerDetails(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public GameInfo(Game game) {\n gameState = game.getGameState();\n activeCategory = game.getActiveCategory();\n round = game.getRound();\n humanRoundsWon = game.getHumanWonRounds();\n numDraws = game.getNumDraws();\n\n if (game.getActivePlayer() != null) {\n activePlayerName = game.getActivePlayer().getName();\n activePlayerHuman = game.getActivePlayer().getIsHuman();\n } else {\n activePlayerName = null;\n activePlayerHuman = null;\n }\n\n if (game.getRoundWinner() != null) {\n roundWinnerName = game.getRoundWinner().getName();\n } else {\n roundWinnerName = null;\n }\n\n if (game.getGameWinner() != null) {\n gameWinnerName = game.getGameWinner().getName();\n } else {\n gameWinnerName = null;\n }\n\n if (game.getGameWinner() != null) {\n winnerHuman = game.getGameWinner().getIsHuman();\n } else {\n winnerHuman = null;\n }\n\n\n\n topCards = getTopCards(game);\n playerNames = getPlayerNames(game);\n topCardTitles = getTopCardTitles(game);\n deck = getDeck(game);\n Player humanPlayer = getHumanPlayer(game);\n numOfCardsLeft = getNumOfCards(game);\n\n\n // Determine number of cards in human's deck\n //, the size of the communal pile and the top \n // most card\n if (humanPlayer != null && humanPlayer.getHand() != null) {\n numHumanCards = humanPlayer.getHand().size();\n } else {\n numHumanCards = null;\n }\n \n if (deck.size() > 0) {\n numOfCommunalCards = deck.size();\n } else {\n numOfCommunalCards = 0;\n }\n\n if (humanPlayer != null && humanPlayer.getTopMostCard() != null) {\n humanTopCardTitle = humanPlayer.getTopMostCard().getName();\n cardCategories = humanPlayer.getTopMostCard().getCardProperties();\n } else {\n humanTopCardTitle = null;\n cardCategories = null;\n }\n }", "PlayerState getPlayerState() {\n return playerState;\n }", "public static void load() {\n tag = getPlugin().getConfig().getString(\"Tag\");\n hologram_prefix = getPlugin().getConfig().getString(\"Prefix\");\n hologram_time_fixed = getPlugin().getConfig().getBoolean(\"Hologram_time_fixed\");\n hologram_time = getPlugin().getConfig().getInt(\"Hologram_time\");\n hologram_height = getPlugin().getConfig().getInt(\"Hologram_height\");\n help_message = getPlugin().getConfig().getStringList(\"Help_message\");\n hologram_text_lines = getPlugin().getConfig().getInt(\"Max_lines\");\n special_chat = getPlugin().getConfig().getBoolean(\"Special_chat\");\n radius = getPlugin().getConfig().getBoolean(\"Radius\");\n radius_distance = getPlugin().getConfig().getInt(\"Radius_distance\");\n chat_type = getPlugin().getConfig().getInt(\"Chat-type\");\n spectator_enabled = getPlugin().getConfig().getBoolean(\"Spectator-enabled\");\n dataType = getPlugin().getConfig().getInt(\"Data\");\n mySQLip = getPlugin().getConfig().getString(\"Server\");\n mySQLDatabase = getPlugin().getConfig().getString(\"Database\");\n mySQLUsername = getPlugin().getConfig().getString(\"Username\");\n mySQLPassword = getPlugin().getConfig().getString(\"Password\");\n\n }", "public Game(){\n player = new Player(createRooms());\n parser = new Parser(); \n }", "private void prepareInfo() {\n if (plane != null) {\n String planeType = plane.getType();\n ArrayList<String> airports = new ArrayList<>();\n\n if (planeType.equalsIgnoreCase(\"Passenger Plane\")) {\n World.getPublicAirports().forEach(publicAirport ->\n airports.add(publicAirport.getName())\n );\n } else if (planeType.equalsIgnoreCase(\"Military Plane\")) {\n World.getMilitaryAirports().forEach(militaryAirport ->\n airports.add(militaryAirport.getName())\n );\n }\n\n startAirport.setItems(FXCollections.observableArrayList(airports));\n endAirport.setItems(FXCollections.observableArrayList(airports));\n startAirport.getSelectionModel().select(plane.getStartBuilding().getName());\n endAirport.getSelectionModel().select(plane.getEndBuilding().getName());\n\n title.setText(\"PLANE INFO\");\n name.setText(plane.getName());\n speed.setText(String.valueOf(plane.getSpeed()));\n fuelLevel.setText(String.valueOf(plane.getFuelLevel()));\n type.setText(plane.getType());\n\n if (plane.isEmergencyLanding()) {\n landButton.setText(\"Take off\");\n } else {\n landButton.setText(\"Emergency land\");\n }\n\n if (plane.getType().equalsIgnoreCase(\"Military Plane\")) {\n MilitaryPlane plane = (MilitaryPlane) this.plane;\n weapon.setText(plane.getWeaponType().weaponType());\n passengers.setVisible(false);\n passengers.setMaxHeight(0);\n } else {\n PassengerPlane plane = (PassengerPlane) this.plane;\n passengers.setItems(FXCollections.observableArrayList(plane.getPassengerContainer().getPassengers()));\n }\n }\n }" ]
[ "0.572995", "0.55549324", "0.5533404", "0.5466989", "0.5432803", "0.53070337", "0.52736235", "0.527323", "0.51591843", "0.5136367", "0.51320094", "0.5123483", "0.51116115", "0.51085955", "0.5098776", "0.5085382", "0.5060575", "0.5058007", "0.5052028", "0.5030684", "0.50069976", "0.5005796", "0.5001121", "0.49696037", "0.49555397", "0.49528307", "0.49444893", "0.49206272", "0.49169445", "0.49168685", "0.49153048", "0.491434", "0.49050727", "0.49034345", "0.48994544", "0.48915848", "0.48880628", "0.48875383", "0.48791155", "0.48722118", "0.48709726", "0.48697603", "0.4863973", "0.486363", "0.485351", "0.4852811", "0.48460254", "0.48418123", "0.48344082", "0.4833142", "0.48119944", "0.48098013", "0.48065147", "0.4801249", "0.47966665", "0.47904402", "0.47790417", "0.47678986", "0.47596836", "0.475625", "0.47556818", "0.47551572", "0.47543854", "0.47526363", "0.47475365", "0.4742782", "0.47406837", "0.47375813", "0.47352254", "0.47262457", "0.47220823", "0.47202042", "0.47177994", "0.4710595", "0.47027022", "0.47007334", "0.4689343", "0.468069", "0.467922", "0.46673515", "0.46627796", "0.46622735", "0.4660622", "0.46599656", "0.46566838", "0.4653293", "0.4647957", "0.46473482", "0.4642356", "0.46404216", "0.4639885", "0.46369454", "0.46334195", "0.46297517", "0.46262705", "0.46242678", "0.46229288", "0.46224743", "0.46209258", "0.46194935" ]
0.5738347
0
/ Proses Seleksi Program
public String run() { // Check if ironCurtain is available to use and GreedyIronCurtain is available if (myself.ironCurtainAvailable && myself.energy >= 120 && checkGreedyIronCurtain()) { return buildIC(); } else if (myself.isIronCurtainActive && canBuy(ATTACK)) { return buildTurret(); } else { // Check if GreedyWinRate is available if (checkGreedyWinRate() && checkGreedyEnergy() && canBuy(ENERGY)) { return buildEnergy(); } // Check if there is an attack.. else if (myTotal.get(3) > 0 || myTotal.get(0) > 0) { // Check if GreedyDefense is available if (canBuy(DEFENSE) && checkGreedyDefense()) return defendRow(); else if (canBuy(ATTACK)) return buildTurret(); return doNothingCommand(); } // Check if GreedyEnergy is available else if (checkGreedyEnergy() && canBuy(ENERGY)) { return buildEnergy(); } // Just Attack if there is no greedy or do nothing if there is no energy else if (canBuy(ATTACK)) { return buildTurret(); } else { return doNothingCommand(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void program() throws Exception {\r\n int valg;\r\n skrivInn(\"dvdarkiv2.txt\");//leser inn fra dvd arkivet\r\n while(true) {\r\n meny();//kaller paa meny for a skrive ut menyen etter hvert fullforte valg\n System.out.println(\"Skriv inn valget ditt\");\n valg = sjekkOmTall();//kaller paa metoden for o sorge for aa faa valg\n if (valg == 1) {\n nyPerson();\n }\n else if (valg == 2) {\n kjop();\n }\n else if (valg == 3) {\n laan();\n }\n else if (valg == 4) {\n visPerson();\n }\n else if (valg == 5) {\n visOversikt();\n }\n else if (valg == 6){\n retur();\n }\n else if (valg == 7) {\n avslutt();\n }\n }\r\n }", "public static void MenuPilihan() {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tboolean running = true;\r\n\t\tint kode = 6;\r\n\t\t\r\n\t\tMatriks Minput = new Matriks(1,1);\r\n\t\t\r\n\t\twhile (running) {\r\n\t\t\tSystem.out.printf(\"Menu \\n1. Sistem Persamaan Linier \\n2. Determinan \\n3. Matriks balikan \\n4. Interpolasi Polinom \\n5. Regresi linier berganda \\n6. Keluar \\n\");\r\n\t\t\tkode = sc.nextInt();\r\n\r\n\t\t\tswitch(kode){\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tSystem.out.printf(\"1. Metode eliminasi Gauss \\n2. Metode eliminasi Gauss-Jordan \\n3. Metode Matriks balikan \\n4. Kaidah Cramer \\n\");\r\n\t\t\t\t\tint kode1 = sc.nextInt();\r\n\t\t\t\t\tMinput.BacaIsi(1);\r\n\t\t\t\t\tint flag;\r\n\t\t\t\t\tdouble[] hasil;\r\n\t\t\t\t\tswitch(kode1){\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\thasil = Gauss(Minput);\r\n\t\t\t\t\t\t\tif (hasil.length == 3 + Minput.BrsEff){\r\n\t\t\t\t\t\t\t\tflag = 3;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if (hasil.length == 2 + Minput.BrsEff){\r\n\t\t\t\t\t\t\t\tflag = 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tflag = 1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tMatriks.writeSPL(hasil, flag);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\thasil = Jordan(Minput);\r\n\t\t\t\t\t\t\tif (hasil.length == 3 + Minput.BrsEff){\r\n\t\t\t\t\t\t\t\tflag = 3;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if (hasil.length == 2 + Minput.BrsEff){\r\n\t\t\t\t\t\t\t\tflag = 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tflag = 1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tMatriks.writeSPL(hasil, flag);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\t\tif(Minput.DetCofactor(Minput)==0){\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"SPL tidak dapat diselesaikan dengan cara ini!\");\r\n\t\t\t\t\t\t\t} else{\r\n\t\t\t\t\t\t\t\tMatriks A = new Matriks(1,1);\r\n\t\t\t\t\t\t\t\tMatriks B = new Matriks(1,1);\r\n\r\n\t\t\t\t\t\t\t\tMinput.splitMatriks(A,B);\r\n\r\n\t\t\t\t\t\t\t\thasil = A.SPLInverse(A,B);\r\n\t\t\t\t\t\t\t\tMatriks.writeSPL(hasil, 1);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\t\tif(Minput.DetCofactor(Minput)==0){\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"SPL tidak dapat diselesaikan dengan cara ini!\");\r\n\t\t\t\t\t\t\t} else{\r\n\t\t\t\t\t\t\t\thasil = Minput.Cramer();\r\n\t\t\t\t\t\t\t\tMatriks.writeSPL(hasil,1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tSystem.out.printf(\"Menu \\n1.Determinan Reduksi Baris \\n2.Determinan Ekspansi Kofaktor \\n\");\r\n\t\t\t\t\tkode1 = sc.nextInt();\r\n\t\t\t\t\tMinput.BacaIsi(4);\r\n\t\t\t\t\tdouble determinan;\r\n\r\n\t\t\t\t\tswitch(kode1){\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\tdeterminan = Minput.DetReduksi();\r\n\t\t\t\t\t\t\tMatriks.writeDouble(determinan);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\tdeterminan = Minput.DetCofactor(Minput);\r\n\t\t\t\t\t\t\tMatriks.writeDouble(determinan);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tSystem.out.printf(\"Matriks Balikan\\n\");\r\n\t\t\t\t\tMinput.BacaIsi(4);\r\n\t\t\t\t\tdouble det = Minput.DetCofactor(Minput);\r\n\t\t\t\t\tif(det!=0){\r\n\t\t\t\t\t\tMatriks Moutput = Minput.Inverse(Minput);\r\n\t\t\t\t\t\tMoutput.writeMatriks(Moutput);\r\n\t\t\t\t\t} else{\r\n\t\t\t\t\t\tSystem.out.println(\"Matriks yang anda masukan tidak memiliki inverse\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tSystem.out.printf(\"Interpolasi Polinom\");\r\n\t\t\t\t\tMinput.BacaIsi(2);\r\n\t\t\t\t\tSystem.out.println(\"Masukan nilai yang akan di taksir: \");\r\n\t\t\t\t\tdouble x = sc.nextDouble();\r\n\t\t\t\t\tint n = Minput.Elmt.length-1;\r\n\r\n\t\t\t\t\tdouble[] result = Minput.Interpolasi(Minput,n,x);\r\n\t\t\t\t\tMinput.writeInterpolasi(x, result);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tSystem.out.printf(\"Regresi Linier Berganda\\n\");\r\n\t\t\t\t\tMinput.BacaIsi(3);\r\n\r\n\t\t\t\t\tdouble jawaban;\r\n\r\n\t\t\t\t\tdouble[] rslt = Minput.Regresi();\r\n\t\t\t\t\tdouble[] var = new double[rslt.length-1];\r\n\r\n\t\t\t\t\tSystem.out.println(\"Masukkan variabel-variabel X untuk nilai Y yang ingin dicari:\");\r\n\r\n\t\t\t\t\tfor (int i=0; i<var.length; i++) {\r\n\t\t\t\t\t\tvar[i] = sc.nextDouble();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tjawaban = HasilRegresi(rslt, var);\r\n\t\t\t\t\t\r\n\t\t\t\t\twriteDouble(jawaban);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\trunning = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tsc.close();\r\n\t}", "public void menuSPL(int metode) {\n switch (metode) {\n case 1:\n System.out.println(\"Penyelesaian SPL menggunakan eliminasi Gauss: \");\n this.splGauss();\n this.save_solusi_spl(\"eliminasi Gauss:\");\n break;\n case 2:\n System.out.println(\"Penyelesaian SPL menggunakan eliminasi Gauss-Jordan: \");\n this.splGaussJordan();\n this.save_solusi_spl(\"eliminasi Gauss-Jordan:\");\n break;\n case 3:\n System.out.println(\"Penyelesaian SPL menggunakan matriks balikan: \");\n this.splMatriksBalikan();\n this.save_solusi_spl(\"matriks balikan:\");\n break;\n case 4:\n System.out.println(\"Penyelesaian SPL menggunakan kaidah Cramer: \");\n this.splCramer();\n this.save_solusi_spl(\"kaidah Cramer:\");\n break;\n }\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\t\tSystem.out.print(\"Masukkan nilai k : \");\n int k = scan.nextInt();\n System.out.print(\"Masukkan nilai l : \"); //jml\n int l = scan.nextInt();\n System.out.print(\"Masukkan nilai m : \"); //nxn\n int m = scan.nextInt();\n \n Soal07 data = new Soal07();\n data.buatSegitiga(k,l,m);\n data.cetak();\n\n\t}", "public static void main(String[] args) {\n System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"--Selamat Datang Di Kuis Matematika--\");\n System.out.println(\"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\");\n System.out.println(\"Daftar soal: \");\n soal();\n System.out.println(\"Silahkan input angka sesuai dengan nomer soal: \");\n pilihan();\n \n \n \n }", "public static void main(String[] args) {\n menu();\r\n int num = 0;\r\n try {\r\n Scanner scan = new Scanner(System.in);\r\n num = scan.nextInt();\r\n } catch (InputMismatchException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n switch (num)\r\n {\r\n case 1:\r\n commercial();\r\n break;\r\n case 2:\r\n residential();\r\n case 3:\r\n System.out.println(\"Your session is over\");\r\n default:\r\n System.out.println(\"\");\r\n }\r\n\r\n }", "public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medlemmer i restance\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }", "public static void main(String[] args) {\n\t\t\t\tArrayList<String> rezultat = new ArrayList<String>();\r\n\r\n\t\t\t\tPisiCitaj pisiCitaj = new PisiCitaj();\r\n\t\t\t\tArrayList<String> procitanFajl = pisiCitaj.procitajFajl(\"src\\\\konverzijaFajlova1709\\\\fajlovi\\\\Primer.sub\");\r\n\t\t\t\tint slucaj = 1;\r\n\r\n\t\t\t\tswitch (slucaj) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tMicroDVD micro0 = new MicroDVD();\r\n\t\t\t\t\trezultat = micro0.ulazMPlayerSUB(procitanFajl);\r\n\t\t\t\t\tmicro0.ispisiFajl(args[2], rezultat);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tSubRipSRT SubRip1 = new SubRipSRT();\r\n\t\t\t\t\trezultat = SubRip1.ulazMPlayerSUB(procitanFajl);\r\n\t\t\t\t\tSubRip1.ispisiFajl(\"src\\\\konverzijaFajlova1709\\\\fajlovi\\\\MplayerToSubRip.srt\", rezultat);\r\n//\t\t\t\t\tfor (String string : rezultat) {\r\n//\t\t\t\t\t\tSystem.out.println(string);\r\n//\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tMicroDVD micro2 = new MicroDVD();\r\n\t\t\t\t\trezultat = micro2.ulazSubRipSRT(procitanFajl);\r\n\t\t\t\t\tmicro2.ispisiFajl(args[2], rezultat);\r\n//\t\t\t\t\tfor (String string : rezultat) {\r\n//\t\t\t\t\t\tSystem.out.println(string);\r\n//\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tMPlayerSUB mPlayer3 = new MPlayerSUB();\r\n\t\t\t\t\trezultat = mPlayer3.ulazSubRipSRT(procitanFajl);\r\n\t\t\t\t\tmPlayer3.ispisiFajl(args[2], rezultat);\r\n//\t\t\t\t\tfor (String string : rezultat) {\r\n//\t\t\t\t\t\tSystem.out.println(string);\r\n//\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tSubRipSRT SubRip4 = new SubRipSRT();\r\n\t\t\t\t\trezultat = SubRip4.ulazMicroDVDtxt(procitanFajl);\r\n//\t\t\t\t\tSubRip4.ispisiFajl(args[2], rezultat);\r\n//\t\t\t\t\tfor (String string : rezultat) {\r\n//\t\t\t\t\t\tSystem.out.println(string);\r\n//\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tMPlayerSUB mPlayer5 = new MPlayerSUB();\r\n\t\t\t\t\trezultat = mPlayer5.ulazMicroDVDtxt(procitanFajl);\r\n//\t\t\t\t\tmPlayer5.ispisiFajl(args[2], rezultat);\r\n//\t\t\t\t\tfor (String string : rezultat) {\r\n//\t\t\t\t\t\tSystem.out.println(string);\r\n//\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "private static void openSKERestaurant() {\n\n System.out.println(\" _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ \");\n System.out.println(\"| __| | | __| __ | __| __|_ _| _ | | | __ | _ | | |_ _|\");\n System.out.println(\"|__ | -| __| -| __|__ | | | | | | | -| | | | | | |\");\n System.out.println(\"|_____|__|__|_____|__|__|_____|_____| |_| |__|__|_____|__|__|__|__|_|___| |_|\");\n\n String input = \"?\";\n while (true) {\n switch (input) {\n case \"p\":\n placeOrder();\n break;\n case \"c\":\n checkOrder();\n break;\n case \"d\":\n checkPromotion();\n break;\n case \"o\":\n double total = checkOut();\n RestaurantManager.recordOrder(RestaurantManager.getOrderNum(), menuOrder, total);\n System.out.println(\"Have a nice day!!\");\n System.exit(0);\n break;\n case \"m\":\n RestaurantManager.manage();\n load();\n break;\n case \"?\":\n printMenu();\n break;\n case \"s\":\n System.exit(0);\n default:\n System.out.println(\"Invalid menu\");\n break;\n }\n System.out.print(\"cmd> \");\n input = sc.nextLine().trim();\n }\n }", "public static void structEMain(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Create a new Structural Engineer Profile\");\n System.out.println(\"2 - Search for Structural Engineer Profile\\n\");\n\n System.out.println(\"0 - Continue\");\n }", "public static void main(String[] args) {\n\t\tYazdirmaMetodlari.fatihBilisimOkuluProgramBasligiYazdir();\r\n\t\tString parametre = \"JAVA\";\r\n\t\tSystem.out.println();\r\n\t\tYazdirmaMetodlari.programBasligiYazdir(parametre);\r\n\t\tYazdirmaMetodlari.ayracYazdir();\r\n\t\tYazdirmaMetodlari.islemSonucuYazdir(\"Hafta\", 4);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.print(\"harf sayısı: \");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tint harfSayisi = scan.nextInt();\r\n\t\tKelimeUretec kelimeUretec = new KelimeUretec(harfSayisi);\r\n\r\n\t\tSystem.out.println(kelimeUretec.kelime);\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\röğrenci Listesi\");\r\n\t\tOgrenciEkle ogrEkle = new OgrenciEkle();\r\n\t\togrEkle.ekle();\r\n\t\t\r\n\r\n\t\tfor (int i = 0; i < ogrEkle.ogrenciArray.size(); i++) {\r\n\r\n\t\t\tSystem.out.println(\"No:\" + ogrEkle.ogrenciArray.get(i).ogrenciNo + \" - Ogrenci ad: \"\r\n\t\t\t\t\t+ ogrEkle.ogrenciArray.get(i).ogrenciAd);\r\n\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n LuuPhuongUyen L = new LuuPhuongUyen();\n L.addLast(\"00\", \"aa\", 2, 2);\n L.addLast(\"11\", \"bb\", 3, 2);\n while (true) {\n L.menu();\n int choice = sc.nextInt();\n switch (choice) {\n case 1:\n L.addItem();\n break;\n case 2:\n L.searchItem();\n break;\n case 3:\n L.deleteItem();\n break;\n case 4:\n L.traverse();\n break;\n case 5:\n return;\n }\n }\n }", "private void printMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opret\");\n System.out.println(\"(2) Find\");\n System.out.println(\"(3) Slet\");\n System.out.print(\"Valg: \");\n }", "private static void menu()\r\n\t{\r\n\t\tSystem.out.println(\"0. ** FOR INSTRUCTOR **\");\r\n\t\tSystem.out.println(\" Seed 5 URLs, set 3 keywords, creates 1000 Producers and 10 Consumers\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"1. Add seed url\");\r\n\t\tSystem.out.println(\"2. Add consumer (Parser)\");\r\n\t\tSystem.out.println(\"3. Add producer (Fetcher)\");\r\n\t\tSystem.out.println(\"4. Add keyword search\");\r\n\t\tSystem.out.println(\"5. Print stats\");\r\n\t}", "public void skrivUtSpiller() {\r\n\t\tSystem.out.println(\"Spiller \" + id + \": \" + navn + \", har \" + poengsum + \" poeng\");\r\n\t}", "public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"Lütfen adinizi giriniz\");\n\t\tString isim=scan.next();\n\t\t\n\t\tSystem.out.println(\"Lütfen soyadinizi giriniz\");\n\t\tString soyisim=scan.next();\n\t\t\n\t\tSystem.out.println(\"Lütfen kart numaranizi giriniz\");\n\t\tString kart=scan.next();\n\t\t\n\t\tchar isimIlkHarf=isim.toUpperCase().charAt(0);\n\t\tString isimGeriKalan=isim.substring(1).replaceAll(\"\\\\w\", \"*\");\n\t\tString soyisimIlkHarf=soyisim.toUpperCase().substring(0, 1);\n\t\tString soyisimGeriyeKalan=soyisim.substring(1).replaceAll(\"\\\\w\", \"*\");\n\t\tString kartIlk=\"**** **** **** \";\n\t\tString kartSon=kart.substring(kart.length()-4);\n\t\t\n\t\tSystem.out.println(\"Adiniz ve Soyadiniz: \"+isimIlkHarf+isimGeriKalan+\" \"+soyisimIlkHarf+soyisimGeriyeKalan);\n\t\tSystem.out.println(\"Kart Numarasi: \"+kartIlk+kartSon);\n\t\t\n\t\t\n\t\tscan.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public void korerProgram()\r\n {\r\n boolean runProgram = true;\r\n\r\n System.out.println(\"Velkommen!\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n\r\n while (runProgram)\r\n {\r\n System.out.println(\"1: Medlemskab\");\r\n System.out.println(\"2: Kontingent\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n char valg = console.next().charAt(0);\r\n String dummy = console.nextLine(); //læs enter indtasten\r\n\r\n\r\n if (valg == '0')\r\n {\r\n System.out.println(\"Afslutter ...\");\r\n runProgram = false;\r\n } else if (valg == '1')\r\n {\r\n Medlemskab medlemskab = new Medlemskab();\r\n\r\n boolean undermenuValg1 = true;\r\n while (undermenuValg1)\r\n {\r\n visMedlemskabsMenu();\r\n\r\n char valg1 = console.next().charAt(0);\r\n dummy = console.nextLine();\r\n\r\n if (valg1 == '0')\r\n {\r\n System.out.println(\"Afslutter ...\");\r\n undermenuValg1 = false;\r\n } else if (valg1 == '1')\r\n {\r\n System.out.println(\"Du har valgt at oprette et nyt medlem.\");\r\n System.out.println(\"(Indtast '\\\\N' hvis programmet forespørger ukendt data)\");\r\n medlemskab.gemMedlem();\r\n undermenuValg1 = false;\r\n } else if (valg1 == '2')\r\n {\r\n System.out.println(\"Du har valgt at opdatere et medlems oplysninger.\");\r\n System.out.println(\"Skriv medlemsnummer:\");\r\n\r\n while (!console.hasNextInt())\r\n {\r\n console.nextLine();\r\n System.out.println(\"Skriv medlemsnummer:\");\r\n }\r\n\r\n int nummer = console.nextInt();\r\n dummy = console.nextLine();\r\n medlemskab.opdatereMedlem(nummer);\r\n undermenuValg1 = false;\r\n }\r\n\r\n\r\n }\r\n } else if (valg == '2')\r\n {\r\n boolean undermenuValg2 = true;\r\n while (undermenuValg2)\r\n {\r\n visKontingenthaandteringMenu();\r\n\r\n char valg2 = console.next().charAt(0);\r\n dummy = console.nextLine();\r\n\r\n if (valg2 == '0')\r\n {\r\n System.out.println(\"Afslutter ...\");\r\n undermenuValg2 = false;\r\n } else if (valg2 == '1')\r\n {\r\n String[] priser = Filhaandtering.laesPriser();\r\n for (String pris : priser)\r\n {\r\n System.out.println(pris);\r\n }\r\n undermenuValg2 = false;\r\n } else if (valg2 == '2')\r\n {\r\n Filhaandtering.laesRestanceListe();\r\n undermenuValg2 = false;\r\n }\r\n }\r\n\r\n }\r\n }\r\n }", "public static void menu(){\n System.out.println(\"-Ingrese el número correspondiente-\");\n System.out.println(\"------------ Opciones -------------\");\n System.out.println(\"------------ 1. Sumar -------------\");\n System.out.println(\"------------ 2. Restar ------------\");\n System.out.println(\"------------ 3. Multiplicar -------\");\n System.out.println(\"------------ 4. Dividir -----------\");\n }", "public static void main(String[] args) {\n\n // Pitamo korisnika za ime fajla koji korisitmo\n String imeFajla = Svetovid.in.readLine(\"Unesite ime fajla:\");\n\n // Poziv prvog nacina ispisivanja\n citajSveRedove(imeFajla);\n\n // Moramo zatvoriti fajl da bi ga opet citali ispocetka\n Svetovid.in(imeFajla).close();\n\n // Poziv drugog nacina ispisivanja\n citajSveRedoveAlt(imeFajla);\n\n }", "public static void main(String[] args) {\n persegi_panjang pp = new persegi_panjang();\r\n pp.lebar=30;\r\n pp.panjang=50;\r\n Segitiga s = new Segitiga();\r\n s.alas=20;\r\n s.tinggi=40;\r\n Persegi p = new Persegi();\r\n p.sisi=40;\r\n lingkaran l= new lingkaran();\r\n l.jari=20;\r\n \r\npp.luas();\r\npp.keliling();\r\np.luas();\r\np.keliling();\r\ns.luas();\r\ns.keliling();\r\nl.luas();\r\nl.keliling();\r\n}", "public static void printSieger(){\n System.out.println(\"Sieger ist \" +GameController.SIEGER);\n }", "public static void Latihan() {\n Model.Garis();\n System.out.println(Model.subTitel[0]);\n Model.Garis();\n\n System.out.print(Model.subTitel[1]);\n Model.nilaiTebakan = Model.inputUser.nextInt();\n\n System.out.println(Model.subTitel[2] + Model.nilaiTebakan);\n\n // Operasi Logika\n Model.statusTebakan = (Model.nilaiTebakan == Model.nilaiBenar);\n System.out.println(Model.subTitel[3] + Model.hasilTebakan(Model.TrueFalse) + \"\\n\\n\");\n }", "public static void main(String[] args) {\n\t\t// apresentando informações em tela, salario e VR.\n\t\tSystem.out.println(\" SALARIO: R$ 1641,00\");\n\t\tSystem.out.println(\" VALE-REFEIÇÃO: R$ 409,00\");\n\t\t\n//fim\n\t}", "public static <Soplo_Humano> void main(String args[])throws Exception{\r\n\t\tScanner entry = new Scanner (System.in);\r\n\t\tString Instrumentos = null;\r\n\t\tSystem.out.print(\"Flauta\"+ \"\\n\" + \"Trompeta\"+ \"\\n\" +\"Marimba\");\r\n\t\tSystem.out.print(\"Ingrese instrumento: \");\r\n\t\t Instrumentos = entry.next();\r\n\t\tif(Instrumentos.equals(\"Flauta\"))\r\n\t \tSystem.out.println(\"Tiene un orificio donde pasa el aire\");\r\n\t\tif(Instrumentos.equals(\"Trompeta\"))\r\n\t\t\tSystem.out.println(\"Tiene un orificio donde pasa el aire\");\r\n\t\tthrow new Exception(\"No tiene orificio por lo tanto no es del tipo Aerofono\");\r\n}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tint menu;\n\t\t\n\t\tSystem.out.println(\"Volume dan Luas\");\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nPerhitungan Ruang\");\n\t\t\tSystem.out.println(\"1. Kubus\");\n\t\t\tSystem.out.println(\"2. Balok\");\n\t\t\tSystem.out.println(\"3. Tabung\");\n\t\t\tSystem.out.println(\"0. Exit\");\n\t\t\tSystem.out.print(\"Pilihan : \"); menu = input.nextInt();\n\t\t\t\n\t\t\tswitch (menu) {\n\t\t\tcase 1:\n\t\t\t\tKubus kubus = new Kubus();\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2:\n\t\t\t\tBalok balok = new Balok();\n\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\tTabung tabung = new Tabung();\n\t\t\t\t\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t} while (menu != 0);\n\t}", "public static void main(String[] args) {\n\n int[] podatki = {150, 70, 120, 190, 60, 130, 40, 100, 80, 60};\n //int[] podatki = {5};\n //int[] podatki = {1, 1, 1};\n Stolpci stolpci = new Stolpci(podatki);\n stolpci.sproziRisanje(args);\n }", "public static void main(String[] args) {\n \n \n boolean do_end = false;\n \n do{\n System.out.println(\"Choose option:\\n\"\n + \"1. Add studnet\\n\"\n + \"2. Show studnet\\n\"\n + \"3. Search studnet\\n\");\n Scanner sc = new Scanner(System.in);\n int option = sc.nextInt();\n \n switch(option){\n case 1: \n //add\n Student st = add_studnet();\n students[counter] = st;\n counter++;\n break;\n case 2:\n //show\n show_student();\n break;\n case 3:\n //search\n break;\n default:\n do_end = true;\n }\n \n \n }while(!do_end);\n \n }", "public static void main (String[] args) throws Exception {\n Ordliste scarlet = new Ordliste();\r\n // sender inn text.filen til metoden lesBok.\r\n scarlet.lesBok(\"scarlet.text\");\r\n // Interaksjoner med brukeren hvor ulike metoder blir kalt paa for aa loose oppgavene.\r\n System.out.println(\"Sporsmaal a: Hvor mange ulike ord forekommer i boken?\");\r\n System.out.println(\"Det er \" + scarlet.antallOrd() + \" ulike ord i teksten.\");\r\n\r\n /* Kommentar til Oppgave b&c : Her tolket jeg oppgaven slik at bruker skulle soke et ord de ville finne selv.\r\n Jeg saa ikke for senere at oppgaven spurte om Holmes og elementary. Kunne eventuelt har forandret\r\n oppgaven slik at man sendte inn argumentet \"Holmes\" og \"elementary\" til finnOrd-metoden, men lot\r\n det staa som det er og heller lagt inn en kommentar. */\r\n Scanner in = new Scanner(System.in);\r\n System.out.println(\"Sporsmaal b: Hvilket ord vil du lete antall forekomster av? (Skriv gjerne Holmes)\\n\");\r\n // Her printer den ut bare forekomster av \"Holmes\" UTEN apostrof bak.\r\n System.out.println(\"Det er \" + scarlet.antallForekomster(in.nextLine()) + \" antall forekomster av ordet du sokte i teksten.\\n\");\r\n\r\n System.out.println(\"Sporsmaal c:Hvilket ord vil du lete antall forekomster av? (Skriv gjerne elementary)\\n\");\r\n System.out.println(\"Det er \" + scarlet.antallForekomster(in.nextLine()) + \" antall forekomster av ordet du sokte i teksten.\\n\");\r\n\r\n System.out.println(\"Sporsmaal d: Det ordet som dukker opp flest ganger i teksten er: \" + scarlet.vanligste() + \"\\n\");\r\n\r\n System.out.println(\"Sporsmaal d (frivillig): De ordene som dukker opp flest ganger i teksten er: \");\r\n // Lager en for-each som leser gjennom listen til alleVanligste-metoden og printer ut ALLE de ordene som forekommer flest ganger.\r\n for(Ord hvertOrd : scarlet.alleVanligste()) {\r\n System.out.println(hvertOrd);\r\n }\r\n\r\n }", "private void instruct() {\n\t\tif (vsComputer) {\n\t\t\tSystem.out.println(\"\"\"\n 1. Stone\n 2. Paper\n 3. Scissors\n You have to enter your choice\n \"\"\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tWindow.startOkno();\n\t\tWindow.zacni.setEnabled(false);\n\n\t\tSystem.out.println(\"Spoustim...\");\n\n\t\tGenerator.generujSouradniceACesty();\n\t\tInputOutput.zapisSouradniceACestyDoSouboru();\n\t\tMatice.vygenerujMatice();\n\n\t\tFile f = new File(InputOutput.MATICE_CEST_SOUBOR);\n\t\tif (f.exists() && !f.isDirectory()) {\n\t\t\tMatice.nactiMaticiNejkratsichCestZeSouboru();\n\t\t} else {\n\t\t\tSystem.out.println(\"Generuji matici nejkratsich cest\");\n\t\t\tMatice.vytvorNejkratsiCesty();\n\t\t\tInputOutput.zapisMaticeNejkratsichCest(Matice.maticeNejkratsichCest);\n\t\t}\n\n\t\tSystem.out.println(\"Pripraveno...\");\n\t\tWindow.zacni.setEnabled(true);\n\t\tWindow.aktualizace.setEnabled(true);\n\t}", "public static void main(String[] args) {\n\n Scanner skaityvtuvas = new Scanner(System.in);\n while (true) {\n System.out.println(\"Turime is viso 9 uzduotis\");\n System.out.println(\"Iveskite uzduoties numeri, kad ja vykdyti.\");\n System.out.println(\"Ivedus 0, programa bus baigta.\");\n int pasirinkimas = skaityvtuvas.nextInt();\n\n switch (pasirinkimas) {\n case CHOISE_0:\n return;\n case CHOISE_1:\n Uzduotis01 pirmoji = new Uzduotis01(); // Vykdo konstruktoriu.\n break;\n case CHOISE_2:\n Uzduotis02 antroji = new Uzduotis02();\n break;\n case CHOISE_3:\n Uzduotis03 trecioji = new Uzduotis03();\n break;\n case CHOISE_4:\n Uzduotis04 ketvirta = new Uzduotis04();\n break;\n case CHOISE_5:\n Uzduotis05 penkta = new Uzduotis05();\n break;\n case CHOISE_6:\n Uzduotis06 sesta = new Uzduotis06();\n break;\n case CHOISE_7:\n Uzduotis07 septinta = new Uzduotis07();\n break;\n case CHOISE_8:\n Uzduotis08 astunta = new Uzduotis08();\n case CHOISE_9:\n Uzduotis09 devinta = new Uzduotis09();\n }\n }\n\n\n }", "public static void main(String[] args) {\n PetriNet inst = new CoffeeMachinePetri();\r\n Scanner scanner = new Scanner(System.in);\r\n int input ;\r\n input = scanner.nextInt();\r\n while(input!=0)\r\n {\r\n System.out.println(\"Introduceti optiunea: \");\r\n input = scanner.nextInt();\r\n inst.exec(input);\r\n \r\n System.out.println(inst.getStareCurenta());\r\n\t\t}\r\n inst.exec(0);\r\n }", "public static void main(String[] args) {\n\t\tVeturi veturi = Veturi.getInstance();\n\t\t\n\t\tveturi.junanPituus();\n\t\tveturi.lisaaVaunu(\"matkustajia\");\n\t\tveturi.lisaaVaunu(\"puuta\");\n\t\tveturi.junanPituus();\n\t\tveturi.junanSisalto();\n\t\t\n\t\tSystem.out.print(\"\\nuudelleen kutsuttuna getInstance() palauttaa saman veturin joka oli jo käytössä\");\n\t\tVeturi veturi2 = Veturi.getInstance();\n\t\tSystem.out.println(\"\");\n\t\tveturi2.junanSisalto();\n\t\t\n\t\tveturi.poistaVaunu(0);\t\n\t\tveturi2.junanSisalto();\n\t}", "public static void main(String[] args) {\n\n\t\tSystem.out.println(\"\\t Welcome to singer app\");\n\t\tSystem.out.println(\"**************************\");\n\t\tprintOperations();\n\t\tSystem.out.println(\"**************************\");\n \n\t\tboolean exit=false;\n\t\t\n\t\twhile(!exit){\n\t\t\tSystem.out.println(\"choose a operation\");\n\t\t\tint operation=scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t\t\n\t\t\tswitch(operation){\n\t\t\tcase 0:\n\t\t\t\tprintOperations();\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tdisplaySingers();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\taddSingers();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tupdateSingers();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tremoveSingers();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tsearchSingers();\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\texit=true;\n\t\t\t\tSystem.out.println(\"Exiting the application...\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint side;\r\n\t\tint i;\r\n\t\tScanner NissanTiida = new Scanner(System.in);\r\n\t\tSystem.out.println(\"設定共要幾次呼叫:\");\r\n\t\tside = NissanTiida.nextInt();\r\n\t\tfor(i=0;i<side;i++)\r\n\t\t{\r\n\t\t\ttiida();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public StartSys() {\r\n\t\twhile(true) {\r\n\t\tSystem.out.println(\"----------------------------------------------\");\r\n\t\tSystem.out.println(\" 1.고객 2.관리자 3.현재 주차장 보기 4.시스템종료\");\r\n\t\tSystem.out.println(\"----------------------------------------------\");\r\n\t\tSystem.out.print(\"선택>\");\r\n\t\tint selectNum1 = sc.nextInt();\r\n\t\tif (selectNum1 == 1) {\r\n\t\t\tSystem.out.println(\"--------------------------------------------------------\");\r\n\t\t\tSystem.out.println(\" 1.입차\\t 2.출차\\t\\t3.선결제\");\r\n\t\t\tSystem.out.println(\"--------------------------------------------------------\");\r\n\t\t\tSystem.out.println(\"선택>\");\r\n\t\t\tint selectNum2 = sc.nextInt();\r\n\t\t\tif (selectNum2 == 1) {\r\n\t\t\t\tentrance();\r\n\t\t\t} else if (selectNum2 == 2) {\r\n\t\t\t\tout();\r\n\t\t\t} else if (selectNum2 == 3) {\r\n\t\t\t\tpayment();\r\n\t\t\t\tdao.commit();\r\n\t\t\t}\r\n\t\t} else if (selectNum1 == 2) {\r\n\t\t\tSystem.out.println(\"관리자 비밀번호 입력>\");\r\n\t\t\tString pwd = sc.next();\r\n\t\t\tSystem.out.println();\r\n\t\t\tloading();\r\n\t\t\tSystem.out.println();\r\n\t\t\tif(pwd.equals(\"admin\") || pwd.equals(\"ADMIN\")) {\r\n\t\t\t\tSystem.out.println(\" 1.누적통계 2.현재주차된 회원정보\");\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\tint sel = sc.nextInt();\r\n\t\t\t\tif(sel == 1) {\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\tSystem.out.println(\"------------------------------------------------------------\");\r\n\t\t\t\t\tSystem.out.println(\" HTA주차장 기록 대장\");\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\tint sum = statistics();\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\tSystem.out.println(\"총 누적 요금 [ \"+sum+\"원 ]\");\r\n\t\t\t\t\tSystem.out.println();System.out.println();System.out.println();\r\n\t\t\t\t} else if(sel == 2) {\r\n\t\t\t\t\tclientPrint(5);\r\n\t\t\t\t\twhile(true) {\r\n\t\t\t\t\tSystem.out.println(); \r\n\t\t\t\t\tSystem.out.println(\"\\t 정렬\");\r\n\t\t\t\t\tSystem.out.println(\" [1]차량번호순\\t[2]이름\\t [3]할인혜택\\t[4]종료\");\r\n\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\tint n = sc.nextInt();\r\n\t\t\t\t\tif(n == 1) clientPrint(1);\r\n\t\t\t\t\telse if(n == 2) clientPrint(2);\r\n\t\t\t\t\telse if(n == 3) clientPrint(3);\r\n\t\t\t\t\telse if(n == 4) {\r\n\t\t\t\t\t\tSystem.out.print(\"종료중\");\r\n\t\t\t\t\t\tfor (int i = 0; i < 20; i++) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tThread.sleep(50);\r\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println(); System.out.println();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (selectNum1 == 3) {\r\n\t\t\tseeParking();\r\n\t\t} else if (selectNum1 ==4) {\r\n\t\t\tdao.close();\r\n\t\t\tSystem.out.println(\" 시스템을 종료중 입니다. \");\r\n\t\t\tfor (int i = 0; i < 30; i++) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(70);\r\n\t\t\t\t\tSystem.out.print(\">\");\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(); System.out.println();\r\n\t\t\tSystem.out.println(\" 시스템이 종료되었습니다.\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tList<Card> kaardipakk = Kaardipakk.AnnaKaardid();\n\n\t\tint[] suvalised = new int[5];\n\t\tfor (int i = 0; i < suvalised.length; i++) {\n\t\t\tsuvalised[i] = (int) (Math.random() * kaardipakk.size());\n\t\t}\n\n\t\tfor (int suvaline : suvalised) {\n\t\t\tCard card = kaardipakk.get(suvaline);\n\t\t\tSystem.out.println(card.mast + \" \" + card.suurus);\n\t\t}\n\t\tSystem.out.println(Sarnased(suvalised, kaardipakk));\n\t}", "public static void main(String[] args) {\n Student sv;\n\n //cap phat bo nho cho bien doi tuong [sv] \n sv = new Student();\n\n //gan gia tri cho cac fields cua bien [sv]\n sv.id = \"student100\";\n sv.name = \"Luu Xuan Loc\";\n sv.yob = 2000;\n sv.mark = 69;\n sv.gender = true;\n\n //in thong tin doi tuong [sv]\n sv.output();\n\n //tao them 1 bien doi tuong [sv2] kieu [Student]\n Student sv2 = new Student();\n //gan gia tri cho cac fields cua doi tuong [sv2]\n sv2.id = \"student101\";\n sv2.name = \"Nguyen Ngoc Son\";\n sv2.yob = 2004;\n sv2.mark = 85;\n sv2.gender = false;\n\n //in thong tin doi tuong [sv2]\n sv2.output();\n\n //tao them 1 bien doi tuong [sv3] kieu [Student]\n Student sv3 = new Student();\n //in thong tin doi tuong [sv3]\n sv3.output();\n }", "public GerenciadorSimples() throws Exception {\n\n Scanner ler = new Scanner(System.in);\n int opcaoMenu;\n while (true) {\n\n try {\n System.out.println(\"\\n=================== =================== LEILÃO DE ENTREGAS =================== ===================\");\n System.out.println(\"1 - Carregar Entradas \");\n System.out.println(\"2 - Calcular Entregas Busca Profunda\");\n System.out.println(\"6 - Mostrar Rotas \");\n System.out.println(\"7 - Limpar tela \");\n System.out.println(\"0 - Sair \");\n opcaoMenu = ler.nextInt();\n\n switch (opcaoMenu) {\n case 1:\n menuArquivos();\n break;\n case 2:\n calcularRota();\n break;\n case 3:\n mostrarRota();\n break;\n case 4:\n limparTela();\n break;\n case 0:\n System.out.println(\"Saindo ...\");\n System.exit(0);\n break;\n }\n } catch (Exception e) {\n System.out.println(\"Ops! Ocorreu algo errado, tente novamente.\");\n }\n }\n }", "private void menuArmadura(){\n System.out.println(\"Escolha o local em que queira colocar a uma armadura:\");\n System.out.println(\"1 - Cabeça\");\n System.out.println(\"2 - Tronco\");\n System.out.println(\"3 - Pernas\");\n System.out.println(\"4 - Pés\");\n System.out.println(\"0 - Sair\");\n }", "public static void main(String[] args) {\n\t\t\n\t\tif(args.length != 1 || args[0].length() != 9) {\n\t\t\tSystem.out.println(\"Wrong input format\");\n\t\t\treturn;\n\t\t}\n\n\t\tint konfig[] = new int[9];\n\n\t\tfor(int i = 0; i < 9; i++) {\n\t\t\tkonfig[i] = args[0].charAt(i) - '0';\n\t\t\t\n\t\t\tif(!args[0].contains(String.valueOf(i))) {\n\t\t\t\tSystem.out.println(\"Wrong input format\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSlagalica slagalica = new Slagalica(new KonfiguracijaSlagalice(konfig));\n\t\tNode<KonfiguracijaSlagalice> rješenje = SearchUtil.bfsv(slagalica.s0, slagalica.succ, slagalica.goal);\n\t\tif(rješenje == null) {\n\t\t\tSystem.out.println(\"Nisam uspio pronaći rješenje.\");\n\t\t} else {\n\t\t\tSlagalicaViewer.display(rješenje);\n\t\t\tSystem.out.println(\"Imam rješenje. Broj poteza je: \" + rješenje.getCost());\n\t\t\tList<KonfiguracijaSlagalice> lista = new ArrayList<>();\n\t\t\tNode<KonfiguracijaSlagalice> trenutni = rješenje;\n\t\t\twhile(trenutni != null) {\n\t\t\t\tlista.add(trenutni.getState());\n\t\t\t\ttrenutni = trenutni.getParent();\n\t\t\t}\n\t\t\t\n\t\t\tCollections.reverse(lista);\n\t\t\tlista.stream()\n\t\t\t\t.forEach(\n\t\t\t\t\tk -> {\n\t\t\t\t\t\tSystem.out.println(k);\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tString home=System.getProperty(\"user.home\");\n\t\tFile directorio=new File(home+\"/Documents/java\");\n\t\tFile archivo=new File(directorio,\"spiner.out\");\n\t\t\n\t\t// guardamos el spiner en el archivo\n\t\t//anadirSpinerA(spin,archivo);\n\t\t\n\t\tmostrarSpinerDe(archivo);\n\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"select level:\");\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tlevel = sc.nextInt();\r\n\t\tsc.close();\r\n\t\t// start game \r\n\t\t//hier moet nog:\r\n\t\t//vragen naar een level via console\r\n\t\t//als dit een onjuiste waarde is (!= 1 | 2 | 3)\r\n\t\t//stop\r\n\t\t//anders\r\n\t\t//level variable hier naar aanpassen\r\n\t\t//en het spel starten\r\n\t\tSystem.out.println(level);\r\n\t\tif(level == 1 || level == 2 || level == 3)\r\n\t\t{\r\n\t\tSystem.out.println(\"starting game..\");\r\n\t\tSpeelveld veld = new Speelveld(breedte, lengte, level);\r\n\t\tveld.start(); \r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"verkeerd level\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\r\n\t}", "public void seleccionSitio() {\r\n\t\tif (sitioId != null) {\r\n\t\t\tsitio = hashSitios.get(sitioId);\r\n\t\t\tcargarEstudiantesSitio();\r\n\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\tSystem.out.println(libres);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tint varSemana;\n\t\tString semanaTxt;\n\t\t\n\t\t// Definir Scanner\n\t\t\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\t// Introducir dato en la consola\n\t\t\n\t\tSystem.out.print(\"Introduce el numero de la Semana: \");\n\t\tvarSemana=sc.nextInt();\n\t\t\n\t\t// Mostrar según el número de la Semana, el nombre de dicha Semana\n\t\t\n\t\tswitch(varSemana){\n\t\tcase 1:\n\t\t\tsemanaTxt=\"Lunes\";\n\t\t\tSystem.out.print(semanaTxt);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 2:\n\t\t\tsemanaTxt=\"Martes\";\n\t\t\tSystem.out.print(semanaTxt);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 3:\n\t\t\tsemanaTxt=\"Miércoles\";\n\t\t\tSystem.out.print(semanaTxt);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 4:\n\t\t\tsemanaTxt=\"Jueves\";\n\t\t\tSystem.out.print(semanaTxt);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 5:\n\t\t\tsemanaTxt=\"Viernes\";\n\t\t\tSystem.out.print(semanaTxt);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 6:\n\t\t\tsemanaTxt=\"Sabado\";\n\t\t\tSystem.out.print(semanaTxt);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 7:\n\t\t\tsemanaTxt=\"Domingo\";\n\t\t\tSystem.out.print(semanaTxt);\n\t\t\tbreak;\n\n\t\t}\n\t}", "public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }", "public static void main(String[] args) {\n\t\tSingelyCardList alleKarten = new SingelyCardList();\n\n\t\tWissenskarte karte1 = new Wissenskarte (\"Peter Pain\", \"Zockt WoW\", \"Horde\", \"Peter\");\n\t\talleKarten.addLast(karte1);\n\t\tWissenskarte karte2 = new Wissenskarte (\"Koeln\", \"Einwohnerzahl 1 Millionen\", \"Liegt in NRW\", \"Stadt\");\n\t\talleKarten.addLast(karte2);\n\t\tWissenskarte karte3 = new Wissenskarte (\"Java\", \"Ist eine Insel\", \"Kann man auch als Kaffee trinken\", \"OOP\");\n\t\talleKarten.addLast(karte3);\n\t\tWissenskarte karte4 = new Wissenskarte (\"C#\", \"Braucht .NET-Komponenten\", \"Ist eine Objektorientierte Programmiersprache\", \"Spiele\");\n\t\talleKarten.addLast(karte4);\n\t\tWissenskarte karte5 = new Wissenskarte (\"TH Koeln\", \"Hat 11 Fakultaeten\", \"Informatiker sind die besten\", \"Campus\");\n\t\talleKarten.addLast(karte5);\n\t\t\n\t\t\n\t\tFrage neue_Frage = new Frage(\"Was zockt Peter?\", \"WoW\");\n\t\tkarte1.setFrage(neue_Frage);\n\t\t\n\t\tFrage neue_Frage1 = new Frage(\"Wo liegt Koeln?\", \"In NRW\");\n\t\tkarte2.setFrage(neue_Frage1);\n\t\t\n\t\tFrage neue_Frage2 = new Frage(\"Welches Getraenk ist Java?\", \"Kaffee\");\n\t\tkarte3.setFrage(neue_Frage2);\n\t\t\n\t\tFrage neue_Frage3 = new Frage(\"Was braucht C#?\", \".NET-Komponenten\");\n\t\tkarte4.setFrage(neue_Frage3);\n\t\t\n\t\tFrage neue_Frage4 = new Frage(\"Was sind Informatiker?\", \"Die besten\");\n\t\tkarte5.setFrage(neue_Frage4);\n\t\t\n\t\tFlashCardEditor frame = new FlashCardEditor(alleKarten);\n\t}", "public static void mainMenu(){\n // Creating a scanner to get console inputs.\n Scanner sc = new Scanner(System.in);\n\n // Getting user selection for from the main menu.\n System.out.print(\"\\n\\nSelect an option from the Menu.\\n\" +\n \"\\tA : \\tTo ADD a passenger to Train Queue\\n\" +\n \"\\tV : \\tTo VIEW the Train Queue\\n\" +\n \"\\tD : \\tTo DELETE passenger from Train Queue\\n\" +\n \"\\tS : \\tTo SAVE Train Queue\\n\" +\n \"\\tL : \\tTo LOAD Train Queue\\n\" +\n \"\\tR : \\tTo RUN simulation\\n\" +\n \"\\tQ : \\tTo QUIT the Program\\n\" +\n \"\\n\\nEnter option letter to proceed : \");\n String text = formattingWhitespace(sc.nextLine());\n\n // If user selected to add Passengers to the TrainQueue.\n if (text.equalsIgnoreCase(\"A\")) {\n System.out.println(\"Adding passenger...\");\n // Setting default train before Launching the GUI.\n GUI.choiceBoxTrains.setValue(GUI.trains[0]);\n launchingGUI(\"addTQ\", TrainStation.getWaitingRoom(), TrainStation.getTrainQueue(), 0, 0);\n }\n // If user selected to view the Train Queue.\n else if (text.equalsIgnoreCase(\"V\")) {\n System.out.println(\"Viewing Train Queue...\");\n // Setting default train before Launching the GUI.\n GUI.choiceBoxTrains.setValue(GUI.trains[0]);\n launchingGUI(\"viewTQ\", TrainStation.getWaitingRoom(), TrainStation.getTrainQueue(), 0, 0);\n }\n // If the user selected to Delete a passenger form thr Train Queue.\n else if (text.equalsIgnoreCase(\"D\")) {\n System.out.println(\"Deleting passenger...\");\n deletePassenger(TrainStation.getWaitingRoom(), TrainStation.getTrainQueue());\n mainMenu();\n }\n // If the user selected to save the Train Queue.\n else if (text.equalsIgnoreCase(\"S\")) {\n System.out.println(\"Saving Train Queue...\");\n saveTQ(TrainStation.getTrainQueue());\n mainMenu();\n }\n // If the user selected tho load the saved Train Queue.\n else if (text.equalsIgnoreCase(\"L\")) {\n System.out.println(\"Loading Train Queue...\");\n TrainStation.setTrainQueue(readTQ());\n mainMenu();\n }\n // If the User selected to run the simulation.\n else if (text.equalsIgnoreCase(\"R\")) {\n System.out.println(\"Running Simulation...\");\n runningSimulation();\n }\n // If the user selected to Quit the program.\n else if (text.equalsIgnoreCase(\"Q\")) {\n quitingProgram(true);\n }\n // When the user input is invalid.\n else {\n System.out.println(\"Invalid Input.\");\n mainMenu();\n }\n }", "public static void main(String []args){\n miFichero = new Fichero(\"peliculas.xml\");\n //cargamos los datos del fichero\n misPeliculas = (ListaPeliculas) miFichero.leer();\n\n //si no habia fichero\n\n if(misPeliculas == null) {\n misPeliculas = new ListaPeliculas();\n }\n int opcion;\n do{\n mostrarMenu();\n opcion = InputData.pedirEntero(\"algo\");\n switch (opcion){\n case 1:\n altaPelicula();\n break;\n case 2:\n break;\n case 3:\n break;\n case 4:\n break;\n }\n\n }while(opcion!= 0);\n }", "public static void main(String[] args) {\n Sal s=new Sal();\n s.getinfo();\n s.Addsal();\n s.Addwork();\n s.display();\n\t}", "public static void main(String[] args) {\n\t\tScanner ip = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Welcome to the Katapayadi Wizard! Enter the 1st syllable of the raga of your choice: \");\r\n\t\t\r\n\t\tString F = ip.nextLine();\r\n\t\tSystem.out.println(\"Great! Now enter the 2nd syllable of the raga of your choice: \");\r\n\t\t\r\n\t\tString S = ip.nextLine();\r\n\t\t//int firstIndex; \r\n\t\t\r\n\t\tString [] [] alphabets = {{\"nya\", \"ka\", \"kha\", \"ga\", \"gha\", \"nga\", \"cha\", \"ccha\", \"ja\", \"jha\"}, \r\n\t\t\t\t\t\t\t\t {\"na\", \"ta\", \"tah\",\"da\", \"dah\", \"nna\", \"tha\", \"ttha\", \"dha\", \"ddha\"},\r\n\t\t\t\t\t\t\t\t {\"null\",\"pa\", \"pha\",\"ba\",\"bha\",\"ma\", \"null\", \"null\", \"null\", \"null\", },\r\n\t\t\t\t\t\t\t\t {\"null\",\"ya\", \"ra\", \"la\", \"va\", \"se\", \"sha\", \"sa\", \"ha\",\"null\"}};\r\n\t\t\r\n\t\tint firstNum = getFirstIndex(alphabets, F);\r\n\t\tint secondNum = getSecondIndex(alphabets, S); \r\n\t\tint finalIndex = concat(firstNum, secondNum);\r\n\t\t\r\n\t\tString swaras1= swaraSthanam1(finalIndex);\r\n\t\t//String finalanswer = The [index]th melakartha: aro [swaras1] and ava [swaras2].\r\n\t\tSystem.out.println(firstNum);\r\n\t\tSystem.out.println(secondNum);\r\n\t\t\r\n\t\tSystem.out.println(finalIndex);\r\n\t\t\r\n\t\tSystem.out.println(swaras1);\r\n\t\t\r\n\t}", "public void visMedlemskabsMenu ()\r\n {\r\n System.out.println(\"Du har valgt medlemskab.\");\r\n System.out.println(\"Hvad Oensker du at foretage dig?\");\r\n System.out.println(\"1: Oprette et nyt medlem\");\r\n System.out.println(\"2: Opdatere oplysninger paa et eksisterende medlem\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }", "public static void main(String[] args) \n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint eleccion = 0;\n\t\tString nombre;\n\n\t\t//Pide un nombre al usuario\n\t\tSystem.out.println(\"Cual es tu nombre alma perdida?\");\n\t\tnombre = scanner.next();\n\n\t\twhile(eleccion != 3)\n\t\t{\n\t\t\t//Manda un mensaje de saludo y el menu\n\t\t\tSystem.out.println(\"Enfrentaras un oponente especifico en base a tu eleccion\");\n\t\t\tSystem.out.println(\"Elija con cuidado y sabiduria\");\n\t\t\tSystem.out.println(\"Elija el tipo de clase\");\n\t\t\tSystem.out.println(\"1) General\");\n\t\t\tSystem.out.println(\"2) Avanzada\");\n\t\t\tSystem.out.println(\"3) Salir\");\n\t\t\tSystem.out.println(\"\");\n\t\t\t//Con el try catch checa que se haya hecho una seleccion aceptable\n\t\t\t//De lo contrario manda un mensaje y otra vez el menu\n\t\t\ttry\n\t\t\t{\n\t\t\t\teleccion = Integer.valueOf(scanner.next());\n\t\t\t}\n\t\t\tcatch (NumberFormatException e) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Elegiste una opcion no valida\");\n\t\t\t}\n\t\t\tif(eleccion == 3)\n\t\t\t{\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\telse if (eleccion < 3 && eleccion > 0) \n\t\t\t{\n\t\t\t\tSeleccionUnidad.selectUnit(eleccion, nombre);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Elige una opcion correcta\\n\");\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"lutfen hangi harfin anlamini istediginizi giriniz\");\n\t\tchar harf=scan.next().charAt(0);//girilen kelimenin ilk harfini alir sikayet etmez\n\t\t\n\t\tswitch (harf) {\n\t\tcase 'V':\n\t\tcase 'v':\n\t\t\tSystem.out.println(\"very\");\n\t\t\tbreak;\n\t\tcase 'I':\n\t\tcase 'i':\n\t\t\tSystem.out.println(\"important\");\n\t\t\tbreak;\n\t\tcase 'P':\n\t\tcase 'p':\n\t\t\tSystem.out.println(\"person\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t\tSystem.out.println(\"gecerli harf giriniz\");\n\t\t}\n\t\t\n\t\t//kullanicinin birden fazla harf girmesini sorun olarak kabul ediyorsaniz\n\t\t//ve bunu hata olarak kullaniciya geri bildirmek istiyorsaniz\n\t\t\n\t\t\n\t\tSystem.out.println(\"lutfen hangi harfin anlamini istediginizi giriniz\");\n\t\tString str=scan.next();\n\t\t\n\t\tswitch (str) {\n\t\tcase \"V\":\n\t\tcase \"v\":\n\t\t\tSystem.out.println(\"very\");\n\t\t\tbreak;\n\t\tcase \"I\":\n\t\tcase \"i\":\n\t\t\tSystem.out.println(\"important\");\n\t\t\tbreak;\n\t\tcase \"P\":\n\t\tcase \"p\":\n\t\t\tSystem.out.println(\"person\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t\tSystem.out.println(\"gecerli harf giriniz\");\n\t\t}\n\t\t\nscan.close();\n\t}", "public static void main(String[] args) {\n\n\t\tSystem.out.println(\"Iveskite ugi (m) ir svori (kg): \");\n\t\tScanner read = new Scanner(System.in);\n\t\tdouble number1, number2;\n\t\tnumber1 = read.nextDouble();\n\t\tnumber2 = read.nextDouble();\n\t\t\n\n//\t\tfor (KMI season : KMI.values()) System.out.println(season);\n//\t\tSystem.out.println(KMI.A.getKMI(number1, number2));\n\t}", "private void nuskaitymas() {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Iveskite zodi\");\n zodis = sc.nextLine();\n patikrinimas(zodis);\n }", "public static void userSelection(){\n\t\tint selection;\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Which program would you like to run?\");\n\t\tselection=input.nextInt();\n\n\t\tif(selection == 1)\n\t\t\tmazeUnion();\n\t\tif(selection == 2)\n\t\t\tunionPathCompression();\n\t\tif(selection == 3)\n\t\t\tmazeHeight();\n\t\tif(selection == 4)\n\t\t\tmazeSize();\n\t\tif(selection == 5)\n\t\t\tsizePathCompression();\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tbyte opcao = 0;\n\t\tControleRemoto remoto = new ControleRemoto(new TV());\n\t\tdo {\n\t\t\tSystem.out.println(\"Selecione o comando (0 para sair)\");\n\t\t\tSystem.out.println(\"1 - Ligar/Desligar\");\n\t\t\tSystem.out.println(\"2 - Aumentar Volume\");\n\t\t\tSystem.out.println(\"3 - Abaixar Volume\");\n\t\t\topcao = sc.nextByte();\n\t\t\tswitch (opcao) {\n\t\t\tcase 1:\n\t\t\t\tremoto.pressLigDes();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tremoto.pressAumVol();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tremoto.pressAbxVol();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (opcao != 0);\n\t}", "static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }", "public static void main(String[] args) {\n\n\t\tString brutoTxt = showInputDialog(\"Skriv in brutopenger\");\n\t\tint bruto = Integer.parseInt(brutoTxt);\n\t int skatt;\n\n\t\t if (bruto <= 164100) {\n\t\t\t skatt = 0;\n\t\t }\n\t\t else if (bruto >= 164100 && bruto <= 230950);\n\t\t\n\t\t (bruto >= 164100 && bruto <= 230950);\n\t\t skatt = bruto * 0.0093;\n\t\t break;\n\t\tcase 3: \n\t\t\t(bruto >= 230950 && bruto <= 580650);\n\t\t\tskatt = bruto * 0.0241;\n\t\t\tbreak;\n\t\tcase 4: \n\t\t\t(bruto >= 580651 && bruto <= 934050);\n\t\t\tskatt = bruto * 0.1152;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t(bruto > 934 050);\n\t\t\tskatt = bruto *0.1452;\n\t\t\t\n\t\t\n\t\t\t\n\t\t}", "public static void main (String []args){\n\t\t\n\t\tString hola =\"RV SIGUIENTE MENSAJE\";\n\t\tint num = hola.indexOf(\"RV\");\n\t\tif (hola.indexOf(\"RV\")!=-1){\n\t\t\tSystem.out.println(\"CONTIENE RV\");\n\n\t\t}else{\n\t\t\tSystem.out.println(\"NO CONTIENE RV\");\n\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tProces p1= new Proces(20, 0, 10);\n\t\tProces p2= new Proces(10, 1, 10);\n\t\tProces p3= new Proces(30, 6, 10);\n\t\tProces p4= new Proces(9, 7, 10);\n\t\tArrayList<Proces> procesy1= new ArrayList<Proces>();\n\t\tprocesy1.add(p1);\n\t\tprocesy1.add(p2);\n\t\tprocesy1.add(p3);\n\t\tprocesy1.add(p4);\n\t\tProcesor proc1= new Procesor(1, procesy1);\n\t\n\t\t\n\t\t\n\t\tArrayList<Proces> procesy2= new ArrayList<Proces>();\n\t\tprocesy2.add(new Proces(40, 2, 14));\n\t\tprocesy2.add(new Proces(20, 8, 9));\n\t\tprocesy2.add(new Proces(30, 2, 3));\n\t\tprocesy2.add(new Proces(10, 4, 5));\n\t\tprocesy2.add(new Proces(4, 7, 14));\n\t\tProcesor proc2= new Procesor(2, procesy2);\n\t\n\t\t\n\t\t\n\t\tArrayList<Procesor> procesory= new ArrayList<Procesor>();\n\t\tprocesory.add(proc1);\n\t\tprocesory.add(proc2);\n\t\t\n\t\tint ileProcesorow=2;\n\t\tint progR=20;\n\t\tint progP=20;\n\t\tint iloscZapytanZ=10;\n\t\tint okresPomiaruObciazen=1;\n\t\t\n\t\tAlgorithms al= new Algorithms(procesory, progP, iloscZapytanZ, progR);\n\t\tal.wyswietlProcesory();\n\t\tal.symulacjaPierwsza(okresPomiaruObciazen);\n\t\tal.symulacjaDruga(okresPomiaruObciazen);\n\t\tal.symulacjaTrzecia(okresPomiaruObciazen);\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\tSystem.out.println(\"Unesi 1. broj: \");\n\t\tint a = s.nextInt();\n\t\tSystem.out.println(\"Unesi 2. broj: \");\n\t\tint b = s.nextInt();\n\t\tSystem.out.println(\"Unesi 3. broj: \");\n\t\tint c = s.nextInt();\n\t\tSystem.out.println(\"Proizvod unetih brojeva je: \" + proizvod(a,b,c));\n\t\t\n\t\t\t\n\t\ts.close();\n\n\t}", "public static void main(String[] args) {\n\t\tString prisTxt = showInputDialog(\"Skriv in pris\");\n\t\tint pris = Integer.parseInt(prisTxt);\n\n\t\tString beløpTxt = showInputDialog(\"Skriv in beløp\");\n\t\tint beløp = Integer.parseInt(beløpTxt);\n\n\n\t\tint tier = 0;\n\t\tint einer = 0;\n\n\t\tif (beløp < pris) {\n\t\t\tSystem.out.println(\" Feil ikke beløp er ikke høgt nok\");\n\n\t\t}\n\t\tint sum = beløp - pris;\n\n\t\twhile (sum > 0) {\n\t\t\tif (sum % 10 == 0) {\n\t\t\t\tsum = sum - 10;\n\t\t\t\ttier++;\n\t\t\t} else {\n\t\t\t\tsum = sum - 1;\n\t\t\t\teiner++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(tier);\n\t\tSystem.out.println(einer);\n\n\t}", "public static void main(String[] args) {\n\t\tScanner unos = new Scanner(System.in);\r\n\t\tString karakter = null;\r\n\t\t// provera unosa\r\n\t\tboolean provjeraUslova = true;\r\n\t\t// radi dok unos ne bude karakter\r\n\t\twhile (provjeraUslova) {\r\n\t\t\tSystem.out.println(\"Molimo unesite neki karakter: \");\r\n\t\t\ttry {\r\n\t\t\t\tkarakter = unos.next();\r\n\t\t\t\t// uslov karakter izmedju 0 i 127\r\n\t\t\t\tif (karakter.length() == 1) {\r\n\t\t\t\t\tprovjeraUslova = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprovjeraUslova = true;\r\n\t\t\t\t}\r\n\t\t\t\t// ukoliko unos nije valjan\r\n\t\t\t} catch (InputMismatchException e) {\r\n\t\t\t\tSystem.out.println(\"Molimo unesite neki karakter: \");\r\n\t\t\t\tunos.nextLine();\r\n\t\t\t}\r\n\t\t}\r\n\t\tunos.close();\r\n\t\t// ispis rezultata\r\n\t\tSystem.out.println(\"Uneseni karakter \" + karakter + \"je slijedeci broj: \" + (int) (karakter.charAt(0)));\r\n\t}", "public void run(){\n ArrayList<String> menuItems = new ArrayList<>();\n menuItems.add(\"Play the Game\");\n menuItems.add(\"Close the Program\");\n menuItems.add(\"Show the highest score\");\n String menu = CollectionTools.collectionPrinter('S', menuItems);\n runMenu(menu);\n }", "public static void main(String[] args) {\n\t\t\n\t\tHashMap<String, String> hm = new HashMap<>();\n\t\t\n//\t\tsaveInfo(hm);\n//\t\tgetInfo(hm);\n//\t\tremoveInfo(hm);\n\t\tString option =\"\";\n\t\tselect(option,hm);\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n int op;\n do { \n System.out.println(\"\\n\\n*** ELEIÇÕES ***\");\n System.out.println(\"1-Novo Candidato\");\n System.out.println(\"2-Votar\");\n System.out.println(\"3-Relatório Simples\");\n System.out.println(\"4-Relatório Completo (com porcentagem)\");\n System.out.println(\"5-Sair\");\n System.out.println(\"**********************\");\n\n \n System.out.print(\"Digite sua opção: \");\n op = tecla.nextInt();\n System.out.print('\\n');\n \n switch(op){\n case 1: adicionar(); break;\n case 2: votar(); break;\n case 3: listar(); break;\n case 4: apurar(); break;\n case 5: break;\n }\n } while (op!=5);\n }", "public void start() {\n\n\tSystem.out.println(\"Welcome on HW8\");\n\tSystem.out.println(\"Avaiable features:\");\n\tSystem.out.println(\"Press 1 for find the book titles by author\");\n\tSystem.out.println(\"Press 2 for find the number of book published in a certain year\");\n\tSystem.out.print(\"Which feature do you like to use?\");\n\n\tString input = sc.nextLine();\n\tif (input.equals(\"1\"))\n\t showBookTitlesByAuthor();\n\telse if (input.equals(\"2\"))\n\t showNumberOfBooksInYear();\n\telse {\n\t System.out.println(\"Input non recognized. Please digit 1 or 2\");\n\t}\n\n }", "public static void archMain(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Create a new Architect Profile\");\n System.out.println(\"2 - Search for Architect Profile\\n\");\n\n System.out.println(\"0 - Continue\");\n }", "public void menu(){\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"<=======|\" + name + \"|=======>\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tSystem.out.println(\"1 -> Jouer\");\n\t\tSystem.out.println(\"2 -> Creer votre personnage\");\n\t\tSystem.out.println(\"3 -> Charger\");\n\t\tSystem.out.println(\"4 -> Best Score\");\n\t\tSystem.out.println(\"5 -> Instruction\");\n\t\tSystem.out.println(\"6 -> Quitter\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tint choice = in.nextInt();\n\n\t\t\tswitch (choice){\n\t\t\t\tcase 1:\n\t\t\t\t\tstartPlay();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreateChar();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tchargeGame();\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.print(\" NOM -\");\n\t\t\t\t\tSystem.out.print(\" GENRE -\");\n\t\t\t\t\tSystem.out.print(\" SANTEE -\");\n\t\t\t\t\tSystem.out.print(\" FORCE -\");\n\t\t\t\t\tSystem.out.print(\" ARMES -\");\n\t\t\t\t\tSystem.out.println(\" ARGENT -\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tbdd.dbQuery(\"SELECT * FROM score ORDER BY health DESC\");\n\t\t\t\t\tmenu();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\trules();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\texit();\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Choix non valide\");\n\t\t\t\t\tmenu();\n\t\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t// hier wird eine Soldatin mit dem default-Konstruktor\n\t\tSoldat soldatErika = new Soldat();\n\t\t\n\t\t//Das konkrete Objekt: soldatErika, ruft das Verhalten/Methode: halloAnAlle() auf.\n\t\tsoldatErika.halloAnAlle();\n\n\t\t// hier wird ein Soldat mit einen anderen Konstruktor (benötigt in den Parametern das alter, name, aktennummer)\n\t\t// erstellt. \n\t\tSoldat soldatPaul = new Soldat(25, \"Paul Seer\", 1);\n\t\t\n\t\t//Das konkrete Objekt: soldatPaul, ruft die Verhalten/Methode: halloAnAlle() auf.\n\t\tsoldatPaul.halloAnAlle();\n\n\t\t//hier wird das alter des konkreten Objekts soldatPaul mit hilfe der Methode getAlter() aufgerufen und auf der Konsole ausgegeben.\n\t\tSystem.out.println(\"das Alter von soldat2 ist: \"\n\t\t\t\t+ soldatPaul.getAlter());\n\n\t\t//hier wird die Personalakte mit inhalt gefüllt. dabei wird erst eine Methode in der Klasse Soldat und dann in der Klasse PersonalAkte aufgerufen.\n\t\tsoldatPaul\n\t\t\t\t.inhaltInAkteHinzufuegen(\"momentan manchmal schlecht gelaunt\");\n\n\t\t//methoden aufruf wirdAelter; dabei wird das Attribut alter zur Laufzeit verändert.\n\t\tsoldatPaul.wirdAelter();\n\t\t\n\t\tsoldatPaul.halloAnAlle();\n\n\t\t//hier wird die logig der methode: wirdAelter(int neuesAlter) auf ihre Funktion getestet\n\t\tsoldatPaul.wirdAelter(12);\n\t\tsoldatPaul.halloAnAlle();\n\n\t\t// direkter zugriff auf die Methode, ohne Objekt der Klasse Helperclass\n\t\t//dabei bekommt die Methode einen String übergeben und gibt diesen auf der Konsole aus\n\t\tHelperClass.consolenAusgabe(\"Test ausgabe\");\n\n\t}", "static void soustraire() throws IOException {\n\t\tScanner clavier = new Scanner(System.in);\n\t\tint nb1, nb2, resultat;\n\t\tnb1 = lireNombreEntier();\n\t\tnb2 = lireNombreEntier();\n\t\tresultat = nb1 - nb2;\n\t\tSystem.out.println(\"\\n\\t\" + nb1 + \" - \" + nb2 + \" = \" + resultat);\n\t}", "static String kembali(String pesan){\n input = new Scanner(System.in);\n System.out.print(pesan);\n System.out.println(\"\\n[ENTER]\");\n input.nextLine();\n Menu();\n\n return pesan;\n }", "public static void main(String[] args) {\n\t\tString palabra=\"supercalifragilisticoespialidoso\";\r\n\t\tString nuevaPalabra = sustituye(palabra);\r\n\t\tSystem.out.println(palabra);\r\n\t\tSystem.out.println(nuevaPalabra);\r\n\t}", "public void iterateAndClickParticularProgram(final String programeName);", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\n\t\tManagerMethod manager = new ManagerMethod();\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t\n\t\tString id, password;\n\t\t\n\t\t\n\t\twhile(true) {\t//처음 메인화면\n\t\t\tSystem.out.println(\"1.관리자모드 2.학생모드 3.교수모드 4.종료\");\n\t\t\tString a = sc.nextLine();\n\t\t\t\n\t\t\tswitch(a) {\n\t\t\t\n\t\t\tcase \"1\":\n\t\t\t\tSystem.out.println(\"관리자 아이디 : \");\n\t\t\t\tid = sc.nextLine();\n\t\t\t\tSystem.out.println(\"관리자 비번 : \");\n\t\t\t\tpassword = sc.nextLine();\n\t\t\t\tif(id.equals(HOST_ID) && password.equals(HOST_PASSWROD))\n\t\t\t\t\tmanager.ManagerView();\n\t\t\t\telse \n\t\t\t\t\tSystem.out.println(\"id or password Error!\");\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\tSystem.out.println(\"아이디 : \");\n\t\t\t\tid = sc.nextLine();\n\t\t\t\tSystem.out.println(\"비번 : \");\n\t\t\t\tpassword = sc.nextLine();\n\t\t\t\tif(student.CheckID(id,password)) {\n\t\t\t\t\tstudent.StudentView();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\tSystem.out.println(\"아이디 : \");\n\t\t\t\tid = sc.nextLine();\n\t\t\t\tSystem.out.println(\"비번 : \");\n\t\t\t\tpassword = sc.nextLine();\n\t\t\t\tif(professor.CheckID(id,password)) {\n\t\t\t\t\tprofessor.ProfessorView();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"4\":\n\t\t\t\tSystem.out.println(\"종료 되었습니다.\");\n\t\t\t\treturn ;\n\t\t\t\tdefault :\n\t\t\t\t\tSystem.out.println(\"잘못 눌렀습니다.\");\n\t\t\t}\n\t\t}\n\t}", "public static void proManMain(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Create a new Project Manager Profile\");\n System.out.println(\"2 - Search for Project Manager Profile\\n\");\n\n System.out.println(\"0 - Continue\");\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Unesite pocetnu godinu:\");\n\t\tint pocetna = input.nextInt();\n\n\t\tSystem.out.println(\"Unesite krajnju godinu:\");\n\t\tint krajnja = input.nextInt();\n\n\t\tprestupneGodine(pocetna, krajnja);\n\t\tinput.close();\n\t}", "private static int menu() {\r\n\t\tSystem.out.println(\"Elige opcion de jugada:\");\r\n\t\tSystem.out.println(\"1-Piedra\");\r\n\t\tSystem.out.println(\"2-Papel\");\r\n\t\tSystem.out.println(\"3-Tijera\");\r\n\t\tSystem.out.println(\"0-Salir\");\r\n\t\tSystem.out.print(\"Opcion: \");\r\n\t\treturn Teclado.leerInt();\r\n\t}", "public static void main(String args[]){\n\t\tString nomi[] = {\"Lucia\", \"Marco\", \"Alessandra\", \"Mario\", \"Paola\", \"Giovanni\", \"Rosa\", \"Filippo\"};\r\n\t\tint eta[] = {19, 24, 20, 20, 18, 21, 22, 19};\r\n\r\n\t\tStudente studenti[] = new Studente[nomi.length];\r\n\t\tfor(int i = 0; i < nomi.length; i++){\r\n\t\t\tstudenti[i] = new Studente(nomi[i], eta[i]);\r\n\t\t}\r\n\r\n\t\tEsse3 scriviEsse3 = new Esse3(\"Password\");\r\n\t\tfor(int i = 0; i < studenti.length; i++){\r\n\t\t\tscriviEsse3.inserisciStudente(studenti[i]);\r\n\t\t}\r\n\r\n\t\t//salvo sul file\r\n\t\tscriviEsse3.salva();\r\n\r\n\t\tEsse3 leggiEsse3 = new Esse3(\"Password2\");\r\n\t\tleggiEsse3 = scriviEsse3.carica();\r\n\r\n\t\t//stampo ciò che è stato caricato dal file\r\n\t\tleggiEsse3.stampaElenco();\r\n\r\n\t}", "public static void main(String []args) {\n\t\tSystem.out.println(school);\n\t\tgetInfo1();\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tInventoryHandler inventoryHandler = new InventoryHandler();\n\t\tShoppingHandler shoppingHandler= new ShoppingHandler();\n\n\t\tSystem.out.println(\"inventar (1) nakupovat(2)\");\n\t\tint pom = scanner.nextInt();\n\t\t\n\t\tswitch(pom){\n\t\t\tcase 1 : {inventoryHandler.launch(scanner);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 2 : {shoppingHandler.launch(scanner);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tshowInfo(\"홍길동\");\r\n\t\tshowInfo(\"김길동\"); //문자\r\n\t\t\r\n\t\tStudentInfo std = new StudentInfo(); // std 변수를 매개값으로받는\r\n\t\tstd.setStudentName(\"박소현\");\r\n\t\tshowInfo(std);\r\n\t\tstd.setEng(90);\r\n\t\tstd.setMath(95);\r\n\t\tshowInfo(std);\r\n\t\t\r\n\t\tStudentInfo[] stds = new StudentInfo[3]; // 배열을 매개값으로 받는\r\n\t\t\r\n\t\tstds[0] = new StudentInfo(\"김영호\", 77, 88);\r\n\t\tstds[1] = new StudentInfo(\"이영호\", 79, 89);\r\n\t\tstds[2] = new StudentInfo(\"박영호\", 72, 86);\r\n\t\tshowInfo(stds);\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tSucursal s1 = new Sucursal();\n\t\tboolean posibilidad = true;\n\t\tint cont;\n\t\twhile (posibilidad) {\n\t\t\tScanner entrada = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Cuantos paquetes quieres enviar:\\n1.Un paquete\\n2.Mas paquetes\\n3.Salir\");\n\t int paquetes = entrada.nextInt();\n\t if (paquetes == 1) {\n\t \tPaquete p1 = new Paquete();\n\t \ts1.setPrecio(p1);\n\t \t/*System.out.println(\"El numero de la sucursal es: \" + (int) s1.getnumero_Sucursal() +\n\t \t\t\t\" con la direccion de \" + s1.getdireccion() + \" en la ciudad de \" + s1.getciudad() +\n\t \t\t\t\" con el numero de referencia \"+ p1.getReferencia() + \" con un peso de \" + p1.getPeso() + \" kg\" + \n\t \t\t\t\" su prioridad es de: \" + p1.getPrioridad() + \" con un precio total de: \" + s1.getprecio());*/\n\t \t\n\t \tSystem.out.println(\"El numero de la sucursal es: \" + (int) s1.getnumero_Sucursal());\n\t \tSystem.out.println(\"La direccion: \" + s1.getdireccion());\n\t \tSystem.out.println(\"Ciudad: \" + s1.getciudad());\n\t \tSystem.out.println(\"Numero de referencia \"+ p1.getReferencia());\n\t \tSystem.out.println(\"con un peso de: \" + p1.getPeso() + \" kg\");\n\t \tSystem.out.println(\"Prioridad: \" + p1.getPrioridad());\n\t \tSystem.out.println(\"Precio total: \" + s1.getprecio() + \" €\");\n\t \t\n\t \t\n\t \tSystem.out.println(\"Muchas gracias por su visita\");\n\t \tposibilidad = false;\n\t }else if (paquetes == 2) {\n\t \tScanner c = new Scanner (System.in);\n\t \tSystem.out.println(\"Cuantos paquetes quieres enviar:\\n1.\\n2\\n3\\nTienes hasta 10 envios\");\n\t \tint cantidad = c.nextInt();\n\t \tint con = cantidad;\n\t \tfor (int i = 0; i < con; i++) {\n\t \t\tPaquete p1 = new Paquete();\n\t\t \ts1.setPrecio(p1);\n\t\t \tSystem.out.println(\"El numero de la sucursal es: \" + (int) s1.getnumero_Sucursal());\n\t\t \tSystem.out.println(\"La direccion: \" + s1.getdireccion());\n\t\t \tSystem.out.println(\"Ciudad: \" + s1.getciudad());\n\t\t \tSystem.out.println(\"Numero de referencia \"+ p1.getReferencia());\n\t\t \tSystem.out.println(\"con un peso de: \" + p1.getPeso() + \" kg\");\n\t\t \tSystem.out.println(\"Prioridad: \" + p1.getPrioridad());\n\t\t \tSystem.out.println(\"Precio total: \" + s1.getprecio() + \" €\");\n\t\t \tSystem.out.println(\"Muchas gracias por su visita\");\n\t\t \tposibilidad = false;\n\t\t \t\n\t\t \n\t \t}\n\t \t\n\t \t\n\t \t\n\t \n\t }else if (paquetes == 3) {\n\t \tSystem.out.println(\"Muchas gracias por su visita\");\n\t \tposibilidad=false;\n\t }\n\t\t\t\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\t Scanner scan = new Scanner (System.in);\n\t\t \n\t\t System.out.println(\"tam isminizi giriniz\");\n\t String tamisim = scan.nextLine();\n\t \n \n System.out.println(\"Yasinizi giriniz\");\n int yas = scan.nextInt();\n System.out.println(yas);\n \n System.out.println(\"Isminizın ilk harfini girin\");\n char ilkHarf = scan.next().charAt(0);\n System.out.println(ilkHarf);\n\t\t\n\t\t\n\t}", "public static void start() {\n clrscr();\n\n System.out.println(\"Die alte Handelsstraße teilt sich in zwei Wege auf\");\n\n\n String eingabe;\n Scanner sc = new Scanner(System.in);\n\n while (Main.exit == 0) {\n System.out.println(\"\\b\");\n System.out.println(\"Was möchtest du nun tun?\");\n System.out.println(\"\\b\");\n eingabe = sc.nextLine();\n switch (eingabe) {\n\n case \"öffne Brief\":\n Objekte.brief();\n break;\n case \"oeffne Brief\":\n Objekte.brief();\n break;\n case \"lese Brief\":\n Objekte.brief();\n break;\n case \"schau dich um\":\n Objekte.umschauen3();\n break;\n case \"guck dich um\":\n Objekte.umschauen3();\n break;\n case \"umschauen\":\n Objekte.umschauen3();\n break;\n case \"gehe nach Norden\":\n Feld4.start();\n break;\n case \"gehe nach Süden\":\n Feld2.start();\n break;\n case \"gehe nach Osten\":\n Feld8.start();\n break;\n case \"gehe nach Westen\":\n Objekte.gebirge();\n break;\n case \"Ende\":\n Main.exit = 1;\n break;\n default:\n System.out.println(\"Das habe ich leider nicht verstanden.\");\n break;\n }\n }\n\n }", "public static void main(String[] args) {\n\t\tgenerateMenu();\n\t\toperations ao = new operations();\n\t\tint choice = getInput();\n\t\twhile(choice>0){\n\t\t\tswitch(choice){\n\t\t\tcase 1:\n\t\t\t\tao.create();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tao.delete();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tao.rotation();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tao.search();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tao.reverse();\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tao.display();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"!!!Invalid Choice!!!\");\n\t\t\t}\n\t\t\tgenerateMenu();\n\t\t\tchoice = getInput();\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tclass Ulamek{\r\n\t\t\tprivate int licznik, mianownik;\r\n\r\n\t\t\tpublic void ustawLicznik (int l){\r\n\t\t\t\tlicznik=l;\r\n\t\t\t}\r\n\t\t\tpublic void ustawMianownik (int m){\r\n\t\t\t\tmianownik=m;\r\n\t\t\t}\r\n\t\t\tpublic void ustawUlamek (int u1, int u2){\r\n\t\t\t\tlicznik=u1;\r\n\t\t\t\tmianownik=u2;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpublic void wyswietl (){\r\n\t\t\t\t\r\n\t\t\t\tint przod, reszta, przod_dlugosc, mianownik_dlugosc, licznik_dlugosc;\r\n\t\t\t\tString przod_zamiana, mianownik_string, licznik_string;\r\n\t\t\t\tdouble wynik;\r\n\t\t\t\t\r\n\t\t\t\tif (mianownik!=0 && licznik !=0){\r\n\t\t\t\tprzod=licznik/mianownik;\r\n\t\t\t\treszta=licznik-(przod*mianownik);\r\n\t\t\t\tprzod_zamiana=\"\"+przod;\r\n\t\t\t\tprzod_dlugosc=przod_zamiana.length();\r\n\t\t\t\twynik=1.0*licznik/mianownik;\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t licznik++;\r\n\t\t\t\t\t}while (licznik!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(reszta);\r\n\t\t\t}\r\n\r\n\t\t\t\t//zamiana na stringa i liczenie\r\n\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//brak calości\r\n\t\t\t\tif(przod==0){\r\n\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\r\n\r\n\t\t\t\tif(przod!=0){\r\n\t\t\t\tSystem.out.print(\" \"+przod+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik2 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik2++;\r\n\t\t\t\t\t\r\n\t\t\t\t}while (licznik2!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t System.out.println();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//jezeli blad \r\n\t\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\tlicznik_string=\"\"+licznik;\r\n\t\t\t\t\tlicznik_dlugosc=licznik_string.length();\r\n\t\t\t\t\tif(licznik_dlugosc>mianownik_dlugosc){\r\n\t\t\t\t\t\tmianownik_dlugosc=licznik_dlugosc;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//gora\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t//if(licznik==0){\r\n\t\t\t\t\t//System.out.print(\" \");\r\n\t\t\t\t\t//}\r\n\r\n\t\t\t\t\tSystem.out.println(licznik);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//srodek\r\n\t\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\t\t\r\n\t\t\t\t\tint licznik3 = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t licznik3++;\r\n\t\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t\t System.out.print(\" = \"+\"ERR\");\r\n\r\n\t\t\t\t System.out.println();\r\n\t\t\t\t\t\r\n\t\t\t\t //dol\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t\t\t System.out.println();\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t Ulamek u1=new Ulamek();\r\n\t\t Ulamek u2=new Ulamek();\r\n\r\n\t\t u1.ustawLicznik(3);\r\n\t\t u1.ustawMianownik(5);\r\n\r\n\t\t u2.ustawLicznik(142);\r\n\t\t u2.ustawMianownik(8);\r\n\r\n\t\t u1.wyswietl();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t \r\n\t\t u2.wyswietl();\r\n\r\n\r\n\r\n\r\n\t\t u2.ustawUlamek(100,0);\r\n\r\n\r\n\t\t u2.wyswietl();\r\n\r\n\t}", "public static void main (String [] args) \n\t{\n\t\tProgram.getParameters (\"C:\\\\Klijenti\\\\Parametri.txt\");\n\t\t\n\t\tProgram pr = new Program ();\n\t\t\n\t\tpr.klijenti.get (0).procitaj (); // prvi klijent preuzima sadrzaj\n\n\t\twhile (!pr.completed ()) // dok svi klijenti ne preuzmu sadrzaj\n\t\t{\n\t\t\tProgramRunnable p = new ProgramRunnable (pr);\n\t\t\tThread t = new Thread (p);\n\t\t\t\t\n\t\t\tt.start ();\n\t\t}\n\t\t\n\t\t// Prenosi sadrzaj svakog klijenta u odgovarajuci direktorijum.S\n\t\tfor (int s = 0; s < pr.klijenti.size (); s++)\n\t\t\tpr.klijenti.get (s).inDirectory ();\n\t}", "public void principal() {\r\n int opciones = 0;\r\n do {\r\n opciones = op.capInt(\"CLINICA LA EVALUACIÓN\\n\\n\"\r\n + \"1. Gestionar Pacientes.\\n\"\r\n + \"2. Gestionar Médicos.\\n\"\r\n + \"3. Gestionar Historial Clínico.\\n\"\r\n + \"4. Salir\");\r\n switch (opciones) {\r\n case 1:\r\n gesPaciente();\r\n break;\r\n case 2:\r\n gesMedico();\r\n break;\r\n case 3:\r\n gesHistoria();\r\n break;\r\n case 4:\r\n op.mensaje(\"Hasta la proxima\");\r\n break;\r\n default:\r\n op.mensajeError(\"La opcione Ingresada no es valida\");\r\n break;\r\n }\r\n } while (opciones != 4);\r\n }", "public static void main(String arg[]) {\n\n try {\n\n // use the default character set for VR encoding - override this as necessary\n SpecificCharacterSet specificCharacterSet = new SpecificCharacterSet((String[]) null);\n AttributeList identifier = new AttributeList();\n\n // build the attributes that you would like to retrieve as well as passing in\n // any search criteria\n identifier.putNewAttribute(TagFromName.QueryRetrieveLevel).addValue(\"STUDY\"); // specific query root\n identifier.putNewAttribute(TagFromName.PatientName, specificCharacterSet).addValue(\"Bowen*\");\n identifier.putNewAttribute(TagFromName.PatientID, specificCharacterSet);\n identifier.putNewAttribute(TagFromName.PatientBirthDate);\n identifier.putNewAttribute(TagFromName.PatientSex);\n identifier.putNewAttribute(TagFromName.StudyInstanceUID);\n identifier.putNewAttribute(TagFromName.SOPInstanceUID);\n identifier.putNewAttribute(TagFromName.StudyDescription);\n identifier.putNewAttribute(TagFromName.StudyDate);\n identifier.putNewAttribute(TagFromName.SOPClassesInStudy);\n\n // retrieve all studies belonging to patient with name 'Bowen'\n new FindSOPClassSCU(\n \t\t\"www.dicomserver.co.uk\",\n \t\t104,\n \t\t\"MEDCONN\",\n \t\t\"OurFindScu\",\n SOPClass.StudyRootQueryRetrieveInformationModelFind,\n identifier,\n new OurFindHandler()\n );\n \n\n } catch (Exception e) {\n e.printStackTrace(System.err); // in real life, do something about this exception\n System.exit(0);\n }\n }", "public static void main(String[] args) {\r\n \r\n // TODO code application logic here\r\n boolean sortir = false;\r\n int opcio;\r\n \r\n while(!sortir){\r\n \t\r\n System.out.println(\"\\n\\n\");\r\n //System.out.println(\"\");\r\n System.out.println(\"Llogar kit d'Esqui\");\r\n System.out.println(\"1. Llogar kit d'Esqui\");\r\n System.out.println(\"2. Consultar kits llogats\"); \r\n System.out.println(\"3. Consultar el kit més econòmic\");\r\n System.out.println(\"4. Consultar numero de kits en que ha estat llogat un material determinat\");\r\n System.out.println(\"5. Sortir\");\r\n if (!teclat.hasNextInt()) {\r\n \tSystem.out.println(\"Has d'introduir un numero com a opcio\");\r\n \tteclat.next();\r\n } else { \r\n opcio=teclat.nextInt();\r\n \r\n switch (opcio) {\r\n case 1:\r\n System.out.println(\"Has seleccionat llogar Kits\");\r\n String idBota = teclat.next();\r\n \r\n \r\n \r\n \r\n \r\n \tbreak;\r\n \t \r\n case 2:\r\n\r\n break;\r\n \r\n case 3:\r\n \r\n break;\r\n \r\n case 4:\r\n \r\n break;\r\n \r\n case 5:\r\n System.out.println(\"Has seleccionat sortir\");\r\n sortir=true;\r\n \r\n default:\r\n System.out.println(\"Sol nomeros entre 1 i 4\"); \r\n }\r\n } \r\n }\r\n }", "public static void main(String[] args) {\n\t\t\n\t\t\t\tScanner scan = new Scanner(System.in);\n\t\t\t\tSystem.out.println(\"Hangi islemi yapmak istersiniz 1) hesabi goruntuleme\\r\\n\" + \n\t\t\t\t\t\t\"\t\t 2)Para cekme\\r\\n\" + \n\t\t\t\t\t\t\"\t\t 3) Para yatirma\\r\\n\" + \n\t\t\t\t\t\t\"\t\t 4)Cikis\");\n\t\t\t\t\n\t\t\t\tint islem = scan.nextInt();\n\t\t\t\tdouble toplamTutar = 5000;\n\t\t\t\tswitch(islem) {\n\t\t\t\tcase 1:\n\t\t\t\t\tSystem.out.println(\"Hesabinizda \" +toplamTutar + \"tl bulunmaktadir\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tSystem.out.println(\"Cekmek istediginiz miktari giriniz \");\n\t\t\t\t\tint miktar = scan.nextInt();\n\t\t\t\t\tSystem.out.println(\"Para cekiminiz basariyla gerceklesti\");\n\t\t\t\t\tSystem.out.println(\"Yeni hesap bakiyeniz = \" + (toplamTutar-miktar));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tSystem.out.println(\"Yatirmak istediginiz miktari giriniz\");\n\t\t\t\t\tint yatirilanPara = scan.nextInt();\n\t\t\t\t\tSystem.out.println(\"Para yatirma isleminiz basariyla gerceklesti\");\n\t\t\t\t\tSystem.out.println(\"Yeni hesap bakiyeniz = \" + (toplamTutar + yatirilanPara));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.println(\"Bizleri tercih ettiginiz icin tesekkur ederiz Iyi gunler dileriz\");\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tSystem.out.println(\"Yanlis giris yaptiniz lutfen tekrar deneyin\");\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tscan.close();\n\t\t\n\t\t\t\t\n\t}", "public static void main(String[] args) {\n\t\tboolean run = true;\n\t\twhile (run) {\n\t\t\tSystem.out.println(\"---------------------------------------------------\");\n\t\t\tSystem.out.println(\"1. 계좌 생성 | 2. 계좌 목록 | 3. 예금 | 4. 출금 | 5. 종료\");\n\t\t\tSystem.out.println(\"---------------------------------------------------\");\n\t\t\tSystem.out.print(\"선택> \");\n\t\t\tint selectNo = sc.nextInt();\n\t\t\t\n\t\t\tif (selectNo == 1) {\n\t\t\t\tcreateAccount();\n\t\t\t}else if(selectNo ==2) {\n\t\t\t\taccountList();\n\t\t\t}else if(selectNo==3) {\n\t\t\t\tdeposit();\n\t\t\t}else if(selectNo==4){\n\t\t\t\twithdraw();\n\t\t\t}else if(selectNo==5) {\n\t\t\t\trun=false;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"시스템 종료\");\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tGaragem garagem = null;\n\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint opcao = mostrarMenu(scanner);\n\n\t\twhile (opcao != OPCAO_SAIR) {\n\t\t\tif (opcao == 1) {\n\t\t\t\tadicionar(garagem, scanner);\n\t\t\t} else if (opcao == 2) {\n\t\t\t\tvender(garagem, scanner);\n\t\t\t} else if (opcao == 3) {\n\t\t\t\tbuscar(garagem, scanner);\n\t\t\t} else if (opcao == 4) {\n\t\t\t\tlistar(garagem);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Opcao invalida!\");\n\t\t\t}\n\t\t\topcao = mostrarMenu(scanner);\n\t\t}\n\t\tscanner.close();\n\t}", "public int menu(){\n System.out.println(\"Elija una opción:\");\n\t\tSystem.out.println(\"1. Registrar un nuevo carro\");//Le damos todas las opciones disponibles\n\t\tSystem.out.println(\"2. Eliminar un carro del registro\");\n\t\tSystem.out.println(\"3. Mostrar espacios disponibles\");\n System.out.println(\"4. Mostrar el registro completo\");\n System.out.println(\"5. Mostrar las estadisticas del parqueo\");\n System.out.println(\"6. Agregar mas espacios de parqueo\");\n System.out.println(\"7. Salir/n/n\");\n\n boolean paso = false;\n int option = 0;\n while (paso == false){//Aplicamos un metodo para que escriba el \n try {\n String optionString = scan.nextLine();//Recibimos el valor como String para evitar un bug con el metodo nextLine()\n option = Integer.parseInt(optionString);//Lo cambiamos a int\n paso = true;\n } catch (Exception e) {\n System.out.println(\"Ingrese un valor correcto, por favor\");\n }\n }\n return option;//regresamos el valor convertido\n }", "private void printSearchToolIDMenu(Shop shop) {\n System.out.println(\"What is the ID of the tool you would like to look up?\");\n int itemId = receiveNumberInput();\n if (shop.searchInventory(itemId) == true) {\n System.out.println(itemId + \" is in the shop.\");\n } else {\n System.out.println(\"Tool does not exist or invalid input, please check spelling and try again.\");\n }\n }", "public static void main(String[] args) {\n\t\tcin = new Scanner(System.in);\n\t\tint d1, d2, d3;\n\t\tSystem.out.println(\"Podaj Liczbę\");\n\t\td1 = cin.nextInt();\n\t\t/*\n\t\t * System.out.println(\"Podaj Liczba drugą\"); d2=cin.nextInt();\n\t\t * System.out.println(\"Podaj Liczba trecią\"); d3=cin.nextInt();\n\t\t * System.out.println(\"Liczby Podzielne przez : \"+d3);\n\t\t */\n\t\tif (poda(d1))\n\t\t\tSystem.out.println(\"Liczba Pierwsza\");\n\t\telse\n\t\t\tSystem.out.println(\"Liczba Złożona\");\n\n\t}", "public static void main(String[] args) {\n\t\tSS p=new SS();\n\t\tSS q=new SS(\"홍 길 동\",20,\"000-1111-2222\",75.8);\n\t\tSystem.out.println(\"p--\");\n\t\tp.disp();\n\t\tSystem.out.println(\"q--\");\n\t\tq.disp();\n\t}", "public static void menu() {\n\t\tSystem.out.println(\"\\nPlease select which type of argument to generate by entering the associated number.\\n\");\n\t\tfor(int i = 0; i < type.length; i++) {\n\t\t\tSystem.out.println((i+1)+\". \"+type[i]);\n\t\t}\n\t\tSystem.out.println(\"8. Quit\");\n\t}" ]
[ "0.6808282", "0.6643654", "0.66000247", "0.65489084", "0.6520344", "0.6479283", "0.6326654", "0.6305407", "0.629449", "0.6289575", "0.6284095", "0.62717915", "0.6258305", "0.6216467", "0.61895484", "0.6181712", "0.61679566", "0.6151231", "0.61512166", "0.6147944", "0.61330974", "0.6132904", "0.6129205", "0.61150926", "0.611345", "0.60924256", "0.6085673", "0.60733455", "0.60689014", "0.60622674", "0.6059318", "0.6055996", "0.6047153", "0.6043117", "0.60430485", "0.60180956", "0.60047585", "0.60024303", "0.5988118", "0.5978711", "0.5974654", "0.597041", "0.59703153", "0.5970198", "0.59661514", "0.5961575", "0.5949748", "0.5941987", "0.5940475", "0.59371126", "0.59207267", "0.5919012", "0.5917628", "0.5913493", "0.59122556", "0.5898663", "0.58980393", "0.5896274", "0.5886739", "0.5883244", "0.58816606", "0.58807945", "0.5873253", "0.5872944", "0.58688927", "0.5867746", "0.58646166", "0.58627343", "0.5860681", "0.5859469", "0.58539444", "0.5850972", "0.584923", "0.5847352", "0.5839811", "0.5837929", "0.5837664", "0.58335465", "0.58305436", "0.58250266", "0.5824956", "0.5818756", "0.58181775", "0.58142835", "0.5813474", "0.58133197", "0.58131814", "0.5812312", "0.58116454", "0.58068824", "0.5802601", "0.5801165", "0.5793198", "0.5785012", "0.578156", "0.5777999", "0.5773256", "0.5770661", "0.57659", "0.5763587", "0.5763207" ]
0.0
-1
/ GreedyEnergy: get 10 energy buildings first or build energy buildings as long as enemy builds energy and my energy buildings are less than 13
private boolean checkGreedyEnergy() { return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String buildEnergy() {\r\n List<Integer> emptyCellsPos0 = new ArrayList<Integer>();\r\n List<Integer> emptyCellsPos1 = new ArrayList<Integer>();\r\n for(int i = 0; i < gameHeight; i++) {\r\n if (myLaneInfo.get(i).get(4).isEmpty()) {\r\n if (myLaneInfo.get(i).get(3).contains(0)) {\r\n emptyCellsPos0.add(i);\r\n }\r\n if (myLaneInfo.get(i).get(3).contains(1)) {\r\n emptyCellsPos1.add(i);\r\n }\r\n }\r\n }\r\n if (!emptyCellsPos0.isEmpty()) {\r\n return ENERGY.buildCommand(0,getRandomElementOfList(emptyCellsPos0));\r\n } else if (!emptyCellsPos1.isEmpty()) {\r\n return ENERGY.buildCommand(1,getRandomElementOfList(emptyCellsPos1));\r\n } else if (canBuy(ATTACK)) {\r\n return buildTurret();\r\n } else {\r\n return doNothingCommand();\r\n }\r\n }", "public void findHighestPowerUnitAnySize() {\r\n\t\ttimer.startAlgorithm(\"ChronalCharger.findHighestPowerUnitAnySize()\");\r\n\t\tfor (int i=1; i<=300; i++) {\r\n//\t\t\tcurrentGrid = new ShrinkingPowerGrid(i, 300);\r\n\t\t\tfindHighestPowerUnit(i);\r\n//\t\t\tpreviousGrids.add(currentGrid);\r\n\t\t}\r\n\t\ttimer.stopAlgorithm();\r\n\t}", "private void greedyEnemySpawner(float enemyCap, IEnemyService spawner, World world, GameData gameData) {\r\n while (enemyCap >= MEDIUM_ENEMY_COST) {\r\n\r\n if (enemyCap >= MEDIUM_ENEMY_COST + BIG_ENEMY_COST) {\r\n spawnBigAndMediumEnemy(spawner, world, gameData);\r\n enemyCap -= MEDIUM_ENEMY_COST + BIG_ENEMY_COST;\r\n\r\n } else if (enemyCap >= BIG_ENEMY_COST) {\r\n spawnBigEnemy(spawner, world, gameData);\r\n enemyCap -= BIG_ENEMY_COST;\r\n\r\n } else {\r\n spawnMediumEnemy(spawner, world, gameData);\r\n enemyCap -= MEDIUM_ENEMY_COST;\r\n }\r\n }\r\n }", "@Test\n\tpublic void testGetEnergyConsumption() {\n\t\tController control = new Controller();\n\t\tBasicRobot robot = new BasicRobot();\n\t\tExplorer explorer = new Explorer();\n\t\tcontrol.setBuilder(Order.Builder.DFS);\n\t\tcontrol.setRobotAndDriver(robot, explorer);\n\t\trobot.setMaze(control);\n\t\tcontrol.turnOffGraphics();\n\t\tcontrol.setSkillLevel(0);\n\t\tcontrol.switchFromTitleToGenerating(0);\n\t\tcontrol.waitForPlayingState();\n\t\texplorer.setRobot(robot);\n\t\tassertTrue(explorer.getEnergyConsumption() == 0);\n\t\tif(robot.distanceToObstacle(Direction.FORWARD) > 0) {\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getEnergyConsumption() == 6);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.RIGHT) > 0) {\n\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getEnergyConsumption() == 10);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.LEFT) > 0) {\n\t\t\trobot.rotate(Turn.LEFT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getEnergyConsumption() == 11);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.BACKWARD) > 0) {\n\t\t\trobot.rotate(Turn.AROUND);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getEnergyConsumption() == 15);\n\t\t}\n\t\tassertTrue(explorer.getEnergyConsumption() > 0);\n\t}", "public int energyRequired(Time time) {\n\n Random r = new Random();\n Time universeTime = universe.getUniverseTime();\n\n /*\n If we are basing our calculation on the current Universe time, the\n appliance will be on thanks to the TimedEvent handler so we do not need\n to check for matching ApplianceTimedEvents, we can just check isOn\n */\n if (time.equals(universeTime)) {\n return energy = isOn ? minUsage + r.nextInt(maxUsage - minUsage) : 0;\n \n }\n else { // THIS IS A FORECAST\n\n //Check usage hours for a TimedEvent where the appliance is used at time\n //usage hours are ordered in acsending order of start times\n for (Iterator<ApplianceTimedEvent> i = usageHours.iterator(); i.hasNext();) {\n ApplianceTimedEvent event = i.next();\n\n //start time comes after time. Therefore for all succeeding TimedEvents\n //the start time would also come after time (ascending order)\n //energy remains at zero and breaks out of iteration\n if (event.getStartTime().compare(time) > 0) \n break;\n \n\n //time occurs within a TimedEvent\n //energy is updated to value and breaks out of iteration\n if (event.containsTime(time)) {\n return energy = minUsage + r.nextInt(maxUsage - minUsage);\n \n }\n\n }\n return energy = 0; /*EXIT AT THIS POINT HAVING NOT FOUND ANY ENERGY USAGE AT THIS TIME FOR THIS APPLIANCE*/\n\n }\n }", "int getEnergy();", "protected abstract float _getGrowthChance();", "public double getEnergy() { return energy; }", "public static int getEnergyValueRandomLimit() {\r\n\t\treturn 50;\r\n\t}", "private static void loop() throws GameActionException {\n RobotCount.reset();\n MinerEffectiveness.reset();\n\n //Update enemy HQ ranges in mob level\n if(Clock.getRoundNum()%10 == 0) {\n enemyTowers = rc.senseEnemyTowerLocations();\n numberOfTowers = enemyTowers.length;\n if(numberOfTowers < 5 && !Map.isEnemyHQSplashRegionTurnedOff()) {\n Map.turnOffEnemyHQSplashRegion();\n }\n if(numberOfTowers < 2 && !Map.isEnemyHQBuffedRangeTurnedOff()) {\n Map.turnOffEnemyHQBuffedRange();\n }\n }\n \n // Code that runs in every robot (including buildings, excepting missiles)\n sharedLoopCode();\n \n updateEnemyInRange(52);//52 includes splashable region\n checkForEnemies();\n \n int rn = Clock.getRoundNum();\n \n // Launcher strategy\n if(rn == 80) {\n BuildOrder.add(RobotType.HELIPAD); \n } else if(rn == 220) {\n BuildOrder.add(RobotType.AEROSPACELAB);\n } else if (rn == 280) {\n BuildOrder.add(RobotType.AEROSPACELAB);\n } else if (rn == 350) {\n BuildOrder.add(RobotType.AEROSPACELAB);\n } else if (rn == 410) {\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n } else if (rn == 500) {\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n } \n if (rn > 500 && rn%200==0) {\n BuildOrder.add(RobotType.AEROSPACELAB);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n }\n //rc.setIndicatorString(1, \"Distance squared between HQs is \" + distanceBetweenHQs);\n \n \n \n if(rn > 1000 && rn%100 == 0 && rc.getTeamOre() > 700) {\n int index = BuildOrder.size()-1;\n if(BuildOrder.isUnclaimedOrExpired(index)) {\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n }\n }\n \n \n \n /**\n //Building strategy ---------------------------------------------------\n if(Clock.getRoundNum() == 140) {\n BuildOrder.add(RobotType.TECHNOLOGYINSTITUTE);\n BuildOrder.add(RobotType.TRAININGFIELD);\n }\n if(Clock.getRoundNum() == 225) {\n BuildOrder.add(RobotType.BARRACKS);\n BuildOrder.add(RobotType.TANKFACTORY);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n }\n if(Clock.getRoundNum() == 550) {\n BuildOrder.add(RobotType.TANKFACTORY);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n }\n if(Clock.getRoundNum() == 800) {\n BuildOrder.add(RobotType.HELIPAD);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.TANKFACTORY);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n //BuildOrder.printBuildOrder();\n }\n //---------------------------------------------------------------------\n **/\n \n //Spawn beavers\n if (hasFewBeavers()) { \n trySpawn(HQLocation.directionTo(enemyHQLocation), RobotType.BEAVER);\n }\n \n //Dispense supply\n Supply.dispense(suppliabilityMultiplier);\n \n //Debug\n //if(Clock.getRoundNum() == 700) Map.printRadio();\n //if(Clock.getRoundNum() == 1500) BuildOrder.print();\n\n }", "public void evaluate()\r\n {\r\n\tdouble max = ff.evaluate(chromos.get(0),generation());\r\n\tdouble min = max;\r\n\tdouble sum = 0;\r\n\tint max_i = 0;\r\n\tint min_i = 0;\r\n\r\n\tdouble temp = 0;\r\n\r\n\tfor(int i = 0; i < chromos.size(); i++)\r\n\t {\r\n\t\ttemp = ff.evaluate(chromos.get(i),generation());\r\n\t\tif(temp > max)\r\n\t\t {\r\n\t\t\tmax = temp;\r\n\t\t\tmax_i = i;\r\n\t\t }\r\n\r\n\t\tif(temp < min)\r\n\t\t {\r\n\t\t\tmin = temp;\r\n\t\t\tmin_i = i;\r\n\t\t }\r\n\t\tsum += temp;\r\n\t }\r\n\r\n\tbestFitness = max;\r\n\taverageFitness = sum/chromos.size();\r\n\tworstFitness = min;\r\n\tbestChromoIndex = max_i;;\r\n\tworstChromoIndex = min_i;\r\n\tbestChromo = chromos.get(max_i);\r\n\tworstChromo = chromos.get(min_i);\r\n\t\r\n\tevaluated = true;\r\n }", "private static Population getBestPossibleParettoOfAGS(){\n int numberOfRounds = 10;\n Population allFrontsMembers = new Population();\n\n NSGAII nsgaii = new NSGAII();\n SPEA2 spea2 = new SPEA2();\n AEMMT aemmt = new AEMMT();\n AEMMD aemmd = new AEMMD();\n MOEAD moead = new MOEAD();\n\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n progressBar = new ProgressBar((double) numberOfRounds);\n\n for (int i = 0; i < numberOfRounds; i++) {\n\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n\n System.out.println(\"NSGAII\");\n nsgaii.runAlgorithm(problem);\n allFrontsMembers.population.addAll(nsgaii.paretto.membersAtThisFront);\n\n System.out.println(\"SPEA2\");\n spea2.runAlgorithm(problem);\n allFrontsMembers.population.addAll(spea2.paretto.membersAtThisFront);\n\n //moead.runAlgorithm(problem);\n //allFrontsMembers.population.addAll( moead.pareto.membersAtThisFront);\n\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n System.out.println(\"AEMMT\");\n aemmt.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmt.paretto.membersAtThisFront);\n\n System.out.println(\"AEMMD\");\n aemmd.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmd.paretto.membersAtThisFront);\n\n progressBar.addJobDone();\n\n allFrontsMembers.fastNonDominatedSort();\n Problem.removeSimilar(allFrontsMembers.fronts.allFronts.get(0),problem);\n allFrontsMembers.population = allFrontsMembers.fronts.allFronts.get(0).membersAtThisFront;\n }\n\n problem.printResolutionMessage();\n //Printer.printBinaryMembers(allFrontsMembers);\n System.out.println(\"ALL FRONTS SIZE: \"+allFrontsMembers.population.size());\n\n return allFrontsMembers;\n }", "private void findBest()\r\n\t{\r\n\t\tint i;\r\n\t\tint size_mature_pool;\r\n\t\tint idx_current;//index of a currently checked genotype\r\n\t\tint num_errors;//number of errors of the current chromosome\r\n\t\tdouble min_error;//smallest error among the oldest genotypes\r\n\t\tVector<Integer> idx_oldest;\r\n\t\t\r\n\t\tsize_mature_pool = _pool_of_bests.size();\r\n\t\t\r\n\t\tidx_oldest = new Vector<Integer>(0, 1);\r\n\t\t\r\n\t\t//find all oldest genotypes\r\n\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t{\r\n\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\tif(num_errors>=_min_life_span)\r\n\t\t\t{\r\n\t\t\t\tidx_oldest.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//find the best oldest gentypes with a span above a threshold\r\n\t\t_best_idx = -1;\r\n\t\tif(idx_oldest.size() > 0)\r\n\t\t{\r\n\t\t\t_best_idx = idx_oldest.get(0);\r\n\t\t\tmin_error = _pool_of_bests.get(_best_idx)._error.getAverageError();\r\n\t\t\tfor(i=1; i<idx_oldest.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tidx_current = idx_oldest.get(i);\r\n\t\t\t\tif(min_error > _pool_of_bests.get(idx_current)._error.getAverageError())\r\n\t\t\t\t{\r\n\t\t\t\t\t_best_idx = idx_current;\r\n\t\t\t\t\tmin_error = _pool_of_bests.get(_best_idx)._error.getAverageError();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public double calcEnergyToBeBought(double neededEnergy) {\n double energyLossIncluded = neededEnergy/cableEnergyLoss; //Here the amount of energy lost is calculated, see cable.getCost() and http://large.stanford.edu/courses/2010/ph240/harting1/\n return energyOffer.getEnergy() <= energyLossIncluded ? (energyOffer.getEnergy()) : energyLossIncluded;\n }", "public Computer findMostExpensiveComputerV4( ) { \n\n\t\tComputer highest= computers.get(0);\n\t\tIterator<Computer> it= computers.iterator();\n\t\tComputer current=null; // a temporary copy of has.next() to perform multiple actions on it inside the loop\n\t\twhile(it.hasNext()) {\n\t\t\tcurrent=it.next();\n\t\t\tif (highest.getPrice()<current.getPrice()) \n\t\t\t\thighest=current;\n\n\n\t\t}\n\n\t\treturn highest;\n\n\t}", "private void runAlgorithm(){\n fitness = new ArrayList<Double>(); \n \n int iter = 0;\n \n // While temperature higher than absolute temperature\n this.temperature = getCurrentTemperature(0);\n while(this.temperature > this.p_absoluteTemperature && iter < 100000){\n //while(!stopCriterionMet()){\n // Select next state\n //for(int i=0;i<20;i++){\n int count = 0;\n boolean selected = false;\n while(!selected){\n Problem.ProblemState next = nextState();\n if(isStateSelected(next)){\n selected = true;\n this.state = next;\n }\n \n count++;\n if(count == 10) break;\n }\n //}\n \n // Sample data\n double fvalue = this.state.getFitnessValue();\n this.fitness.add(new Double(fvalue));\n \n iter = iter + 1;\n \n // Lower temperature\n this.temperature = getCurrentTemperature(iter);\n }\n \n this.n_iter = iter;\n return;\n }", "double energy(T searchState);", "@Override\n\tpublic void doTimeStep() {\n\t\tif (getEnergy() > Params.MIN_REPRODUCE_ENERGY) {\n\t\t\tCritter1 child = new Critter1();\n\t\t\treproduce(child, Critter.getRandomInt(8));\n\t\t}\n\t\telse{\n\t\t\twalk(Critter.getRandomInt(8));\n\t\t}\n\t}", "public boolean[] eGreedyAction()\n\t{\n\t\t// initialize variables\n\t\tRandom generator = new Random();\n\t\t\n\t\t// find best action\n\t\tList<boolean[]> validActions = getValidActions();\n\t\t\n\t\t// initiate values for comparison\n\t\tStateActionPair sap = new StateActionPair(state, validActions.get(0));\n\t\tboolean[] bestAction = sap.action;\n\t\t\n\t\tdouble bestValue= getStateActionValue(sap);\n\t\t\n\t\tfor(int i=1; i<validActions.size(); i++)\n\t\t{\n\t\t\tsap = new StateActionPair(state, validActions.get(i));\n\t\t\tdouble qValue = getStateActionValue(sap);\n\t\t\tif( qValue > bestValue )\n\t\t\t{\n\t\t\t\tbestAction = sap.action;\n\t\t\t\tbestValue = qValue;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// choose random action\n\t\tif( generator.nextDouble() < epsilon )\t\n\t\t{\n\t\t\tList<boolean[]> randomActions = new ArrayList<boolean[]>(validActions);\n\t\t\trandomActions.remove(bestAction);\t// don't choose the best action\n\t\t\tboolean[] randomAction = randomActions.get(generator.nextInt(randomActions.size()));\n\t\t\treturn randomAction;\n\t\t}\n\t\t\n\n\t\treturn bestAction;\t// choose best action\n\t}", "private void GreedySearch(){\n\n Queue<Node> expanded = new LinkedList<>();\n ArrayList<Node> fringe = new ArrayList<>();\n ArrayList<Node> fringeTemp = new ArrayList<>();\n\n\n Node current = startNode;\n\n while(expanded.size() < 1000){\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal is reached.\n solutionPath(current);\n expanded.add(current);\n printExpanded(expanded);\n System.exit(0);\n }\n\n\n boolean b = cycleCheck(current,expanded);\n\n if(!b) {\n expanded.add(current);\n }\n\n if(!b){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n\n }\n }\n\n if(current.getDigit().last_changed != 1){\n\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n }\n\n\n\n for(Node n : fringe){\n heuristicSetter(n);\n\n }\n\n fringeTemp.addAll(fringe);\n //now all the nodes in fringe have the heuristic value.\n //We can get the last added minm\n Node minm;\n if(fringeTemp.size() != 0){\n minm = fringeTemp.get(0);\n }else{\n break;\n }\n for(int i = 1; i<fringeTemp.size(); i++){\n if(fringeTemp.get(i).getHeuristic() <= minm.getHeuristic()){\n minm = fringeTemp.get(i);\n }\n }\n\n //now we have the minm for the next stage.\n current = minm;\n fringeTemp.remove(minm);\n fringe.clear();\n }\n\n //While loop ends\n System.out.println(\"No solution found.\");\n printExpanded(expanded);\n\n\n\n }", "protected void setStateToLowestEnergy() {\n\tpoints = bestEverPoints;\n\n\t// make a copy of the best points\n\tbestEverPoints = getPoints();\n\n\tbuildEnergyMatrix();\n\tstateEnergy();\n }", "public static double getEnergy(double energy) {\n double newEnergy;\n\n if (energy < 0 )\n newEnergy = -1.0;\n\n if (energy < 40.0)\n newEnergy = -0.33;\n else if (energy >= 40.0 && energy < 80.0)\n newEnergy = 0.33;\n else\n newEnergy = 1.0;\n return newEnergy;\n }", "private void calculerChemin() {\n suiteDeDeplacement.clear();\n int[][] empreinte = lab.getEmpreinte();\n lee(empreinte, x / Case.TAILLE, y / Case.TAILLE, cibleX, cibleY);\n }", "Energy getMaxLoad();", "public Computer findMostExpensiveComputerV2( ) { \n\t\tComputer highest= computers.get(0);\n\t\tint index=1; \n\t\twhile (index<computers.size()){\n\t\t\tif (highest.getPrice()<computers.get(index).getPrice()) {\n\t\t\t\thighest= computers.get(index);\n\n\t\t\t}\n\t\t\tindex ++;\n\t\t}\n\t\treturn highest;\n\n\t}", "public void setEnergy(double energy) { this.energy = energy; }", "private static void getFitness() {\n\t\tint popSize = population.size();\n\t\tChromosome thisChromo = null;\n\t\tdouble bestScore = 0;\n\t\tdouble worstScore = 0;\n\n\t\t// The worst score would be the one with the highest energy, best would be\n\t\t// lowest.\n\t\tworstScore = population.get(maximum()).conflicts();\n\n\t\t// Convert to a weighted percentage.\n\t\tbestScore = worstScore - population.get(minimum()).conflicts();\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tthisChromo = population.get(i);\n\t\t\tthisChromo.fitness((worstScore - thisChromo.conflicts()) * 100.0 / bestScore);\n\t\t}\n\n\t\treturn;\n\t}", "private double getNearestAEnergy() {\n\t\tdouble value = getInitialEnergy();\n\t\tdouble ret = value;\n\t\twhile (value < getaEnergy()) {\n\t\t\tdouble step = getPreEdgeStep();\n\t\t\t// avoid infinite loop\n\t\t\tif (step <= 0.0)\n\t\t\t\tstep = 1.0;\n\t\t\tvalue += step;\n\t\t\tif (value > getaEnergy())\n\t\t\t\tbreak;\n\t\t\tret = value;\n\t\t}\n\t\treturn ret;\n\t}", "public void perdEnergieRandom() {\r\n Random rd = new Random();\r\n robots.get(rd.nextInt(robots.size() - 1)).perdEnergie(5);\r\n }", "public double getHigh(){\n return /*home*/ this.high /*and eat everything*/;\r\n //then go to sleep for a day or three \r\n }", "public String run() {\r\n // Check if ironCurtain is available to use and GreedyIronCurtain is available\r\n if (myself.ironCurtainAvailable && myself.energy >= 120 && checkGreedyIronCurtain()) {\r\n return buildIC();\r\n } else if (myself.isIronCurtainActive && canBuy(ATTACK)) {\r\n return buildTurret();\r\n } else {\r\n // Check if GreedyWinRate is available\r\n if (checkGreedyWinRate() && checkGreedyEnergy() && canBuy(ENERGY)) {\r\n return buildEnergy();\r\n }\r\n // Check if there is an attack..\r\n else if (myTotal.get(3) > 0 || myTotal.get(0) > 0) {\r\n // Check if GreedyDefense is available\r\n if (canBuy(DEFENSE) && checkGreedyDefense()) \r\n return defendRow();\r\n else if (canBuy(ATTACK)) return buildTurret();\r\n return doNothingCommand();\r\n } \r\n // Check if GreedyEnergy is available\r\n else if (checkGreedyEnergy() && canBuy(ENERGY)) {\r\n return buildEnergy();\r\n } \r\n // Just Attack if there is no greedy or do nothing if there is no energy\r\n else if (canBuy(ATTACK)) {\r\n return buildTurret();\r\n } else {\r\n return doNothingCommand();\r\n }\r\n }\r\n }", "public Computer findMostExpensiveComputerV1( ) { \n\t\tComputer highest= computers.get(0);\n\t\tfor (int index=1; index<computers.size();index++){\n\t\t\tif (highest.getPrice()<computers.get(index).getPrice()) {\n\t\t\t\thighest= computers.get(index);\n\n\t\t\t}\n\t\t}\n\t\treturn highest;\n\t}", "protected int getEnergy() {\n\t\treturn energy;\n\t}", "<T> GeneticResult<T> train(List<Chromosome<T>> chromosomes){\n\t\tGeneticResult<T> bestFit = maxFitness(chromosomes, 0);\n\t\tfor(int i = 0; i < totalBreedings; i++){\n\t\t\tif(bestFit.getFitness() > sufficientFitness){ break ;}\n\t\t\tchromosomes = breedNewGeneration(chromosomes);\n\t\t\tbestFit = maxFitness(chromosomes, i);\n\t\t}\n\t\treturn bestFit;\n\t}", "public int getFitness(){\n\t\treturn getEnergy()*-1; \n\t}", "public int getGears();", "public double getEnergy(){\n\t\t return energy;\n\t}", "private boolean checkGreedyIronCurtain() {\r\n return (myself.health < 30 || enTotal.get(0) >= 8 || opponent.isIronCurtainActive || this.myTotal.get(0) < this.enTotal.get(0));\r\n }", "public static int consumedPower(){\n int consumedPower = 0;\n for (ElectricalHomeDevice device : allTrunedOnDevices){\n consumedPower += device.getDevicePower();\n }\n return consumedPower;\n }", "public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }", "@Override\r\n\tpublic double getMinimalCostToReach(Robot robot, long x, long y)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn robot.getEnergyRequiredToReach(new Position(x, y));\r\n\t\t}\r\n\t\tcatch(IllegalBoardException exc)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The given robot is not placed on a board..\");\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tcatch(IllegalStateException exc)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The given robot is terminated.\");\r\n\t\t\treturn -1; \r\n\t\t}\r\n\t}", "private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }", "@Override\n public double getEnergyLevel() {\n return energy;\n }", "public void doTimeStep() {\r\n\t\twalk(getRandomInt(8));\r\n\t\tif (getEnergy() < 6 * Params.min_reproduce_energy && getEnergy() > Params.min_reproduce_energy) {\r\n\t\t\tCritter1 child = new Critter1();\r\n\t\t\treproduce(child, getRandomInt(8));\r\n\t\t\tnumberSpawned += 1;\r\n\t\t}else if(getEnergy() < Params.min_reproduce_energy) {\r\n\t\t\treturn;\r\n\t\t}else {\r\n\t\t\tCritter1 child1 = new Critter1();\r\n\t\t\treproduce(child1, getRandomInt(8));\r\n\t\t\tCritter1 child2 = new Critter1();\r\n\t\t\treproduce(child2, getRandomInt(8));\r\n\t\t\tnumberSpawned += 2;\r\n\t\t}\t\r\n\t}", "public int getEnergy(){ return energy; }", "public static void worldTimeStep() {\n\t\t\n\t//Do time step for all critters\n\t\tfor (Critter c: population) {\n\t\t\tc.doTimeStep();\t\t\t\n\t\t}\n\t\n\t\t\n\t//Resolve encounters\n\t\tIterator<Critter> it1 = population.iterator();\n\t\tfightMode = true;\n\t\twhile(it1.hasNext())\n\t\t{\n\t\t\tCritter c = it1.next();\n\t\t\tIterator<Critter> it2 = population.iterator();\n\t\t\twhile(it2.hasNext()&&(c.energy > 0)) \n\t\t\t{\t\n\t\t\t\tCritter a =it2.next();\n\t\t\t\tif((c != a)&&(a.x_coord==c.x_coord)&&(a.y_coord==c.y_coord))\n\t\t\t\t{\n\t\t\t\t\tboolean cFighting = c.fight(a.toString());\n\t\t\t\t\tboolean aFighting = a.fight(c.toString());\n\t\t\t\t//If they are both still in the same location and alive, then fight\n\t\t\t\t\tif ((a.x_coord == c.x_coord) && (a.y_coord == c.y_coord) && (a.energy > 0) && (c.energy > 0)) {\t\t\n\t\t\t\t\t\tint cFight=0;\n\t\t\t\t\t\tint aFight=0;\n\t\t\t\t\t\tif(cFighting)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcFight = getRandomInt(100);\n\t\t\t\t\t\t\tcFight++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(aFighting)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taFight =getRandomInt(100);\n\t\t\t\t\t\t\taFight++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(cFight>aFight)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc.energy+=(a.energy/2);\n\t\t\t\t\t\t\t//it2.remove();\n\t\t\t\t\t\t\ta.energy=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(aFight>cFight)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ta.energy+=(c.energy/2);\n\t\t\t\t\t\t\t//it1.remove()\n\t\t\t\t\t\t\tc.energy=0;\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(aFight>50)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ta.energy+=(c.energy/2);\n\t\t\t\t\t\t\t\t//it1.remove();\n\t\t\t\t\t\t\t\tc.energy=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tc.energy+=(a.energy);\n\t\t\t\t\t\t\t\t//it2.remove();\n\t\t\t\t\t\t\t\ta.energy=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfightMode = false;\n\t\t\n\t//Update rest energy and reset hasMoved\n\t\tfor (Critter c2: population) {\n\t\t\tc2.hasMoved = false;\n\t\t\tc2.energy -= Params.rest_energy_cost;\n\t\t}\n\t\t\n\t//Spawn offspring and add to population\n\t\tpopulation.addAll(babies);\n\t\tbabies.clear();\n\t\t\n\t\tIterator<Critter> it3 = population.iterator();\n\t\twhile(it3.hasNext())\n\t\t{\n\t\t\tif(it3.next().energy<=0)\n\t\t\t\tit3.remove();\n\t\t}\n\t//Create new algae\n\t\tfor (int i = 0; i < Params.refresh_algae_count; i++) {\n\t\t\ttry {\n\t\t\t\tmakeCritter(\"Algae\");\n\t\t\t} catch (InvalidCritterException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void evaluate() {\n for (Chromosome chromo : chromosomes) {\n double chromoGH = chromo.getTotalGH();\n if (chromo.isValid()) {\n this.validChromosomes++;\n if (chromoGH > this.getBestScore()) {\n this.bestScore = chromoGH;\n this.setBestChromo(chromo);\n }\n }\n //Log.debugMsg(chromo.getTotalGH().toString());\n// this.map.put(chromoGH, chromo);\n }\n }", "private WeightedSampler<String> getPossibleLethalActions(int team) {\n if (this.b.getCurrentPlayerTurn() != team || this.b.getWinner() != 0) {\n return null;\n }\n Player p = this.b.getPlayer(team);\n WeightedSampler<String> poss = new WeightedOrderedSampler<>();\n List<Minion> minions = this.b.getMinions(team, false, true).collect(Collectors.toList());\n for (Minion m : minions) {\n if (p.canUnleashCard(m)) {\n double totalWeight = UNLEASH_TOTAL_WEIGHT + UNLEASH_WEIGHT_PER_PRESENCE * m.getTotalEffectValueOf(e -> e.getPresenceValue(5));\n List<List<List<TargetList<?>>>> targetSearchSpace = new LinkedList<>();\n this.getPossibleListTargets(m.getUnleashTargetingSchemes(), new LinkedList<>(), targetSearchSpace);\n if (targetSearchSpace.isEmpty()) {\n targetSearchSpace.add(List.of());\n }\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new UnleashMinionAction(p, m, targets).toString().intern(), totalWeight / targetSearchSpace.size());\n }\n }\n }\n if (this.b.getMinions(team * -1, false, true).anyMatch(m -> m.finalStats.get(Stat.WARD) > 0)) {\n // find ways to break through the wards\n for (Minion m : minions) {\n if (m.canAttack()) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n List<Minion> searchSpace = m.getAttackableTargets().collect(Collectors.toList());\n double weight = totalWeight / searchSpace.size();\n for (Minion target : searchSpace) {\n double overkillMultiplier = Math.pow(ATTACK_WEIGHT_OVERKILL_PENALTY, Math.max(0, m.finalStats.get(Stat.ATTACK) - target.health));\n poss.add(new OrderAttackAction(m, target).toString().intern(), overkillMultiplier * weight);\n }\n }\n }\n } else {\n // just go face\n this.b.getPlayer(team * -1).getLeader().ifPresent(l -> {\n for (Minion m : minions) {\n if (m.canAttack(l)) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n poss.add(new OrderAttackAction(m, l).toString().intern(), totalWeight);\n }\n }\n });\n }\n poss.add(new EndTurnAction(team).toString().intern(), END_TURN_WEIGHT);\n return poss;\n }", "public int getBodyGrowth(int collectTime, int totalCollected);", "public int getEnergy()\n {\n return energy;\n }", "public static void worldTimeStep() {\n\t\t//System.out.println(\"Time Step: \" + count);\n\t\tcount = count + 1;\n\t for (Critter A : Critter.population){\n\t if(A.energy<=0){\n\t\t\t\tA.isAlive = false;\n }\n else if(A.energy>0){\n\t A.isAlive=true;\n A.doTimeStep();\n if(A.energy<0){\n\t\t\t\t\tA.isAlive = false;\n\t\t\t\t}\n }\n\n }\n\t\tfor (Iterator<Critter> iterator = Critter.population.iterator(); iterator.hasNext();){\n\t\t\tCritter tmp = iterator.next();\n\t\t\tif (tmp.isAlive == false){\n\t\t\t\titerator.remove();\n\t\t\t}\n\t\t}\n\n encounters2();\n\n\t\tfor (Iterator<Critter> iterator = Critter.population.iterator(); iterator.hasNext();){\n\t\t\tCritter tmp = iterator.next();\n\t\t\tif (tmp.isAlive == false){\n\t\t\t\titerator.remove();\n\t\t\t}\n\t\t}\n\n\t\tmapCheck();\n\t\t// we have add reproduction\n\n\t\t// we have to add algae\n\t\tfor (int i = 0; i < Params.refresh_algae_count; i = i + 1){\n\t\t\t//Algae child = new Algae();\n\t\t\t//child.setEnergy(Params.start_energy);\n\t\t\t//makecritter takes care of anything\n\t\t\ttry{\n\t\t\t\tmakeCritter(\"Algae\");\n\t\t\t}\n\t\t\tcatch(InvalidCritterException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\t//deduct rest energy\n\t\tfor (Critter A : Critter.population){\n\t\t\tA.energy = A.getEnergy() - Params.rest_energy_cost;\n\t\t\tif(A.getEnergy()<=0){\n\t\t\t\tA.isAlive=false;\n\t\t\t}\n\t\t}\n\t\tfor (Iterator<Critter> iterator = Critter.population.iterator(); iterator.hasNext();){\n\t\t\tCritter tmp = iterator.next();\n\t\t\tif (tmp.isAlive == false){\n\t\t\t\titerator.remove();\n\t\t\t}\n\t\t}\n\t\t//babies add\n\t\tfor(Critter b: babies){\n\t\t\tb.isAlive=true;\n\t\t\tpopulation.add(b);\n\t\t}\n\t\t//not sure if this removes everything\n\t\tbabies.clear();\n\t}", "private static void checkForEnemies() throws GameActionException {\n //No need to hijack code for structure\n if (rc.isWeaponReady()) {\n // basicAttack(enemies);\n HQPriorityAttack(enemies, attackPriorities);\n }\n \n //Old splash damage code\n //Preserve because can use to improve current splash damage code\n //But not so simple like just checking directions, since there are many more \n //locations to consider hitting.\n /*if (numberOfTowers > 4) {\n //can do splash damage\n RobotInfo[] enemiesInSplashRange = rc.senseNearbyRobots(37, enemyTeam);\n if (enemiesInSplashRange.length > 0) {\n int[] enemiesInDir = new int[8];\n for (RobotInfo info: enemiesInSplashRange) {\n enemiesInDir[myLocation.directionTo(info.location).ordinal()]++;\n }\n int maxDirScore = 0;\n int maxIndex = 0;\n for (int i = 0; i < 8; i++) {\n if (enemiesInDir[i] >= maxDirScore) {\n maxDirScore = enemiesInDir[i];\n maxIndex = i;\n }\n }\n MapLocation attackLoc = myLocation.add(directions[maxIndex],5);\n if (rc.isWeaponReady() && rc.canAttackLocation(attackLoc)) {\n rc.attackLocation(attackLoc);\n }\n }\n }//*/\n \n }", "private PMCGenotype[] advanceGeneration()\n\t{\n\t\tPMCGenotype[] newPop = new PMCGenotype[population.length];\n\t\tPMCGenotype[] parents = selectParents();\n\t\tArrayList<PMCGenotype> candidates = new ArrayList<PMCGenotype>();\n\n\t\t// Add the current population to the list of candidates.\n\t\tfor (PMCGenotype pmcg : population)\n\t\t{\n\t\t\tcandidates.add(pmcg);\n\t\t}\n\n\t\t// For each parent, generate a number of mutations (children), calculate their fitness\n\t\t// and add them to the list of candidates.\n\t\tint childrenPerParent = this.childrenPerGeneration / this.parentsToSelect;\n\t\tfor (PMCGenotype p : parents)\n\t\t{\n\t\t\tfor (int i = 0; i < childrenPerParent; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = PMCGenotype.mutate(p, r);\n\t\t\t\tpmcg.setFitness(fitness(pmcg, this.trials));\n\t\t\t\tcandidates.add(pmcg);\n\t\t\t}\n\t\t}\n\n\t\t// Find candidate with the best fitness and add it to the new population.\n\t\t// Repeat this until the new population size matches the previous population size.\n\t\tint candidatesChosen = 0;\n\t\twhile (candidatesChosen < this.population.length)\n\t\t{\n\t\t\tint numberOfRemainingCandidates = candidates.size();\n\t\t\tdouble currentBestFitnessScore = 0;\n\t\t\tint currentBestFitnessScoreIndex = 0;\n\n\t\t\tfor (int i = 0; i < numberOfRemainingCandidates; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = candidates.get(i);\n\t\t\t\tif (pmcg.getFitness() > currentBestFitnessScore)\n\t\t\t\t{\n\t\t\t\t\tcurrentBestFitnessScore = pmcg.getFitness();\n\t\t\t\t\tcurrentBestFitnessScoreIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnewPop[candidatesChosen] = candidates.get(currentBestFitnessScoreIndex);\n\t\t\tcandidatesChosen++;\n\n\t\t\tcandidates.remove(currentBestFitnessScoreIndex);\n\t\t}\n\n\t\treturn newPop;\n\t}", "public int getEnergy() {\n return energy;\n }", "private int[] getElite(int[][] population) {\n\t\tfloat[] fitnesses = new float[population.length];\n\n\t\tfor (int i = 0; i < population.length; i++) {\n\t\t\tfitnesses[i] = getFitness(population[i]);\n\t\t\tif (fitnesses[i] < eliteFitness) {\n\t\t\t\tSystem.out.println(getFitness(eliteChromosome) + \" old\" + getFitness(population[i]) + \" new\");\n\t\t\t\teliteFitness = fitnesses[i];\n\t\t\t\teliteChromosome = population[i];\n\t\t\t}\n\t\t}\n\t\treturn eliteChromosome;\n\t}", "public List<Integer> GetMoves(boolean growthMoves, boolean expandMoves, boolean captureMoves, int maxGrowthValue) {\n List<Integer> moves = new ArrayList<>();\n\n if (Winner != PlayerType.Empty) {\n return moves;\n } else if (GetMoveTypeForTurn(Turn) == MoveType.AllGrow) {\n moves.add(Constants.AllGrowMove);\n } else {\n for (int i = 0; i < 80; i++) {\n // Grow existing tiles\n if (growthMoves && ((Tiles[i] > 0 && Player == PlayerType.One) || (Tiles[i] < 0 && Player == PlayerType.Two)) && Math.abs(Tiles[i]) < maxGrowthValue) {\n if (!Settings.AllowDormantVolcanoes || !Dormant[i]) {\n moves.add(i);\n }\n }\n\n // Claim new tiles\n if (expandMoves && Tiles[i] == 0) {\n moves.add(i);\n }\n\n // Capture enemy tiles\n if (captureMoves) {\n PlayerType opponent = Player == PlayerType.One ? PlayerType.Two : PlayerType.One;\n if (Settings.AllowMagmaChamberCaptures &&\n ((Tiles[i] > 0 && opponent == PlayerType.One) || (Tiles[i] < 0 && opponent == PlayerType.Two)) &&\n Math.abs(Tiles[i]) <= Settings.MaxMagmaChamberLevel) {\n moves.add(i);\n }\n if (Settings.AllowVolcanoCaptures &&\n ((Tiles[i] > 0 && opponent == PlayerType.One) || (Tiles[i] < 0 && opponent == PlayerType.Two)) &&\n Math.abs(Tiles[i]) > Settings.MaxMagmaChamberLevel) {\n moves.add(i);\n }\n }\n }\n }\n\n if (moves.size() == 0) {\n if (growthMoves && expandMoves & captureMoves && maxGrowthValue >= Settings.MaxVolcanoLevel) {\n // There are no moves in this position\n return moves;\n } else {\n return GetMoves(true, true, true, Settings.MaxVolcanoLevel);\n }\n }\n\n return moves;\n }", "private static double randomSearch(int numTermites, int iterations,\n\t\t\tdouble pStrength, int moves, double pImportance, Grid g, double decay) {\n\t\t\n\t\tRandom r = new Random();\n\t\t\n//\t\tSystem.out.println(\"-------Beginning random search-------\");\n\t\twhile (iterations>0) {\n\t\t\tArrayList<Termite> termites = new ArrayList<Termite>();\n\t\t\n\t\t\t//Generate the termites for this iteration\n\t\t\tfor (int i=0; i<numTermites; i++) {\n\t\t\t\tint x = r.nextInt(10);\n\t\t\t\tint y = r.nextInt(10);\n\t\t\t\ttermites.add(new Termite(x,y,pStrength,moves,pImportance));\n\t\t\t}\n\t\t\n\t\t\t//Let each termite move once, if it has at least one remaining move\n\t\t\twhile(termites.get(0).getMovesLeft() > 0) {\n\t\t\t\tfor (Termite t: termites) {\n\t\t\t\t\tt.move(g);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Lay pheromone after each termite has moved\n\t\t\tfor (Termite t: termites) {\n\t\t\t\tt.layPheromones(g);\n\t\t\t}\n\t\t\t//Print the results of this iteration and prepare for the next\n\t\t\titerations--;\n//\t\t\tSystem.out.println(\"Pheromones after iteration \" + iterations);\n//\t\t\tg.printPheromones();\n\t\t\tg.decayPheromones(decay);\n//\t\t\tSystem.out.println(\"-----------------------------\");\n\t\t}\n\t\treturn g.getAccuracy();\n\t}", "public void setEnergy(int energy) {\r\n\t\tthis.energy = energy;\r\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException {\nfor (double b = 0.5; b < 0.51; b+=0.1) {\n for (double k = 4.40; k < 4.5; k+=0.5) {\n Machine.b = 0.5; //0.2 - ATCnon-delay\n Machine.k = 1.5; //1.4 - ATCnon delay\n int hits = 0;\n engineJob = new cern.jet.random.engine.MersenneTwister(99999);\n noise = new cern.jet.random.Normal(0, 1, engineJob);\n SmallStatistics[] result = new SmallStatistics[5];\n result[0] = new SmallStatistics();\n result[1] = new SmallStatistics();\n for (int ds = 0; ds < 2; ds++) {\n JSPFramework[] jspTesting = new JSPFramework[105];\n for (int i = 0; i < jspTesting.length; i++) {\n jspTesting[i] = new JSPFramework();\n jspTesting[i].getJSPdata(i*2 + 1);\n }\n //DMU - instances (1-80)//la - instances (81-120)\n //mt - instances (121/-123)//orb - instances (124-133)//ta -instances (134-173)\n //////////////////////////////////////////////\n for (int i = 0; i < jspTesting.length; i++) {\n double countEval = 0;\n double tempObj = Double.POSITIVE_INFINITY;\n double globalBest = Double.POSITIVE_INFINITY;\n boolean[] isApplied_Nk = new boolean[2]; //Arrays.fill(isApplied_Nk, Boolean.TRUE);\n int Nk = 0; // index of the Iterative dispatching rule to be used\n jspTesting[i].resetALL();\n boolean firstIteration = true;\n double countLargeStep = 0;\n do{\n countEval++;\n //start evaluate schedule\n jspTesting[i].reset();\n int N = jspTesting[i].getNumberofOperations();\n jspTesting[i].initilizeSchedule();\n int nScheduledOp = 0;\n\n //choose the next machine to be schedule\n while (nScheduledOp<N){\n\n Machine M = jspTesting[i].Machines[jspTesting[i].nextMachine()];\n\n jspTesting[i].setScheduleStrategy(Machine.scheduleStrategy.HYBRID );\n jspTesting[i].setPriorityType(Machine.priorityType.ATC);\n jspTesting[i].setNonDelayFactor(0.3);\n //*\n jspTesting[i].setInitalPriority(M);\n for (Job J:M.getQueue()) {\n double RJ = J.getReadyTime();\n double RO = J.getNumberRemainingOperations();\n double RT = J.getRemainingProcessingTime();\n double PR = J.getCurrentOperationProcessingTime();\n double W = J.getWeight();\n double DD = J.getDuedate();\n double RM = M.getReadyTime();\n double RWT = J.getCurrentOperationWaitingTime();\n double RFT = J.getFinishTime();\n double RNWT = J.getNextOperationWaitingTime();\n int nextMachine = J.getNextMachine();\n\n if (nextMachine==-1){\n RNWT=0;\n } else {\n RNWT = J.getNextOperationWaitingTime();\n if (RNWT == -1){\n RNWT = jspTesting[i].getMachines()[nextMachine].getQueueWorkload()/2.0;\n }\n }\n if (RWT == -1){\n RWT = M.getQueueWorkload()/2.0;\n }\n //J.addPriority((W/PR)*Math.exp(-maxPlus((DD-RM-PR-(RT-PR+J.getRemainingWaitingTime(M)))/(3*M.getQueueWorkload()/M.getNumberofJobInQueue())))); //iATC\n //J.addPriority((PR*PR*0.614577*(-RM-RM/W)-RT*PR*RT/W)\n // -(RT*PR/(W-0.5214191)-RM/W*PR*0.614577+RT*PR/(W-0.5214191)*2*RM/W));\n //J.addPriority(((W/PR)*((W/PR)/(RFT*RFT)))/(max(div((RFT-RT),(RWT/W)),IF(RFT/W-max(RFT-RT,DD),DD,RFT))+DD/RFT+RFT/W-max(RFT-RFT/W,DD))); //best TWT priorityIterative\n if (Nk==0)\n //J.addPriority(min(W/PR-RFT+min(RT,W/RFT),((min(RT,RNWT-RFT)/(RJ-min(RWT,RFT*0.067633785)))/(RJ-min(RWT,RFT*0.067633785))))/RFT);\n J.addPriority(min(W/PR-RFT+min(RT,W/RFT),((div(min(RT,RNWT-RFT),(RJ-min(RWT,RFT*0.067633785))))/(RJ-min(RWT,RFT*0.067633785))))/RFT);\n else\n J.addPriority(min((((W/PR)/RFT)/(2*RNWT+max(RO,RFT)))/(PR+RNWT+max(RO,RFT)),((W/PR)/RFT)/PR)/RFT);\n }\n //jspTesting[i].calculatePriority(M);\n jspTesting[i].sortJobInQueue(M);\n Job J = M.completeJob();\n if (!J.isCompleted()) jspTesting[i].Machines[J.getCurrentMachine()].joinQueue(J);\n nScheduledOp++;\n }\n double currentObj = -100;\n currentObj = jspTesting[i].getTotalWeightedTardiness();\n if (tempObj > currentObj){\n tempObj = currentObj;\n jspTesting[i].recordSchedule();\n Arrays.fill(isApplied_Nk, Boolean.FALSE);\n //System.out.println(\"Improved!!!\");\n }\n else {\n isApplied_Nk[Nk] = true;\n if (!isNextApplied(Nk, isApplied_Nk)) Nk = circleShift(Nk, isApplied_Nk.length);\n else {\n if (globalBest>tempObj) {\n globalBest = tempObj;\n jspTesting[i].storeBestRecordSchedule();\n } jspTesting[i].restoreBestRecordSchedule();\n if (countLargeStep<1) {\n tempObj = Double.POSITIVE_INFINITY;\n Arrays.fill(isApplied_Nk, Boolean.FALSE);\n jspTesting[i].shakeRecordSchedule(noise, engineJob, globalBest);\n countLargeStep++;\n }\n else break;\n }\n }\n firstIteration = false;\n \n } while(true);\n result[ds].add(jspTesting[i].getDevREFTotalWeightedTardiness(globalBest));\n if (jspTesting[i].getDevLBCmax()==0) hits++;\n System.out.println(jspTesting[i].instanceName + \" & \"+ globalBest + \" & \" + countEval);\n }\n }\n //jsp.schedule();\n //*\n System.out.println(\"*************************************************************************\");\n System.out.println(\"[ & \" + formatter.format(result[0].getMin()) + \" & \"\n + formatter.format(result[0].getAverage()) + \" & \" + formatter.format(result[0].getMax()) +\n \" & \" + formatter.format(result[1].getMin()) + \" & \"\n + formatter.format(result[1].getAverage()) + \" & \" + formatter.format(result[1].getMax()) + \"]\");\n //*/\n System.out.print(\"\"+formatter.format(result[0].getAverage()) + \" \");\n }\n System.out.println(\"\");\n}\n }", "public void findExpressedGenes(){\n\t\tHashMap exp = new HashMap();\n\t\t//instantiate Bar parser\n\t\tScoreParsedBars barParser = new ScoreParsedBars (barDirectory, bpPositionOffSetBar, bpPositionOffSetRegion);\n\t\t//for each chromosome in select\n\t\tIterator it = genesSelect.keySet().iterator();\n\t\twhile (it.hasNext()){\n\t\t\t//get genes\n\t\t\tString chrom = (String)it.next();\n\t\t\tUCSCGeneLine[] chrGenes = (UCSCGeneLine[])genesSelect.get(chrom);\n\t\t\tSystem.out.println(\"\\tTotal \"+chrom+\"\\t\"+ chrGenes.length);\n\t\t\t//calculate medians\n\t\t\tbarParser.calculateMedians(chrGenes);\n\t\t\tArrayList expressedGenes = new ArrayList();\n\t\t\t//for each gene look for intersection after expanding\n\t\t\tfor (int i=0; i< chrGenes.length; i++){\n\t\t\t\tif (chrGenes[i].getScores()[0] >= threshold ) {\n\t\t\t\t\texpressedGenes.add(chrGenes[i]);\n\t\t\t\t\t//System.out.println(chrGenes[i].simpleToString()+ chrGenes[i].getScore());\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert ArrayList to array and replace in hash\n\t\t\tchrGenes = new UCSCGeneLine[expressedGenes.size()];\n\t\t\texpressedGenes.toArray(chrGenes);\n\t\t\tSystem.out.println(\"\\tExpressed \"+chrom+\"\\t\"+ chrGenes.length);\n\t\t\texp.put(chrom, chrGenes);\n\t\t}\n\t\tgenesSelect = exp;\n\t}", "private static MapLocation getBestPastrLocNearMeBasedOnCowGrowthRate() {\n\t\tif (Clock.getRoundNum() < 1) {\n\t\t\tallCowGrowths = rc.senseCowGrowth();\t\t\t\n\t\t}\n\t\tMapLocation bestLocation = new MapLocation(curLoc.x, curLoc.y);\n\t\tdouble cowGrowthAmount = 0;\n\t\tMapLocation enemyHQLocation = rc.senseEnemyHQLocation();\n\t\tdouble distanceToEnemyHQ = curLoc.distanceSquaredTo(enemyHQLocation);\n\t\tfor (int i = 15; i-- > 0;) {\n\t\t\tfor (int j = 15; j-- > 0;) {\n\t\t\t\t// Check that it's in bounds\n\t\t\t\tif (curLoc.x - i + 8 >= 0 && curLoc.x - i + 8 < rc.getMapWidth() &&\n\t\t\t\t\tcurLoc.y - j + 8 >= 0 && curLoc.y - j + 8 < rc.getMapHeight()) {\n\t\t\t\t\tMapLocation mapLoc = new MapLocation(curLoc.x - i + 8, curLoc.y - j + 8);\n\t\t\t\t\tdouble currentLocGrowth = allCowGrowths[curLoc.x - i + 8][curLoc.y - j + 8];\n\n\t\t\t\t\t// Check that it's behind a perpendicular line and not void\n\t\t\t\t\t// and choose the best point.\n\t\t\t\t\tif (mapLoc.distanceSquaredTo(enemyHQLocation) < distanceToEnemyHQ &&\n\t\t\t\t\t\tcurrentLocGrowth > cowGrowthAmount && rc.senseTerrainTile(mapLoc) != TerrainTile.VOID) {\n\t\t\t\t\t\tcowGrowthAmount = currentLocGrowth;\n\t\t\t\t\t\tbestLocation = mapLoc;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn bestLocation;\n\t}", "private void findFood() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\tlogger.error(\"Should not happen\");\n\t\t\treturn;\n\t\t}\n\n\t\t_food = null;\n\t\tfloat distance = 0;\n\t\t\n\t\tfor (FoodEntry entry : map.values()) { \n\t\t\tfloat d = _obj.getPPosition().sub(entry.obj.getPPosition()).length();\n\t\t\tif (_food == null || d < distance) { \n\t\t\t\t_food = entry.obj;\n\t\t\t\tdistance = d;\n\t\t\t}\n\t\t}\n\t}", "public double getCost(StringBuffer detail, boolean ignoreAmmo) {\n double[] costs = new double[15];\n int i = 0;\n\n double cockpitCost = 0;\n if (getCockpitType() == Mech.COCKPIT_TORSO_MOUNTED) {\n cockpitCost = 750000;\n } else if (getCockpitType() == Mech.COCKPIT_DUAL) {\n // FIXME\n cockpitCost = 0;\n } else if (getCockpitType() == Mech.COCKPIT_COMMAND_CONSOLE) {\n // Command Consoles are listed as a cost of 500,000.\n // That appears to be in addition to the primary cockpit.\n cockpitCost = 700000;\n } else if (getCockpitType() == Mech.COCKPIT_SMALL) {\n cockpitCost = 175000;\n } else if (getCockpitType() == Mech.COCKPIT_INDUSTRIAL) {\n cockpitCost = 100000;\n } else {\n cockpitCost = 200000;\n }\n if (hasEiCockpit() && getCrew().getOptions().booleanOption(\"ei_implant\")) {\n cockpitCost = 400000;\n }\n costs[i++] = cockpitCost;\n costs[i++] = 50000;// life support\n costs[i++] = weight * 2000;// sensors\n int muscCost = hasTSM() ? 16000 : 2000;\n costs[i++] = muscCost * weight;// musculature\n costs[i++] = EquipmentType.getStructureCost(structureType) * weight;// IS\n costs[i++] = getActuatorCost();// arm and/or leg actuators\n Engine engine = getEngine();\n costs[i++] = engine.getBaseCost() * engine.getRating() * weight / 75.0;\n if (getGyroType() == Mech.GYRO_XL) {\n costs[i++] = 750000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f) * 0.5;\n } else if (getGyroType() == Mech.GYRO_COMPACT) {\n costs[i++] = 400000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f) * 1.5;\n } else if (getGyroType() == Mech.GYRO_HEAVY_DUTY) {\n costs[i++] = 500000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f) * 2;\n } else {\n costs[i++] = 300000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f);\n }\n double jumpBaseCost = 200;\n // You cannot have JJ's and UMU's on the same unit.\n if (hasUMU()) {\n costs[i++] = Math.pow(getAllUMUCount(), 2.0) * weight * jumpBaseCost;\n } else {\n if (getJumpType() == Mech.JUMP_BOOSTER) {\n jumpBaseCost = 150;\n } else if (getJumpType() == Mech.JUMP_IMPROVED) {\n jumpBaseCost = 500;\n }\n costs[i++] = Math.pow(getOriginalJumpMP(), 2.0) * weight * jumpBaseCost;\n }\n // num of sinks we don't pay for\n int freeSinks = hasDoubleHeatSinks() ? 0 : 10;\n int sinkCost = hasDoubleHeatSinks() ? 6000 : 2000;\n // cost of sinks\n costs[i++] = sinkCost * (heatSinks() - freeSinks);\n costs[i++] = hasFullHeadEject()?1725000:0;\n costs[i++] = getArmorWeight() * EquipmentType.getArmorCost(armorType);\n costs[i++] = getWeaponsAndEquipmentCost(ignoreAmmo);\n\n double cost = 0; // calculate the total\n for (int x = 0; x < i; x++) {\n cost += costs[x];\n }\n\n double omniMultiplier = 0;\n if (isOmni()) {\n omniMultiplier = 1.25f;\n cost *= omniMultiplier;\n }\n costs[i++] = -omniMultiplier; // negative just marks it as multiplier\n\n double weightMultiplier = 1 + (weight / 100f);\n costs[i++] = -weightMultiplier; // negative just marks it as multiplier\n cost = Math.round(cost * weightMultiplier);\n if (detail != null) {\n addCostDetails(cost, detail, costs);\n }\n return cost;\n }", "private Enemy enemyWithLowestHealth(java.util.List<Enemy> enemies){\n Enemy enemyWithLowestHealth = null;\n\n for (Enemy enemy : enemies){\n if (enemyWithLowestHealth == null || enemyWithLowestHealth.getHealth() > enemy.getHealth()){\n enemyWithLowestHealth = enemy;\n }\n }\n\n return enemyWithLowestHealth;\n }", "private int heavyAttack() {\n return attack(6, 2);\n }", "@Override\n \tpublic Solution solve() {\n \t\tfor (int i = 0; i < n; i++) {\n \t\t\tnest[i] = generator.getSolution();\n \t\t}\n \n \t\tfor (int t = 0; t < maxGeneration; t++) { // While (t<MaxGeneration) or\n \t\t\t\t\t\t\t\t\t\t\t\t\t// (stop criterion)\n \t\t\t// Get a cuckoo randomly (say, i) and replace its solution by\n \t\t\t// performing random operations;\n \t\t\tint i = r.nextInt(n);\n \t\t\tSolution randomNest = nest[i];\n \t\t\t//FIXME: randomNest = solutionModifier.modify(nest[i]);\n \n \t\t\t// Evaluate its quality/fitness\n \t\t\tint fi = randomNest.f();\n \n \t\t\t// Choose a nest among n (say, j) randomly;\n \t\t\tint j = r.nextInt(n);\n \t\t\tint fj = f[j];\n \n \t\t\tif (fi > fj) {\n \t\t\t\tnest[i] = randomNest;\n \t\t\t\tf[i] = fi;\n \t\t\t}\n \n \t\t\tsort();\n \t\t\t// A fraction (pa) of the worse nests are abandoned and new ones are built;\n\t\t\tfor(i = n-toAbandon; i<n; i++) {\n \t\t\t\tnest[i] = generator.getSolution();\n \t\t\t}\n \t\t\t\n \t\t\t// Rank the solutions/nests and find the current best;\n \t\t\tsort();\n \t\t}\n \n \t\treturn nest[0];\n \t}", "public void lastChanceGas()\n {\n System.out.print( \"Tank capacity: \" );\n int capacity = scan.nextInt();\n System.out.print( \"Gage reading: \" );\n int gage = scan.nextInt();\n System.out.print( \"Miles per gallon: \" );\n int mpg = scan.nextInt();\n double gasLeft = capacity * ( gage * 0.01 );\n double milesDriveable = gasLeft * mpg;\n if ( milesDriveable >= 200 )\n {\n System.out.println( \"Safe to Proceed!\" );\n }\n else\n {\n System.out.println( \"Get Gas!\" );\n }\n\n }", "private static void runHQ() throws GameActionException {\n\t\tif (Clock.getRoundNum() < 3) {\t\t\t\n\t\t\tif (rc.isActive()) {\n\t\t\t\tDirection spawnDir = dir[rand.nextAnd(7)];\n\t\t\t\tif (rc.senseObjectAtLocation(curLoc.add(spawnDir)) == null) {\n\t\t\t\t\trc.spawn(spawnDir);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif (pastrLocations[0] == null) {\n\t\t\t\tpastrLocations[0] = getBestPastrLocNearMeBasedOnCowGrowthRate();\n\t\t\t\trc.broadcast(0, pastrLocations[0].x * 100 + pastrLocations[0].y);\n\t\t\t}\n\t\t}\n\t\tdouble d = rc.senseCowsAtLocation(new MapLocation(8,11));\n\t\tSystem.out.println(d);\n\t}", "private int tournament()\r\n {\r\n\tint out = spinTheWheel();\r\n\tdouble max = ff.evaluate(chromos.get(out),generation());\r\n\tdouble temp_fitness = 0;\r\n\tint temp_index = 0;\r\n\r\n\tfor(int i = 0; i < selPara - 1 + tourStep*generation(); i++)\r\n\t {\r\n\t\ttemp_index = spinTheWheel();\r\n\t\ttemp_fitness = ff.evaluate(chromos.get(temp_index),generation());\r\n\t\tif(temp_fitness > max)\r\n\t\t {\r\n\t\t\tmax = temp_fitness;\r\n\t\t\tout = temp_index;\r\n\t\t }\r\n\t }\r\n\treturn out;\r\n }", "public Energy getEnergy() {\n return energy;\n }", "final int getNextBuildTarget(int difficulty) {\n/* 1970 */ difficulty = Math.min(5, difficulty);\n/* 1971 */ int start = difficulty * 3;\n/* 1972 */ int templateFound = -1;\n/* */ int x;\n/* 1974 */ for (x = start; x < 17; x++) {\n/* */ \n/* 1976 */ if (this.epicTargetItems[x] <= 0L) {\n/* */ \n/* 1978 */ templateFound = x;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* 1983 */ if (templateFound == -1)\n/* */ {\n/* */ \n/* 1986 */ for (x = start; x > 0; x--) {\n/* */ \n/* 1988 */ if (this.epicTargetItems[x] <= 0L) {\n/* */ \n/* 1990 */ templateFound = x;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* */ }\n/* 1996 */ if (templateFound > -1) {\n/* */ \n/* 1998 */ if (templateFound < 3)\n/* 1999 */ return 717; \n/* 2000 */ if (templateFound < 6)\n/* 2001 */ return 714; \n/* 2002 */ if (templateFound < 9)\n/* 2003 */ return 713; \n/* 2004 */ if (templateFound < 12)\n/* 2005 */ return 715; \n/* 2006 */ if (templateFound < 15) {\n/* 2007 */ return 712;\n/* */ }\n/* 2009 */ return 716;\n/* */ } \n/* 2011 */ return -1;\n/* */ }", "private <T> GeneticResult<T> maxFitness(List<Chromosome<T>> chromosomes, int totalBreedings){\n\t\tChromosome<T> bestFit = fittestChromosome(chromosomes);\n\t\treturn new GeneticResult<T>(bestFit, bestFit.getFitness(), totalBreedings);\n\t}", "private void calculateFitness() {\n\t\tint day1=this.getNumberOfHours()*this.getNumberOfClasses();\n\t\tint day2=2*day1;\n\t\tint day3=3*day1;\n\t\tint day4=4*day1;\n\t\tint day5=5*day1;\n\t\tTeacher_lesson temp=null;\n\t\t//day 1//\n\t\tHashSet<Integer> closedSet=new HashSet<Integer>();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<day1;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day1;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t\t\n\t\t//day2//\n\t\tclosedSet.clear();;\n\t\t\n\t\tfor(int i=day1;i<day2;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day2;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t//day3//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day2;i<day3;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day3;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//day4//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day3;i<day4;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day4;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\t\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t//day5//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day4;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t\t\t\n\t\t}\n\t\t\t/*if(temp.get_td_hour()<0){this.fitness=this.fitness-100;}//adunato na ginei giati o ka8igitis exei parapanw wres apo oti mporei na kanei//\n\t\t\t\telse if (temp.get_td_hour()==0){this.fitness=this.fitness-2;}//meiwnoume giati o ka8igitis 8a epivarin8ei oles tou tis wres thn idia mera//\n\t\t\t\telse{++this.fitness;}//kalh prosegisi*/\n\t\t}\n\t\t//*********************END OF DAILY EVALUATION*****************************//\n\t\t\n\t\t//**********************START OF WEEKLY EVALUATION************************//\n\t\t\n\t\tclosedSet.clear();\n\t\t\n\t int \t_weeklyhours = 1;\n\t \n\t\tfor(int i=0;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp!=null){\n\t\t\tif(!closedSet.contains(this.genes[i])){\n\t\t\t\t\n\t\t\t\n\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\t\t++_weeklyhours; }\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t/*if(_weeklyhours>temp.get_tw_hour()){\n\t\t\t\tthis.fitness=this.fitness-100 ; //adunato na kanei parapanw wres ma8hma//\n\t\t\t}else\n\t\t\t\t{++this.fitness;}*/\n\t\t\tif(_weeklyhours<temp.get_tw_hour()){++this.fitness;}\n\t\t\tclosedSet.add(this.genes[i]);}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//*************END OF WEEKLY EVALUATION**********//\n\t\n\t\t//**START OF LESSON EVALUATION***//\n\t\tArraylistLesson set=new ArraylistLesson();\n\t\tclass_lid templ=null;\n\t\tTeacher_lesson tempj=null;\n\t\tint lid=0;\n\t\tString _class;\n\t\tint _classhours=1;\n\t\tfor(int i=0;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp!=null){\n\t\t\tlid=temp.get_lid();\n\t\t\t_class=temp.get_class();\n\t\t\ttempl=new class_lid(lid,_class);\n\t\t\tif(!set.contains(templ)){\n\t\t\t\t\n\t\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\t\ttempj=getdata(this.genes[j]);{\n\t\t\t\t\t\tif(tempj!=null){\n\t\t\t\t\t\t\tif(temp.get_tid()==tempj.get_tid()){\n\t\t\t\t\t\t\t\tif(temp.get_lid()==tempj.get_lid()&&temp.get_class().equalsIgnoreCase(tempj.get_class())){\n\t\t\t\t\t\t\t\t\t++_classhours;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tint hours;\n\t\t\t\thours=temp.get_lhours();\n\t\t\t\n\t\tif(_classhours==hours){\n\t\t\t++this.fitness;\n\t\t}\n\t\tset.add(templ);\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}", "public void setEnergy(int energy) {\n\t\tthis.energy = energy;\n\t}", "@Test\n @Order(8)\n void taillardTestMoreIterations() {\n try {\n\n for (int i = 0; i < SearchTestUtil.taillardFilenames.length; i++) {\n int output;\n float sumTabu = 0;\n int minTabu = Integer.MAX_VALUE;\n float sumRecuit = 0;\n int minRecuit = Integer.MAX_VALUE;\n System.out.println(\"Run#\" + SearchTestUtil.taillardFilenames[i]);\n assignementProblem.taillardInitializer(SearchTestUtil.taillardFilenames[i]);\n assignementProblem.setNeighborsFunction(NEIGHBORHOOD_TYPE, assignementProblem.getAssignmentData().getLength());\n for (int j = 0; j < 10; j++) {\n assignementProblem.setInCombination(Combination.generateRandom(assignementProblem.getAssignmentData().getLength()));\n\n System.out.println(\"\\n \\t Test#\"+j);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n output = assignementProblem.getF().apply(assignementProblem.getOutCombination());\n sumTabu += output;\n if (output < minTabu) minTabu = output;\n\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n output = assignementProblem.getF().apply(assignementProblem.getOutCombination());\n sumRecuit += output;\n if (output < minRecuit) minRecuit = output;\n }\n\n\n System.out.println(\"\\tAverage tabu \" + sumTabu / 10);\n System.out.println(\"\\tMinimum found \" + minTabu);\n\n System.out.println(\"\\tAverage recuit \" + sumRecuit / 10);\n System.out.println(\"\\tMinimum found \" + minRecuit);\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "int getSuperEffectiveChargeAttacksUsed();", "public double higherFitnessElementCalculator(BlackBoxTree blackBox) {\n distanceFromBlackBox = blackBox.measureDistanceFromCandidate(bestSyntaxTree);\n double distanceWeight = distanceFromBlackBox* 1000 / PARAMs.EPSILON_DISTANCE_FOR_LOWER_EVOLUTION_TO_STOP;//should be in the order 1000\n double effortWeight = effortElement.calcTotalEffort();//should be in the order of 100\n if(RunHigherLevel.PRINT_EVERY_H_FITNESS_ELEMENT_CALCULATION)\n System.out.println(\" calculated hFitnessElement for \"+ blackBox + \"| distanceWeight: \"+distanceWeight+ \", effortWeight: \"+ effortWeight);\n hFitnessElement = distanceWeight + effortWeight;// PARAM set how to calc the hFitnessElement of ParamGA\n\n return distanceFromBlackBox;\n }", "public int getEnergy() {\n\t\treturn energy;\n\t}", "public void play() {\n\t\tthis.initializeTurn();\n\t\twhile(this.getAction() > 0) {\n\t\t\tint choix = RandomInt.randomInt(1,6, this.rand);\n\t\t\tif(choix == 1) {\n\t\t\t\t//add building, preference of Machine\n\t\t\t\tint max = 0;\n\t\t\t\tint maxi = 0;\n\t\t\t\tboolean find = false;\n\t\t\t\tfor(int i = 0; i < this.getBoard().getFiveBuildingCards().size(); i++) {\n\t\t\t\t\tif(this.getBoard().getFiveBuildingCards().get(i) != null) {\n\t\t\t\t\t\tif(this.getBoard().getFiveBuildingCards().get(i) instanceof Machine) {\n\t\t\t\t\t\t\tmaxi = i;\n\t\t\t\t\t\t\tfind = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this.getBoard().getFiveBuildingCards().get(i).getPoint() > max && !find) {\n\t\t\t\t\t\t\tmax = this.getBoard().getFiveBuildingCards().get(i).getPoint();\n\t\t\t\t\t\t\tmaxi = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.addBuilding(this.getBoard().getFiveBuildingCards().get(maxi));\n\t\t\t\tDesignString.printBorder(\"Ouverture d'un chantier\");\n\t\t\t}\n\t\t\telse if(choix == 2 || choix == 3) {\n\t\t\t\t//add worker, preference of the lowest one\n\t\t\t\tint min = 999;\n\t\t\t\tint mini = 0;\n\t\t\t\tfor(int i = 0; i < this.getBoard().getFiveWorkerCards().size(); i++) {\n\t\t\t\t\tif(this.getBoard().getFiveWorkerCards().get(i) != null) {\n\t\t\t\t\t\tif(this.getBoard().getFiveWorkerCards().get(i).getCost() < min && this.getBoard().getFiveWorkerCards().get(i).getCost() >= this.getCoin()) {\n\t\t\t\t\t\t\tmin = this.getBoard().getFiveWorkerCards().get(i).getCost();\n\t\t\t\t\t\t\tmini = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(this.getBoard().getFiveWorkerCards().get(mini).getCost() >= this.getCoin()) {\n\t\t\t\t\tDesignString.printBorder(\"Échange action vers écus\");\n\t\t\t\t\tthis.actionToCoins(RandomInt.randomInt(1,this.getAction(), this.rand));\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tDesignString.printBorder(\"Recrutement d'un ouvrier\");\n\t\t\t\t\tthis.hireWorker(this.getBoard().getFiveWorkerCards().get(mini));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(choix == 4 || choix == 5 || choix == 6) {\n\t\t\t\t//worker to building. Preference to the started building. If it can't play, preference to action to coin\n\t\t\t\tIBuilding building = null;\n\t\t\t\tIWorker worker = null;\n\t\t\t\tif(this.getWorkerCards().size() > 0) {\n\t\t\t\t\tif(this.getStartedBuilding().size() > 0) {\n\t\t\t\t\t\tchoix = RandomInt.randomInt(0,2,this.rand);\n\t\t\t\t\t\tif(choix%2 == 0) {\n\t\t\t\t\t\t\tint max = 0;\n\t\t\t\t\t\t\tint maxi = 0;\n\t\t\t\t\t\t\tfor(int i = 0; i < this.getStartedBuilding().size(); i++) {\n\t\t\t\t\t\t\t\tif(this.getStartedBuilding().get(i) != null) {\n\t\t\t\t\t\t\t\t\tif(this.getStartedBuilding().get(i).getWorkerOn().size() > max) {\n\t\t\t\t\t\t\t\t\t\tmax = this.getStartedBuilding().get(i).getWorkerOn().size();\n\t\t\t\t\t\t\t\t\t\tmaxi = i;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbuilding = this.getStartedBuilding().get(maxi);\n\n\t\t\t\t\t\t\tworker = this.getWorkerCards().get(RandomInt.randomInt(0,this.getWorkerCards().size()-1, this.rand));\n\n\t\t\t\t\t\t\twhile(worker != null && worker.getCost() > this.getCoin() && this.getAction() > 0) {\n\t\t\t\t\t\t\t\tworker = this.getWorkerCards().get(RandomInt.randomInt(0,this.getWorkerCards().size()-1, this.rand));\n\t\t\t\t\t\t\t\tchoix = RandomInt.randomInt(1,5,this.rand);\n\t\t\t\t\t\t\t\tif(choix == 1) {\n\t\t\t\t\t\t\t\t\tDesignString.printBorder(\"Échange action vers écus\");\n\t\t\t\t\t\t\t\t\tthis.actionToCoins(RandomInt.randomInt(1,this.getAction(), this.rand));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(this.getAction() >= this.getRemoveBuilding(building)) {\n\t\t\t\t\t\t\t\tDesignString.printBorder(\"Envoi d'un ouvrier sur un chantier\");\n\t\t\t\t\t\t\t\tthis.workerToBuilding(worker, building);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbuilding = this.getBuildingsCards().get(RandomInt.randomInt(0,this.getBuildingsCards().size()-1, this.rand));\n\t\t\t\t\t\t\twhile(building == null) {\n\t\t\t\t\t\t\t\tbuilding = this.getBuildingsCards().get(RandomInt.randomInt(0,this.getBuildingsCards().size()-1, this.rand));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tworker = this.getWorkerCards().get(RandomInt.randomInt(0,this.getWorkerCards().size()-1, this.rand));\n\t\t\t\t\t\t\twhile(worker != null && worker.getCost() > this.getCoin() && this.getAction() > 0) {\n\t\t\t\t\t\t\t\tworker = this.getWorkerCards().get(RandomInt.randomInt(0,this.getWorkerCards().size()-1, this.rand));\n\t\t\t\t\t\t\t\tchoix = RandomInt.randomInt(1,5,this.rand);\n\t\t\t\t\t\t\t\tif(choix == 1) {\n\t\t\t\t\t\t\t\t\tDesignString.printBorder(\"Échange action vers écus\");\n\t\t\t\t\t\t\t\t\tthis.actionToCoins(RandomInt.randomInt(1,this.getAction(), this.rand));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(this.getAction() >= this.getRemoveBuilding(building)) {\n\t\t\t\t\t\t\t\tDesignString.printBorder(\"Envoi d'un ouvrier sur un chantier\");\n\t\t\t\t\t\t\t\tthis.workerToBuilding(worker, building);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(this.getBuildingsCards().size() > 0) {\n\t\t\t\t\t\tbuilding = this.getBuildingsCards().get(RandomInt.randomInt(0,this.getBuildingsCards().size()-1, this.rand));\n\t\t\t\t\t\twhile(building == null) {\n\t\t\t\t\t\t\tbuilding = this.getBuildingsCards().get(RandomInt.randomInt(0,this.getBuildingsCards().size()-1, this.rand));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tworker = this.getWorkerCards().get(RandomInt.randomInt(0,this.getWorkerCards().size()-1, this.rand));\n\t\t\t\t\t\twhile(worker != null && worker.getCost() > this.getCoin() && this.getAction() > 0) {\n\t\t\t\t\t\t\tworker = this.getWorkerCards().get(RandomInt.randomInt(0,this.getWorkerCards().size()-1, this.rand));\n\t\t\t\t\t\t\tchoix = RandomInt.randomInt(1,5,this.rand);\n\t\t\t\t\t\t\tif(choix == 1) {\n\t\t\t\t\t\t\t\tDesignString.printBorder(\"Échange action vers écus\");\n\t\t\t\t\t\t\t\tthis.actionToCoins(RandomInt.randomInt(1,this.getAction(), this.rand));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this.getAction() >= this.getRemoveBuilding(building)) {\n\t\t\t\t\t\t\tDesignString.printBorder(\"Envoi d'un ouvrier sur un chantier\");\n\t\t\t\t\t\t\tthis.workerToBuilding(worker, building);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public double getEnergy() {\n\t\treturn energy;\n\t}", "private int GetBestCard(Card[] card) {\n\t int iPos = 0;\n\t int iWeightTemp = 0;\n\t int iWeight[] = new int[8];\n\t for (int i = 0; i < 8; i++){\n\t\t iWeight[i] = -1;\n\t }\n\t // For each selectable card, work out a weight, the highest weight is the one selected.\n\t // The weight is worked out by the distance another of the players cards is from playable ones, with no playable cards in between\n\t Card myCard, nextCard;\n\t for (int i = 0; i < 8; i++){\n\t\t if (card[i] != null){\n\t\t\t // if card value > 7\n\t\t\t if (card[i].GetValue() > 7){\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\n\t\t\t if (card[i].GetValue() < 7){\n\t\t\t\t // do you have cards that are lower than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\t\n\t\t\t if (card[i].GetValue() == 7){\n\t\t\t\t // do you have cards that are in this suit\n\t\t\t\t myCard = card[i];\n\t\t\t\t int iWeightTemp1;\n\t\t\t\t iWeightTemp = 0;\n\t\t\t\t iWeightTemp1 = 0;\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tmyCard = card[i];\n\t\t\t \t// do you have cards that are lower than this card\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp1)\n\t\t\t \t\t\t\tiWeightTemp1 = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t} \t\n\t\t\t \tiWeight[i] = iWeightTemp + iWeightTemp1;\n\t\t\t \t\t\n\t\t\t }\t\t\t \n\t\t }\n\t\t \t \n\t }\n\t boolean bLoopAceKing = true;\n\t int iMaxTemp = 0;\n\t int iMaxCount = 0;\t\n\t int[] iMaxs;\n\t iMaxs = new int[8];\n\t while (bLoopAceKing){\n\t\t for (int i = 0; i < 8; i++){\n\t\t\t if (iWeight[i] >= iMaxTemp){\n\t\t\t\t if (iWeight[i] == iMaxTemp){\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t iMaxTemp = iWeight[i];\n\t\t\t\t\t iMaxs = new int[8];\n\t\t\t\t\t iMaxCount = 0;\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\t\t\t \n\t\t\t }\t \n\t\t }\n\t\t boolean bAceKing = false;\n\t\t // If the top weight is zero, meaning your options don't help you, then play the one that is closest to ace/king\n\t\t if (iMaxTemp == 0 && iMaxCount > 1){\n\t\t\t for (int k = 0; k < iMaxCount; k++){\n\t\t\t\t\t iWeight[iMaxs[k]] = Math.abs(card[iMaxs[k]].GetValue()-7);\n\t\t\t\t\t bAceKing = true;\t\t\t\t \n\t\t\t } \t\t \n\t\t }\n\t\t if (bAceKing){\n\t\t\t bLoopAceKing = true;\n\t\t\t iMaxs = new int[8];\n\t\t\t iMaxTemp = 0;\n\t\t\t iMaxCount = 0;\t\t\t \n\t\t }\n\t\t else \n\t\t\t bLoopAceKing = false;\n\t }\n\t if (iMaxCount == 1)\n\t\t iPos = iMaxs[iMaxCount-1];\n\t else {\n\t\t Random generator = new Random();\n\t\t int randomIndex = generator.nextInt( iMaxCount );\n\t\t iPos = iMaxs[randomIndex];\n\t }\n\t\t \n\t return iPos;\n\t \n }", "private List<Double> MinimaxAlgorithm(MinimaxNode<GameState> node, int dataCount){\n if(node.getNumberOfChildren() == 0){ //checks to see if terminal node\n List<Double> heuristics = new ArrayList();\n heuristics.addAll(calculateHeuristic(node.getState()));\n return heuristics;\n }\n else{ //will maximise all the scores for each player.\n double value = Double.NEGATIVE_INFINITY;\n double checkValue;\n int bestMove;\n List<Double> heuristics = new ArrayList();\n if(node.getIfChanceNode()){ //checks if current node is a chance node, if so, times \n for (int i = 0; i < node.getChildren().size(); i++){\n List<Double> tempHeuristics = new ArrayList();\n tempHeuristics.addAll(MinimaxAlgorithm(node.getChildren().get(i),dataCount+1));\n checkValue = node.getChildren().get(i).getProbability() * tempHeuristics.get(node.getNodeIndex());\n value = Math.max(value, checkValue);//maximises the score.\n if(checkValue == value){\n heuristics.addAll(tempHeuristics); \n }\n if(dataCount == 0){//checks if this is the root node\n if(checkValue == value){\n MinimaxPlayer.optimalMoves = node.getChildren().get(i).getState().getOrientation(node.getNodeIndex()); \n }\n } \n }\n }\n else{\n for (int i = 0; i < node.getChildren().size(); i++){\n List<Double> tempHeuristics = new ArrayList();\n tempHeuristics.addAll(MinimaxAlgorithm(node.getChildren().get(i),dataCount+1));\n checkValue = tempHeuristics.get(node.getNodeIndex());\n value = Math.max(value, checkValue);//maximises the score.\n if(checkValue == value){\n heuristics.addAll(tempHeuristics); \n }\n if(dataCount == 0){//checks if this is the root node\n if(checkValue == value){\n MinimaxPlayer.optimalMoves = node.getChildren().get(i).getState().getOrientation(node.getNodeIndex()); \n }\n } \n } \n }\n return heuristics;\n } \n }", "int getLegs();", "public int getEnergy(){\n\t\tEnumeration students = table.keys(); \n\t\tint totalEnergy=0;\n\t\tHashtable<String,String> assignedProjects= new Hashtable<String,String>();\n\t\tint totalpenalties =0;\n\t while(students.hasMoreElements()) {\n\t CandidateAssignment cand = table.get((String) students.nextElement()); \n\t totalEnergy+=cand.getEnergy();\n\t \n\t String project = cand.getAssignedProject(); \n\t if(!assignedProjects.containsKey(project)){\n\t \t assignedProjects.put(project, project);\n\t }else{\n\t \t totalpenalties+=penalty; \n\t }\n\t }\n\t\treturn totalEnergy+ totalpenalties;\n\t}", "private Groepen bepaalOptimaleGroep(ArrayList<Groepen> mogelijkegroepen) {\r\n\t\tGroepen beste = null;\r\n\t\tint beste_spreiding = Integer.MAX_VALUE;\r\n\t\tint beste_groepverschil = 0;\r\n\t\tdouble beste_stddev = Double.MAX_VALUE;\r\n\t\tfor (Groepen groepen : mogelijkegroepen) {\r\n\t\t\t//if (groepen.getKleinsteGroep() >= 4) {\r\n\t\t\t\tif (groepen.getSpreidingTotaal() < beste_spreiding) {\r\n\t\t\t\t\tbeste = groepen;\r\n\t\t\t\t\tbeste_spreiding = groepen.getSpreidingTotaal();\r\n\t\t\t\t\tbeste_groepverschil = groepen.getSomGroepVerschil();\r\n\t\t\t\t\tbeste_stddev = groepen.getSomStdDev();\r\n\t\t\t\t} else if (groepen.getSpreidingTotaal() == beste_spreiding) {\r\n\t\t\t\t\tif (groepen.getSomGroepVerschil() > beste_groepverschil) {\r\n\t\t\t\t\t\tbeste = groepen;\r\n\t\t\t\t\t\tbeste_spreiding = groepen.getSpreidingTotaal();\r\n\t\t\t\t\t\tbeste_groepverschil = groepen.getSomGroepVerschil();\r\n\t\t\t\t\t\tbeste_stddev = groepen.getSomStdDev();\r\n\t\t\t\t\t} else if (groepen.getSomStdDev() < beste_stddev) {\r\n\t\t\t\t\t\tbeste = groepen;\r\n\t\t\t\t\t\tbeste_spreiding = groepen.getSpreidingTotaal();\r\n\t\t\t\t\t\tbeste_groepverschil = groepen.getSomGroepVerschil();\r\n\t\t\t\t\t\tbeste_stddev = groepen.getSomStdDev();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t}\r\n\t\treturn beste;\r\n\t}", "int getMinigameDefenseChancesLeft();", "public static Action attackEP(final int energy) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.getGrid().isValid(a.getLocation().getAdjacentLocation(a.getDirection()))) {\n Actor b = a.getGrid().get(a.getLocation().getAdjacentLocation(a.getDirection()));\n if(b instanceof DestructibleActor) {\n if(a.getHealth() * 10 + a.getEnergy() >= energy) {\n ((DestructibleActor) b).damage((int) (Math.pow(energy + 4, .5) - 2), a);\n\n a.energy -= getCost();\n }\n }\n }\n }\n\n @Override\n public int getCost() {\n return energy;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return energy;\n }\n\n @Override\n public String toString() {\n return \"AttackEP(\" + energy + \")\";\n }\n };\n }", "@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}", "private int getClosestPowersHigh(int reported) {\n for (int power : AudioSettings.POWERS_TWO_HIGH) {\n if (reported <= power) {\n return power;\n }\n }\n // didn't find power, return reported\n return reported;\n }", "public void generateNextGeneration() {\n int neighbours;\n int minimum = Integer.parseInt(PreferencesActivity\n .getMinimumVariable(this._context));\n int maximum = Integer.parseInt(PreferencesActivity\n .getMaximumVariable(this._context));\n int spawn = Integer.parseInt(PreferencesActivity\n .getSpawnVariable(this._context));\n\n minimum = 2;\n maximum = 3;\n spawn = 3;\n\n int[][] nextGenerationLifeGrid = new int[HEIGHT][WIDTH];\n\n\n\n for (int h = 0; h < HEIGHT; h++) {\n for (int w = 0; w < WIDTH; w++) {\n neighbours = calculateNeighbours(h, w);\n\n\n if (_lifeGrid[h][w] != 0) {\n if ((neighbours >= minimum) && (neighbours <= maximum)) {\n nextGenerationLifeGrid[h][w] = neighbours;\n }\n\n } else {\n if (neighbours == spawn) {\n nextGenerationLifeGrid[h][w] = spawn;\n\n }\n }\n\n }\n\n }\n\n copyGrid(nextGenerationLifeGrid, _lifeGrid);\n\n }", "private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }", "private void randomizePowers(EliteMobProperties eliteMobProperties) {\n\n if (hasCustomPowers) return;\n if (eliteMobTier < 1) return;\n\n int availableDefensivePowers = 0;\n int availableOffensivePowers = 0;\n int availableMiscellaneousPowers = 0;\n int availableMajorPowers = 0;\n\n if (eliteMobTier >= 1) availableDefensivePowers = 1;\n if (eliteMobTier >= 2) availableOffensivePowers = 1;\n if (eliteMobTier >= 3) availableMiscellaneousPowers = 1;\n if (eliteMobTier >= 4) availableMajorPowers = 1;\n if (eliteMobTier >= 5) availableDefensivePowers = 2;\n if (eliteMobTier >= 6) availableOffensivePowers = 2;\n if (eliteMobTier >= 7) availableMiscellaneousPowers = 2;\n if (eliteMobTier >= 8) availableMajorPowers = 2;\n\n //apply defensive powers\n applyPowers((HashSet<ElitePower>) eliteMobProperties.getValidDefensivePowers().clone(), availableDefensivePowers);\n\n //apply offensive powers\n applyPowers((HashSet<ElitePower>) eliteMobProperties.getValidOffensivePowers().clone(), availableOffensivePowers);\n\n //apply miscellaneous powers\n applyPowers((HashSet<ElitePower>) eliteMobProperties.getValidMiscellaneousPowers().clone(), availableMiscellaneousPowers);\n\n //apply major powers\n applyPowers((HashSet<ElitePower>) eliteMobProperties.getValidMajorPowers().clone(), availableMajorPowers);\n\n MinorPowerPowerStance minorPowerStanceMath = new MinorPowerPowerStance(this);\n MajorPowerPowerStance majorPowerPowerStance = new MajorPowerPowerStance(this);\n\n }", "public void getProbe () {\n double prxg;\n int index;\n double effaoa = effective_aoa();\n /* get variables in the generating plane */\n if (Math.abs(ypval) < .01) ypval = .05;\n getPoints(xpval,ypval);\n\n solver.getVel(lrg,lthg);\n loadProbe();\n\n pxg = lxgt;\n pyg = lygt;\n prg = lrgt;\n pthg = lthgt;\n pxm = lxmt;\n pym = lymt;\n /* smoke */\n if (pboflag == 3 ) {\n prxg = xpval;\n for (index =1; index <=POINTS_COUNT; ++ index) {\n getPoints(prxg,ypval);\n xg[19][index] = lxgt;\n yg[19][index] = lygt;\n rg[19][index] = lrgt;\n thg[19][index] = lthgt;\n xm[19][index] = lxmt;\n ym[19][index] = lymt;\n if (stall_model_type != STALL_MODEL_IDEAL_FLOW) { // stall model\n double apos = stall_model_type == STALL_MODEL_DFLT ? +10 : stall_model_apos;\n double aneg = stall_model_type == STALL_MODEL_DFLT ? -10 : stall_model_aneg;\n if (xpval > 0.0) {\n if (effaoa > apos && ypval > 0.0) { \n ym[19][index] = ym[19][1];\n } \n if (effaoa < aneg && ypval < 0.0) {\n ym[19][index] = ym[19][1];\n }\n }\n if (xpval < 0.0) {\n if (effaoa > apos && ypval > 0.0) { \n if (xm[19][index] > 0.0) {\n ym[19][index] = ym[19][index-1];\n }\n } \n if (effaoa < aneg && ypval < 0.0) {\n if (xm[19][index] > 0.0) {\n ym[19][index] = ym[19][index-1];\n }\n }\n }\n }\n solver.getVel(lrg,lthg);\n prxg = prxg + vxdir*STEP_X;\n }\n }\n return;\n }", "protected void saveStateAsLowestEnergy() {\n\tbestEverPoints = getPoints();\n\tbestEverStateEnergy = currentStateEnergy;\n }", "@Test\n public void testBuild() {\n System.out.println(\"build\");\n game.getPlayer().setEps(0);\n assertEquals((Integer) 1, building.build());\n assertEquals((Integer) 0, game.getPlayer().getEps());\n \n game.getPlayer().setEps(600);\n assertEquals((Integer) 3, building.build());\n assertEquals((Integer) 600, game.getPlayer().getEps());\n \n game.getPlayer().setEps(800);\n assertEquals((Integer) 0, building.build());\n assertEquals((Integer) 300, game.getPlayer().getEps());\n \n game.getPlayer().setEps(1000);\n assertEquals((Integer) 2, building.build());\n assertEquals((Integer) 1000, game.getPlayer().getEps());\n }", "static double[] evolveWeights() throws Exception {\n\t\t// Create a random initial population\n\t\tRandom r = new Random();\n\t\t// Matrix is a two dimensional array, populationSize are rows, Genes are columns\n\t\tMatrix population = new Matrix(populationSize, numberofGenes);\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\t// returns elements(genes) of every row\n\t\t\t// Think of every row as a seperate chromosome of parent\n\t\t\tdouble[] chromosome = population.row(i);\n\t\t\t// create every gene for each chrosome in the population\n\t\t\tfor (int j = 0; j < chromosome.length; j++) {\n\t\t\t\tdouble gene = 0.03 * r.nextGaussian();\n\t\t\t\tchromosome[j] = gene;\n\t\t\t}\n\t\t}\n\n\t\tint generationNum = 0;\n\t\t// do battle with chromosomes until winning condition is found\n\t\t// Controller.doBattleNoGui(new ReflexAgent(), new\n\t\t// NeuralAgent(population.row(0)))\n\t\twhile (Controller.doBattleNoGui(new ReflexAgent(), new NeuralAgent(population.row(0))) != -1) {\n\n\t\t\tSystem.out.println(\"Generation \" + (generationNum));\n\n\t\t\tint mightLive = r.nextInt(100);\n\n\t\t\tif (generationNum == 10)\n\t\t\t\tmutationRate -= 0.01;\n\t\t\tif (generationNum == 20)\n\t\t\t\tmutationRate -= 0.02;\n\t\t\tif (generationNum == 30)\n\t\t\t\tmutationRate -= 0.02;\n\n\t\t\t// Mutate the genes of the current population\n\t\t\tfor (int y = 0; y < populationSize; y++) {\n\t\t\t\tfor (int x = 0; x < numberofGenes; x++) {\n\t\t\t\t\tif (Math.random() <= mutationRate) {\n\t\t\t\t\t\tpopulation.changeGene(x, y, r.nextGaussian());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Make random number of battles\n\t\t\tfor (int i = 0; i < 40; i++) {\n\t\t\t\t// Create two teams with two random chromosomes from the population\n\t\t\t\tint soldier_a = r.nextInt(population.rows());\n\t\t\t\tint soldier_b = r.nextInt(population.rows());\n\n\t\t\t\t// Ensure that both teams don't have the same chromosome\n\t\t\t\tif (soldier_a == soldier_b)\n\t\t\t\t\tsoldier_b = r.nextInt(population.rows());\n\n\t\t\t\t// Do Battle between teams and select winner\n\t\t\t\tif (Controller.doBattleNoGui(new NeuralAgent(population.row(soldier_a)),\n\t\t\t\t\t\tnew NeuralAgent(population.row(soldier_b))) == 1) {\n\t\t\t\t\t// Chooses if the winner survives\n\t\t\t\t\tif (mightLive < winnerSurvivalRate)\n\t\t\t\t\t\tpopulation.removeRow(soldier_b);\n\t\t\t\t\telse\n\t\t\t\t\t\tpopulation.removeRow(soldier_a);\n\t\t\t\t}\n\n\t\t\t\telse if (Controller.doBattleNoGui(new NeuralAgent(population.row(soldier_a)),\n\t\t\t\t\t\tnew NeuralAgent(population.row(soldier_b))) == -1) {\n\t\t\t\t\t// Chooses if the winner survives\n\t\t\t\t\tif (mightLive < winnerSurvivalRate)\n\t\t\t\t\t\tpopulation.removeRow(soldier_a);\n\t\t\t\t\telse\n\t\t\t\t\t\tpopulation.removeRow(soldier_b);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Reproduce for the population (This is where the magic happens)\n\t\t\t// int currentPopulation = population.rows();\n\t\t\twhile (population.rows() < 100) {\n\t\t\t\t// Retrieve random parent\n\t\t\t\tint parentID = r.nextInt(population.rows());\n\t\t\t\tdouble[] parent = population.row(parentID);\n\t\t\t\tint[] potentialPartners = new int[10];\n\t\t\t\tint abs_min_value = Integer.MIN_VALUE;\n\t\t\t\tBoolean foundpartner = false;\n\t\t\t\tint partner = 0;\n\n\t\t\t\tfor (int i = 0; i < potentialPartners.length; i++) {\n\t\t\t\t\tint potentialPartnerID = r.nextInt(population.rows());\n\t\t\t\t\tif (parentID == potentialPartnerID)\n\t\t\t\t\t\tpotentialPartnerID = r.nextInt(population.rows());\n\t\t\t\t\tpotentialPartners[i] = potentialPartnerID;\n\t\t\t\t}\n\n\t\t\t\tfor (int i = 0; i < potentialPartners.length; i++) // Finding most compatiable parent #2.\n\t\t\t\t{\n\t\t\t\t\tint compatiablity = similarities(parent, population.row(potentialPartners[i]));\n\t\t\t\t\tif (compatiablity > abs_min_value) {\n\t\t\t\t\t\tpartner = potentialPartners[i];\n\t\t\t\t\t\tfoundpartner = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (foundpartner == false)\n\t\t\t\t\tpartner = r.nextInt(population.rows());\n\n\t\t\t\tdouble[] secondParent = population.row(partner);\n\t\t\t\tdouble[] newChild = population.newRow();\n\t\t\t\tint splitpoint = r.nextInt((int) numberofGenes / 4);\n\n\t\t\t\tfor (int i = 0; i < splitpoint; i++) // logic to a for loop and two if statements\n\t\t\t\t\tnewChild[i] = parent[i];\n\t\t\t\tfor (int i = splitpoint; i < numberofGenes; i++)\n\t\t\t\t\tnewChild[i] = secondParent[i];\n\n\t\t\t\t// for (int i = 0; i < population.rows(); i++) {\n\t\t\t\t// if (Controller.doBattleNoGui(new ReflexAgent(), new\n\t\t\t\t// NeuralAgent(population.row(i))) == -1) {\n\t\t\t\t// population.row(i) = population.newRow();\n\t\t\t\t// numOfWins++;\n\t\t\t\t// } else { }\n\n\t\t\t\t// Test for the best in the given population\n\t\t\t\t// win_Collection.add(numOfWins);\n\t\t\t\t// printWeights(population.row(0));\n\n\t\t\t}\n\t\t\tgenerationNum++;\n\t\t\tfor (int i = 0; i < population.rows(); i++) {\n\t\t\t\tif (Controller.doBattleNoGui(new ReflexAgent(), new NeuralAgent(population.row(i))) == -1) {\n\t\t\t\t\tnumOfWins++;\n\t\t\t\t\t// population.row(i) = population.newRow();\n\t\t\t\t} else {\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Number of Winners: \" + numOfWins);\n\t\t\tnumOfWins = 0;\n\n\t\t}\n\t\tprintWeights(population.row(0));\n\t\treturn population.row(0);\n\t}", "public double getEnergy() {\n\t\treturn _energy;\n\t}", "int getNextLevelGold();", "public void setEnergy (double energy) {\n\t this.energy = energy;\n\t}", "@Override\n\tprotected double[] calculateNeighbourhoodBest(int i) {\n\t\t\t//System.out.println(\"Gbest particle from local typology!\");\n\t\t\tint indexBestParticle = i;\n\t\t\tint indexLeftNeighbour = (i > 0) ? i - 1 : swarmSize - 1;\n\t\t\tint indexRightNeighbour = (i < swarmSize - 1) ? i + 1 : 0;\t\t\n\t\t\t\t\t\n\t\t\tdouble nBestFitness = swarm.get(i).getPBestFitness();\n\t\t\tdouble leftNeighborParticlePBestFitness = swarm.get(indexLeftNeighbour).getPBestFitness();\n\t\t\tdouble rightNeighborParticlePBestFitness = swarm.get(indexRightNeighbour).getPBestFitness();\n\t\t\t\t\t\n\t\t\tif (leftNeighborParticlePBestFitness < nBestFitness) {\n\t\t\t\tindexBestParticle = indexLeftNeighbour;\n\t\t\t\tnBestFitness = leftNeighborParticlePBestFitness;\n\t\t\t}\n\t\t\tif (rightNeighborParticlePBestFitness < nBestFitness) {\n\t\t\t\tindexBestParticle = indexRightNeighbour;\n\t\t\t\tnBestFitness = rightNeighborParticlePBestFitness;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn swarm.get(indexBestParticle).getPBest();\n\t\t\t//return swarm.get(indexBestParticle);\n\t\t\t\n\t}" ]
[ "0.6357397", "0.5953301", "0.5892612", "0.58895636", "0.57693315", "0.5643365", "0.5633733", "0.56139505", "0.55815506", "0.55766565", "0.55723643", "0.55588484", "0.55292475", "0.552384", "0.54867864", "0.5483327", "0.5473977", "0.54609734", "0.5454374", "0.54296947", "0.54166687", "0.54038006", "0.5400588", "0.53961116", "0.539244", "0.5380778", "0.5379338", "0.53539246", "0.5343238", "0.53383094", "0.5335476", "0.5334847", "0.53144234", "0.52972347", "0.5284018", "0.5283383", "0.5275223", "0.5270221", "0.5260506", "0.5260375", "0.52525014", "0.5249727", "0.5249004", "0.52412486", "0.5237459", "0.5237192", "0.5231328", "0.52249426", "0.521877", "0.52178484", "0.5209941", "0.51961184", "0.5183701", "0.5178128", "0.51730305", "0.51562065", "0.51561785", "0.51480764", "0.5142906", "0.5141424", "0.51399994", "0.5138985", "0.51380205", "0.5135941", "0.51331675", "0.51313794", "0.5130888", "0.51180285", "0.5114376", "0.511069", "0.51027834", "0.5098851", "0.50979155", "0.5097356", "0.5097075", "0.50947857", "0.5093383", "0.5091816", "0.5088336", "0.5084426", "0.50777495", "0.50774974", "0.50759166", "0.50725216", "0.5071042", "0.50669295", "0.5066821", "0.5064736", "0.50624603", "0.50535786", "0.5049493", "0.5040784", "0.5039154", "0.50357807", "0.50311005", "0.50306624", "0.50294155", "0.5027513", "0.50253135", "0.502379" ]
0.67861176
0
/ GreedyIronCurtain: either health is low enemy's turrets are more than 8 enemy activates iron curtain my turrets are less than enemy's turrets
private boolean checkGreedyIronCurtain() { return (myself.health < 30 || enTotal.get(0) >= 8 || opponent.isIronCurtainActive || this.myTotal.get(0) < this.enTotal.get(0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkIfHungry(){\r\n\t\tif (myRC.getEnergonLevel() * 2.5 < myRC.getMaxEnergonLevel()) {\r\n\t\t\tmission = Mission.HUNGRY;\r\n\t\t}\r\n\t}", "private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }", "protected abstract float _getGrowthChance();", "private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }", "int getMinigameDefenseChancesLeft();", "public static double evaluateSurvivability(Board b, int team) {\n Optional<Leader> ol = b.getPlayer(team).getLeader();\n if (ol.isEmpty()) {\n return 0;\n }\n Leader l = ol.get();\n if (l.health <= 0) { // if dead\n return -99999 + l.health; // u dont want to be dead\n }\n int shield = l.finalStats.get(Stat.SHIELD);\n Supplier<Stream<Minion>> attackingMinions = () -> b.getMinions(team * -1, true, true);\n // TODO add if can attack check\n // TODO factor in damage limiting effects like durandal\n int potentialDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int potentialLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int threatenDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int threatenLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int attackers = attackingMinions.get()\n .map(m -> m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n List<Minion> defendingMinons = b.getMinions(team, false, true)\n .filter(m -> m.finalStats.get(Stat.WARD) > 0)\n .collect(Collectors.toList());\n int leaderhp = l.health + shield;\n int ehp = defendingMinons.stream()\n .map(m -> m.health)\n .reduce(leaderhp, Integer::sum);\n long defenders = defendingMinons.size();\n if (shield > 0) {\n defenders++;\n }\n if (b.getCurrentPlayerTurn() != team) {\n threatenDamage = potentialDamage;\n threatenLeaderDamage = potentialLeaderDamage;\n }\n // if there are more defenders than attacks, then minions shouldn't be\n // able to touch face\n if (defenders >= attackers) {\n ehp = Math.max(ehp - threatenDamage, leaderhp);\n } else {\n ehp = Math.max(ehp - threatenDamage, leaderhp - threatenLeaderDamage);\n if (ehp <= 0) {\n if (team == b.getCurrentPlayerTurn()) {\n // they're threatening lethal if i dont do anything\n return -30 + ehp;\n } else {\n // they have lethal, i am ded\n return -60 + ehp;\n }\n }\n }\n return 6 * Math.log(ehp);\n }", "public void lowerHealth() {\n Greenfoot.playSound(\"hit.wav\");\n lives--;\n move(-100);\n if (lives == 0) {\n die();\n }\n }", "double getCritChance();", "public boolean wantToFight(int[] enemyAbilities) {\n boolean fight = boldness < 50;//After 50 fights, believes self unstoppable \n int huntable = 0;\n for(int ability : enemyAbilities){\n if(ability == 1)\n huntable++;\n }\n if(huntable >= 3){\n fight = true;\n }//if at least 3 of the visible stats are 1 then consider this prey and attack\n else if((float)enemyAbilities[1] / (float)getDefenseLvl() <= (float)getStrengthLvl() + (float)(getClevernessLvl() % 10) / (float)enemyAbilities[2] && enemyAbilities[0] / 5 < getLifeLvl() / 5)\n fight = true;//If I fancy my odds of coming out on top, float division for chance\n if(fight){//Count every scar\n boldness++;//get more bold with every battle\n life += enemyAbilities[0] / 5;\n str += enemyAbilities[1] / 5;\n def += enemyAbilities[2] / 5;\n clever += (10 - (enemyAbilities[0] + enemyAbilities[1] + enemyAbilities[2] + enemyAbilities[3] - 4)) / 5;//count the human cleverness attained or the enemies who buffed clever early\n }\n return fight;\n }", "public boolean Fight(Player p)\n{\n\tint m=1;\n\t int t=1;\n int temp=0;\n int player1=this.weapon-1;\n int player2=p.weapon-1;\n\n\t int[] a=new int[this.weapon];\n int[] b=new int[p.weapon];\n System.out.println(\"XXxxXXxxXXxxXXxxXX FIGHT XXxxXXxxXXxxXXxxXX\\n\");\nwhile(this.health>0&&p.health>0)\n{\n System.out.println(\"~~~~~Round: \" +m+\"~~~~~\");\n m++;\n System.out.println(\"++\"+this.name+\" Health: \"+this.health+\" potions.\");\n System.out.println(\"++\"+p.name+\" Health: \"+p.health+\" potions.\");\n\n for (int i=0;i<a.length;i++)\n {\n\ta[i]=this.Roll();\n }\n for(int j=0;j<b.length;j++)\n {\n\tb[j]=p.Roll();\n }\n\n Arrays.sort(a);\n Arrays.sort(b);\n\n System.out.print(this.name+\" has thrown: {\");\n\n for(int i=a.length-1;i>0;i--)\n System.out.print(a[i]+\", \");\n\n System.out.println(a[0]+\"}\");\n\n System.out.print(p.name+\" has thrown: {\");\n for(int j=b.length-1;j>0;j--)\n System.out.print(b[j]+\", \");\n\n System.out.println(b[0]+\"}\");\n\n if(a.length>b.length)\n \ttemp=b.length;\n else\n \ttemp=a.length;\n\n player1=this.weapon-1;\n player2=p.weapon-1;\n t=1;\n while(this.health>0&&p.health>0&&temp>0)\n \t{\n\n System.out.print(\"***Strike \"+t+\": \");\n if(a[player1]==b[player2])\n {\n \tSystem.out.println(\"BOTH suffer blows!!!\");\n \tthis.health-=a[player1]*10;\n \tp.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n \tSystem.out.println(p.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n else if(a[player1]>b[player2])\n {\n \t\tSystem.out.println(p.name+\" does damage!\");\n \tp.health-=a[player1]*10;\n \tSystem.out.println(p.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n }\n else\n {\n \tSystem.out.println(this.name+\" does damage!\");\n \tthis.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n\n player1--;\n player2--;\n\n temp--;\n t++;\n \t}\n\n\n}\nif(this.health<=0)\n return false;\n else\n \treturn true;\n\n}", "@Override\n protected int strengthViability(Creature c){\n int baseViability = super.strengthViability(c);\n if (Elements.elementDamageMultiplier(c,bossFormation.getFrontCreature().getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST * 3);\n }\n if (Elements.elementDamageMultiplier(bossFormation.getFrontCreature(),c.getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST / 3);\n }\n return baseViability;\n }", "private void greedyEnemySpawner(float enemyCap, IEnemyService spawner, World world, GameData gameData) {\r\n while (enemyCap >= MEDIUM_ENEMY_COST) {\r\n\r\n if (enemyCap >= MEDIUM_ENEMY_COST + BIG_ENEMY_COST) {\r\n spawnBigAndMediumEnemy(spawner, world, gameData);\r\n enemyCap -= MEDIUM_ENEMY_COST + BIG_ENEMY_COST;\r\n\r\n } else if (enemyCap >= BIG_ENEMY_COST) {\r\n spawnBigEnemy(spawner, world, gameData);\r\n enemyCap -= BIG_ENEMY_COST;\r\n\r\n } else {\r\n spawnMediumEnemy(spawner, world, gameData);\r\n enemyCap -= MEDIUM_ENEMY_COST;\r\n }\r\n }\r\n }", "private void checkHeatLevels()\n {\n // Computer is switched on and has power reserves.\n if (this.isPowered() && this.isRedstonePowered())\n {\n if (this.getEnergyStored(ForgeDirection.UNKNOWN) <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN))\n {\n // Running computer consumes energy from internal reserve.\n this.consumeInternalEnergy(this.getEnergyConsumeRate());\n }\n\n // Running computer generates heat with excess energy it wastes.\n if (!this.isHeatAboveZero() && worldObj.getWorldTime() % 5L == 0L)\n {\n if (!this.isOverheating() && !this.isHeatedPastTriggerValue())\n {\n // Raise heat randomly from zero to five if we are not at optimal temperature.\n this.setHeatLevelValue(this.getHeatLevelValue() + worldObj.rand.nextInt(10));\n }\n else if (!this.isOverheating() && this.isHeatedPastTriggerValue() && this.getFluidAmount() > FluidContainerRegistry.BUCKET_VOLUME)\n {\n // Computer has reached operating temperature and has water to keep it cool.\n this.setHeatLevelValue(this.getHeatLevelValue() + worldObj.rand.nextInt(2));\n }\n else if (!this.isOverheating() && this.getFluidAmount() <= FluidContainerRegistry.BUCKET_VOLUME)\n {\n // Computer is running but has no water to keep it cool.\n this.setHeatLevelValue(this.getHeatLevelValue() + worldObj.rand.nextInt(5));\n }\n }\n }\n\n // Water acts as coolant to keep running computer components cooled.\n if (!this.isHeatAboveZero() && !this.isFluidTankEmpty() && this.isPowered() && this.isRedstonePowered() && worldObj.getWorldTime() % 16L == 0L)\n {\n if (this.getHeatLevelValue() <= this.getHeatLevelMaximum() && this.isHeatAboveZero())\n {\n // Some of the water evaporates in the process of cooling off the computer.\n // Note: water is drained in amount of heat computer has so hotter it gets\n // the faster it will consume water up to rate of one bucket\n // every few ticks.\n if (this.getFluidAmount() >= this.getHeatLevelValue())\n {\n // The overall heat levels of the computer drop so long as there is water though.\n this.removeFluidAmountExact(this.getHeatLevelValue() / 4);\n this.decreaseHeatValue();\n }\n }\n }\n else if (this.isHeatAboveZero() && worldObj.getWorldTime() % 8L == 0L)\n {\n // Computer will slowly dissipate heat while powered off but nowhere near as fast with coolant.\n this.decreaseHeatValue();\n }\n }", "private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }", "private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }", "public static void bullyAttack(){\n int punch = player.getHealth() - bullyHitPoints ;\n player.setHealth(punch);\n //Step 2: Conditional dialogue\n if(bullyHitPoints > 50) {\n System.out.println(textparser.getMassiveDamage() + bullyHitPoints + textparser.getToYou());\n }else if(bullyHitPoints > 25){\n System.out.println(textparser.getPunch() + bullyHitPoints + textparser.getToYou());\n }else{\n System.out.println(textparser.getDidntHurtMuch() + bullyHitPoints + textparser.getToYou());\n }\n }", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "@Override\n public int maxHealth() {\n return 25;\n }", "private int heavyAttack() {\n return attack(6, 2);\n }", "public int attack()\n {\n int percent = Randomizer.nextInt(100) + 1;\n int baseDamage = super.attack();\n if(percent <= 5)\n {\n baseDamage *= 2;\n baseDamage += 50;\n }\n return baseDamage;\n }", "public int adjustForCrowding() {\n int deadGuppyCount = 0;\n\n Collections.sort(this.guppiesInPool, new Comparator<Guppy>() {\n @Override\n public int compare(Guppy g1, Guppy g2) {\n return Double.compare(g1.getHealthCoefficient(), g2.getHealthCoefficient());\n }\n });\n\n Guppy weakestGuppy;\n Iterator<Guppy> it = guppiesInPool.iterator();\n double volumeNeeded = this.getGuppyVolumeRequirementInLitres();\n\n while (it.hasNext() && volumeNeeded > this.getVolumeLitres()) {\n weakestGuppy = it.next();\n volumeNeeded -= (weakestGuppy.getVolumeNeeded() / ML_TO_L_CONVERSION);\n\n weakestGuppy.setIsAlive(false);\n\n\n deadGuppyCount++;\n\n }\n return deadGuppyCount;\n }", "public static int getEnemyLives(){\n return 1 + currentLvl * 2;\n\n }", "float shouldAggroOnHit(IGeneticMob geneticMob, EntityLiving attacker);", "@Test\n\tpublic void testConsertPassQualityWithSellInUnder6() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by three (perhaps should be one)\n\t\tassertEquals(\"Quality with sellIn under 6 consert backstage passes\", 23, quality);\n\t}", "public boolean checkIfPlayerHoldsExplosive () { return noOfExplosives > 0; }", "public void goAdventuring() {\n\n game.createRandomMonster(4);\n if(RandomClass.getRandomTenPercent() == 5) {\n System.out.println(\"Your are walking down the road... Everything looks peaceful and calm.. Hit enter to continue!\");\n sc.nextLine();\n\n } else {\n game.battle();\n p.checkXp();\n }\n }", "public int CriticalHit(int start)\r\n {\r\n damage = ((int)(Math.random() * 100) % 50 + 80);\r\n int hp = start - damage;\r\n \r\n //modified to turn hp to 0 once it drops below or equals 0.\r\n if(hp <= 0)\r\n hp = 0;\r\n return hp;\r\n }", "private static int maxHealth(int health){\r\n int mHealth = 0;\r\n mHealth = health + 5;\r\n return mHealth; \r\n }", "public void consumeVigor(float amount) {\n\t\tstat -= amount;\n\t\tif(stat < 0f)\n\t\t\tstat = 0f;\n\t\t\n\t\t// Check for increasing level up counters\n\t\tif(amount > maxStat / threshold) {\n\t\t\t// Current average damage taken exceeding threshold of max HP\n\t\t\taverage = (average + (amount - (maxStat / threshold))) / 2f;\n\t\t\t// Current total damage taken exceeding threshold of max HP\n\t\t\ttallie += amount - (maxStat / threshold);\n\t\t\tSystem.out.println(\"Vigor \" + average + \" \" + tallie);\n\t\t}\n\n\t\t// Check for level up conditions\n\t\tif(tallie >= maxStat * Math.log(maxStat)) {\n\t\t\t// Apply new max HP and reset counters\n\t\t\tmaxStat = maxStat * average;\n\t\t\tthreshold = (float) Math.log(maxStat);\n\t\t\taverage = 0f;\n\t\t\ttallie = 0f;\n\t\t}\n\t}", "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w4);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w4);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w4.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w4.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n }", "@Test\n\tpublic void testTInvader3() {\n\t\ttank.damage(proj);\n\t\tassertEquals(2, tank.getHealth());\n\t}", "public void war() {\r\n while ((safeCount(survivors) > 0) && (safeCount(zombies) > 0)) {\r\n // Make each survivor attack every zombie\r\n attack(survivors, zombies);\r\n\r\n // Make each zombie attack every survivor\r\n attack(zombies, survivors);\r\n }\r\n\r\n // Print number of survivors that made to safety.\r\n warResult();\r\n }", "private void strengthen(float hp) {\n this.hp += hp;\n if (this.hp > MAX_HP) {\n this.hp = MAX_HP;\n }\n }", "public boolean isHighValue() {\n return reward > 750;\n }", "public boolean hasBust() {\n\t\treturn this.hand.countValue().first() > 21;\n\t}", "private boolean IsBust(Player player) {\n if (CalcHandSum(player, player.getHand()) > 21) {\n return true;\n } else {\n return false;\n }\n }", "private void calculateCrit(Monster target, MonsterParts part, Weapon weapon, double motionValue) throws InvalidPartException {\n \n if (target.isWeakness(part)) {\n if (Math.random() < (Math.abs((weapon.getAffinity() + weaknessExploit)/100.0)) && (weapon.getAffinity() + weaknessExploit) < 0) {\n critDamage -= weapon.getAttack()/weapon.getInflation() * 0.25 * weapon.getRawSharpness() * target.getPartMultiplierRaw(part, weapon) * motionValue;\n }\n if (Math.random() < ((weapon.getAffinity() + weaknessExploit)/100.0) && (weapon.getAffinity() + weaknessExploit) > 0) {\n critDamage += weapon.getAttack()/weapon.getInflation() * (0.25 + critBoost/100.0) * weapon.getRawSharpness() *target.getPartMultiplierRaw(part, weapon) * motionValue;\n if (criticalElement) {\n elementalCritDamage += weapon.getElementStatusDmg()/10 * 0.25 * weapon.getElementalSharpness() * target.getPartMultiplierElemental(part, weapon);\n }\n }\n } else {\n if (Math.random() < (Math.abs(weapon.getAffinity()/100.0)) && weapon.getAffinity() < 0) {\n critDamage -= weapon.getAttack()/weapon.getInflation() * 0.25 * weapon.getRawSharpness() * target.getPartMultiplierRaw(part, weapon) * motionValue;\n }\n if (Math.random() < (weapon.getAffinity()/100.0) && weapon.getAffinity() > 0) {\n critDamage += weapon.getAttack()/weapon.getInflation() * (0.25 + critBoost/100.0) * weapon.getRawSharpness() * target.getPartMultiplierRaw(part, weapon) * motionValue;\n if (criticalElement) {\n elementalCritDamage += weapon.getElementStatusDmg()/10 * 0.25 * weapon.getElementalSharpness() * target.getPartMultiplierElemental(part, weapon);\n }\n }\n }\n\n }", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "public IronArmour()\n {\n name = \"iron armour\";\n hitpoints = 10;\n damageBlocked = 5;\n }", "@Override\n public boolean gainBerryEffect(Battle b, ActivePokemon user, CastSource source) {\n List<Stat> stats = user.getStages().getNonMaxStats();\n\n // You probably don't need the berry at this point anyhow...\n if (stats.isEmpty()) {\n return false;\n }\n\n // Sharply raise random battle stat\n Stat stat = RandomUtils.getRandomValue(stats);\n return new StageModifier(2*ripen(user), stat).modify(b, user, user, source);\n }", "public int CriticalHitCheck(int creatureSkill){\n \tcriticalChance = genRandom.nextInt(100);\n \tif(criticalChance <= creatureSkill){\n \t\tLog.write(\"A CRITICAL HIT!\");\n \t\treturn 2;\n \t}\n \treturn 1;\n }", "public static void main(String[] args) {\n\t\tint myHp = 100;\r\n\t\tint bossHp = 100;\r\n\t\t\r\n\t\tmyHp = myHp - 99;\r\n\t\tbossHp = bossHp - 100;\r\n\t\t\r\n\t\tif(myHp > 0 && bossHp <= 0) {\r\n\t\t\tSystem.out.println(\"my win\");\r\n\t\t}else if(myHp <= 0 && bossHp<= 0) {\r\n\t\t\tSystem.out.println(\"draw\");\r\n\t\t}else if(myHp <= 0 && bossHp > 0) {\r\n\t\t\tSystem.out.println(\"boss win\");\r\n\t\t}\r\nSystem.out.println(!true);\r\nSystem.out.println(!false);\r\n\t}", "public void hasHeartPower(){\n shipVal.setHealth(shipVal.getHealth()+1);\n updateHearts(new ImageView(cacheHeart));\n score_val += 1000;\n }", "void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }", "protected boolean IsHighExplosive()\r\n {\r\n \t// Wrapper function to make code a little cleaner.\r\n // isInvulnerable() is wrongly named and instead represents the specific\r\n // skull type the wither has launched\r\n \t\r\n \treturn isInvulnerable();\r\n }", "private void checkVictory()\n {\n if(throne.getEnemyHealth() <= 0)\n {\n System.out.println(\"Congrats! The land is now free from all chaos and destruction. You are now very rich and wealthy. Yay\");\n alive = false;\n }\n }", "private void condenseSteam() {\n if (getPressure()> Constants.ATMOSPHERIC_PRESSURE) {\n double boilingPoint = Water.getBoilingTemperature(getPressure());\n if (boilingPoint > steam.getTemperature()) { // remove steam such that it equalizes to the boiling point\n double newSteamPressure = Math.max(Water.getBoilingPressure(steam.getTemperature()), Constants.ATMOSPHERIC_PRESSURE);\n \n\n int newQuantity = steam.getParticlesAtState(newSteamPressure, getCompressibleVolume());\n int deltaQuantity = steam.getParticleNr() - newQuantity;\n if (deltaQuantity < 0) {\n System.out.println(\"BAD\");\n }\n steam.remove(deltaQuantity);\n getWater().add(new Water(steam.getTemperature(), deltaQuantity));\n }\n } \n }", "@Test\n\tpublic void testTAlive5() {\n\t\ttank.damage(proj);\n\t\ttank.damage(proj);\n\t\tassertEquals(false, tank.isDeceased());\n\t}", "void gainHealth(int points) {\n this.health += points;\n }", "public static void handleEffectChances() {\n for (int i=0 ; i<5 ; i++) {\n effectChances.set(i, effectChances.get(i)+((int) Math.ceil(((double)stageCount)/5))*2);\n }\n }", "int getAttackRange();", "public void takeDamage(double num) {\r\n \r\n int damage = (int)Math.round(num);\r\n this.health -= damage;\r\n this.state=this.color+16;\r\n if (damage <= 5) {\r\n if (this.playerNum == 1)\r\n this.positionX -= 40;\r\n else \r\n this.positionX += 40;\r\n }\r\n else if (this.playerNum == 1)\r\n this.positionX -= damage * 6;\r\n else\r\n this.positionX += damage * 6;\r\n \r\n }", "private void communityChest(Player currentPlayer){\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n int nextPlayer;\n if(m_currentTurn >= m_numPlayers){\n nextPlayer = 0;\n } else {\n nextPlayer = m_currentTurn+1;\n }\n\n if(randomNum == 1){\n convertTextToSpeech(\"Your new business takes off, collect 200\");\n if(m_manageFunds) {\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(200);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Your friend hires your villa for a week, \" +\n \"collect 100 off the next player\");\n if(m_manageFunds) {\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(100);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n players.get(nextPlayer).subtractMoney(100);\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n }\n }\n if(randomNum == 3){\n convertTextToSpeech(\"You receive a tax rebate, collect 300\");\n if(m_manageFunds) {\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n }", "static void attacking() throws GameActionException {\n\n\t\trc.setIndicatorLine(myLocation, myLocation.add(robotDirection), 0, 0, 0);\n\n\t\tcheckLumberjack();\n\n\t\tint maxSoldier = Constants.MAX_COUNT_SOLDIER;\n\t\tint maxTank = Constants.MAX_COUNT_TANK;\n\n\t\tint numSoldier = rc.readBroadcast(Channels.COUNT_SOLDIER);\n\t\tint numTank = rc.readBroadcast(Channels.COUNT_TANK);\n\n\t\tfloat maxRatio = (float) (maxSoldier) / (maxTank + 1);\n\t\tfloat numRatio = (float) (numSoldier) / (numTank + 1);\n\n\t\tboolean canBuildTank = rc.canBuildRobot(RobotType.TANK, robotDirection);\n\t\tboolean canBuildSoldier = rc.canBuildRobot(RobotType.SOLDIER, robotDirection);\n\n\t\tSystem.out.println(numRatio + \">\" + maxRatio);\n\n\t\tif (canBuildSoldier && numSoldier < maxSoldier && numRatio < maxRatio) {\n\t\t\trc.buildRobot(RobotType.SOLDIER, robotDirection);\n\t\t\tCommunication.countMe(RobotType.SOLDIER);\n\t\t} else if (canBuildTank && numTank < maxTank) {\n\t\t\trc.buildRobot(RobotType.TANK, robotDirection);\n\t\t\tCommunication.countMe(RobotType.TANK);\n\t\t}\n\n\t}", "int maxHit(Player player, Entity target);", "@Test\n\tpublic void testTAlive6() {\n\t\ttank.damage(proj);\n\t\tassertEquals(false, tank.isDeceased());\n\t}", "public int getHealthGain();", "abstract public RandomRange getPlunderRange(Unit attacker);", "private int sinksUnderwater() {\n if ((getPosition() == null) || isOffBoard()) {\n return 0;\n }\n\n IHex curHex = game.getBoard().getHex(getPosition());\n // are we even in water? is it depth 1+\n if ((curHex.terrainLevel(Terrains.WATER) <= 0) || (getElevation() >= 0)) {\n return 0;\n }\n\n // are we entirely underwater?\n if (isProne() || (curHex.terrainLevel(Terrains.WATER) >= 2)) {\n return getHeatCapacity();\n }\n\n // okay, count leg sinks\n int sinksUnderwater = 0;\n for (Mounted mounted : getMisc()) {\n if (mounted.isDestroyed() || mounted.isBreached() || !locationIsLeg(mounted.getLocation())) {\n continue;\n }\n if (mounted.getType().hasFlag(MiscType.F_HEAT_SINK)) {\n sinksUnderwater++;\n } else if (mounted.getType().hasFlag(MiscType.F_DOUBLE_HEAT_SINK)) {\n sinksUnderwater += 2;\n }\n }\n return sinksUnderwater;\n }", "public Critter1() {\r\n\t\tnumberSpawned = 0;\r\n\t\twhile (fearfullness < 50) {//at minimum fearfullness is 50%\r\n\t\t\tfearfullness = getRandomInt(100);\r\n\t\t}\r\n\t}", "public int attack(boolean weakness){\r\n\t\tint damage = 0;\r\n\t\t\r\n\t\tif (energy <= 0) {\r\n\t\t\tSystem.out.println(\"no energy to attack\");\r\n\t\t\tenergy = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (weakness == true) {\r\n\t\t\t\tenergy -= 2;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tenergy -= 1;\r\n\t\t\t}\r\n\t\t\texp += 1;\r\n\t\t\tdamage = 1;\r\n\t\t}\r\n\t\treturn damage;\r\n\t}", "public void tick(){\n oilLevel --;\n maintenance --;\n happiness --;\n health --;\n boredom ++;\n }", "public boolean hasBust()\n {\n return getSumOfCards(false) > 21;\n }", "private void warResult() {\r\n // Get number of survivors alive\r\n int survivorCount = safeCount(survivors);\r\n if (survivorCount == 0) {\r\n System.out.println(\"None of the survivors made it.\");\r\n\t\t}\r\n else {\r\n System.out.println(\"It seems \" + survivorCount + \" have made it to safety.\");\r\n\t\t}\r\n }", "public void onUsingTick(ItemStack stack, EntityPlayer player, int count) {\n/* 132 */ player.motionX = 0.0D;\n/* 133 */ player.motionZ = 0.0D;\n/* */ \n/* 135 */ int searchRange = 20;\n/* 136 */ List<EntityLivingBase> entities = player.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(player.posX - searchRange, player.posY - searchRange, player.posZ - searchRange, player.posX + searchRange, player.posY + searchRange, player.posZ + searchRange));\n/* */ \n/* 138 */ if (entities.contains(player)) {\n/* 139 */ entities.remove(player);\n/* */ }\n/* 141 */ if (count < getMaxItemUseDuration(stack) - 20) {\n/* 142 */ for (int counter = entities.size() - 1; counter >= 0; counter--) {\n/* 143 */ if (player.getDistanceToEntity((Entity)entities.get(counter)) <= 3.0F && \n/* 144 */ WandManager.consumeVisFromInventory(player, (new AspectList()).add(Aspect.FIRE, (int)(150.0F * RelicsConfigHandler.soulTomeVisMult)).add(Aspect.ENTROPY, (int)(120.0F * RelicsConfigHandler.soulTomeVisMult)))) {\n/* */ \n/* 146 */ EntityLivingBase thrownEntity = entities.get(counter);\n/* */ \n/* 148 */ Vector3 entityVec = Vector3.fromEntityCenter((Entity)thrownEntity);\n/* 149 */ Vector3 playerVec = Vector3.fromEntityCenter((Entity)player);\n/* */ \n/* 151 */ Vector3 diff = entityVec.copy().sub(playerVec).multiply((1.0F / player.getDistanceToEntity((Entity)thrownEntity) * 3.0F));\n/* */ \n/* 153 */ float curve = (float)(1.0D / player.getDistance(entityVec.x, entityVec.y, entityVec.z) * 8.0D);\n/* */ \n/* 155 */ if (!player.worldObj.isRemote)\n/* 156 */ for (int counterZ = 0; counterZ <= 3; counterZ++) {\n/* 157 */ Main.proxy.lightning(player.worldObj, player.posX, player.posY + 1.0D, player.posZ, entityVec.x, entityVec.y, entityVec.z, 40, curve, (int)(player.getDistance(entityVec.x, entityVec.y, entityVec.z) * 6.0D), 0, 0.075F);\n/* */ } \n/* 159 */ player.worldObj.playSoundAtEntity((Entity)player, \"thaumcraft:zap\", 1.0F, 0.8F);\n/* */ \n/* 161 */ thrownEntity.attackEntityFrom((DamageSource)new DamageRegistryHandler.DamageSourceTLightning((Entity)player), (float)(20.0D + 80.0D * Math.random()));\n/* */ \n/* 163 */ thrownEntity.motionX = diff.x;\n/* 164 */ thrownEntity.motionY = diff.y + 1.0D;\n/* 165 */ thrownEntity.motionZ = diff.z;\n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 195 */ this; this; this; this; if ((((count < getMaxItemUseDuration(stack) - 20) ? 1 : 0) & ((count % 4 == 0) ? 1 : 0)) != 0 && WandManager.consumeVisFromInventory(player, (new AspectList()).add(Aspect.EARTH, TerraCost).add(Aspect.AIR, AerCost).add(Aspect.FIRE, IgnisCost).add(Aspect.ENTROPY, PerditioCost))) {\n/* */ \n/* 197 */ EntityLivingBase randomEntity = null;\n/* */ \n/* 199 */ if (entities.size() > 0) {\n/* 200 */ randomEntity = entities.get((int)(entities.size() * Math.random()));\n/* */ }\n/* 202 */ if ((((randomEntity != null) ? 1 : 0) & (!player.worldObj.isRemote ? 1 : 0)) != 0) {\n/* */ \n/* 204 */ float soulDamage = randomEntity.getMaxHealth() / RelicsConfigHandler.soulTomeDivisor;\n/* */ \n/* 206 */ if (soulDamage > 20.0F) {\n/* 207 */ soulDamage = 20.0F;\n/* 208 */ } else if (soulDamage < 1.0F) {\n/* 209 */ soulDamage = 1.0F;\n/* */ } \n/* 211 */ randomEntity.attackEntityFrom((DamageSource)new DamageRegistryHandler.DamageSourceSoulDrain((Entity)player), soulDamage);\n/* 212 */ spawnSoul(player.worldObj, randomEntity, (EntityLivingBase)player);\n/* */ } \n/* */ } \n/* */ }", "public boolean nearMaxRescue() {\n double water = this.waterLevel;\n double no = (this.configuration.getMaximalLimitLevel()\n - this.configuration.getMaximalNormalLevel()) / 2;\n if (water > this.configuration.getMaximalLimitLevel()\n || water > this.configuration.getMaximalLimitLevel() - no) {\n return true;\n } else if (water < this.configuration.getMinimalLimitLevel()\n || water < this.configuration.getMinimalLimitLevel() + no) {\n\n return true;\n }\n return false;\n }", "@Test\n\tpublic void testHarvestWheat1() throws GameControlException {\n\t\tint result = GameControl.harvestWheat(900, 15, 1, 2, 4);\n\t\tassertEquals(3600, result);\n\t}", "public void heal3()\r\n {\r\n this.health = 1200;\r\n Story.healText3();\r\n }", "public void growLiving(){\n living += Math.round(Math.random());\n living -= Math.round(Math.random());\n \n if(living > 100){\n living = 100;\n }\n \n if(living < 0){\n living = 0;\n }\n }", "public void suffer(int hits)\r\n {\r\n health = health - hits;\r\n if (health < 0)\r\n health = 0;\r\n if (hits == 0)\r\n say(\"Hahaha! I defened myself with \" + armor.getName() + \" and still have \" + health + \" left!\");\r\n else\r\n say(\"Ouch! \" + hits + \" hits is more than I want! I only have \" + health + \" left!\");\r\n if (health <= 0)\r\n die();\r\n }", "@Test\n void doEffectrailgun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"railgun\");\n Weapon w11 = new Weapon(\"railgun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w11);\n p.setPlayerPosition(Board.getSpawnpoint('r'));\n p.getPh().drawWeapon(wd, w11.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 2);\n }", "private void checkForPlayerChance()\n\t\t\t{\n\t\t\t\tf = false;\n\t\t\t\tfor (j = 0; j < 8; ++j)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (win[j] == 2 && lose[j] == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tf = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\tif (f == false)\n\t\t\t\t\tj = 10;\n\n\t\t\t}", "@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}", "@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }", "public boolean gainExperience(int i) {\n boolean lvlUp = false;\n switch (i) {\n case 1:\n // if a level 1 enemy is defeated\n Experience += 1;\n // if hero levels up\n if ((LVL == 1 && Experience == 1) || (LVL == 2 && Experience == 2) || (LVL == 3 && Experience == 3)) {\n lvlUp = true;\n LVL++;\n HP.setCapacity(HP.getCapacity() + 10); // increasing health bar by 10\n Experience = 0;\n }\n break;\n case 2:\n // if a level 2 enemy is defeated\n Experience += 2;\n // if hero levels up\n if ((LVL == 2 && Experience == 2) || (LVL == 3 && Experience == 3)) {\n lvlUp = true;\n LVL++;\n HP.setCapacity(HP.getCapacity() + 10); // increasing health bar by 10\n Experience = 0;\n }\n break;\n case 3:\n // if a level 3 enemy is defeated\n Experience += 3;\n if (Experience == 3) { // if hero levels up\n lvlUp = true;\n LVL++;\n HP.setCapacity(HP.getCapacity() + 10); // increasing health bar by 10\n Experience = 0;\n }\n break;\n case 4:\n // if a level 4 enemy is defeated\n Experience += 1000;\n if (Experience >=4) { // if hero levels up\n lvlUp = true;\n LVL++;\n HP.setCapacity(HP.getCapacity() + 10); // increasing health bar by 10\n Experience = 0;\n } \n break;\n default:\n break;\n }\n HP.setHealth(HP.getCapacity()); // healing hero to full\n return lvlUp;\n }", "public float getSpawningChance()\n {\n return 0.1F;\n }", "public static boolean isMaxed(Player player) {\n\t\tif (player.getSkills().getLevelForXp(Skills.ATTACK) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.STRENGTH) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.DEFENCE) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.RANGE) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.PRAYER) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.MAGIC) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.RUNECRAFTING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.HITPOINTS) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.AGILITY) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.HERBLORE) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.THIEVING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.CRAFTING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.FLETCHING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.SLAYER) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.HUNTER) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.MINING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.SMITHING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.FISHING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.COOKING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.FIREMAKING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.WOODCUTTING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.FARMING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.CONSTRUCTION) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.SUMMONING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.DUNGEONEERING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.DIVINATION) >= 99)\n\t\treturn true;\n\treturn false;\n\t}", "int getSuperEffectiveChargeAttacksUsed();", "@Test\n\tpublic void testQualityWithSellInUnder0QualityUnder50Brie() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -1, 40));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by 2\n\t\tassertEquals(\"Quality with sellIn under 0 brie\", 42, quality);\n\t}", "public int getHealthCost();", "@Test\n public void RobotHitByDoubleLaserShouldTake2InDamage() {\n\n int damage = 2;\n\n //health before laser firing\n int healthRobotBeforeHit = robot4.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after hit by laser\n int healthRobotAfterHit = robot4.getRobotHealthPoint();\n\n //should evaluate to true\n assertEquals(healthRobotBeforeHit, healthRobotAfterHit+damage);\n\n }", "@Override\r\n\tpublic boolean wasIncident() {\r\n\t\tdouble random = Math.random()*100;\r\n\t\tif(random<=25) return true;\r\n\t\treturn false;\r\n\t}", "public boolean goldilocksCheck() {\n\t\treturn (waterConcentration > 0.25 && heat > 32);\r\n\t}", "@Test\n\tpublic void testMonsterHPwithRock() {\n\t\tEngine engine = new Engine(20);\n\t\tint shouldHit = 1;\n\t\tengine.update();\n\t\tassertEquals(\"failure - monsterX's hp is not functioning properly\", shouldHit, engine.getMoveableObject(1).getHP(), 0.0);\n\t}", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "boolean hasDamage();", "public void battleVampire() {\n\n\t \tPlayer playern = this.playern;\n\t\tcyborgVampire = new CyborgVampire(\"Cyborg Vampire\");\n\t\tSystem.out.println(\"*shivers* It is the evil Cyber Vampire\");\n\t\tSystem.out.println(\"[press enter to fight]\");\n\t\tsc.nextLine();\n\n\t\twhile (true) {\n\t\t\tcyborgVampire.takeDamage(playern.attack());\n\t\t\tif (!cyborgVampire.getisDead()) {\n\t\t\t\tSystem.out.println(\"You killed the Cyborg Vampire, earned \" + cyborgVampire.giveExp() + \" experience\");\n\t\t\t\tplayern.setExp(cyborgVampire.giveExp());\n\t\t\t\tplayern.afterBattleStats();\n\t\t\t\t//playern.restoreHpAfterBattle();\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tGame.playern.takeDamage(cyborgVampire.attack());\n\t\t\tif (!Game.playern.getIsAlive()){\n\t\t\t\tSystem.out.println(\"You are killed\");\n\t\t\t\tSystem.out.println(\"You have lost the game and turn into warrior zombie\");\n\t\t\t\tplayern.afterBattleStats();\n\t\t\t\tbreak;\n\t\t\t\t//System.exit(0);\n\t\t\t}\n\n\t\t\tSystem.out.println(\"* \" + playern.getName() + \": \" + playern.getHp() + \" hp\");\n\t\t\tSystem.out.println(\"* \" + cyborgVampire.getName() + \": \" + cyborgVampire.getHp() + \" hp\");\n\t\t\tSystem.out.println(\"[press enter to continue]\");\n\t\t\tsc.nextLine();\n\t\t}\n\t\t topScore();\n\t}", "public void specialEffect() {\n if (getDefense() > 0) {\n setDefense(0);\n setCurrentHealth(currentHealth + 50);\n }\n\n }", "private void aimlessScout() {\n\t\ttargetFlower = null;\n\t\t// if bee is sufficiently far from flower, look for other flowers\n\t\tif((clock.time - tempTime) > 0.15) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying\n\t\telse{\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\t//energy -= exhaustionRate;\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "void hurt(int strength) {\n life -= strength;\n if (life < 0)\n life = 0;\n }", "@Override\n @SuppressWarnings(\"empty-statement\")\n public void attack(){\n\n if (myTerritory.getAlpha() <= 0.5){\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getSoldiers()/4;\n defendingSoldiers = myTerritory.getSoldiers()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }\n else\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getFoodGrowth()/4;\n defendingSoldiers = myTerritory.getFoodGrowth()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }", "double getMissChance();", "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "public int computeRangedDamageTo(Combatant opponent) { return 0; }", "public short getSiegeWeaponDamage();", "public float getHungerDamage();", "@Override\n\tprotected void onPlayerDamage(EntityDamageEvent evt, Player p) {\n\t\tsuper.onPlayerDamage(evt, p);\n\t\tif(evt.getCause() == DamageCause.WITHER){\n\t\t\tGUtils.healDamageable(getOwnerPlayer(), evt.getDamage() * 1.5);\n\t\t\tVector v = Utils.CrearVector(getOwnerPlayer().getLocation(), getPlayer().getLocation()).multiply(0.5D);\n\t\t\tdouble max = 7;\n\t\t\tfor (int i = 0; i < max; i++) {\n//\t\t\t\tgetWorld().playEffect(getPlayer().getEyeLocation().add(0, -0.8, 0).add(v.clone().multiply(i/max)),\n//\t\t\t\t\t\tEffect.HEART, 0);\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6623285", "0.65150607", "0.64005923", "0.63322985", "0.630835", "0.62286747", "0.61730194", "0.6147181", "0.6144276", "0.6054645", "0.6022265", "0.6011654", "0.59944594", "0.5983035", "0.59772784", "0.59494483", "0.5918041", "0.5904491", "0.5904095", "0.5900756", "0.58985394", "0.58935136", "0.58854467", "0.5859805", "0.5858193", "0.5848168", "0.5844922", "0.5838225", "0.5817138", "0.58018726", "0.5799585", "0.57975197", "0.5796893", "0.57952183", "0.5776201", "0.57671905", "0.57670313", "0.576222", "0.57605886", "0.5750723", "0.5744766", "0.5744236", "0.57409465", "0.57341385", "0.5726164", "0.5705519", "0.56971663", "0.56971157", "0.5686069", "0.56753325", "0.56741863", "0.5664338", "0.56543714", "0.56491363", "0.5648674", "0.56398135", "0.5638805", "0.5635818", "0.5628984", "0.5617458", "0.5615154", "0.56039006", "0.5601743", "0.5598283", "0.5595041", "0.5587488", "0.5586616", "0.55778605", "0.5575388", "0.55752975", "0.5571208", "0.55702734", "0.55643743", "0.5563992", "0.5563485", "0.5562661", "0.55607045", "0.55592585", "0.5558907", "0.5558309", "0.55540836", "0.55527985", "0.5549493", "0.55488944", "0.55451214", "0.55451214", "0.55451214", "0.55451214", "0.55451214", "0.55437", "0.5536779", "0.55365425", "0.5534855", "0.5530239", "0.55290085", "0.5528352", "0.55269724", "0.55248123", "0.5523821", "0.55205405" ]
0.7991115
0
/ GreedyWinRate: my turrets are more than enemy's turrets and either my health is more than half max my health is more than enemy's health
private boolean checkGreedyWinRate() { return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float getWinLossRatio();", "int getMinigameDefenseChancesLeft();", "@Override\n\tpublic void win() {\n\t\t\n\t\tfround[fighter1]++;\n\t fplatz[fighter1]=Math.round((float)fplatz[fighter1]/2); \n\t \n\t\tnextRound();\n\t}", "private boolean checkGreedyIronCurtain() {\r\n return (myself.health < 30 || enTotal.get(0) >= 8 || opponent.isIronCurtainActive || this.myTotal.get(0) < this.enTotal.get(0));\r\n }", "private void checkIfHungry(){\r\n\t\tif (myRC.getEnergonLevel() * 2.5 < myRC.getMaxEnergonLevel()) {\r\n\t\t\tmission = Mission.HUNGRY;\r\n\t\t}\r\n\t}", "public static double evaluateSurvivability(Board b, int team) {\n Optional<Leader> ol = b.getPlayer(team).getLeader();\n if (ol.isEmpty()) {\n return 0;\n }\n Leader l = ol.get();\n if (l.health <= 0) { // if dead\n return -99999 + l.health; // u dont want to be dead\n }\n int shield = l.finalStats.get(Stat.SHIELD);\n Supplier<Stream<Minion>> attackingMinions = () -> b.getMinions(team * -1, true, true);\n // TODO add if can attack check\n // TODO factor in damage limiting effects like durandal\n int potentialDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int potentialLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int threatenDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int threatenLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int attackers = attackingMinions.get()\n .map(m -> m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n List<Minion> defendingMinons = b.getMinions(team, false, true)\n .filter(m -> m.finalStats.get(Stat.WARD) > 0)\n .collect(Collectors.toList());\n int leaderhp = l.health + shield;\n int ehp = defendingMinons.stream()\n .map(m -> m.health)\n .reduce(leaderhp, Integer::sum);\n long defenders = defendingMinons.size();\n if (shield > 0) {\n defenders++;\n }\n if (b.getCurrentPlayerTurn() != team) {\n threatenDamage = potentialDamage;\n threatenLeaderDamage = potentialLeaderDamage;\n }\n // if there are more defenders than attacks, then minions shouldn't be\n // able to touch face\n if (defenders >= attackers) {\n ehp = Math.max(ehp - threatenDamage, leaderhp);\n } else {\n ehp = Math.max(ehp - threatenDamage, leaderhp - threatenLeaderDamage);\n if (ehp <= 0) {\n if (team == b.getCurrentPlayerTurn()) {\n // they're threatening lethal if i dont do anything\n return -30 + ehp;\n } else {\n // they have lethal, i am ded\n return -60 + ehp;\n }\n }\n }\n return 6 * Math.log(ehp);\n }", "private double evaluate() {\n // check for draws first, most lickely\n if (board.gameState() == MNKGameState.DRAW) return 0;\n else if (board.gameState() == MY_WIN) return 2 * M * N; // 2 times max depth\n else if (board.gameState() == ENEMY_WIN) return -2 * M * N;\n else {\n evaluated++;\n // keep the heuristic evaluation between 1 and -1\n return board.value();\n }\n }", "private int getEnemyGunFireRate()\n\t{\n\t\tfloat rate = 115 - (GameState._playerScore * .2f);\n\t\tif (rate < 20)\n\t\t{\n\t\t\trate = 20;\n\t\t}\n\t\treturn (int)rate;\n\t}", "private void strengthen(float hp) {\n this.hp += hp;\n if (this.hp > MAX_HP) {\n this.hp = MAX_HP;\n }\n }", "private void greedyEnemySpawner(float enemyCap, IEnemyService spawner, World world, GameData gameData) {\r\n while (enemyCap >= MEDIUM_ENEMY_COST) {\r\n\r\n if (enemyCap >= MEDIUM_ENEMY_COST + BIG_ENEMY_COST) {\r\n spawnBigAndMediumEnemy(spawner, world, gameData);\r\n enemyCap -= MEDIUM_ENEMY_COST + BIG_ENEMY_COST;\r\n\r\n } else if (enemyCap >= BIG_ENEMY_COST) {\r\n spawnBigEnemy(spawner, world, gameData);\r\n enemyCap -= BIG_ENEMY_COST;\r\n\r\n } else {\r\n spawnMediumEnemy(spawner, world, gameData);\r\n enemyCap -= MEDIUM_ENEMY_COST;\r\n }\r\n }\r\n }", "public boolean[] isFightWinning() {\n RobotInfo[] nearbyEnemies = Cache.getEngagementEnemies();\n if (nearbyEnemies.length == 0) {\n return new boolean[] {true};\n }\n \n RobotInfo closestEngageable = null;\n double closestDist = Double.MAX_VALUE;\n double tempDist = 0;\n for (RobotInfo bot : nearbyEnemies) {\n switch (bot.type) {\n case HQ:\n case TOWER:\n // TODO figure out how to deal with towers that turn up...\n return new boolean[] {false, false};\n case BEAVER:\n case DRONE:\n case SOLDIER:\n case TANK:\n case COMMANDER:\n case MINER:\n case BASHER:\n case MISSILE:\n tempDist = curLoc.distanceSquaredTo(bot.location);\n if (tempDist < closestDist) {\n closestDist = tempDist;\n closestEngageable = bot;\n }\n break;\n default:\n break;\n }\n }\n \n if (closestEngageable == null) {\n return new boolean[] {true};\n }\n \n RobotInfo[] allies = rc.senseNearbyRobots(closestEngageable.location, ALLY_INLCUDE_RADIUS_SQ, myTeam);\n double allyScore = Util.getDangerScore(allies);\n double enemyScore = Util.getDangerScore(rc.senseNearbyRobots(closestEngageable.location, ENEMY_INCLUDE_RADIUS_SQ, theirTeam));\n // rc.setIndicatorString(2, \"Ally score: \" + allyScore + \", Enemy score: \" + enemyScore);\n if (allyScore > enemyScore) {\n return new boolean[] {true};\n } else {\n // Check if we are definitely going to die.\n double myHealth = rc.getHealth();\n int myID = rc.getID();\n boolean isAlone = true;\n for (int i = allies.length; i-- > 0;) {\n if (allies[i].ID != myID) {\n isAlone = false;\n if(allies[i].health < myHealth) {\n return new boolean[] {false, false};\n }\n }\n }\n // We didn't find any bots with lower health, so we are the lowest.\n // If we are alone, we should retreat anyways...\n return new boolean[] {false, !isAlone};\n }\n }", "public void win() {\n if (turn == 1) {\n p1.incrementLegs();\n if (p1.getLegs() == 5) {\n p1.incrementSets();\n p1.setLegs(0);\n p2.setSets(0);\n\n }\n if (p1LastScore > p1.getHighout()) {\n p1.setHighout(p1LastScore);\n\n }\n\n if (p1.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p1.getHighout();\n }\n } else if (turn == 2) {\n p2.incrementLegs();\n if (p2.getLegs() == 5) {\n p2.incrementSets();\n p2.setLegs(0);\n p1.setSets(0);\n\n }\n if (p2LastScore > p2.getHighout()) {\n p2.setHighout(p2LastScore);\n }\n\n if (p2.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p2.getHighout();\n }\n\n\n\n }\n changeFirstTurn();\n win = true;\n\n\n\n }", "private double enemyKills()\n {\n return (double)enemyResult.shipsLost();\n }", "protected abstract float _getGrowthChance();", "public boolean getWin() {\n if (targetDistance == 25) {\n if (missDistance <= 1 && missDistance >= -1) { //checks 25m win\n return true;\n }\n else {\n return false;\n }\n }\n else if (targetDistance == 50) { //checks 50m win\n if (missDistance <= 2 && missDistance >= -2) {\n return true;\n }\n else {\n return false;\n }\n }\n else { //checks 100m win\n if (missDistance <= 3 && missDistance >= -3) {\n return true;\n }\n else {\n return false;\n }\n }\n }", "public double getPlayerFullHP();", "public void collectWinnings() {\n\t\tif (hand.checkBlackjack()) {\n\t\t\tdouble win = bet * 1.5;\n\t\t\ttotalMoney += (win + bet);\n\t\t} else {\n\t\t\ttotalMoney += (bet + bet);\n\t\t}\n\t}", "int getWins() {return _wins;}", "public Boolean gameIsOver(){\n\n if(playerShipDead || enemyShipDead){\n if(enemyShipDead && !(deathTriggered)){\n deathTriggered = true;\n playerScore += scoreToGain; //This will depend on the enemyShip's score amount. Only affects the display.\n playerGoldAmount += goldToGain;\n //playerShip.setPointsWorth(playerScore); // Doesn't work.\n }\n return true;\n } else {\n return false;\n }\n }", "public void consumeVigor(float amount) {\n\t\tstat -= amount;\n\t\tif(stat < 0f)\n\t\t\tstat = 0f;\n\t\t\n\t\t// Check for increasing level up counters\n\t\tif(amount > maxStat / threshold) {\n\t\t\t// Current average damage taken exceeding threshold of max HP\n\t\t\taverage = (average + (amount - (maxStat / threshold))) / 2f;\n\t\t\t// Current total damage taken exceeding threshold of max HP\n\t\t\ttallie += amount - (maxStat / threshold);\n\t\t\tSystem.out.println(\"Vigor \" + average + \" \" + tallie);\n\t\t}\n\n\t\t// Check for level up conditions\n\t\tif(tallie >= maxStat * Math.log(maxStat)) {\n\t\t\t// Apply new max HP and reset counters\n\t\t\tmaxStat = maxStat * average;\n\t\t\tthreshold = (float) Math.log(maxStat);\n\t\t\taverage = 0f;\n\t\t\ttallie = 0f;\n\t\t}\n\t}", "@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=50-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}", "@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=30-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}", "static public int getGoblinMaxHP(int battles){\n maxHP = rand.nextInt(8) + 10 + battles;\n currentHP = maxHP;\n return maxHP;\n }", "private int evaluate(boolean maximizing) {\n int selfEval = getCountOfStonesFor(this);\n selfEval += countOfMills(this) * 5;\n selfEval += countOfPossibleMills(this) * 15;\n\n int opponentEval = getCountOfStonesFor(opponent);\n opponentEval += countOfMills(opponent) * 5;\n opponentEval += countOfPossibleMills(opponent) * 15;\n\n return (selfEval - opponentEval) * (maximizing ? 1 : -1);\n }", "private int determineWinning(GamePlayerInterface player, GamePlayerInterface dealer)\n {\n \n int playerValue = player.getTotalCardsValue();\n int dealerValue = dealer.getTotalCardsValue();\n int result = 0;\n \n if(dealerValue > playerValue)\n {\n \t view.print(\"Dealer Wins\");\n \t view.printLine();\n \t result = 1;\n }\n \n else if(dealerValue < playerValue)\n {\n \t view.print(\"Player Wins\");\n \t view.printLine();\n \t result = 2;\n }\n \n else{\n \t view.print(\"Match Draw!\");\n \t view.printLine();\n }\n \n return result;\n }", "@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=20-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}", "private static int maxHealth(int health){\r\n int mHealth = 0;\r\n mHealth = health + 5;\r\n return mHealth; \r\n }", "public float getSpawningChance()\n {\n return 0.1F;\n }", "public boolean Fight(Player p)\n{\n\tint m=1;\n\t int t=1;\n int temp=0;\n int player1=this.weapon-1;\n int player2=p.weapon-1;\n\n\t int[] a=new int[this.weapon];\n int[] b=new int[p.weapon];\n System.out.println(\"XXxxXXxxXXxxXXxxXX FIGHT XXxxXXxxXXxxXXxxXX\\n\");\nwhile(this.health>0&&p.health>0)\n{\n System.out.println(\"~~~~~Round: \" +m+\"~~~~~\");\n m++;\n System.out.println(\"++\"+this.name+\" Health: \"+this.health+\" potions.\");\n System.out.println(\"++\"+p.name+\" Health: \"+p.health+\" potions.\");\n\n for (int i=0;i<a.length;i++)\n {\n\ta[i]=this.Roll();\n }\n for(int j=0;j<b.length;j++)\n {\n\tb[j]=p.Roll();\n }\n\n Arrays.sort(a);\n Arrays.sort(b);\n\n System.out.print(this.name+\" has thrown: {\");\n\n for(int i=a.length-1;i>0;i--)\n System.out.print(a[i]+\", \");\n\n System.out.println(a[0]+\"}\");\n\n System.out.print(p.name+\" has thrown: {\");\n for(int j=b.length-1;j>0;j--)\n System.out.print(b[j]+\", \");\n\n System.out.println(b[0]+\"}\");\n\n if(a.length>b.length)\n \ttemp=b.length;\n else\n \ttemp=a.length;\n\n player1=this.weapon-1;\n player2=p.weapon-1;\n t=1;\n while(this.health>0&&p.health>0&&temp>0)\n \t{\n\n System.out.print(\"***Strike \"+t+\": \");\n if(a[player1]==b[player2])\n {\n \tSystem.out.println(\"BOTH suffer blows!!!\");\n \tthis.health-=a[player1]*10;\n \tp.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n \tSystem.out.println(p.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n else if(a[player1]>b[player2])\n {\n \t\tSystem.out.println(p.name+\" does damage!\");\n \tp.health-=a[player1]*10;\n \tSystem.out.println(p.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n }\n else\n {\n \tSystem.out.println(this.name+\" does damage!\");\n \tthis.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n\n player1--;\n player2--;\n\n temp--;\n t++;\n \t}\n\n\n}\nif(this.health<=0)\n return false;\n else\n \treturn true;\n\n}", "@Override\n public int maxHealth() {\n return 25;\n }", "private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }", "private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }", "int maxHit(Player player, Entity target);", "public boolean wantToFight(int[] enemyAbilities) {\n boolean fight = boldness < 50;//After 50 fights, believes self unstoppable \n int huntable = 0;\n for(int ability : enemyAbilities){\n if(ability == 1)\n huntable++;\n }\n if(huntable >= 3){\n fight = true;\n }//if at least 3 of the visible stats are 1 then consider this prey and attack\n else if((float)enemyAbilities[1] / (float)getDefenseLvl() <= (float)getStrengthLvl() + (float)(getClevernessLvl() % 10) / (float)enemyAbilities[2] && enemyAbilities[0] / 5 < getLifeLvl() / 5)\n fight = true;//If I fancy my odds of coming out on top, float division for chance\n if(fight){//Count every scar\n boldness++;//get more bold with every battle\n life += enemyAbilities[0] / 5;\n str += enemyAbilities[1] / 5;\n def += enemyAbilities[2] / 5;\n clever += (10 - (enemyAbilities[0] + enemyAbilities[1] + enemyAbilities[2] + enemyAbilities[3] - 4)) / 5;//count the human cleverness attained or the enemies who buffed clever early\n }\n return fight;\n }", "float getWetness();", "public static int getEnemyLives(){\n return 1 + currentLvl * 2;\n\n }", "public int updateSleeping() {\n //sleeping = 1.3 + 7-energy/10 -- Eat until foodAmt == 0 or 2 more than the lowest stat\n //wake up = 1.0 + 7-stat/10 -- Get the highest value to compare to eating value\n options[0] = (1.0 + ((5.0-(double)energy)/10.0)); // sleep\n options[1] = (1.0 + ((7.0-(double)food)/10.0)); // eat\n options[2] = (1.0 + ((7.0-(double)water)/10.0)); // drink\n \n int maxStat = getMax();\n \n if(maxStat == 0)\n return 0;\n else\n return 1;\n }", "private void checkForPlayerChance()\n\t\t\t{\n\t\t\t\tf = false;\n\t\t\t\tfor (j = 0; j < 8; ++j)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (win[j] == 2 && lose[j] == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tf = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\tif (f == false)\n\t\t\t\t\tj = 10;\n\n\t\t\t}", "private static double getWinRate() {\n\t\treturn winRate ;\n\t}", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "public int sleepersCount(int height)\r\n {\n int fullSleepers = (int) ((height)/20);\r\n //Calculating exceeding sleeper.\r\n int extraSleeper = ((height)/20);\r\n //Deciding whether an extra full sleeper is needed or not.\r\n if (fullSleepers != 0)\r\n {\r\n if (extraSleeper % fullSleepers > 0.5)\r\n {\r\n fullSleepers++;\r\n }\r\n }\r\n return fullSleepers;\r\n \r\n }", "public void checkWin() {\n if (rockList.isEmpty() && trackerRockList.isEmpty() && bigRockList.isEmpty() && bossRockList.isEmpty()) {\n if (ship.lives < 5) {\n ship.lives++;\n }\n Level++;\n LevelIntermission = true;\n LevelIntermissionCount = 0;\n }\n }", "public boolean winner(){\n\t\treturn goals1 > goals2;\n\t}", "@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}", "public int winner() {\n if(humanPlayerHits == 17) {\n return 1;\n }\n if(computerPlayerHits == 17){\n return 2;\n }\n return 0;\n }", "public void win(int wager){\n bankroll += wager;\n }", "public double getSurvivalRate() {\n return 100 - (Math.round((double) deaths / (double) attempts * 100d));\n }", "private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }", "public int attack()\n {\n int percent = Randomizer.nextInt(100) + 1;\n int baseDamage = super.attack();\n if(percent <= 5)\n {\n baseDamage *= 2;\n baseDamage += 50;\n }\n return baseDamage;\n }", "int getHPPerSecond();", "public double calculateVal(DraughtsState s, int depth) {\n int[] pieces = s.getPieces(); \n \n \n // This is where the actual heuristic is calculated. because the situation is slightly different for the white and black\n // player their heuristic is calculated seperately.\n double h = 0;\n int enemypieces = 0;\n for (int i = 1; i < pieces.length; i++) {\n int piece = pieces[i];\n \n // If we are white, substract 1, giving the white piece of the same category.\n if (piece == BLACKPIECE + ((isWhite) ? -1 : 0) || piece == BLACKKING + ((isWhite) ? -1 : 0)) {\n enemypieces++;\n }\n \n //for the kings it is not checked whether they are on the sides of the board or not since they have more movement freedom\n //and their is no real benifit for them to be at the sides.\n h += SQ_LEFT(i) * SQ_RIGHT(i) * ((piece == WHITEPIECE) ? 1.5 : 0) - SQ_LEFT(i) * SQ_RIGHT(i) * ((piece == BLACKPIECE) ? 1 : 0) + \n ((piece == WHITEKING) ? 4 : 0) - ((piece == BLACKKING) ? 5 : 0) + 0.3 * is_square(i, pieces);\n \n }\n \n // Victory rush\n if(enemypieces < 4) {\n h += 1;\n }\n\n \n if (isWhite) {\n return h;\n } else\n \n return -h;\n }", "public int fight() {\r\n\t\treturn -this.randomObject.nextInt(50);\r\n\t}", "static void attacking() throws GameActionException {\n\n\t\trc.setIndicatorLine(myLocation, myLocation.add(robotDirection), 0, 0, 0);\n\n\t\tcheckLumberjack();\n\n\t\tint maxSoldier = Constants.MAX_COUNT_SOLDIER;\n\t\tint maxTank = Constants.MAX_COUNT_TANK;\n\n\t\tint numSoldier = rc.readBroadcast(Channels.COUNT_SOLDIER);\n\t\tint numTank = rc.readBroadcast(Channels.COUNT_TANK);\n\n\t\tfloat maxRatio = (float) (maxSoldier) / (maxTank + 1);\n\t\tfloat numRatio = (float) (numSoldier) / (numTank + 1);\n\n\t\tboolean canBuildTank = rc.canBuildRobot(RobotType.TANK, robotDirection);\n\t\tboolean canBuildSoldier = rc.canBuildRobot(RobotType.SOLDIER, robotDirection);\n\n\t\tSystem.out.println(numRatio + \">\" + maxRatio);\n\n\t\tif (canBuildSoldier && numSoldier < maxSoldier && numRatio < maxRatio) {\n\t\t\trc.buildRobot(RobotType.SOLDIER, robotDirection);\n\t\t\tCommunication.countMe(RobotType.SOLDIER);\n\t\t} else if (canBuildTank && numTank < maxTank) {\n\t\t\trc.buildRobot(RobotType.TANK, robotDirection);\n\t\t\tCommunication.countMe(RobotType.TANK);\n\t\t}\n\n\t}", "public int fight(HW10Monster a, HW10Monster b,HW10Trainer a1,HW10Trainer b1 )\n\t{\n\t\t\n\t\tif(a.type.equals(\"earth\") && b.type.equals(\"fire\"))//determines which case the pokemon will have a stronger or weaker type attack power\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage + (.30*a.damage));//sets the first trainers pokemon attack to be extra strong against the seconds trainer pokemon\n\t\t\t\tb.damage=(int)(b.damage - (.30*b.damage));\n\t\t\t}\n\t\telse if(a.type.equals(\"earth\") && b.type.equals(\"water\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage - (.30*a.damage));\n\t\t\t\tb.damage=(int)(b.damage + (.30*b.damage));\n\t\t\t}\n\t\telse if(a.type.equals(\"water\") && b.type.equals(\"earth\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage + (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage - (b.damage*.30));\n\t\t\t}\n\t\telse if(a.type.equals(\"water\") && b.type.equals(\"fire\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage - (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage + (b.damage*.30));\n\t\t\t}\n\t\telse if(a.type.equals(\"fire\") && b.type.equals(\"earth\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage - (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage + (b.damage*.30));\n\t\t\t}\n\t\telse if(a.type.equals(\"fire\") && b.type.equals(\"water\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage + (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage - (b.damage*.30));\n\t\t\t}\n\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\twhile(a.hp>0 && b.hp>0)//while both pokemon are still above zero continue to take away hp\n\t\t\t{\n\t\t\t\ta.hp=a.hp - b.damage;\n\t\t\t\tb.hp=b.hp - a.damage;\n\t\t\n\t\t\t\n\t\t\t if(a.hp<1 && b.hp<1)//if pokemon are below 1 \n\t\t\t \t{\n\t\t\n\t\t\t\treturn 3;\n\t\t\t\t}\n\t\t\telse if(a.hp>1 && b.hp<1) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t else if (a.hp<1 && b.hp>1)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\treturn 2;\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\n\t\t\treturn 5;\n\t}", "@Override\n\tpublic void lose() {\n\t\t\n\t\tfround[fighter2]++;\n\t fplatz[fighter2]=Math.round((float)fplatz[fighter2]/2); \n\t\tnextRound();\n\t}", "public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();", "int getMaxHP();", "public void rollStats() {\n\t\tRandom roll = new Random();\n\t\tint rolled;\n\t\tint sign;\n\t\t\n\t\t\n\t\trolled = roll.nextInt(4);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetMaxHealth(getMaxHealth() + rolled*(getDifficulty()+5/5));\n\t\t\tsetHealth(getMaxHealth());\n\t\t} else {\n\t\t\tsetMaxHealth(getMaxHealth() - rolled*(getDifficulty()+5/5));\n\t\t\tsetHealth(getMaxHealth());\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetAttack(getAttack() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetAttack(getAttack() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetDefense(getDefense() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetDefense(getDefense() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetSpeed(getSpeed() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetSpeed(getSpeed() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t}", "public static int[] fight(String enemy, int enemyHealth, int enemyDamage, int playerHealth, int playerDamage, int elixirCount, int elixirHealth, int wins, boolean[] items, int itemCount, int level) {\r\n System.out.println(\"You've chosen to fight!\");\r\n playerHealth = playerHealth - enemyDamage;\r\n enemyHealth = enemyHealth - playerDamage;\r\n //FIGHT: Player died\r\n if (playerHealth <= 0) {\r\n playerHealth = 0;\r\n System.out.println(\"You lost.\");\r\n int[] returned = {50, elixirCount, wins, itemCount};\r\n if (level == 3)\r\n playerHealth = returned[0];\r\n elixirCount = returned[1];\r\n wins = returned[2];\r\n itemCount = returned[3];\r\n return new int[]{playerHealth, elixirCount, wins, itemCount};\r\n }\r\n //FIGHT: Enemy died\r\n else if (enemyHealth <= 0) {\r\n System.out.println(\"You won! You now have \" +playerHealth+ \" HP!\");\r\n wins += 1;\r\n items = drop(enemy, enemyHealth, enemyDamage, playerHealth, playerDamage, elixirCount, elixirHealth, wins, items, itemCount, level);\r\n if (items[wins - 1] ||wins==4)\r\n itemCount += 1;\r\n int[] returned = {playerHealth, elixirCount, wins, itemCount};\r\n if (level == 3)\r\n playerHealth = returned[0];\r\n elixirCount = returned[1];\r\n wins = returned[2];\r\n itemCount = returned[3];\r\n return new int[]{playerHealth, elixirCount, wins, itemCount};\r\n }\r\n //FIGHT: No ones dead yet\r\n else {\r\n System.out.println(\"The \" +enemy+ \" now has \" +enemyHealth+ \" HP!\\nYou now have \" +playerHealth+ \" HP!\\n\");\r\n int[] returned = choice(enemy, enemyHealth, enemyDamage, playerHealth, playerDamage, elixirCount, elixirHealth, wins, items, itemCount, level);\r\n if (level == 3)\r\n playerHealth = returned[0];\r\n elixirCount = returned[1];\r\n wins = returned[2];\r\n itemCount = returned[3];\r\n }\r\n return new int[]{playerHealth, elixirCount, wins, itemCount};\r\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "private double getUnadjustedFitness(Computer computer){\n double score = 0;\n score += 6 * getMatchPercent(computer);\n if(computer.compatible() && sizeCompatability(computer))\n score += 9.5;\n int ramAmount =computer.ramAmount();\n if(ramAmount < 8)\n score -= (8 - ramAmount) * 2;\n else if(ramAmount > 8 && ramAmount < 17)\n score += .06 * (ramAmount - 8);\n else if(ramAmount > 17)\n score += .03 * (ramAmount - 8);\n\n if(computer.cpu.name.contains(\"Intel\") && computer.cpu.name.endsWith(\"K\")){\n if (!computer.motherboard.overclock()){\n score -= 6;\n }\n }\n\n if(computer.cpu.name.contains(\"Intel\") && !(computer.cpu.shortname.contains(\"-5\") || computer.cpu.shortname.contains(\"-6\"))){\n score -= 2;\n }\n if(computer.cpu.name.contains(\"GeForce\") && !(computer.gpu.name.contains(\"GTX 9\") || computer.gpu.name.contains(\"GTX 1\"))){\n score -= 2;\n }\n if(computer.bootDrive.size < 240)\n score -= settings.diskSize * 0.33;\n if(computer.bootDrive.size > 700)\n score += settings.diskSize * 5;\n else\n score += settings.diskSize * computer.bootDrive.size / 140;\n if(computer.secondaryDrive != null)\n score += settings.diskSize * computer.secondaryDrive.size / 1000;\n\n //Now ensure there's enough power, and give a bonus for there being ~300 watts more than needed;\n //there are 4.5 points to gain in powersupply, 10 points to lose\n int basePower = computer.powerConsumption();\n int ideal = basePower + 65;\n if(computer.power.watts < basePower)\n score -= 10;\n else if(computer.power.watts < ideal)\n score += (basePower - computer.power.watts) / 100;\n else\n score += 2.5 - (computer.power.watts - basePower) / 250;\n score += (3 - computer.power.tier) * .6;\n\n // Now motherboard, one point to gain, one to lose\n score += 2 - computer.motherboard.getQuality();\n\n double driveScore = ((computer.bootDrive.reads + computer.bootDrive.writes) / 2) / 88;\n driveScore -= 2;\n if(driveScore > 7.5){\n driveScore = 7.5;\n }\n score += driveScore;\n double rawCpu = ((1 - settings.multicore) / 3) * computer.cpu.singlecore + ((settings.multicore / 3) * (computer.cpu.multicore));\n double adjustedCpu = 26 + 40* ((settings.cpuIntensity / (settings.cpuIntensity + settings.gpuIntensity))* rawCpu - lowCpuScore()) / (maxCpuScore() - lowCpuScore());\n double rawGpu = computer.gpu.fps + (computer.gpu.threedmark / 100);\n double adjustedGpu = 17 + 40 * ((settings.gpuIntensity / (settings.cpuIntensity + settings.gpuIntensity)) * rawGpu - lowGpuScore()) / (maxGpuScore() - lowGpuScore());\n //Inflate the GPU score slightly\n // adjustedGpu * ((35 - adjustedGpu) / 35);\n score += adjustedGpu;\n score += adjustedCpu;\n\n return score;\n }", "public void tick(){\r\n scoreKeep++;\r\n if(scoreKeep >= 500){\r\n scoreKeep = 0;\r\n hud.setLevel(hud.getLevel()+1);\r\n // continuous addition of enemies at each new level\r\n if(game.diff == 0) {\r\n \tif((hud.getLevel() >= 2 && hud.getLevel() <= 3)||(hud.getLevel() >= 7 && hud.getLevel() <= 9))\r\n \thandler.addObject(new BasicEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.BasicEnemy, handler));\r\n if(hud.getLevel() == 4 || hud.getLevel() == 6)\r\n handler.addObject(new FastEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.FastEnemy, handler));\r\n if(hud.getLevel() == 5)\r\n \thandler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n if(hud.getLevel() == 10){\r\n handler.clearEnemies();\r\n handler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n handler.addObject(new BossEnemy((Game.width/2)-48, -100, ID.BossEnemy, handler));\r\n }\r\n }else if(game.diff == 1) {\r\n \tif((hud.getLevel() >= 2 && hud.getLevel() <= 3)||(hud.getLevel() >= 7 && hud.getLevel() <= 9))\r\n \thandler.addObject(new HardEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.BasicEnemy, handler));\r\n if(hud.getLevel() == 4 || hud.getLevel() == 6)\r\n handler.addObject(new FastEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.FastEnemy, handler));\r\n if(hud.getLevel() == 5)\r\n \thandler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n if(hud.getLevel() == 10){\r\n handler.clearEnemies();\r\n handler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n handler.addObject(new BossEnemy((Game.width/2)-48, -100, ID.BossEnemy, handler));\r\n }\r\n }\r\n }\r\n }", "private static double calWinRate5Cards(Card[] cards, int playerNum) {\n\t\tint winTimes = 0;\n\t\tPlayer[] oppsPlayers = new Player[playerNum - 1]; \n\t\tPlayer mePlayer = new Player();\n\t\tfor(int i = 0; i<50; i++){\n\t\t\t//生成playerNum-1个人,每个人2+3=5张\t\t\n\t\t\t\n\t\t}\n\t\treturn 0.6;\n\t}", "private void enemyturn() {\n if (enemy.getHealth() == 0) { // check if the enemy is still alive\n enemy.setAlive(false);\n }\n\n if (enemy.getAlive()) { // if he is alive\n // time to fuck the players day up\n System.out.println(\"\");//formatting\n System.out.println(enemy.getName() + \" attacks you!\");\n\n // calculate the damage this enemy will do\n int differenceHit = enemy.getMaxHit() - enemy.getMinHit(); // difference will be 0-3. But plus 1 (as the result will ALWAYS be +1 in the randomizer so a \"0\" will not happen.\n int minimumDamage = randomize.getRandomDamage(differenceHit); // for example, will return 0-4 if the min and max hit was 4-7. Then do a -1. Making it a 0-3 chance.\n int damage = differenceHit + minimumDamage; // add the minimum damage, to random hit damage.\n\n // calculate the players armor\n damage = damage - player.getPlayerArmorRating();\n if (damage <= 0){\n System.out.println(\"... but you dont take any damage because of your armor!\");\n } else {\n\n System.out.println(\"You take \" + damage + \" damage!\");\n player.removeHealth(damage);\n }\n\n } else { // when ded\n System.out.println(\"The enemy has no chance to fight back. As your final blow killed the enemy.\");\n }\n }", "boolean hasMaxHP();", "boolean hasMaxHP();", "boolean hasMaxHP();", "boolean hasMaxHP();", "boolean hasMaxHP();", "boolean hasMaxHP();", "void win() {\n\t\t_money += _bet * 2;\n\t\t_wins++;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}", "private void evaluateWin(boolean finalCheck)\r\n\t{\r\n\t\t// Stores player and dealer scores in local variables, rather than repeatedly call the get methods\r\n\t\tint scoreP = player1.getTotal();\r\n\t\tint scoreD = dealer.getTotal();\r\n\t\t\r\n\t\t// first check: is the game still going? If it has ended, then no evaluation needs to be made\r\n\t\tif ( !endGame )\r\n\t\t{\r\n\t\t\t/* second check: is this the final evaluation? if not, the first block of statements executes.\r\n\t\t\tIf Player == 21 and Dealer == 21, Tie\r\n\t\t\tIf Player == 21 and Dealer != 21, Player wins\r\n\t\t\tIf Player != 21 and Dealer == 21, Dealer wins\r\n\t\t\tIf Player > 21, Dealer wins at any number\r\n\t\t\tIf Player > Dealer at the end of the game and no one has busted or hit 21, Player wins\r\n\t\t\tThe last check is performed only if finalCheck is true.\r\n\t\t\t*/\r\n\t\t\tif ( !finalCheck )\r\n\t\t\t{\r\n\t\t\t\tif (scoreP > BUST_SCORE)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You lose...\");\r\n\t\t\t\t\tendGame = true;\r\n\t\t\t\t}\r\n\t\t\t\telse if (scoreP == BUST_SCORE)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (scoreD == BUST_SCORE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"It's a tie.\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"You win!\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end scoreP > BUST_SCORE\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif (scoreD == BUST_SCORE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"You lose...\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (scoreD > BUST_SCORE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"You win!\");\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end ScoreP <= BUST SCORE\r\n\t\t\t} // end finalCheck = false\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Final victory condition check\r\n\t\t\t\tif ( dealer.getTotal() < player1.getTotal() )\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You win!\");\r\n\t\t\t\t}\r\n\t\t\t\telse if ( dealer.getTotal() == player1.getTotal() )\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"It's a tie.\");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"You lose...1\");\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t} // end finalCheck = true\r\n\t\t\r\n\t\t} // end endGame = false if\r\n\t\r\n\t}", "public void autosimulateCombat() {\n\n int monstersRemainingHealth = monster.getHealth() - player.getPower();\n int playersRemainingHealth = player.getHealth() - monster.getPower();\n\n while (player.getHealth() > 0 && monster.getHealth() > 0) {\n\n monster.setHealth(monstersRemainingHealth);\n monstersRemainingHealth = monster.getHealth() - player.getPower();\n\n\n player.setHealth(playersRemainingHealth);\n playersRemainingHealth = player.getHealth() - monster.getPower();\n\n }\n isPlayerDefeated();\n return;\n }", "double getCritChance();", "public boolean nearMaxRescue() {\n double water = this.waterLevel;\n double no = (this.configuration.getMaximalLimitLevel()\n - this.configuration.getMaximalNormalLevel()) / 2;\n if (water > this.configuration.getMaximalLimitLevel()\n || water > this.configuration.getMaximalLimitLevel() - no) {\n return true;\n } else if (water < this.configuration.getMinimalLimitLevel()\n || water < this.configuration.getMinimalLimitLevel() + no) {\n\n return true;\n }\n return false;\n }", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public int getMaxHealth();", "public int getHealthGain();", "public static boolean isMaxed(Player player) {\n\t\tif (player.getSkills().getLevelForXp(Skills.ATTACK) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.STRENGTH) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.DEFENCE) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.RANGE) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.PRAYER) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.MAGIC) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.RUNECRAFTING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.HITPOINTS) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.AGILITY) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.HERBLORE) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.THIEVING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.CRAFTING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.FLETCHING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.SLAYER) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.HUNTER) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.MINING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.SMITHING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.FISHING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.COOKING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.FIREMAKING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.WOODCUTTING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.FARMING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.CONSTRUCTION) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.SUMMONING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.DUNGEONEERING) >= 99\n\t\t\t\t&& player.getSkills().getLevelForXp(Skills.DIVINATION) >= 99)\n\t\treturn true;\n\treturn false;\n\t}", "double getMissChance();", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "public boolean checkIfPlayerHoldsExplosive () { return noOfExplosives > 0; }", "public int whoWin(){\r\n int winner = -1;\r\n \r\n int highest = 0;\r\n \r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(getPlayerPoints(player) > highest){\r\n highest = getPlayerPoints(player);\r\n winner = player.getID();\r\n }\r\n \r\n }\r\n \r\n return winner;\r\n }", "public boolean isHighValue() {\n return reward > 750;\n }", "private void calculeStatAdd() {\n resourceA = this.getContext().getGame().getPlayer(idPlayer).getInventory().getValueRessource(type);\n int win = resourceA - resourceB;\n int diff = (resourceB - resourceA) + value;\n this.getContext().getStats().incNbRessourceWinPlayers(idPlayer,type,win);\n this.getContext().getStats().incNbRessourceExtendMaxPlayers(idPlayer,type,diff);\n }", "void win() {\n String name = score.getName();\n if (Time.getSecondsPassed() < 1) {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / 1);\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + 1 + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n } else {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / Time.getSecondsPassed());\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n }\n }", "public int computeRangedDamageTo(Combatant opponent) { return 0; }", "public static void increaseDifficaulty() {\r\n\t\tif (Enemy._timerTicker > 5)\r\n\t\t\tEnemy._timerTicker -= 2;\r\n\t\tif (Player._timerTicker < 100)\r\n\t\t\tPlayer._timerTicker += 2;\r\n\t}", "@Test\n public void testWinLossRatio(){\n float wins = 0;\n float losses = 0;\n\n realDie1 = new Dice();\n realDie2 = new Dice();\n realDie3 = new Dice();\n\n game = new Game(realDie1, realDie2, realDie3);\n\n when (mockPlayer.getBalance()).thenReturn(100);\n\n int currentGameWins = 0;\n\n for (int i = 0; i < 10000; i++) {\n currentGameWins = game.playRound(mockPlayer, DiceValue.ANCHOR, 10);\n\n if (currentGameWins == 0) {\n losses ++;\n } else {\n wins ++;\n }\n\n }\n System.out.println(\"Wins = \" + wins + \" Losses = \" + losses);\n float ratio = wins/(losses + wins);\n System.out.println(\"Win ratio = \" + ratio);\n }", "static void golbat_fights() {\n enter = next.nextLine();\n System.out.println( username + \" defeat this Golbat to advance into the next level \");\n System.out.println(\"Don't let the Golbat fly near you... It's part vampire. You wouldn't want that to be near you.\");\n enter = next.nextLine();\n System.out.println(\"'We can do this master \" + username + \". Just hang on!\");\n playerhealth = 310; // player leveled up to level 5 with 500 HP\n golbathealth = 190; //this is the Golbat's health.\n monsterisalive = true;\n while(monsterisalive){//#while-while loop that will allow the player fight the golbat\n if(monsterisalive){\n System.out.println(\" The Golbat's HP is \" + golbathealth + \".\");\n enter = next.nextLine();\n System.out.println(\"You have recently leveled up and now can use up to six different types of attacks:\");\n enter = next.nextLine();\n System.out.println(username + \", you can cast fire, ice, lightning spells, throw rocks at the enemy,\");\n System.out.println(\"throw in multiple wind storms, heal, or run\");\n attack = next.nextLine(); //attack response\n if(attack.contains(\"fire\")){\n System.out.println(\"Alright, I'm fired up...FOOSH!!!\");\n golbathealth = golbathealth-30;\n System.out.println(\"The Golbat lost 30 HP. The Golbat now has \" + golbathealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You have \" + playerhealth + \" HP.\");\n }else if (attack.contains(\"ice\")) {\n System.out.println(\"Alright, it's gonna be a little chilly...GHAAAA!!!\");\n golbathealth = golbathealth-20;\n System.out.println(\"The Golbat lost 20 HP. The Golbat currently has \" + golbathealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You have \" + playerhealth + \" HP.\");\n }else if (attack.contains(\"lightning\")) {\n System.out.println(\"Someone's getting fried today...BAAAAAMMMM!!!\");\n golbathealth = golbathealth-40;\n System.out.println(\"OUCH!!! The Golbat lost 40 HP. It now has \" + golbathealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You have \" + playerhealth + \" HP.\");\n }else if (attack.contains(\"throw rocks\")) {\n System.out.println(\"Incoming Boulder...BOOOOOMM!!!\");\n golbathealth = golbathealth-30;\n System.out.println(\"The Golbat lost 30 HP. It now has \" + golbathealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\"); \n }else if (attack.contains(\"wind\")) {\n System.out.println(\"Alright...let's finish this up...WHIRL!!!\");\n golbathealth = golbathealth-10;\n System.out.println(\"The Golbat lost 10 HP. It now has \" + golbathealth + \" HP.\");\n enter = next.nextLine();\n System.out.println(\"You now have \" + playerhealth + \" HP.\");\n }else if (attack.contains(\"run\")) {\n System.out.println(\"Coward...there's no running. You lost a turn and don't have enough time to check your health.\");\n }else if (attack.contains(\"heal\")) { //player will be given an opportunity to heal\n healing_challenge2();\n System.out.println(\"\\n\");\n System.out.println(\"The golbat still has \" + golbathealth + \" HP.\");\n System.out.println(username + \"'s HP increased to \" + playerhealth + \" HP.\");\n enter = next.nextLine();\n }\n }//check to see if adding an if(monsterisalive) will prevent\n if(golbathealth <= zero) {\n System.out.println(\"You defeated the golbat.\");\n System.out.println(\"You win!\");\n System.out.println(\"The Golbat left a drooping that seems to glimmer...\");\n System.out.println(\"Do you want to check it out: yes or no?\");\n if(answer.contains(\"y\")) {\n System.out.println(username + \" clears the droopings and finds a small bottle of potion.\");\n potions = potions+1;\n System.out.println(username + \" puts the healing potion into the bag, which now contains \" + potions + \" potions.\");\n System.out.println(\"\\n\");\n }else{\n System.out.println(username + \" casts a fire spell and burned the droopings...\");\n System.out.println(\"\\n\");\n }\n monsterisalive = false;\n }else if (golbathealth > zero) {\n enter = next.nextLine();\n System.out.println(\"Now it is the Golbat's turn... Brace Yourself\");\n enter = next.nextLine();\n System.out.println(\"The Golbat swooped down and cutted \" + username + \" with its wings and bit \");\n System.out.println(username + \"'s neck... \"); \n playerhealth = playerhealth-40;\n System.out.println(\"OUCH! \" + username + \" lost 40 HP...You now have \" + playerhealth + \".\");\n enter = next.nextLine();\n }\n if(playerhealth <= zero) {\n System.out.println(\"OH NO!!! You lost all your HP.\");\n monsterisalive = false;\n play_yellowportal();\n }\n }\n }", "public void takeDamage(int damage) {\n Random rand = new Random();\n int game = rand.nextInt(51) + 75;\n double game2 = (double) game;\n double percDamage = game2/100.0;\n double realSomething = (double) damage;\n double actualDamageNotReal = realSomething * percDamage;\n int actualDamage = (int) actualDamageNotReal;\n int actualDmg = actualDamage - this.armour;\n if (actualDmg <= 0){\n actualDmg = 0;\n }\n this.health -= actualDmg;\n slowDisplay(String.format(\"%s takes %s damage, now at %s\\n\",this.name,actualDmg,this.health));\n\n }", "public void win(int player)\r\n\t{\r\n\t\taccountValue[player]+=pool;\r\n\t\tendRund();\r\n\t}", "public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue();\n Card.NUMBER three = player3Play.getValue();\n Card.NUMBER four = player4Play.getValue();\n Card.SUIT oneSuit = player1Play.getSuit();\n Card.SUIT twoSuit = player2Play.getSuit();\n Card.SUIT threeSuit = player3Play.getSuit();\n Card.SUIT fourSuit = player4Play.getSuit();\n int[] value = new int[4];\n value[0] = Card.getValsVal(one, oneSuit, currentTrumpSuit);\n value[1] = Card.getValsVal(two, twoSuit, currentTrumpSuit);\n value[2] = Card.getValsVal(three, threeSuit, currentTrumpSuit);\n value[3] = Card.getValsVal(four, fourSuit, currentTrumpSuit);\n if(player1Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[0] += 10;\n }\n if(player2Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[1] += 10;\n }\n if(player3Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[2] += 10;\n }\n if(player4Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[3] += 10;\n }\n if(player1Play.getSuit() == currentTrumpSuit || value[0] == 7){\n value[0] += 20;\n }\n if(player2Play.getSuit() == currentTrumpSuit || value[1] == 7){\n value[1] += 20;\n }\n if(player3Play.getSuit() == currentTrumpSuit || value[2] == 7){\n value[2] += 20;\n }\n if(player4Play.getSuit() == currentTrumpSuit || value[3] == 7){\n value[3] += 20;\n }\n int winner = 0;\n int winVal = 0;\n for(int i = 0; i < 4; i++){\n if(value[i] > winVal){\n winVal = value[i];\n winner = i;\n }\n }\n return winner;\n }", "public void updateStats( ) {\r\n\t\tperseverance = owner.perseverance;\r\n\t\tobservation = owner.observation;\r\n\t\tintellect = owner.intellect;\r\n\t\tnegotiation = owner.negotiation;\r\n\t\ttact = owner.tact;\r\n\t\tstrength = owner.strength;\r\n\r\n\t\txCoord = owner.xCoord;\r\n\t\tyCoord = owner.yCoord;\r\n\r\n\t\tmaxHealth = 2400 + ( perseverance * 200 );\r\n\r\n\t\thealth = maxHealth;\r\n\r\n\t\tsetDamages( );\r\n\t}" ]
[ "0.65561515", "0.65103245", "0.65016496", "0.64777523", "0.64252883", "0.6424496", "0.640434", "0.6340832", "0.63081115", "0.6287974", "0.62809515", "0.6257321", "0.6201282", "0.61982924", "0.6171887", "0.6158085", "0.6157703", "0.61529714", "0.61310697", "0.61189824", "0.61167043", "0.6113018", "0.6094837", "0.6094612", "0.60932004", "0.60851496", "0.607082", "0.6064241", "0.6061239", "0.60556465", "0.6028561", "0.6007792", "0.6001047", "0.599838", "0.59622365", "0.59148586", "0.5910901", "0.5899008", "0.5887946", "0.58779645", "0.5874631", "0.58711433", "0.585936", "0.5850892", "0.58439475", "0.58355975", "0.58338183", "0.582495", "0.5822612", "0.5818276", "0.5810999", "0.58006644", "0.5800041", "0.5786858", "0.5785322", "0.57779384", "0.57754713", "0.57754713", "0.57754713", "0.57754713", "0.57754713", "0.57754713", "0.57754713", "0.57592833", "0.5754103", "0.5753934", "0.5753648", "0.57527596", "0.57523346", "0.5751565", "0.57497084", "0.57497084", "0.57497084", "0.57497084", "0.57497084", "0.57497084", "0.57442385", "0.57387155", "0.57377976", "0.5736602", "0.572399", "0.5723946", "0.5722336", "0.57209164", "0.5719605", "0.5716617", "0.5709169", "0.5705228", "0.5701568", "0.56992364", "0.56973356", "0.5697317", "0.569608", "0.56952965", "0.5693232", "0.56889474", "0.5683461", "0.56794024", "0.56788063", "0.56787825" ]
0.8013637
0
/ GreedyDefense: my turrets are more than enemy's turrets and my energy buildings are more than enemy's energy buildings
private boolean checkGreedyDefense() { return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getMinigameDefenseChancesLeft();", "@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}", "int getDefense();", "int getDefense();", "int getDefense();", "int getDefense();", "int getDefense();", "int getDefense();", "public void findDefeated(){\n for(Enemy enemy: enemies){\n if(enemy.getCurrHP() <= 0 || enemy.isFriendly()){\n if (!defeated.contains(enemy)) {\n defeated.add(enemy);\n }\n }\n }\n }", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "boolean hasDefense();", "private void greedyEnemySpawner(float enemyCap, IEnemyService spawner, World world, GameData gameData) {\r\n while (enemyCap >= MEDIUM_ENEMY_COST) {\r\n\r\n if (enemyCap >= MEDIUM_ENEMY_COST + BIG_ENEMY_COST) {\r\n spawnBigAndMediumEnemy(spawner, world, gameData);\r\n enemyCap -= MEDIUM_ENEMY_COST + BIG_ENEMY_COST;\r\n\r\n } else if (enemyCap >= BIG_ENEMY_COST) {\r\n spawnBigEnemy(spawner, world, gameData);\r\n enemyCap -= BIG_ENEMY_COST;\r\n\r\n } else {\r\n spawnMediumEnemy(spawner, world, gameData);\r\n enemyCap -= MEDIUM_ENEMY_COST;\r\n }\r\n }\r\n }", "static void attacking() throws GameActionException {\n\n\t\trc.setIndicatorLine(myLocation, myLocation.add(robotDirection), 0, 0, 0);\n\n\t\tcheckLumberjack();\n\n\t\tint maxSoldier = Constants.MAX_COUNT_SOLDIER;\n\t\tint maxTank = Constants.MAX_COUNT_TANK;\n\n\t\tint numSoldier = rc.readBroadcast(Channels.COUNT_SOLDIER);\n\t\tint numTank = rc.readBroadcast(Channels.COUNT_TANK);\n\n\t\tfloat maxRatio = (float) (maxSoldier) / (maxTank + 1);\n\t\tfloat numRatio = (float) (numSoldier) / (numTank + 1);\n\n\t\tboolean canBuildTank = rc.canBuildRobot(RobotType.TANK, robotDirection);\n\t\tboolean canBuildSoldier = rc.canBuildRobot(RobotType.SOLDIER, robotDirection);\n\n\t\tSystem.out.println(numRatio + \">\" + maxRatio);\n\n\t\tif (canBuildSoldier && numSoldier < maxSoldier && numRatio < maxRatio) {\n\t\t\trc.buildRobot(RobotType.SOLDIER, robotDirection);\n\t\t\tCommunication.countMe(RobotType.SOLDIER);\n\t\t} else if (canBuildTank && numTank < maxTank) {\n\t\t\trc.buildRobot(RobotType.TANK, robotDirection);\n\t\t\tCommunication.countMe(RobotType.TANK);\n\t\t}\n\n\t}", "public boolean wantToFight(int[] enemyAbilities) {\n boolean fight = boldness < 50;//After 50 fights, believes self unstoppable \n int huntable = 0;\n for(int ability : enemyAbilities){\n if(ability == 1)\n huntable++;\n }\n if(huntable >= 3){\n fight = true;\n }//if at least 3 of the visible stats are 1 then consider this prey and attack\n else if((float)enemyAbilities[1] / (float)getDefenseLvl() <= (float)getStrengthLvl() + (float)(getClevernessLvl() % 10) / (float)enemyAbilities[2] && enemyAbilities[0] / 5 < getLifeLvl() / 5)\n fight = true;//If I fancy my odds of coming out on top, float division for chance\n if(fight){//Count every scar\n boldness++;//get more bold with every battle\n life += enemyAbilities[0] / 5;\n str += enemyAbilities[1] / 5;\n def += enemyAbilities[2] / 5;\n clever += (10 - (enemyAbilities[0] + enemyAbilities[1] + enemyAbilities[2] + enemyAbilities[3] - 4)) / 5;//count the human cleverness attained or the enemies who buffed clever early\n }\n return fight;\n }", "int getIndividualDefense();", "public boolean[] isFightWinning() {\n RobotInfo[] nearbyEnemies = Cache.getEngagementEnemies();\n if (nearbyEnemies.length == 0) {\n return new boolean[] {true};\n }\n \n RobotInfo closestEngageable = null;\n double closestDist = Double.MAX_VALUE;\n double tempDist = 0;\n for (RobotInfo bot : nearbyEnemies) {\n switch (bot.type) {\n case HQ:\n case TOWER:\n // TODO figure out how to deal with towers that turn up...\n return new boolean[] {false, false};\n case BEAVER:\n case DRONE:\n case SOLDIER:\n case TANK:\n case COMMANDER:\n case MINER:\n case BASHER:\n case MISSILE:\n tempDist = curLoc.distanceSquaredTo(bot.location);\n if (tempDist < closestDist) {\n closestDist = tempDist;\n closestEngageable = bot;\n }\n break;\n default:\n break;\n }\n }\n \n if (closestEngageable == null) {\n return new boolean[] {true};\n }\n \n RobotInfo[] allies = rc.senseNearbyRobots(closestEngageable.location, ALLY_INLCUDE_RADIUS_SQ, myTeam);\n double allyScore = Util.getDangerScore(allies);\n double enemyScore = Util.getDangerScore(rc.senseNearbyRobots(closestEngageable.location, ENEMY_INCLUDE_RADIUS_SQ, theirTeam));\n // rc.setIndicatorString(2, \"Ally score: \" + allyScore + \", Enemy score: \" + enemyScore);\n if (allyScore > enemyScore) {\n return new boolean[] {true};\n } else {\n // Check if we are definitely going to die.\n double myHealth = rc.getHealth();\n int myID = rc.getID();\n boolean isAlone = true;\n for (int i = allies.length; i-- > 0;) {\n if (allies[i].ID != myID) {\n isAlone = false;\n if(allies[i].health < myHealth) {\n return new boolean[] {false, false};\n }\n }\n }\n // We didn't find any bots with lower health, so we are the lowest.\n // If we are alone, we should retreat anyways...\n return new boolean[] {false, !isAlone};\n }\n }", "private void checkIfHungry(){\r\n\t\tif (myRC.getEnergonLevel() * 2.5 < myRC.getMaxEnergonLevel()) {\r\n\t\t\tmission = Mission.HUNGRY;\r\n\t\t}\r\n\t}", "private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }", "@Override\n @SuppressWarnings(\"empty-statement\")\n public void attack(){\n\n if (myTerritory.getAlpha() <= 0.5){\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getSoldiers()/4;\n defendingSoldiers = myTerritory.getSoldiers()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }\n else\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getFoodGrowth()/4;\n defendingSoldiers = myTerritory.getFoodGrowth()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }", "public float getDefense()\n {\n return defense;\n }", "public void calcFragility() {\n System.out.println(\"Calculating . . . \");\n\n // getting all exposures\n HashMap<String, HashMap<String, Double>> exposures = gfmBroker.getExposures();\n\n // data structure to store fragility calculations/responses\n responses = new HashMap<>();\n\n double failure=0.0;\n\n /*\n ******** Calculate fragility here ********\n */\n for (JsonNode n : assets) {\n\n String id = n.get(\"id\").asText();\n Double dv = exposures.get(\"wind\").get(id);\n\n // store responses\n responses.put(id, failure);\n }\n }", "private static int monsterDamageDealt(int monsterAttack, int playerDefense){\r\n int monsterDamageDealt;\r\n monsterDamageDealt = (monsterAttack - playerDefense);\r\n if(monsterDamageDealt < 0){\r\n monsterDamageDealt = 0;\r\n return monsterDamageDealt;\r\n }else{\r\n return monsterDamageDealt;\r\n }\r\n }", "protected abstract float _getGrowthChance();", "@Override\n\tpublic double getDefense() {\n\t\treturn 0;\n\t}", "private void calcEfficiency() {\n \t\tdouble possiblePoints = 0;\n \t\tfor (int i = 0; i < fermentables.size(); i++) {\n \t\t\tFermentable m = ((Fermentable) fermentables.get(i));\n \t\t\tpossiblePoints += (m.getPppg() - 1) * m.getAmountAs(\"lb\")\n \t\t\t\t\t/ postBoilVol.getValueAs(\"gal\");\n \t\t}\n \t\tefficiency = (estOg - 1) / possiblePoints * 100;\n \t}", "public int increaseDefense () {\n return 3;\n }", "private boolean checkGreedyIronCurtain() {\r\n return (myself.health < 30 || enTotal.get(0) >= 8 || opponent.isIronCurtainActive || this.myTotal.get(0) < this.enTotal.get(0));\r\n }", "@Test\n public void bestowEnchantmentDoesNotTriggerEvolve() {\n addCard(Zone.BATTLEFIELD, playerA, \"Forest\", 6);\n // Creature - Giant 3/5\n addCard(Zone.BATTLEFIELD, playerA, \"Silent Artisan\");\n\n addCard(Zone.HAND, playerA, \"Experiment One\");\n // Enchanted creature gets +4/+2.\n addCard(Zone.HAND, playerA, \"Boon Satyr\");\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Experiment One\");\n castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, \"Boon Satyr using bestow\", \"Silent Artisan\");\n\n setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n // because Boon Satyr is no creature on the battlefield, evolve may not trigger\n assertPermanentCount(playerA, \"Boon Satyr\", 1);\n Permanent boonSatyr = getPermanent(\"Boon Satyr\", playerA);\n Assert.assertTrue(\"Boon Satyr may not be a creature\", !boonSatyr.isCreature(currentGame));\n assertPermanentCount(playerA, \"Silent Artisan\", 1);\n assertPermanentCount(playerA, \"Experiment One\", 1);\n assertPowerToughness(playerA, \"Experiment One\", 1, 1);\n assertPowerToughness(playerA, \"Silent Artisan\", 7, 7);\n\n }", "private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }", "public static double evaluateSurvivability(Board b, int team) {\n Optional<Leader> ol = b.getPlayer(team).getLeader();\n if (ol.isEmpty()) {\n return 0;\n }\n Leader l = ol.get();\n if (l.health <= 0) { // if dead\n return -99999 + l.health; // u dont want to be dead\n }\n int shield = l.finalStats.get(Stat.SHIELD);\n Supplier<Stream<Minion>> attackingMinions = () -> b.getMinions(team * -1, true, true);\n // TODO add if can attack check\n // TODO factor in damage limiting effects like durandal\n int potentialDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int potentialLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int threatenDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int threatenLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int attackers = attackingMinions.get()\n .map(m -> m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n List<Minion> defendingMinons = b.getMinions(team, false, true)\n .filter(m -> m.finalStats.get(Stat.WARD) > 0)\n .collect(Collectors.toList());\n int leaderhp = l.health + shield;\n int ehp = defendingMinons.stream()\n .map(m -> m.health)\n .reduce(leaderhp, Integer::sum);\n long defenders = defendingMinons.size();\n if (shield > 0) {\n defenders++;\n }\n if (b.getCurrentPlayerTurn() != team) {\n threatenDamage = potentialDamage;\n threatenLeaderDamage = potentialLeaderDamage;\n }\n // if there are more defenders than attacks, then minions shouldn't be\n // able to touch face\n if (defenders >= attackers) {\n ehp = Math.max(ehp - threatenDamage, leaderhp);\n } else {\n ehp = Math.max(ehp - threatenDamage, leaderhp - threatenLeaderDamage);\n if (ehp <= 0) {\n if (team == b.getCurrentPlayerTurn()) {\n // they're threatening lethal if i dont do anything\n return -30 + ehp;\n } else {\n // they have lethal, i am ded\n return -60 + ehp;\n }\n }\n }\n return 6 * Math.log(ehp);\n }", "public static void endDamageStep (boolean hasDefeatedOpponent) {\r\n // Exhausted Executioner effect (turn into defence mode)\r\n if (Game.ActiveAttackingMonster.isTurningIntoDef()) {\r\n Game.ActiveAttackingMonster.passiveEffectExhaustedExecutioner();\r\n }\r\n // delete free mode change per turn\r\n Game.ActiveAttackingMonster.isModeChangeableThisTurn=false;\r\n // gain attack due to fighting experience\r\n if (hasDefeatedOpponent && Game.ActiveAttackingMonster.isGainingExperience()) {\r\n // only count number of defeated monster while the Steep Learning Curve effect is active\r\n getNthSummonedMonster(Game.ActiveAttackingMonster.sumMonsterNumber, Game.ActiveAttackingMonster.isPlayersMonster).numberOfDefeatedMonsters++;\r\n Game.ActiveAttackingMonster.att = Game.ActiveAttackingMonster.att + Mon.SteepLearningCurve.SteepLearningCurveAttBoost();\r\n Game.ActiveAttackingMonster.updateAttDefDisplay();\r\n }\r\n endAttack(false); // swich off booleans remembering what monsters are currently in battle\r\n }", "private static int playerDamageDealt(int playerAttack, int monsterDefense){\r\n int playerDamageDealt;\r\n playerDamageDealt = (playerAttack - monsterDefense);\r\n return playerDamageDealt;\r\n }", "public int fight(HW10Monster a, HW10Monster b,HW10Trainer a1,HW10Trainer b1 )\n\t{\n\t\t\n\t\tif(a.type.equals(\"earth\") && b.type.equals(\"fire\"))//determines which case the pokemon will have a stronger or weaker type attack power\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage + (.30*a.damage));//sets the first trainers pokemon attack to be extra strong against the seconds trainer pokemon\n\t\t\t\tb.damage=(int)(b.damage - (.30*b.damage));\n\t\t\t}\n\t\telse if(a.type.equals(\"earth\") && b.type.equals(\"water\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage - (.30*a.damage));\n\t\t\t\tb.damage=(int)(b.damage + (.30*b.damage));\n\t\t\t}\n\t\telse if(a.type.equals(\"water\") && b.type.equals(\"earth\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage + (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage - (b.damage*.30));\n\t\t\t}\n\t\telse if(a.type.equals(\"water\") && b.type.equals(\"fire\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage - (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage + (b.damage*.30));\n\t\t\t}\n\t\telse if(a.type.equals(\"fire\") && b.type.equals(\"earth\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage - (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage + (b.damage*.30));\n\t\t\t}\n\t\telse if(a.type.equals(\"fire\") && b.type.equals(\"water\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage + (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage - (b.damage*.30));\n\t\t\t}\n\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\twhile(a.hp>0 && b.hp>0)//while both pokemon are still above zero continue to take away hp\n\t\t\t{\n\t\t\t\ta.hp=a.hp - b.damage;\n\t\t\t\tb.hp=b.hp - a.damage;\n\t\t\n\t\t\t\n\t\t\t if(a.hp<1 && b.hp<1)//if pokemon are below 1 \n\t\t\t \t{\n\t\t\n\t\t\t\treturn 3;\n\t\t\t\t}\n\t\t\telse if(a.hp>1 && b.hp<1) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t else if (a.hp<1 && b.hp>1)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\treturn 2;\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\n\t\t\treturn 5;\n\t}", "@Test\n public void bestowNighthowlerTest() {\n addCard(Zone.BATTLEFIELD, playerA, \"Mountain\", 4);\n // Instant - {2}{R}{R}\n // Chandra's Outrage deals 4 damage to target creature and 2 damage to that creature's controller.\n addCard(Zone.HAND, playerA, \"Chandra's Outrage\");\n\n // Enchantment Creature — Horror\n // 0/0\n // Bestow {2}{B}{B}\n // Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.\n addCard(Zone.HAND, playerB, \"Nighthowler\");\n addCard(Zone.BATTLEFIELD, playerB, \"Swamp\", 4);\n // First strike\n // Whenever Alesha, Who Smiles at Death attacks, you may pay {W/B}{W/B}. If you do, return target creature card\n // with power 2 or less from your graveyard to the battlefield tapped and attacking.\n addCard(Zone.BATTLEFIELD, playerB, \"Alesha, Who Smiles at Death\"); // 3/2\n addCard(Zone.GRAVEYARD, playerB, \"Pillarfield Ox\");\n\n castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, \"Nighthowler using bestow\", \"Alesha, Who Smiles at Death\");\n\n // attacks by Alesha and return card on trigger\n attack(2, playerB, \"Alesha, Who Smiles at Death\");\n setChoice(playerB, true); // use trigger\n addTarget(playerB, \"Pillarfield Ox\"); // target card to return\n\n castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, \"Chandra's Outrage\", \"Alesha, Who Smiles at Death\");\n\n setStrictChooseMode(true);\n setStopAt(2, PhaseStep.END_TURN);\n execute();\n\n assertLife(playerB, 18); // -2 from Chandra's Outrage\n assertLife(playerA, 16); // -3 from attack Alesha with bestowed Nighthowler\n\n assertGraveyardCount(playerA, \"Chandra's Outrage\", 1);\n assertGraveyardCount(playerB, \"Alesha, Who Smiles at Death\", 1);\n assertPermanentCount(playerB, \"Nighthowler\", 1);\n assertPowerToughness(playerB, \"Nighthowler\", 2, 2);\n Permanent nighthowler = getPermanent(\"Nighthowler\", playerB);\n\n Assert.assertEquals(\"Nighthowler has to be a creature\", true, nighthowler.isCreature(currentGame));\n }", "private int FindGold() {\n VuforiaLocalizer vuforia;\n\n /**\n * {@link #tfod} is the variable we will use to store our instance of the Tensor Flow Object\n * Detection engine.\n */\n TFObjectDetector tfod;\n \n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = CameraDirection.BACK;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n \n\n /**\n * Initialize the Tensor Flow Object Detection engine.\n */\n if (ClassFactory.getInstance().canCreateTFObjectDetector()) {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL);\n tfod.activate();\n } else {\n telemetry.addData(\"Sorry!\", \"This device is not compatible with TFOD\");\n return 3;\n }\n\n int Npos1=0;\n int Npos2=0;\n int Npos3=0;\n int NposSilver1=0;\n int NposSilver2=0;\n int NposSilver3=0;\n double t_start = getRuntime();\n\n\n while (opModeIsActive()) {\n \n if( (getRuntime() - t_start ) > 3.5) break;\n if (Npos1 >=5 || Npos2>=5 || Npos3>=5)break;\n if (NposSilver1>=5 && NposSilver2>=5)break;\n if (NposSilver2>=5 && NposSilver3>=5)break;\n if (NposSilver1>=5 && NposSilver3>=5)break;\n if (tfod != null) {\n // getUpdatedRecognitions() will return null if no new information is available since\n // the last time that call was made.\n List<Recognition> updatedRecognitions = tfod.getUpdatedRecognitions();\n if (updatedRecognitions != null) {\n //telemetry.addData(\"# Object Detected\", updatedRecognitions.size());\n //if (updatedRecognitions.size() == 3) {\n int goldMineralX = -1;\n int silverMineralX = -1;\n for (Recognition recognition : updatedRecognitions) {\n if (recognition.getLabel().equals(LABEL_GOLD_MINERAL)) {\n goldMineralX = (int) recognition.getLeft();\n telemetry.addData(\"gold position\", goldMineralX);\n if(goldMineralX<300) {\n Npos1++;\n telemetry.addData(\"loc\", 1);\n }else if(goldMineralX<800){\n Npos2++;\n telemetry.addData(\"loc\", 2);\n }else{\n Npos3++;\n telemetry.addData(\"loc\", 3);\n }\n } \n \n if (recognition.getLabel().equals(LABEL_SILVER_MINERAL)) {\n silverMineralX = (int) recognition.getLeft();\n telemetry.addData(\"silver position\", silverMineralX);\n if(silverMineralX<300) {\n NposSilver1++;\n telemetry.addData(\"loc\", 1);\n }else if(silverMineralX<300){\n NposSilver2++;\n telemetry.addData(\"loc\", 2);\n }else{\n NposSilver3++;\n telemetry.addData(\"loc\", 3);\n }\n } \n }\n telemetry.update();\n }\n }\n }\n\n\n if (tfod != null) {\n tfod.shutdown();\n }\n \n \n \n telemetry.addData(\"\", 2);\n \n if (Npos1>=5)return 1;\n if (Npos2>=5)return 2;\n if (Npos3>=5)return 3;\n if (NposSilver1>=5 && NposSilver2>=5)return 3;\n if (NposSilver2>=5 && NposSilver3>=5)return 1; \n if (NposSilver1>=5 && NposSilver3>=5)return 2;\n\n return 3;\n }", "public void defend(){\n\tdefense += (int)(Math.random() * defense * .45 + 5);\n\tstrength -= 3;\n\tif (defense > 70) {\n\t defense = 70;\n\t}\t \n\tcounterDef += 1;\n\tif (counterDef == 2){\n\t counterDef = 0;\n\t recover();\n\t}\n\tSystem.out.println(\"You brace yourself with your bow.\");\n }", "private static void checkForEnemies() throws GameActionException {\n //No need to hijack code for structure\n if (rc.isWeaponReady()) {\n // basicAttack(enemies);\n HQPriorityAttack(enemies, attackPriorities);\n }\n \n //Old splash damage code\n //Preserve because can use to improve current splash damage code\n //But not so simple like just checking directions, since there are many more \n //locations to consider hitting.\n /*if (numberOfTowers > 4) {\n //can do splash damage\n RobotInfo[] enemiesInSplashRange = rc.senseNearbyRobots(37, enemyTeam);\n if (enemiesInSplashRange.length > 0) {\n int[] enemiesInDir = new int[8];\n for (RobotInfo info: enemiesInSplashRange) {\n enemiesInDir[myLocation.directionTo(info.location).ordinal()]++;\n }\n int maxDirScore = 0;\n int maxIndex = 0;\n for (int i = 0; i < 8; i++) {\n if (enemiesInDir[i] >= maxDirScore) {\n maxDirScore = enemiesInDir[i];\n maxIndex = i;\n }\n }\n MapLocation attackLoc = myLocation.add(directions[maxIndex],5);\n if (rc.isWeaponReady() && rc.canAttackLocation(attackLoc)) {\n rc.attackLocation(attackLoc);\n }\n }\n }//*/\n \n }", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "private WeightedSampler<String> getPossibleLethalActions(int team) {\n if (this.b.getCurrentPlayerTurn() != team || this.b.getWinner() != 0) {\n return null;\n }\n Player p = this.b.getPlayer(team);\n WeightedSampler<String> poss = new WeightedOrderedSampler<>();\n List<Minion> minions = this.b.getMinions(team, false, true).collect(Collectors.toList());\n for (Minion m : minions) {\n if (p.canUnleashCard(m)) {\n double totalWeight = UNLEASH_TOTAL_WEIGHT + UNLEASH_WEIGHT_PER_PRESENCE * m.getTotalEffectValueOf(e -> e.getPresenceValue(5));\n List<List<List<TargetList<?>>>> targetSearchSpace = new LinkedList<>();\n this.getPossibleListTargets(m.getUnleashTargetingSchemes(), new LinkedList<>(), targetSearchSpace);\n if (targetSearchSpace.isEmpty()) {\n targetSearchSpace.add(List.of());\n }\n for (List<List<TargetList<?>>> targets : targetSearchSpace) {\n poss.add(new UnleashMinionAction(p, m, targets).toString().intern(), totalWeight / targetSearchSpace.size());\n }\n }\n }\n if (this.b.getMinions(team * -1, false, true).anyMatch(m -> m.finalStats.get(Stat.WARD) > 0)) {\n // find ways to break through the wards\n for (Minion m : minions) {\n if (m.canAttack()) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n List<Minion> searchSpace = m.getAttackableTargets().collect(Collectors.toList());\n double weight = totalWeight / searchSpace.size();\n for (Minion target : searchSpace) {\n double overkillMultiplier = Math.pow(ATTACK_WEIGHT_OVERKILL_PENALTY, Math.max(0, m.finalStats.get(Stat.ATTACK) - target.health));\n poss.add(new OrderAttackAction(m, target).toString().intern(), overkillMultiplier * weight);\n }\n }\n }\n } else {\n // just go face\n this.b.getPlayer(team * -1).getLeader().ifPresent(l -> {\n for (Minion m : minions) {\n if (m.canAttack(l)) {\n double totalWeight = ATTACK_TOTAL_WEIGHT + ATTACK_WEIGHT_MULTIPLIER * m.finalStats.get(Stat.ATTACK);\n poss.add(new OrderAttackAction(m, l).toString().intern(), totalWeight);\n }\n }\n });\n }\n poss.add(new EndTurnAction(team).toString().intern(), END_TURN_WEIGHT);\n return poss;\n }", "int getSuperEffectiveChargeAttacksUsed();", "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "public int getMaxDefense() {\n\t\treturn maxDefense;\n\t}", "void analyze(CaveGen g) {\n caveGenCount += 1; \n\n // count the number of purple flowers\n int num = 0;\n for (Teki t: g.placedTekis) {\n if (t.tekiName.equalsIgnoreCase(\"blackpom\"))\n num += 1;\n }\n if (num > 5) num = 5;\n numPurpleFlowers[num] += 1;\n\n // report about missing treasures\n // print the seed everytime we see a missing treasure\n int minTreasure = 0, actualTreasure = 0;\n for (Item t: g.spawnItem) { minTreasure += t.min; }\n for (Teki t: g.spawnTekiConsolidated) { if (t.itemInside != null) minTreasure += t.min; }\n actualTreasure += g.placedItems.size();\n for (Teki t: g.placedTekis) {\n if (t.itemInside != null)\n actualTreasure += 1;\n }\n int expectedMissingTreasures = 0;\n if (\"CH29 1\".equals(g.specialCaveInfoName + \" \" + g.sublevel))\n expectedMissingTreasures = 1; // This level is always missing a treasure\n boolean missingUnexpectedTreasure = actualTreasure + expectedMissingTreasures < minTreasure;\n if (missingUnexpectedTreasure) {\n println(\"Missing treasure: \" + g.specialCaveInfoName + \" \" + g.sublevel + \" \" + Drawer.seedToString(g.initialSeed));\n missingTreasureCount += 1;\n }\n\n // Good layout finder (story mode)\n if (CaveGen.findGoodLayouts && !CaveGen.challengeMode && !missingUnexpectedTreasure) {\n boolean giveWorstLayoutsInstead = CaveGen.findGoodLayoutsRatio < 0;\n\n ArrayList<Teki> placedTekisWithItems = new ArrayList<Teki>();\n for (Teki t: g.placedTekis) {\n if (t.itemInside != null)\n placedTekisWithItems.add(t);\n }\n\n String ignoreItems = \"g_futa_kyodo,flower_blue,tape_blue,kinoko_doku,flower_red,futa_a_silver,cookie_m_l,chocolate\";\n String findTekis = \"\"; //\"whitepom,blackpom\";\n\n // Compute the waypoints on the shortest paths\n ArrayList<WayPoint> wpOnShortPath = new ArrayList<WayPoint>();\n for (Item t: g.placedItems) { // Treasures\n if (ignoreItems.contains(t.itemName.toLowerCase())) continue;\n WayPoint wp = g.closestWayPoint(t.spawnPoint);\n while (!wp.isStart) {\n if (!wpOnShortPath.contains(wp)) wpOnShortPath.add(wp);\n wp = wp.backWp;\n }\n }\n for (Teki t: placedTekisWithItems) { // Treasures inside enemies\n if (ignoreItems.contains(t.itemInside.toLowerCase())) continue;\n WayPoint wp = g.closestWayPoint(t.spawnPoint);\n while (!wp.isStart) {\n if (!wpOnShortPath.contains(wp)) wpOnShortPath.add(wp);\n wp = wp.backWp;\n }\n }\n for (Teki t: g.placedTekis) { // Other tekis\n if (findTekis.contains(t.tekiName.toLowerCase())) {\n WayPoint wp = g.closestWayPoint(t.spawnPoint);\n while (!wp.isStart) {\n if (!wpOnShortPath.contains(wp)) wpOnShortPath.add(wp);\n wp = wp.backWp;\n }\n }\n }\n /*if (g.placedHole != null) {\n WayPoint wp = g.closestWayPoint(g.placedHole);\n while (!wp.isStart) {\n if (!wpOnShortPath.contains(wp)) wpOnShortPath.add(wp);\n wp = wp.backWp;\n }\n }\n if (g.placedGeyser != null) {\n WayPoint wp = g.closestWayPoint(g.placedGeyser);\n while (!wp.isStart) {\n if (!wpOnShortPath.contains(wp)) wpOnShortPath.add(wp);\n wp = wp.backWp;\n }\n }*/\n\n // add up distance penalty for score\n int score = 0;\n for (WayPoint wp: wpOnShortPath) {\n score += wp.distToStart - wp.backWp.distToStart;\n } \n // add up enemy penalties for score\n for (Teki t: g.placedTekis) {\n WayPoint wp = g.closestWayPoint(t.spawnPoint);\n if (wpOnShortPath.contains(wp)) {\n score += Parser.tekiDifficulty.get(t.tekiName.toLowerCase());\n }\n }\n // add up gate penalties for score\n for (Gate t: g.placedGates) {\n WayPoint wp = g.closestWayPoint(t.spawnPoint);\n if (g.placedHole != null && g.placedHole.mapUnit.type == 0 && g.placedHole.mapUnit.doors.get(0).spawnPoint == t.spawnPoint)\n score += t.life / 3; // covers hole\n // if (g.placedGeyser != null && g.placedGeyser.mapUnit.type == 0 && g.placedGeyser.mapUnit.doors.get(0).spawnPoint == t.spawnPoint)\n // score += t.life / 3; // covers geyser\n if (wpOnShortPath.contains(wp))\n score += t.life / 3; // covers path back to ship\n }\n\n if (giveWorstLayoutsInstead) score *= -1;\n\n // keep a sorted list of the scores\n allScores.add(score);\n\n // only print good ones\n if (CaveGen.indexBeingGenerated > CaveGen.numToGenerate/10 && \n score <= allScores.get((int)(allScores.size()*Math.abs(CaveGen.findGoodLayoutsRatio))) \n || score == allScores.get(0) && CaveGen.indexBeingGenerated > CaveGen.numToGenerate/40) {\n CaveGen.images = true;\n println(\"GoodLayoutScore: \" + Drawer.seedToString(g.initialSeed) + \" -> \" + score);\n }\n else {\n CaveGen.images = false;\n }\n\n }\n\n // good layout finder (challenge mode)\n if (CaveGen.findGoodLayouts && CaveGen.challengeMode) {\n boolean giveWorstLayoutsInstead = CaveGen.findGoodLayoutsRatio < 0;\n\n // compute the number of pokos availible\n int pokosAvailible = 0;\n for (Teki t: g.placedTekis) {\n String name = t.tekiName.toLowerCase();\n if (plantNames.contains(\",\" + name + \",\")) continue;\n if (hazardNames.contains(\",\" + name + \",\")) continue;\n if (name.equalsIgnoreCase(\"egg\"))\n pokosAvailible += 10; // mitites\n else if (!noCarcassNames.contains(\",\" + name + \",\") && !name.contains(\"pom\"))\n pokosAvailible += Parser.pokos.get(t.tekiName.toLowerCase());\n if (t.itemInside != null)\n pokosAvailible += Parser.pokos.get(t.itemInside.toLowerCase());\n }\n for (Item t: g.placedItems)\n pokosAvailible += Parser.pokos.get(t.itemName.toLowerCase());\n\n // compute the number of pikmin*seconds required to complete the level\n float pikminSeconds = 0;\n for (Teki t: g.placedTekis) {\n if (plantNames.contains(\",\" + t.tekiName.toLowerCase() + \",\")) continue;\n if (hazardNames.contains(\",\" + t.tekiName.toLowerCase() + \",\")) continue;\n pikminSeconds += workFunction(g, t.tekiName, t.spawnPoint);\n if (t.itemInside != null)\n pikminSeconds += workFunction(g, t.itemInside, t.spawnPoint);\n }\n for (Item t: g.placedItems) {\n pikminSeconds += workFunction(g, t.itemName, t.spawnPoint);\n }\n pikminSeconds += workFunction(g, \"hole\", g.placedHole);\n pikminSeconds += workFunction(g, \"geyser\", g.placedGeyser);\n // gates??\n // hazards??\n \n int score = -pokosAvailible * 1000 + (int)(pikminSeconds/2);\n if (giveWorstLayoutsInstead) score *= -1;\n\n // keep a sorted list of the scores\n allScores.add(score);\n\n // only print good ones\n if (CaveGen.indexBeingGenerated > CaveGen.numToGenerate/10 && \n score <= allScores.get((int)(allScores.size()*Math.abs(CaveGen.findGoodLayoutsRatio))) \n || score == allScores.get(0) && CaveGen.indexBeingGenerated > CaveGen.numToGenerate/40) {\n CaveGen.images = true;\n println(\"GoodLayoutScore: \" + Drawer.seedToString(g.initialSeed) + \" -> \" + score);\n }\n else {\n CaveGen.images = false;\n }\n }\n }", "public int attack(boolean weakness){\r\n\t\tint damage = 0;\r\n\t\t\r\n\t\tif (energy <= 0) {\r\n\t\t\tSystem.out.println(\"no energy to attack\");\r\n\t\t\tenergy = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (weakness == true) {\r\n\t\t\t\tenergy -= 2;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tenergy -= 1;\r\n\t\t\t}\r\n\t\t\texp += 1;\r\n\t\t\tdamage = 1;\r\n\t\t}\r\n\t\treturn damage;\r\n\t}", "public boolean Fight(Player p)\n{\n\tint m=1;\n\t int t=1;\n int temp=0;\n int player1=this.weapon-1;\n int player2=p.weapon-1;\n\n\t int[] a=new int[this.weapon];\n int[] b=new int[p.weapon];\n System.out.println(\"XXxxXXxxXXxxXXxxXX FIGHT XXxxXXxxXXxxXXxxXX\\n\");\nwhile(this.health>0&&p.health>0)\n{\n System.out.println(\"~~~~~Round: \" +m+\"~~~~~\");\n m++;\n System.out.println(\"++\"+this.name+\" Health: \"+this.health+\" potions.\");\n System.out.println(\"++\"+p.name+\" Health: \"+p.health+\" potions.\");\n\n for (int i=0;i<a.length;i++)\n {\n\ta[i]=this.Roll();\n }\n for(int j=0;j<b.length;j++)\n {\n\tb[j]=p.Roll();\n }\n\n Arrays.sort(a);\n Arrays.sort(b);\n\n System.out.print(this.name+\" has thrown: {\");\n\n for(int i=a.length-1;i>0;i--)\n System.out.print(a[i]+\", \");\n\n System.out.println(a[0]+\"}\");\n\n System.out.print(p.name+\" has thrown: {\");\n for(int j=b.length-1;j>0;j--)\n System.out.print(b[j]+\", \");\n\n System.out.println(b[0]+\"}\");\n\n if(a.length>b.length)\n \ttemp=b.length;\n else\n \ttemp=a.length;\n\n player1=this.weapon-1;\n player2=p.weapon-1;\n t=1;\n while(this.health>0&&p.health>0&&temp>0)\n \t{\n\n System.out.print(\"***Strike \"+t+\": \");\n if(a[player1]==b[player2])\n {\n \tSystem.out.println(\"BOTH suffer blows!!!\");\n \tthis.health-=a[player1]*10;\n \tp.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n \tSystem.out.println(p.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n else if(a[player1]>b[player2])\n {\n \t\tSystem.out.println(p.name+\" does damage!\");\n \tp.health-=a[player1]*10;\n \tSystem.out.println(p.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n }\n else\n {\n \tSystem.out.println(this.name+\" does damage!\");\n \tthis.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n\n player1--;\n player2--;\n\n temp--;\n t++;\n \t}\n\n\n}\nif(this.health<=0)\n return false;\n else\n \treturn true;\n\n}", "@Override\n protected void defend(Territory attacker, double soldiersAttacking){\n // Example of a defending strategy: if the attacker is my subordinate, and attacks me with\n // more soldiers than my stock, then I will surender. Otherwise, attack will all soldiers\n if(myTerritory.getSubordinates().contains(attacker) && soldiersAttacking > myTerritory.getSoldiers()){\n defendingSoldiers = 0;\n }\n else defendingSoldiers = (myTerritory.getSoldiers())*3/4;\n }", "Float attack();", "public int throwDefense(int[] fighter) {\n Coins coins = new Coins();\n return coins.coinTry(fighter[DEFENSE]);\n }", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "protected void processDefensive(World myWorld,\n\t\t\tArrayList<World> worldsInRange) {\n\t\tTreeSet<World> enemies = new TreeSet<World>(World.enemyComparator);\n\t\tTreeSet<World> allies = new TreeSet<World>(World.allyComparator);\n\t\tint neutralCount = 0;\n\n\t\tfor (World w : worldsInRange) {\n\t\t\tif (w.getPower() <= myWorld.getPower()) {\n\t\t\t\tswitch (w.getMode()) {\n\t\t\t\tcase OFFENSIVE:\n\t\t\t\t\t// Defensive avoids attacking offensive without\n\t\t\t\t\t// advantage\n\t\t\t\t\tif (w.getOwner() != this\n\t\t\t\t\t\t\t&& (w.getPower() <= 0.5 * myWorld.getPower() || myWorld\n\t\t\t\t\t\t\t\t\t.getPower() == 100)) {\n\t\t\t\t\t\tenemies.add(w);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEFENSIVE:\n\t\t\t\t\tif (w.getOwner() != this) {\n\t\t\t\t\t\tenemies.add(w);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tallies.add(w);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase EXPLORATIVE:\n\t\t\t\t\t// Defensive avoids attacking explorative without\n\t\t\t\t\t// advantage\n\t\t\t\t\tif (w.getOwner() != this\n\t\t\t\t\t\t\t&& (w.getPower() <= 0.5 * myWorld.getPower() || myWorld\n\t\t\t\t\t\t\t\t\t.getPower() == 100)) {\n\t\t\t\t\t\tenemies.add(w);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase NEUTRAL:\n\t\t\t\t\tif (w.getOwner() != this) {\n\t\t\t\t\t\tneutralCount++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Attack the highest priority victim\n\t\tif (!enemies.isEmpty()) {\n\t\t\tif (enemies.first().getMode() == WorldMode.DEFENSIVE\n\t\t\t\t\t&& rand.nextInt(100) < 75) {\n\t\t\t\t// If defensive encounters enemy defensive, give chance to\n\t\t\t\t// change to offensive\n\t\t\t\tmyWorld.setMode(WorldMode.OFFENSIVE);\n\t\t\t} else {\n\t\t\t\tWorld.initializeAttack(myWorld, enemies.first());\n\t\t\t}\n\t\t} else if (myWorld.getPower() == 100 && neutralCount > 0) {\n\t\t\t// If there's nothing to attack but worlds to claim, change to\n\t\t\t// explorative\n\t\t\tmyWorld.setMode(WorldMode.EXPLORATIVE);\n\t\t}\n\t\t\n\t\tprocessTransfers(myWorld, allies);\n\t}", "float shouldAggroOnHit(IGeneticMob geneticMob, EntityLiving attacker);", "public int throwRandomStrategy(int[] fighter) {\n Random rnd = new Random();\n int defenseLimit = 3;\n//If little life left, he defends 50% of the blows\n if (fighter[LIFE] < 2) {\n defenseLimit = 1;\n }\n int accio = rnd.nextInt(10);\n if ((accio >= 0) && (accio < defenseLimit)) {\n return Combat.ATTACK;\n } else if ((defenseLimit >= 3) && (accio < 6)) {\n return Combat.DEFENSE;\n } else if ((accio >= 6) && (accio < 8)) {\n return Combat.CHEATING;\n } else {\n return Combat.MANEUVER;\n }\n }", "private void obtainProblem(){\n followers = frame.getFollowers();\n followers = Math.min(followers, CreatureFactory.getStrongestMonster().getFollowers() * Formation.MAX_MEMBERS);\n maxCreatures = frame.getMaxCreatures();\n heroes = frame.getHeroes();//is this field needed?\n prioritizedHeroes = frame.getHeroes(Priority.ALWAYS);\n //create boss formation\n LinkedList<Creature> list = new LinkedList<>();\n list.add(frame.getBoss());\n bossFormation = new Formation(list);\n containsRandomBoss = bossFormation.containsRandomHeroes();\n yourRunes = frame.getYourRunes();\n for (int i = 0; i < Formation.MAX_MEMBERS; i++){\n //System.out.println(yourRunes[i]);\n if (!(yourRunes[i] instanceof Nothing)){\n hasRunes = true;\n //System.out.println(\"hasRunes\");\n break;\n }\n }\n \n NHWBEasy = heroes.length == 0 && prioritizedHeroes.length == 0 && frame.getBoss().getMainSkill().WBNHEasy() && !hasRunes && !containsRandomBoss;\n \n }", "public static void damageStep () {\r\n // rough plan:\r\n // #1: flip defending monster, if face down -> see flipMonster(...);\r\n // #2: Ask CPU and player for possible effect negation! (For an attack negation it is too late!) -> see below in this method\r\n // #3: calculate damage, kill monsters, if needed\r\n // (consider also banishing and immunity, also copied passive effect of (Holy) Lance)\r\n // -> see makeDamageCalculation(...);\r\n // #4: decrease life points, if needed -> see isDealingBattleDamageAndContinuingGame(...);\r\n // #5: consider passive (also copied) trap monster effects -> see possibleSuicideEffect(...);\r\n // #6: display Win/Lose dialog and end match, if needed -> see Game.over(...);\r\n // #7: finally end the attack (consider the effects that happen afterwards), thus allowing the next attack -> endDamageStep(...);\r\n \r\n // about #1:\r\n if (Game.ActiveGuardingMonster.isFaceDown) {flipMonster(Game.ActiveGuardingMonster);}\r\n // about #2:\r\n if (Game.ActiveAttackingMonster.canBeNegated() || Game.ActiveGuardingMonster.canBeNegated()) {\r\n AIinterrupts.cpuIsUsingEffectNegateDuringBattlePhase(); // ask CPU to negate effects first\r\n // ask player to negate effect here\r\n boolean isCanceling = false;\r\n boolean hasEffectNegateHandTrap = Hand.lookForEffectNegateOnHand(true);\r\n boolean hasEffectNegateOnField = Hand.lookForEffectNegateOnField(true);\r\n if (hasEffectNegateHandTrap || hasEffectNegateOnField) {\r\n if (hasEffectNegateHandTrap && !hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (!hasEffectNegateHandTrap && hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n else {\r\n int intDialogResult = YuGiOhJi.multipleChoiceDialog(\"Do you want to negate effects on the field?\", \"You can negate passive effects.\", new String[]{\"yes, by discarding Neutraliser\", \"yes, by paying the cost worth 1 card\", \"no (default)\"}, \"no (default)\");\r\n if (intDialogResult==0) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (intDialogResult==1) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n }\r\n }\r\n if (!isCanceling) {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n }\r\n else {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n \r\n }", "private boolean shouldApplyGFTGun(double aimedEnemyDistance, int enemiesCount) {\n double totalIncreasePercentageDistance = enemiesCount * PERCENTAGE_INCREASING_DISTANCE_FOR_EACH_ADDITIONAL_ENEMY;\n boolean result = aimedEnemyDistance <= FURTHEST_DISTANCE_TO_FIRE_ONE_ON_ONE * (1 + totalIncreasePercentageDistance);\n return result;\n }", "public static void hardestBoss() {\r\n // Get array with names of bosses.\r\n BossNames[] names = BossNames.values();\r\n\r\n // Get array of damage/attack points of the bosses.\r\n Boss boss = new Boss();\r\n int bossDamage[] = boss.getBossDamage();\r\n\r\n // Calculate max damage/attack points using for-each loop.\r\n int maxDamage = bossDamage[0];\r\n for (int damage : bossDamage) {\r\n if (damage > maxDamage) {\r\n maxDamage = damage;\r\n }\r\n }\r\n\r\n // Search array for maxDamage to calculate index.\r\n int index = -1;\r\n for (int i = 0; i < bossDamage.length; i++) {\r\n if (bossDamage[i] == maxDamage) {\r\n index = i;\r\n }\r\n }\r\n\r\n if (index != -1) {\r\n console.println(\"The boss with the greatest attack points is \" + names[index] + \".\");\r\n }\r\n }", "@Test\r\n void testHardMajorityAlwaysDefect() {\r\n AlwaysDefect testStrat = new AlwaysDefect();\r\n HardMajority testStrat2 = new HardMajority();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 3, payoffs);\r\n game.playGame();\r\n assertEquals(testStrat2.getPoints(), 3, \"HardMajority strategy not functioning correctly\");\r\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public static void worldTimeStep() {\n\t\t\n\t//Do time step for all critters\n\t\tfor (Critter c: population) {\n\t\t\tc.doTimeStep();\t\t\t\n\t\t}\n\t\n\t\t\n\t//Resolve encounters\n\t\tIterator<Critter> it1 = population.iterator();\n\t\tfightMode = true;\n\t\twhile(it1.hasNext())\n\t\t{\n\t\t\tCritter c = it1.next();\n\t\t\tIterator<Critter> it2 = population.iterator();\n\t\t\twhile(it2.hasNext()&&(c.energy > 0)) \n\t\t\t{\t\n\t\t\t\tCritter a =it2.next();\n\t\t\t\tif((c != a)&&(a.x_coord==c.x_coord)&&(a.y_coord==c.y_coord))\n\t\t\t\t{\n\t\t\t\t\tboolean cFighting = c.fight(a.toString());\n\t\t\t\t\tboolean aFighting = a.fight(c.toString());\n\t\t\t\t//If they are both still in the same location and alive, then fight\n\t\t\t\t\tif ((a.x_coord == c.x_coord) && (a.y_coord == c.y_coord) && (a.energy > 0) && (c.energy > 0)) {\t\t\n\t\t\t\t\t\tint cFight=0;\n\t\t\t\t\t\tint aFight=0;\n\t\t\t\t\t\tif(cFighting)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcFight = getRandomInt(100);\n\t\t\t\t\t\t\tcFight++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(aFighting)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taFight =getRandomInt(100);\n\t\t\t\t\t\t\taFight++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(cFight>aFight)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc.energy+=(a.energy/2);\n\t\t\t\t\t\t\t//it2.remove();\n\t\t\t\t\t\t\ta.energy=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(aFight>cFight)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ta.energy+=(c.energy/2);\n\t\t\t\t\t\t\t//it1.remove()\n\t\t\t\t\t\t\tc.energy=0;\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(aFight>50)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ta.energy+=(c.energy/2);\n\t\t\t\t\t\t\t\t//it1.remove();\n\t\t\t\t\t\t\t\tc.energy=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tc.energy+=(a.energy);\n\t\t\t\t\t\t\t\t//it2.remove();\n\t\t\t\t\t\t\t\ta.energy=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfightMode = false;\n\t\t\n\t//Update rest energy and reset hasMoved\n\t\tfor (Critter c2: population) {\n\t\t\tc2.hasMoved = false;\n\t\t\tc2.energy -= Params.rest_energy_cost;\n\t\t}\n\t\t\n\t//Spawn offspring and add to population\n\t\tpopulation.addAll(babies);\n\t\tbabies.clear();\n\t\t\n\t\tIterator<Critter> it3 = population.iterator();\n\t\twhile(it3.hasNext())\n\t\t{\n\t\t\tif(it3.next().energy<=0)\n\t\t\t\tit3.remove();\n\t\t}\n\t//Create new algae\n\t\tfor (int i = 0; i < Params.refresh_algae_count; i++) {\n\t\t\ttry {\n\t\t\t\tmakeCritter(\"Algae\");\n\t\t\t} catch (InvalidCritterException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public int getDefense() {\n return defense_;\n }", "public BattleSimulator findBattle(){\r\n\r\n List<Enemy> enemies = world.getEnemies();\r\n Character character = world.getCharacter();\r\n List<MovingEntity> activeStructures = world.getActiveStructures();\r\n List<MovingEntity> friendlyEntities = world.getFriendlyEntities();\r\n List<Ally> allies = world.getAllies();\r\n\r\n\r\n // Create potentialFighting list which begins with all enemies in the world\r\n ArrayList<MovingEntity> potentialFighting = new ArrayList<MovingEntity>(enemies);\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n List<Pair<MovingEntity, Double>> pairEnemyDistance = new ArrayList<Pair<MovingEntity, Double>>();\r\n ArrayList<MovingEntity> structures = new ArrayList<MovingEntity>();\r\n\r\n // For each enemy in potentialFighting, find the distance from enemy to character \r\n // If character is in battle radius of enemy, add enemy to a pairEnemyDistance list, remove them from potentialFighting list\r\n for(MovingEntity enemy: enemies) {\r\n double distanceSquaredBR = inRangeOfCharacter(character, enemy, enemy.getBattleRadius());\r\n if(distanceSquaredBR >= 0){\r\n potentialFighting.remove(enemy);\r\n Pair<MovingEntity, Double> pairEnemy = new Pair<MovingEntity, Double>(enemy, distanceSquaredBR);\r\n pairEnemyDistance.add(pairEnemy);\r\n }\r\n }\r\n // if no enemies within battle radius, no battle happens\r\n if (pairEnemyDistance.size() == 0) {\r\n return null;\r\n \r\n // else a battle is about to begin!!!\r\n } else if(pairEnemyDistance.size() > 0) {\r\n // For remaining enemies in potentialFighting list, if fighters list size > 0 and if character is in support radius of that enemy\r\n // also add that enemy to pairEnemyDistance list\r\n for(MovingEntity enemy : potentialFighting){\r\n double distanceSquaredSR = inRangeOfCharacter(character, enemy, enemy.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n Pair<MovingEntity, Double> pairEnemy = new Pair<MovingEntity, Double>(enemy, distanceSquaredSR);\r\n pairEnemyDistance.add(pairEnemy);\r\n }\r\n }\r\n }\r\n\r\n // Sort pairEnemyDistance list by distance of enemy to character, so that the closest enemy is first, the furthest enemy is last\r\n Collections.sort(pairEnemyDistance, new Comparator<Pair<MovingEntity, Double>>() {\r\n @Override\r\n public int compare(final Pair<MovingEntity, Double> p1, final Pair<MovingEntity, Double> p2) {\r\n if(p1.getValue1() > p2.getValue1()) {\r\n return 1;\r\n } else {\r\n return -1;\r\n }\r\n }\r\n });\r\n\r\n // Take all enemies from sorted pairEnemyDistance and add to fighters list\r\n for(Pair<MovingEntity, Double> pairEnemy : pairEnemyDistance) {\r\n fighters.add(pairEnemy.getValue0());\r\n }\r\n \r\n // For each tower, find the distance from tower to character\r\n // If character is in the support radius of tower, add tower to structure list\r\n if(activeStructures.size() > 0){\r\n for(MovingEntity structure : activeStructures) {\r\n if(structure.getID().equals(\"TowerBattler\")) {\r\n double distanceSquaredSR = inRangeOfCharacter(character, structure, structure.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n structures.add(structure);\r\n }\r\n }\r\n }\r\n }\r\n // If character is in the support radius of friendly entities, add to fighters\r\n if(friendlyEntities.size() > 0){\r\n for(MovingEntity friendly : friendlyEntities) {\r\n double distanceSquaredSR = inRangeOfCharacter(character, friendly, friendly.getSupportRadius());\r\n if(distanceSquaredSR >= 0){\r\n fighters.add(friendly);\r\n }\r\n }\r\n }\r\n \r\n // Add all allies to fighters list\r\n for(Ally ally : allies) {\r\n fighters.add(ally);\r\n }\r\n\r\n // Construct BattleSimulator class with character, fighters, structures\r\n BattleSimulator battle = new BattleSimulator(character, fighters, structures);\r\n\r\n // battle is about to begin!\r\n return battle;\r\n }", "public void gameAttack(){\n int counter = 0;\n while (currentPlayer.wantToAttack(this)){\n counter++;\n if (counter > 100) break;\n /*In rare cases, AI players will repeatedly select the same attackers and defenders\n while also not wanting to dice fight. That will infinitely loop here and this counter will prevent it\n Under normal circumstances, no reasonable player will ever try to do more than 100 separate attacks in the same turn\n */\n\n String[] attackerDefender = {\"\",\"\"};\n //AttackStarterSelection\n attackerDefender[0] = currentPlayer.chooseAttackStarter(this);\n\n //AttackDefenderSelection\n attackerDefender[1] = currentPlayer.chooseAttackDefender(this, attackerDefender[0]);\n\n //DiceFightOrQuit\n int attackerDice, defenderDice;\n while (currentPlayer.wantToDiceFight(this, attackerDefender[0]+ \",\" + attackerDefender[1])){\n //DiceFightAttackerChoice\n attackerDice = currentPlayer.getAttackerDice(this, getTerritory(attackerDefender[0]));\n\n //DiceFightDefenderChoice\n Player defender = this.getPlayerFromList(this.getTerritory(attackerDefender[1]).getOwner());\n defenderDice = defender.getDefenderDice(this, this.getTerritory(attackerDefender[1]));\n\n\n //DiceFight results\n displayMessage(this.diceFight(attackerDefender, attackerDice,defenderDice));\n\n //Possible elimination and announcement of winner\n //Current diceFight ends if attacker has 1 troop left, or territory is conquered\n if (endDiceFight(attackerDefender, attackerDice)) break;\n\n }//End diceFightOrQuit\n\n\n }//End wantToAttack\n //Proceed to fortify stage of turn\n }", "void calculateFitness() {\n if (reachedGoal) {\n fitness = 1d / 16d + 8192d / (genome.step * genome.step);\n } else {\n double d = position.distance(Game.Setup.goal);\n fitness = 1d / (d * d);\n }\n }", "@Override\n public abstract float defensiveUse(float characterdefensivePoints, float characterEnergyPoints);", "@Override\n\tpublic boolean fight(String opponent) {\n\t\tif (getEnergy() > (Params.start_energy/2) && (!opponent.equals(\"Critter3\"))) {\n\t\t\treturn true;\n\t\t}\n\t\tint check = this.getX() + 1 ;\n\t\tif(check > (Params.world_width-1)) {\n\t\t\tcheck = 0;\n\t\t}\n\t\tif((this.moveFlag == false) && (myWorld.world[this.getY()][check].isEmpty())){\n\t\t\twalk(0);\n\t\t\tthis.moveFlag = true;\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tthis.setEnergy(this.getEnergy() - Params.walk_energy_cost);\n\t\t\treturn false;\n\t\t}\n\t}", "public int getDefense() {\n\t\treturn defense;\n\t}", "private void strengthen(float hp) {\n this.hp += hp;\n if (this.hp > MAX_HP) {\n this.hp = MAX_HP;\n }\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "public int getDefense() {\n return defense_;\n }", "abstract public Unit getDefendingUnit(Unit attacker);", "protected void attackEntity(Entity par1Entity, float par2) {\n/* 310 */ if (this.attackTime <= 0 && par2 < 3.0F && (par1Entity.func_174813_aQ()).field_72337_e > (func_174813_aQ()).field_72338_b && (par1Entity.func_174813_aQ()).field_72338_b < (func_174813_aQ()).field_72337_e) {\n/* */ \n/* 312 */ if (getIsSummoned()) {\n/* 313 */ ((EntityLivingBase)par1Entity).field_70718_bc = 100;\n/* */ }\n/* */ \n/* 316 */ this.attackTime = 15 + this.field_70146_Z.nextInt(10);\n/* */ \n/* 318 */ double mx = par1Entity.field_70159_w;\n/* 319 */ double my = par1Entity.field_70181_x;\n/* 320 */ double mz = par1Entity.field_70179_y;\n/* 321 */ if (func_70652_k(par1Entity) && \n/* 322 */ !this.field_70170_p.field_72995_K && par1Entity instanceof EntityLivingBase) {\n/* 323 */ ((EntityLivingBase)par1Entity).func_70690_d(new PotionEffect(MobEffects.field_76437_t, 100, 0));\n/* */ }\n/* */ \n/* 326 */ par1Entity.field_70160_al = false;\n/* 327 */ par1Entity.field_70159_w = mx;\n/* 328 */ par1Entity.field_70181_x = my;\n/* 329 */ par1Entity.field_70179_y = mz;\n/* */ \n/* 331 */ func_184185_a(SoundsTC.swarmattack, 0.3F, 0.9F + this.field_70170_p.field_73012_v.nextFloat() * 0.2F);\n/* */ } \n/* */ }", "public int getDef()\r\n {\r\n return defense;\r\n }", "private void communityChest(Player currentPlayer){\n Random rand = new Random();\n int randomNum = rand.nextInt((3 - 1) + 1) + 1;\n int nextPlayer;\n if(m_currentTurn >= m_numPlayers){\n nextPlayer = 0;\n } else {\n nextPlayer = m_currentTurn+1;\n }\n\n if(randomNum == 1){\n convertTextToSpeech(\"Your new business takes off, collect 200\");\n if(m_manageFunds) {\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(200);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 200\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n if(randomNum == 2){\n convertTextToSpeech(\"Your friend hires your villa for a week, \" +\n \"collect 100 off the next player\");\n if(m_manageFunds) {\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(100);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 100\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n players.get(nextPlayer).subtractMoney(100);\n Log.d(\"chance subtract 100\", players.get(nextPlayer).getName() +\n String.valueOf(players.get(nextPlayer).getMoney()));\n }\n }\n if(randomNum == 3){\n convertTextToSpeech(\"You receive a tax rebate, collect 300\");\n if(m_manageFunds) {\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n currentPlayer.addMoney(300);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n Log.d(\"chance add 300\", currentPlayer.getName() +\n String.valueOf(currentPlayer.getMoney()));\n }\n }\n }", "protected boolean IsHighExplosive()\r\n {\r\n \t// Wrapper function to make code a little cleaner.\r\n // isInvulnerable() is wrongly named and instead represents the specific\r\n // skull type the wither has launched\r\n \t\r\n \treturn isInvulnerable();\r\n }", "public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(new FileReader(\"talent.in\"));// new InputStreamReader(System.in)); //\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"talent.out\")));\n int N = sc.nextInt();\n int minWeight = sc.nextInt();\n int[] weight = new int[N];\n int[] value = new int[N];\n int totalTalent = 0;\n for (int i = 0; i < N; i++) {\n int wt = sc.nextInt();\n int val = sc.nextInt();\n weight[i] = wt;\n value[i] = val;\n totalTalent += val;\n }\n\n // Store, for a given talent, what is the smallest weight used to achieve it?\n int[] dp = new int[totalTalent + 1];\n Arrays.fill(dp, (int) 1e9);\n dp[0] = 0;\n // the min weight to produce 0 talent is 0. However,\n // it is necessary to make everything else big because we can only BUILD\n // from 0\n double bestRatio = 0;\n for (int cow = 0; cow < N; cow++) {\n // look at each cow, and go DOWN THROUGH THE dp array, updating the\n // best weight achievable BEHIND US. This countercurrent motion ensures no repeated\n // counting of a single cow's talents\n int contribution = value[cow];\n int wt = weight[cow];\n for (int talent = totalTalent; talent >= 0; talent--) {\n int boostedTalent = contribution + talent;\n int boostedWeight = dp[talent] + wt;\n // with the min weight of a certain talent,\n // is it possible to get a smaller boostedWeight for a boostedTalent\n if (boostedTalent <= totalTalent) {\n // If we are in bounds,\n if (boostedWeight < dp[boostedTalent]) {\n // and the attempted team has a better weight value\n // then update it!\n // Initially, when everything is 1 billion, this cannot\n // happen except for from the base cases, building outward\n dp[boostedTalent] = boostedWeight;\n\n // At the same time, we can be more efficient by constantly\n // checking if we had enough weight first of all, and\n // second of all had a better talent/weight ratio!\n double ratio = (double) boostedTalent / boostedWeight;\n if (ratio > bestRatio && boostedWeight >= minWeight) {\n bestRatio = ratio;\n }\n }\n }\n }\n }\n\n out.println((int) (1000 * bestRatio));\n out.close();\n }", "private double enemyKills()\n {\n return (double)enemyResult.shipsLost();\n }", "public int fire(ArrayList<Enemy> enemies) {\n\t\tint coins = 0;\n\t\tint index = 0;\n\t\tboolean findIt = true;\n\t\t//looking for the first rat\n\t\twhile (!(enemies.get(index) instanceof Rat) || enemies.get(index).getPosition() > position) {\n\t\t\tindex++;\n\t\t\tif (index >= enemies.size()) {\n\t\t\t\tfindIt = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (findIt) {\n\t\t\tEnemy e = enemies.get(index);\n\t\t\te.hit(new Slingshot(position));\n\t\t\tSystem.out.println(type + position + \" hit \" + e.getType() + e.getPosition() + \".\\nEnemy's health is \" + e.getHealth());\n\t\t\tif (e.getHealth() <= 0) {\n\t\t\t\tenemies.remove(e);\n\t\t\t\tcoins += e.getCoins();\n\t\t\t}\n\t\t}\n\t\t//looking for the first lizard\n\t\telse {\n\t\t\tindex = 0;\n\t\t\tfindIt = true;\n\t\t\twhile (!(enemies.get(index) instanceof Lizard) || enemies.get(index).getPosition() > position) {\n\t\t\t\tindex++;\n\t\t\t\tif (index >= enemies.size()) {\n\t\t\t\t\tfindIt = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (findIt) {\n\t\t\t\tEnemy e = enemies.get(index);\n\t\t\t\te.hit(new Slingshot(position));\n\t\t\t\tSystem.out.println(type + position + \" hit \" + e.getType() + e.getPosition() + \".\\nEnemy's health is \" + e.getHealth());\n\t\t\t\tif (e.getHealth() <= 0) {\n\t\t\t\t\tenemies.remove(e);\n\t\t\t\t\tcoins += e.getCoins();\n\t\t\t\t}\n\t\t\t}\n\t\t\t//looking for the first elephant\n\t\t\telse {\n\t\t\t\tindex = 0;\n\t\t\t\tfindIt = true;\n\t\t\t\twhile (!(enemies.get(index) instanceof Elephant) || enemies.get(index).getPosition() > position) {\n\t\t\t\t\tindex++;\n\t\t\t\t\tif (index >= enemies.size()) {\n\t\t\t\t\t\tfindIt = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (findIt) {\n\t\t\t\t\tEnemy e = enemies.get(index);\n\t\t\t\t\te.hit(new Slingshot(position));\n\t\t\t\t\tSystem.out.println(type + position + \" hit \" + e.getType() + e.getPosition() + \".\\nEnemy's health is \" + e.getHealth());\n\t\t\t\t\tif (e.getHealth() <= 0) {\n\t\t\t\t\t\tenemies.remove(e);\n\t\t\t\t\t\tcoins += e.getCoins();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn coins;\n\t}", "public int computeDamageTo(Combatant opponent) { return 0; }", "public int getDefensePower() {\n return defensePower;\n }", "public int fight() {\r\n\t\treturn -this.randomObject.nextInt(50);\r\n\t}", "private static int playerTotalDefense(String [] helmetEquip, String [] chestPlateEquip, String [] bootsEquip, String [] glovesEquip, int playerDefense){\r\n int totalDefense;\r\n int bootsDefense = 0;\r\n int chestDefense = 0;\r\n int glovesDefense = 0;\r\n int helmetDefense = 0;\r\n leatherHelmet LeatherHelmet = new leatherHelmet();\r\n leatherBoots LeatherBoots = new leatherBoots();\r\n leatherGloves LeatherGloves = new leatherGloves();\r\n leatherChestPlate LeatherChestPlate = new leatherChestPlate();\r\n ironHelmet IronHelmet = new ironHelmet();\r\n ironChestPlate IronChestPlate = new ironChestPlate();\r\n ironBoots IronBoots = new ironBoots();\r\n ironGloves IronGloves = new ironGloves();\r\n switch(helmetEquip[0]){\r\n case \"Leather Helmet\":\r\n helmetDefense = LeatherHelmet.getDefense();\r\n break;\r\n case \"Iron Helmet\":\r\n helmetDefense = IronHelmet.getDefense();\r\n break;\r\n }\r\n switch(bootsEquip[0]){\r\n case \"Leather Boots\":\r\n bootsDefense = LeatherBoots.getDefense();\r\n break;\r\n case \"Iron Boots\":\r\n bootsDefense = IronBoots.getDefense();\r\n break;\r\n }\r\n switch(chestPlateEquip[0]){\r\n case \"Leather Chest Plate\":\r\n chestDefense = LeatherChestPlate.getDefense();\r\n break;\r\n case \"Iron Chest Plate\":\r\n chestDefense = IronChestPlate.getDefense();\r\n break;\r\n }\r\n switch(glovesEquip[0]){\r\n case \"Leather Gloves\":\r\n glovesDefense = LeatherGloves.getDefense();\r\n break;\r\n case \"Iron Gloves\":\r\n glovesDefense = IronGloves.getDefense();\r\n break;\r\n }\r\n totalDefense = playerDefense + helmetDefense + chestDefense + glovesDefense + bootsDefense;\r\n return totalDefense;\r\n }", "public int computeRangedDamageTo(Combatant opponent) { return 0; }", "private void harvest() {\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\tif(grid.getDistance(grid.getLocation(targetFlower),grid.getLocation(this)) > 200) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// if crop storage is full, return to hive with information\n\t\telse if(food >= maxCrop) {\n\t\t\tif(targetFlower != null) {\n\t\t\t\tlastFlowerNectar = targetFlower.food;\n\t\t\t}\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if daylight is diminishing, return to hive\n\t\telse if(clock.time > (endForagingTime + 1.0)){\n\t\t\tlastFlowerNectar = 0;\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if flower loses all nectar, start scouting for new flower\n\t\telse if(targetFlower.food <= 0){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// semi-random decision to scout for new flower if current flower has low food\n\t\telse if(RandomHelper.nextIntFromTo(0,(int)(maxFlowerNectar/4)) > targetFlower.food &&\n\t\t\t\tRandomHelper.nextDoubleFromTo(0,1) < forageNoise){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// otherwise continue harvesting current flower\n\t\telse{\n\t\t\thover(grid.getLocation(targetFlower));\n\t\t\ttargetFlower.food -= foragingRate;\n\t\t\tfood += foragingRate;\n\t\t\tfood -= lowMetabolicRate;\n\t\t}\n\t}", "@Override\n public final float getSpecialDefenseValue() {\n return _defenseValue;\n }", "private void aimlessScout() {\n\t\ttargetFlower = null;\n\t\t// if bee is sufficiently far from flower, look for other flowers\n\t\tif((clock.time - tempTime) > 0.15) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying\n\t\telse{\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\t//energy -= exhaustionRate;\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "public Field.Fieldelements placeShotComputer() {\r\n int sizeX = this.fieldUser.getSizeX();\r\n int sizeY = this.fieldUser.getSizeY();\r\n \r\n // probability that a field contains a ship (not in percent, 1000 is best)\r\n double[][] probability = new double[sizeX][sizeY];\r\n double sumProbability = 0;\r\n \r\n for (int posX = 0; posX < sizeX; posX++) {\r\n for (int posY = 0; posY < sizeY; posY++) {\r\n // set probability for each field to 1\r\n probability[sizeX][sizeY] = 1.;\r\n \r\n // check neighbouring fields for hits and set probability to 1000\r\n if (Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX, posY + 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY)) {\r\n probability[posX][posY] = 1000;\r\n }\r\n \r\n // 0 points if all fields above and below are SUNK or SHOT\r\n if ((Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY - 1) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX, posY - 1)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY + 1) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX, posY + 1)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX - 1, posY)) &&\r\n (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY) || Field.Fieldelements.WATER == fieldUser.getFieldStatus(posX + 1, posY))\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if a neighbouring field is SUNK\r\n if (Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX - 1, posY + 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX, posY + 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY - 1) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY) ||\r\n Field.Fieldelements.SUNK == fieldUser.getFieldStatus(posX + 1, posY + 1)\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if top right, top left, bottom right or bottom left is HIT\r\n if (Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX - 1, posY + 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY - 1) ||\r\n Field.Fieldelements.HIT == fieldUser.getFieldStatus(posX + 1, posY + 1)\r\n ) {\r\n probability[posX][posY] = 0;\r\n }\r\n \r\n // 0 points if a shot has already been placed\r\n if (Field.Fieldelements.WATER != fieldUser.getFieldStatus(posX, posY) &&\r\n Field.Fieldelements.SHIP != fieldUser.getFieldStatus(posX, posY)) {\r\n probability[posX][posY] = 0;\r\n }\r\n }\r\n }\r\n \r\n // calculate sum of all points\r\n // TODO check if probability must be smaller numbers\r\n for (int posX = 0; posX < sizeX; sizeX++) {\r\n for (int posY = 0; posY < sizeY; posY++) {\r\n sumProbability += probability[posX][posY];\r\n }\r\n }\r\n \r\n // random element\r\n Random random = new Random();\r\n sumProbability = random.nextInt((int) --sumProbability);\r\n sumProbability++; // must at least be 1\r\n int posY = -1;\r\n int posX = -1;\r\n while (posY < sizeY - 1 && sumProbability >= 0) {\r\n posY++;\r\n posX = -1;\r\n while (posX < sizeX && sumProbability >= 0) {\r\n posX++;\r\n sumProbability = sumProbability - probability[posX][posY];\r\n }\r\n }\r\n return fieldUser.shoot(posX, posY);\r\n }", "public void doOffensiveMicro(RobotInfo[] engageableEnemies, MapLocation rallyPoint) throws GameActionException {\n\n if (engageableEnemies.length > 0) {\n // returns {is winning, is lowest health and not alone}\n int[] metrics = getBattleMetrics(engageableEnemies);\n if (metrics[0] > 0) {\n //rc.setIndicatorString(1, \"winning...\" + Clock.getRoundNum());\n\n if (metrics[1] != -1 || metrics[2] != -1) {\n Messaging.setBattleFront(new MapLocation(metrics[1], metrics[2]));\n }\n MapLocation nearestBattle = Messaging.getClosestBattleFront(rc.getLocation());\n RobotInfo[] attackableEnemies = Cache.getAttackableEnemies();\n if (attackableEnemies.length > 0) {\n if (rc.isWeaponReady()) {\n attackLeastHealthPrioritized(attackableEnemies);\n }\n } else {\n if (metrics[1] != -1 || metrics[2] != -1) {\n if (nearestBattle != null && nearestBattle.distanceSquaredTo(rc.getLocation()) <= 50) {\n //rc.setIndicatorString(1, \"Going to battlefront: \" + nearestBattle + \", \" + Clock.getRoundNum());\n Nav.goTo(nearestBattle, Engage.UNITS);\n } else {\n Nav.goTo(rallyPoint, Engage.NONE);\n }\n }\n }\n } else {\n // \"are we definitely going to die?\"\n if (metrics[1] > 0) {\n SupplyDistribution.setDyingMode();\n SupplyDistribution.manageSupply();\n if (rc.isWeaponReady()) {\n attackLeastHealthPrioritized(Cache.getAttackableEnemies());\n }\n \n // Retreat\n } else {\n if (rc.isCoreReady()) {\n int[] attackingEnemyDirs = calculateNumAttackingEnemyDirs();\n Nav.retreat(attackingEnemyDirs);\n }\n }\n }\n } else {\n if (rc.isCoreReady()) {\n MapLocation nearestBattle = Messaging.getClosestBattleFront(curLoc);\n if (nearestBattle != null ) {\n //rc.setIndicatorString(1, \"Going to battlefront: \" + nearestBattle + \", \" + Clock.getRoundNum());\n Nav.goTo(nearestBattle, Engage.UNITS);\n } else if (rallyPoint != null) {\n Nav.goTo(rallyPoint, Engage.NONE);\n }\n }\n }\n }", "@Test\n public void bestowEnchantmentBecomesCreature() {\n addCard(Zone.BATTLEFIELD, playerA, \"Plains\", 4);\n addCard(Zone.BATTLEFIELD, playerA, \"Silvercoat Lion\");\n addCard(Zone.HAND, playerA, \"Hopeful Eidolon\");\n\n addCard(Zone.BATTLEFIELD, playerB, \"Mountain\", 1);\n addCard(Zone.HAND, playerB, \"Lightning Bolt\");\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Hopeful Eidolon using bestow\", \"Silvercoat Lion\");\n castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, \"Lightning Bolt\", \"Silvercoat Lion\");\n\n setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n // because Boon Satyr is no creature on the battlefield, evolve may not trigger\n assertLife(playerA, 20);\n assertLife(playerB, 20);\n\n assertPermanentCount(playerA, \"Silvercoat Lion\", 0);\n assertPermanentCount(playerA, \"Hopeful Eidolon\", 1);\n assertPowerToughness(playerA, \"Hopeful Eidolon\", 1, 1);\n\n Permanent hopefulEidolon = getPermanent(\"Hopeful Eidolon\", playerA);\n Assert.assertTrue(\"Hopeful Eidolon has to be a creature but is not\", hopefulEidolon.isCreature(currentGame));\n Assert.assertTrue(\"Hopeful Eidolon has to be an enchantment but is not\", hopefulEidolon.isEnchantment(currentGame));\n\n }" ]
[ "0.67129457", "0.64577776", "0.6412415", "0.6412415", "0.6412415", "0.6412415", "0.6412415", "0.6412415", "0.6334524", "0.62888324", "0.62888324", "0.62888324", "0.62888324", "0.62888324", "0.62888324", "0.6269899", "0.6228765", "0.6183374", "0.61290115", "0.6103842", "0.60927653", "0.60669607", "0.6047651", "0.60319597", "0.6022397", "0.5996881", "0.59940237", "0.5990937", "0.5976167", "0.5969138", "0.59617186", "0.594471", "0.5931677", "0.59252274", "0.5919275", "0.5871332", "0.5849857", "0.5840108", "0.58398664", "0.58243257", "0.58079356", "0.5801867", "0.5793079", "0.5787647", "0.5785751", "0.5784187", "0.5783139", "0.5761039", "0.5751183", "0.5748181", "0.57425344", "0.57352144", "0.573359", "0.5721592", "0.5718873", "0.57110906", "0.5698087", "0.5686686", "0.567658", "0.56690675", "0.5664084", "0.5657899", "0.5657899", "0.5657448", "0.5657448", "0.5657448", "0.5656952", "0.56562114", "0.5652826", "0.5651357", "0.56447875", "0.5640261", "0.56373626", "0.5636325", "0.5634957", "0.56222975", "0.56222975", "0.56222975", "0.562177", "0.562177", "0.562177", "0.5621516", "0.5606078", "0.56049496", "0.56026363", "0.55928355", "0.5591897", "0.5588435", "0.55836457", "0.55767417", "0.55726236", "0.55716145", "0.5570896", "0.55675644", "0.5565215", "0.5561734", "0.55511934", "0.5549129", "0.5546608", "0.5546126" ]
0.69125736
0
/ Build Energy only on the last (behind) 2 columns and on a lane/row with no missiles If there is no available place, just attack or wait
private String buildEnergy() { List<Integer> emptyCellsPos0 = new ArrayList<Integer>(); List<Integer> emptyCellsPos1 = new ArrayList<Integer>(); for(int i = 0; i < gameHeight; i++) { if (myLaneInfo.get(i).get(4).isEmpty()) { if (myLaneInfo.get(i).get(3).contains(0)) { emptyCellsPos0.add(i); } if (myLaneInfo.get(i).get(3).contains(1)) { emptyCellsPos1.add(i); } } } if (!emptyCellsPos0.isEmpty()) { return ENERGY.buildCommand(0,getRandomElementOfList(emptyCellsPos0)); } else if (!emptyCellsPos1.isEmpty()) { return ENERGY.buildCommand(1,getRandomElementOfList(emptyCellsPos1)); } else if (canBuy(ATTACK)) { return buildTurret(); } else { return doNothingCommand(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void SpiritBomb()\r\n {\r\n\r\n\t \r\n\t\tLocation loc = new Location(userRow+1, userCol);\r\n\t\tLocation loc1 = new Location(userRow+1, userCol1);\r\n\t\tLocation loc2 = new Location(userRow+1, userCol2);\r\n\t\tLocation loc3 = new Location(userRow+1, userCol3);\r\n\t\t\r\n\t\tLocation loc4 = new Location(userRow, userCol);\r\n\t\tLocation loc5 = new Location(userRow, userCol1);\r\n\t\tLocation loc6 = new Location(userRow, userCol2);\r\n\t\tLocation loc7 = new Location(userRow, userCol3);\r\n\t\t\r\n\t\tLocation loc8 = new Location(userRow-1, userCol);\r\n\t\tLocation loc9 = new Location(userRow-1, userCol1);\r\n\t\tLocation loc10 = new Location(userRow-1, userCol2);\r\n\t\tLocation loc11 = new Location(userRow-1, userCol3);\r\n\t\t\r\n\t\tLocation loc12 = new Location(userRow-2, userCol);\r\n\t\tLocation loc13= new Location(userRow-2, userCol1);\r\n\t\tLocation loc14 = new Location(userRow-2, userCol2);\r\n\t\tLocation loc15 = new Location(userRow-2, userCol3);\r\n\r\n\t \r\n\r\n\r\n\r\n\t\t\r\n\t\tLocation base1 = new Location(userRow,0);\r\n\t\t\r\n\t\t\tgrid.setImage(base1, \"FSpiritHold.png\");\r\n\t\t\t\r\n\t\tfor(int a = 0; a<9; a++) {\r\n\t\tif(userCol>0 && userCol3 !=15 && userCol2!=15 && userCol1!=15 && userCol!=15 && userRow>0)\r\n\t\t{\r\n\t\r\n\t\t\t Location next101 = new Location(userRow+1,userCol);\r\n\t\t\t Location next102 = new Location(userRow+1,userCol1);\r\n\t\t\t Location next103 = new Location(userRow+1,userCol2);\r\n\t\t\t Location next104 = new Location(userRow+1,userCol3);\r\n\r\n\t\t\t\tLocation next201 = new Location(userRow,userCol);\r\n\t\t\t\tLocation next202 = new Location(userRow,userCol1);\r\n\t\t\t\tLocation next203 = new Location(userRow,userCol2);\r\n\t\t\t\tLocation next204 = new Location(userRow,userCol3);\r\n\t\t\t\t\r\n\t\t\t\tLocation next301 = new Location(userRow-1,userCol);\r\n\t\t\t\tLocation next302 = new Location(userRow-1,userCol1);\r\n\t\t\t\tLocation next303 = new Location(userRow-1,userCol2);\r\n\t\t\t\tLocation next304 = new Location(userRow-1,userCol3);\r\n\t\t\t\t\r\n\t\t\t Location next401 = new Location(userRow-2,userCol);\r\n\t\t\t Location next402 = new Location(userRow-2,userCol1);\r\n\t\t\t Location next403 = new Location(userRow-2,userCol2);\r\n\t\t\t Location next404 = new Location(userRow-2,userCol3);\r\n\t\t\t userCol+=1;\r\n\t\t\t userCol1+=1;\r\n\t\t\t\tuserCol2+=1;\r\n\t\t\t\tuserCol3+=1;\r\n\t\t\t grid.setImage(next101, \"SB401.png\");\r\n\t\t\t grid.setImage(loc1, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next102, \"SB402.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next103, \"SB403.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next104, \"SB404.png\");\r\n\t\t\t grid.setImage(loc3, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next201, \"SB301.png\");\r\n\t\t\t grid.setImage(loc4, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next202, \"SB302.png\");\r\n\t\t\t grid.setImage(loc5, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next203, \"SB303.png\");\r\n\t\t\t grid.setImage(loc6, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next204, \"SB304.png\");\r\n\t\t\t grid.setImage(loc7, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next301, \"SB201.png\");\r\n\t\t\t grid.setImage(loc8, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next302, \"SB202.png\");\r\n\t\t\t grid.setImage(loc9, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next303, \"SB203.png\");\r\n\t\t\t grid.setImage(loc10, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next304, \"SB204.png\");\r\n\t\t\t grid.setImage(loc11, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next401, \"SB101.png\");\r\n\t\t\t grid.setImage(loc12, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next402, \"SB102.png\");\r\n\t\t\t grid.setImage(loc13, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next403, \"SB103.png\");\r\n\t\t\t grid.setImage(loc14, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next404, \"SB104.png\");\r\n\t\t\t grid.setImage(loc15, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t \r\n\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n }\r\n }", "private String defendRow() {\r\n for (int i = 0; i < gameHeight; i++) {\r\n if (!enLaneInfo.get(i).get(0).isEmpty() && myLaneInfo.get(i).get(1).isEmpty()) {\r\n return DEFENSE.buildCommand(7,i);\r\n }\r\n }\r\n return buildTurret();\r\n }", "public Location attack() {\n resetBoard();\n\n if (getHits().isEmpty()) {\n// System.out.println(\"Hunting\");\n\n for (final int[] r : board) {\n for (int c = 0; c < r.length; c++) {\n if (getIntegers().contains(5) && (c < (r.length - 4)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3]) && (-1 != r[c + 4])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n ++r[c + 4];\n }\n\n if (getIntegers().contains(4) && (c < (r.length - 3)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n }\n if (getIntegers().contains(3) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(2) && (c < (r.length - 1)))\n if ((-1 != r[c]) && (-1 != r[c + 1])) {\n ++r[c];\n ++r[c + 1];\n }\n }\n }\n\n for (int c = 0; c < board[0].length; c++) {\n for (int r = 0; r < board.length; r++) {\n if (getIntegers().contains(5) && (r < (board.length - 4)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n\n if (getIntegers().contains(4) && (r < (board.length - 3)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n if (getIntegers().contains(3) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(2) && (r < (board.length - 1)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n }\n }\n } else {\n// System.out.println(\"Hitting\");\n\n for (final Location hit : getHits()) {\n final int r = hit.getRow();\n final int c = hit.getCol();\n\n if (getIntegers().contains(2)) {\n if ((0 <= (c - 1)) && (-1 != board[r][c]) && (-1 != board[r][c - 1])) {\n ++board[r][c];\n ++board[r][c - 1];\n }\n\n\n if (((c + 1) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1])) {\n ++board[r][c];\n ++board[r][c + 1];\n }\n\n if ((0 <= (r - 1)) && (-1 != board[r][c]) && (-1 != board[r - 1][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n }\n\n if (((r + 1) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n\n\n }\n if (getIntegers().contains(3)) {\n final int inc = Collections.frequency(getIntegers(), 3);\n\n if ((0 <= (c - 2)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2])) {\n board[r][c] += inc;\n board[r][c - 1] += inc;\n board[r][c - 2] += inc;\n }\n if (((c + 2) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2])) {\n board[r][c] += inc;\n board[r][c + 1] += inc;\n board[r][c + 2] += inc;\n }\n if ((0 <= (r - 2)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c])) {\n board[r][c] += inc;\n board[r - 1][c] += inc;\n board[r - 2][c] += inc;\n }\n if (((r + 2) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n board[r][c] += inc;\n board[r + 1][c] += inc;\n board[r + 2][c] += inc;\n }\n\n\n }\n if (getIntegers().contains(4)) {\n if ((0 <= (c - 3)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n }\n if (((c + 3) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n }\n if ((0 <= (r - 3)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n }\n if (((r + 3) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n\n\n }\n if (getIntegers().contains(5)) {\n if ((0 <= (c - 4)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3]) && (-1 != board[r][c - 4])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n ++board[r][c - 4];\n }\n if (((c + 4) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3]) && (-1 != board[r][c + 4])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n ++board[r][c + 4];\n }\n if ((0 <= (r - 4)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c]) && (-1 != board[r - 4][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n ++board[r - 4][c];\n }\n if (((r + 4) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n }\n }\n\n for (final Location hit : getHits()) {\n board[hit.getRow()][hit.getCol()] = 0;\n }\n }\n\n// for (int[] i : board)\n// System.out.println(Arrays.toString(i));\n return findLargest();\n }", "private void addEnemyPowerUps() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint x = (int) (Math.random() * 10);\n\t\t\tint y = (int) (Math.random() * 10);\n\n\t\t\twhile (egrid[x][y] != 0) { // prevents overlaps\n\t\t\t\tx = (int) (Math.random() * 10);\n\t\t\t\ty = (int) (Math.random() * 10);\n\t\t\t}\n\n\t\t\tegrid[x][y] = 2;\n\t\t}\n\t}", "private Array<Tile>[] walk() {\n float targetY = currentTile.y + 1;\n Vector2 previousTile = new Vector2(currentTile.x, currentTile.y);\n\n Array<Vector2> tiles = new Array<Vector2>();\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n\n while(currentTile.y < targetY) {\n float rnd = random.nextFloat();\n\n if(rnd > 0.75f) { // up\n Array<Tile> grassRow = new Array<Tile>();\n Array<Tile> treeRow = new Array<Tile>();\n\n for(int x = 1; x <= 5; x++) {\n Vector2 vector = new Vector2(x, currentTile.y);\n\n GrassNEW grass = grassPool.obtain();\n grass.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n grassRow.add(grass);\n\n if(!tiles.contains(vector, false)) {\n if(random.nextFloat() > 0.3) {\n TreeNEW tree = treePool.obtain();\n tree.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n treeRow.add(tree);\n }\n } else {\n if(random.nextFloat() > 0.99) {\n Collectible power = new PowerUpSpikes(world, spikesTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(power);\n } else {\n if(random.nextFloat() > 0.5) {\n Coin coin = new Coin(world, coinTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(coin);\n }\n }\n }\n }\n\n currentTile.add(0, 1);\n\n Array<Tile>[] ret = new Array[2];\n ret[0] = grassRow;\n ret[1] = treeRow;\n\n return ret;\n } else if(rnd > 0.375) { // right\n if(currentTile.x < 5 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n } else { // left\n if(currentTile.x > 1 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(-1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n }\n }\n\n return null; // will never happen\n }", "public String checkCheese() {\n\n\n int j = 1;\n\n while (j < _cheese.getY() + 2) {\n\n for (int i = 1; i < _cheese.getX() + 1; i++) {\n\n int i2 = i;\n int j2 = j;\n\n\n if (_cheese.getCellArray()[i2][j2].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2].isVisited()) {\n int temp1 = i2;\n int temp2 = j2;\n _holeCount++;\n while ((\n\n (_cheese.getCellArray()[i2 + 1][j2].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 + 1][j2].isVisited()) ||\n\n\n (_cheese.getCellArray()[i2 + 1][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 + 1][j2 + 1].isVisited()) ||\n\n\n (_cheese.getCellArray()[i2][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) ||\n\n (_cheese.getCellArray()[i2 - 1][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 - 1][j2 + 1].isVisited()) ||\n\n (_cheese.getCellArray()[i2 - 1][j2].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 - 1][j2].isVisited()) ||\n\n (_cheese.getCellArray()[i2 - 1][j2 - 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 - 1][j2 - 1].isVisited()) ||\n\n (_cheese.getCellArray()[i][j2 - 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i][j2 - 1].isVisited()) ||\n\n (_cheese.getCellArray()[i2 + 1][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 + 1][j2 + 1].isVisited())\n\n )) {\n if (_cheese.getCellArray()[i2 + 1][j2].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 + 1][j2].isVisited()) {\n _cheese.getCellArray()[i2 + 1][j2].setVisited(true);\n i2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2 + 1][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 + 1][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2 + 1][j2 + 1].setVisited(true);\n i2++;\n j2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2][j2 + 1].setVisited(true);\n j2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2 - 1][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2 - 1][j2 + 1].setVisited(true);\n j2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2 - 1][j2].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2 - 1][j2].setVisited(true);\n j2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2 - 1][j2 - 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2 - 1][j2 - 1].setVisited(true);\n j2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2][j2 - 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2][j2 - 1].setVisited(true);\n j2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2 + 1][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2 + 1][j2 + 1].setVisited(true);\n j2++;\n\n }\n\n\n }\n _cheese.getCellArray()[temp1][temp2].setVisited(true);\n if (_holeCount > _biggestHole) {\n _biggestHole = _holeCount;\n }\n }\n _cheese.getCellArray()[i2][j2].setVisited(true);\n\n\n }\n\n\n j++;\n }\n\n\n return \"hole-count: \" + _holeCount + \"\\n\" +\n \"biggest hole edge: \" + _biggestHole;\n\n }", "public void enemymoveGarret(){\n\t\tint YEG = 0;\n\t\tint XEG = 0;\n\t\tint[] turns = new int[]{0,0,0,0,0,2,1,1,1,1,1,3};//dependign on the placement garret will move a certain way\n\t\tfor(int i = 0 ; i < this.Garret.length;i++){//this grabs garrets current locations\n\t\t\tfor(int p = 0; p < this.Garret.length;p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tYEG = i;\n\t\t\t\t\tXEG = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint move = turns[count];\n\t\tswitch(move){//first block is up and down second block is left and right\n\t\t\tcase 0:\n\t\t\t\tif(this.area[YEG][XEG-1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG-1] = 1;//to turn left\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(this.area[YEG][XEG+1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG+1] = 1;//to turn right\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(this.area[YEG-1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG-1][XEG] = 1;//to turn up\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(this.area[YEG+1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG+1][XEG] = 1;//to turn down\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}//end of switch\t\n\t}", "private static void checkForEnemies() throws GameActionException {\n //No need to hijack code for structure\n if (rc.isWeaponReady()) {\n // basicAttack(enemies);\n HQPriorityAttack(enemies, attackPriorities);\n }\n \n //Old splash damage code\n //Preserve because can use to improve current splash damage code\n //But not so simple like just checking directions, since there are many more \n //locations to consider hitting.\n /*if (numberOfTowers > 4) {\n //can do splash damage\n RobotInfo[] enemiesInSplashRange = rc.senseNearbyRobots(37, enemyTeam);\n if (enemiesInSplashRange.length > 0) {\n int[] enemiesInDir = new int[8];\n for (RobotInfo info: enemiesInSplashRange) {\n enemiesInDir[myLocation.directionTo(info.location).ordinal()]++;\n }\n int maxDirScore = 0;\n int maxIndex = 0;\n for (int i = 0; i < 8; i++) {\n if (enemiesInDir[i] >= maxDirScore) {\n maxDirScore = enemiesInDir[i];\n maxIndex = i;\n }\n }\n MapLocation attackLoc = myLocation.add(directions[maxIndex],5);\n if (rc.isWeaponReady() && rc.canAttackLocation(attackLoc)) {\n rc.attackLocation(attackLoc);\n }\n }\n }//*/\n \n }", "public void step()\n { \n //Remember, you need to access both row and column to specify a spot in the array\n //The scalar refers to how big the value could be\n //int someRandom = (int) (Math.random() * scalar)\n //remember that you need to watch for the edges of the array\n\t int randomRow = (int)(Math.random() * grid.length - 1);\n\t int randomCol = (int)(Math.random() * grid[0].length - 1);\n\t int randomDirection = (int)(Math.random() * 3);\n\t int randomDirectionFire = (int)(Math.random() * 4);\n\t int randomSpread = (int)(Math.random() * 100);\n\t int randomTelRow = (int)(Math.random() * grid.length);\n\t int randomTelCol = (int)(Math.random() * grid[0].length);\n\t \n\t //Sand\n\t if(grid[randomRow][randomCol] == SAND && (grid[randomRow + 1][randomCol] == EMPTY || grid[randomRow + 1][randomCol] == WATER))\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == WATER)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = WATER;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\n\t }\n\t //Water\n\t if(grid[randomRow][randomCol] == WATER && randomCol - 1 >= 0)\n\t {\n\t\t if(randomDirection == 1 && grid[randomRow + 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(randomDirection == 2 && grid[randomRow][randomCol - 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(grid[randomRow][randomCol + 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t //Helium\n\t if(grid[randomRow][randomCol] == HELIUM && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow - 1][randomCol] == WATER)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = WATER;\n\t\t }\n\t\t else if(randomDirection == 1 && grid[randomRow - 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(randomDirection == 2 && grid[randomRow][randomCol - 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(grid[randomRow][randomCol + 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t \n\t //Bounce\n\t if(grid[randomRow][randomCol] == BOUNCE)\n\t { \t\n\t\t if(randomRow + 1 >= grid[0].length - 1 || randomRow + 1 == METAL)\n\t\t {\n\t\t\t hitEdge[randomCol] = true;\n\t\t }\n\t\t else if(randomRow - 1 < 0 || randomRow - 1 == METAL)\n\t\t {\n\t\t\t hitEdge[randomCol] = false;\n\t\t }\n\t\t \n\t\t if(hitEdge[randomCol] == true)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = BOUNCE;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = BOUNCE;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t \n\t //Virus\n\t if(grid[randomRow][randomCol] == VIRUS && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = VIRUS;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t \n\t\t\t int temp = grid[randomRow + 1][randomCol];\n\t\t\t //VIRUS takeover\n\t\t\t if(grid[randomRow - 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow - 1][randomCol] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow + 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol - 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol - 1] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol + 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol + 1] = VIRUS;\n\t\t\t }\n\t\t\t //TEMP takeover\n\t\t\t grid[randomRow][randomCol] = temp;\n\t\t\t if(grid[randomRow - 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow - 1][randomCol] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow + 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol - 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol - 1] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol + 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol + 1] = temp;\n\t\t\t }\n\t }\n\t \n\t //Fire\n\t if(grid[randomRow][randomCol] == FIRE && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t { \n\t\t if(randomDirectionFire == 1)\n\t\t {\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t else if(randomDirectionFire == 2)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol - 1] = FIRE;\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t else if(randomDirectionFire == 3)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol + 1] = FIRE;\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t \n\t\t //Fire Eats Vine\n\t\t if(grid[randomRow - 1][randomCol] == VINE)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = FIRE;\n\t\t }\n\t\t if(grid[randomRow + 1][randomCol] == VINE)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = FIRE;\n\t\t }\n\t\t if(grid[randomRow][randomCol - 1] == VINE)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = FIRE;\n\t\t }\n\t\t if(grid[randomRow][randomCol + 1] == VINE)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = FIRE;\n\t\t }\n\t\t \n\t\t //Fire Blows Up Helium\n\t\t if(grid[randomRow - 1][randomCol] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t //Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow + 1][randomCol] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow][randomCol - 1] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow][randomCol + 1] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t }\n\t \n\t //Vine\n\t if(grid[randomRow][randomCol] == VINE && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == EMPTY)\n\t\t { \n\t\t\t if(randomSpread == 1)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VINE;\n\t\t\t }\n\t\t }\n\t\t else if(grid[randomRow + 1][randomCol] == WATER)\n\t\t {\n\t\t\t if(randomSpread >= 90)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VINE;\n\t\t\t\t grid[randomRow][randomCol + 1] = VINE;\n\t\t\t\t grid[randomRow][randomCol - 1] = VINE;\n\t\t\t }\n\t\t }\n\t }\n\t \n\t //Teleport\n\t if(grid[randomRow][randomCol] == TELEPORT && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t grid[randomTelRow][randomTelCol] = TELEPORT;\n\t\t grid[randomRow][randomCol] = EMPTY;\n\t }\n\t \n\t //Laser\n\t if(grid[randomRow][randomCol] == LASER && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(randomDirectionLaser == 1 && randomRow - 4 >= 0)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = LASER;\n\t\t\t grid[randomRow - 4][randomCol] = EMPTY;\n\t\t\t if(randomRow + 1 == grid.length - 1)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 2][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 3][randomCol] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else if(randomDirectionLaser == 2)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = LASER;\n\t\t\t grid[randomRow + 4][randomCol] = EMPTY;\n\t\t\t if(randomRow - 1 == 0)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 2][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 3][randomCol] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else if(randomDirectionLaser == 3 && randomCol - 4 >= 0)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = LASER;\n\t\t\t grid[randomRow][randomCol - 4] = EMPTY;\n\t\t\t if(randomCol + 1 == grid[0].length - 1)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 2] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 3] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = LASER;\n\t\t\t grid[randomRow][randomCol + 4] = EMPTY;\n\t\t\t if(randomCol - 1 == 0)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 2] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 3] = EMPTY;\n\t\t\t }\n\t\t }\n\t }\n }", "private void findChest() {\n\t\tchar[][] location = game.getPlayingmap().getLocation();\n//\t\tFighter fighter = (Fighter)game.getPlayingmap().getCellsinthemap()[character.xOfFighter][character.yOfFighter].getContent();\n\n\t\tif(character.xOfFighter-1>=0&&location[character.xOfFighter-1][character.yOfFighter]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter-1][character.yOfFighter].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter-1, character.yOfFighter, 'e');\n\t\t\t}\n\t\t}\n\t\telse if(character.xOfFighter+1<game.getPlayingmap().getRow()&&location[character.xOfFighter+1][character.yOfFighter]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter+1][character.yOfFighter].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter+1, character.yOfFighter, 'e');\n\t\t\t}\n\t\t}\n\t\telse if(character.yOfFighter-1>=0&&location[character.xOfFighter][character.yOfFighter-1]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter][character.yOfFighter-1].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter, character.yOfFighter-1, 'e');\n\t\t\t}\n\t\t}\n\t\telse if(character.yOfFighter+1<game.getPlayingmap().getColumn()&&location[character.xOfFighter][character.yOfFighter+1]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter][character.yOfFighter+1].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter, character.yOfFighter+1, 'e');\n\t\t\t}\n\t\t}\n\t}", "private void scanForBlockFarAway() {\r\n\t\tList<MapLocation> locations = gameMap.senseNearbyBlocks();\r\n\t\tlocations.removeAll(stairs);\r\n\t\tif (locations.size() == 0) {\r\n\t\t\tblockLoc = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/* remove blocks that can be sensed */\r\n\t\tIterator<MapLocation> iter = locations.iterator();\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tMapLocation loc = iter.next();\r\n\t\t\tif (myRC.canSenseSquare(loc))\r\n\t\t\t\titer.remove();\r\n\t\t} \r\n\t\t\r\n\t\tlocations = navigation.sortLocationsByDistance(locations);\r\n\t\t//Collections.reverse(locations);\r\n\t\tfor (MapLocation block : locations) {\r\n\t\t\tif (gameMap.get(block).robotAtLocation == null){\r\n\t\t\t\t/* this location is unoccupied */\r\n\t\t\t\tblockLoc = block;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tblockLoc = null;\r\n\t}", "public void generateAntHill(int x, int y, String colour) {\n for (int i = 0; i < 11; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[x*130+y+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[x*130+y+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next change the two rows above and below the centre\n for (int i = 0; i < 10; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+1)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-1)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+1)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-1)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next rows inset by one on the right\n for (int i = 0; i < 9; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+2)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-2)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+2)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-2)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the left none on the right\n for (int i = 0; i < 8; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+3)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-3)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+3)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-3)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the right and none on the left\n for (int i = 0; i < 7; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+4)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-4)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+4)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-4)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the left and none on the right\n for (int i = 0; i < 6; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+5)*130+y+3+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-5)*130+y+3+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+5)*130+y+3+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-5)*130+y+3+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n }", "public void Add (int row, int column) {\n if ((row < 0 || column < 0) || (row >= numberOfRows || column >= numberOfColumns) || (grid[row][column] == X || grid[row][column] == ZERO ||\n grid[row][column] == ONE || grid[row][column] == TWO ||\n grid[row][column] == THREE || grid[row][column] == FOUR ||\n grid[row][column] == LASER)) {\n message = \"Error adding laser at: (\" + row + \", \" + column + \")\";\n } else {\n grid[row][column] = LASER;\n RowOfLastPlacedLaser = row;\n ColumnOfLastPlacedLaser = column;\n // Set up a laser beam to the North direction until we reach a pillar, laser or the top\n for (int i = row - 1; i >= 0; i--) {\n if (grid[i][column] == X || grid[i][column] == ZERO ||\n grid[i][column] == ONE || grid[i][column] == TWO ||\n grid[i][column] == THREE || grid[i][column] == FOUR ||\n grid[i][column] == LASER) {\n break;\n } else {\n grid[i][column] = LASER_BEAM;\n }\n }\n // Set up a laser beam to the South direction until we reach a pillar, laser or the bottom\n for (int i = row + 1; i < numberOfRows; i++) {\n if (grid[i][column] == X || grid[i][column] == ZERO ||\n grid[i][column] == ONE || grid[i][column] == TWO ||\n grid[i][column] == THREE || grid[i][column] == FOUR ||\n grid[i][column] == LASER) {\n break;\n } else {\n grid[i][column] = LASER_BEAM;\n }\n }\n // Set up a laser beam to the West direction until we reach a pillar, laser or the left corner\n for (int i = column - 1; i >= 0; i--) {\n if (grid[row][i] == X || grid[row][i]== ZERO ||\n grid[row][i] == ONE || grid[row][i] == TWO ||\n grid[row][i] == THREE || grid[row][i] == FOUR ||\n grid[row][i] == LASER) {\n break;\n } else {\n grid[row][i] = LASER_BEAM;\n }\n }\n // Set up a laser beam to the East direction until we reach a pillar, laser or the right direction\n for (int i = column + 1; i < numberOfColumns; i++) {\n if (grid[row][i] == X || grid[row][i]== ZERO ||\n grid[row][i] == ONE || grid[row][i] == TWO ||\n grid[row][i] == THREE || grid[row][i] == FOUR ||\n grid[row][i] == LASER) {\n break;\n } else {\n grid[row][i] = LASER_BEAM;\n }\n }\n message = \"Laser added at: (\" + row + \", \" + column + \")\";\n }\n }", "private void openFloor(Tile t) {\r\n int tileRow = t.getRow();\r\n int tileCol = t.getCol();\r\n if (t.getSurroudingBombs() == 0) { \r\n for (int r = tileRow - 1; r <= tileRow + 1; r++) {\r\n for (int c = tileCol - 1; c <= tileCol + 1; c++) {\r\n if (r >= 0 && r < gridSize && c >= 0 && c < gridSize) {\r\n Tile inspectionTile = grid[r][c]; \r\n if (!(r == tileRow && c == tileCol) && inspectionTile.isHidden() \r\n && !inspectionTile.getFlagged()) {\r\n if (!inspectionTile.isBomb()) {\r\n inspectionTile.handleTile();\r\n if (inspectionTile.getSurroudingBombs() == 0) {\r\n openFloor(inspectionTile);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n for (int r = tileRow - 1; r <= tileRow + 1; r++) {\r\n for (int c = tileCol - 1; c <= tileCol + 1; c++) {\r\n if (r >= 0 && r < gridSize && c >= 0 && c < gridSize) {\r\n Tile inspectionTile = grid[r][c]; \r\n if ((r != tileRow - 1 && c != tileCol - 1) ||\r\n (r != tileRow - 1 && c != tileCol + 1) ||\r\n (r != tileRow + 1 && c != tileCol - 1) ||\r\n (r != tileRow + 1 && c != tileCol + 1) && \r\n !(r == tileRow && c == tileCol) && inspectionTile.isHidden()) {\r\n if (!inspectionTile.isBomb()) {\r\n inspectionTile.handleTile();\r\n if (inspectionTile.getSurroudingBombs() == 0) {\r\n openFloor(inspectionTile);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "private static void loop() throws GameActionException {\n RobotCount.reset();\n MinerEffectiveness.reset();\n\n //Update enemy HQ ranges in mob level\n if(Clock.getRoundNum()%10 == 0) {\n enemyTowers = rc.senseEnemyTowerLocations();\n numberOfTowers = enemyTowers.length;\n if(numberOfTowers < 5 && !Map.isEnemyHQSplashRegionTurnedOff()) {\n Map.turnOffEnemyHQSplashRegion();\n }\n if(numberOfTowers < 2 && !Map.isEnemyHQBuffedRangeTurnedOff()) {\n Map.turnOffEnemyHQBuffedRange();\n }\n }\n \n // Code that runs in every robot (including buildings, excepting missiles)\n sharedLoopCode();\n \n updateEnemyInRange(52);//52 includes splashable region\n checkForEnemies();\n \n int rn = Clock.getRoundNum();\n \n // Launcher strategy\n if(rn == 80) {\n BuildOrder.add(RobotType.HELIPAD); \n } else if(rn == 220) {\n BuildOrder.add(RobotType.AEROSPACELAB);\n } else if (rn == 280) {\n BuildOrder.add(RobotType.AEROSPACELAB);\n } else if (rn == 350) {\n BuildOrder.add(RobotType.AEROSPACELAB);\n } else if (rn == 410) {\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n } else if (rn == 500) {\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n } \n if (rn > 500 && rn%200==0) {\n BuildOrder.add(RobotType.AEROSPACELAB);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n }\n //rc.setIndicatorString(1, \"Distance squared between HQs is \" + distanceBetweenHQs);\n \n \n \n if(rn > 1000 && rn%100 == 0 && rc.getTeamOre() > 700) {\n int index = BuildOrder.size()-1;\n if(BuildOrder.isUnclaimedOrExpired(index)) {\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n }\n }\n \n \n \n /**\n //Building strategy ---------------------------------------------------\n if(Clock.getRoundNum() == 140) {\n BuildOrder.add(RobotType.TECHNOLOGYINSTITUTE);\n BuildOrder.add(RobotType.TRAININGFIELD);\n }\n if(Clock.getRoundNum() == 225) {\n BuildOrder.add(RobotType.BARRACKS);\n BuildOrder.add(RobotType.TANKFACTORY);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n }\n if(Clock.getRoundNum() == 550) {\n BuildOrder.add(RobotType.TANKFACTORY);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n }\n if(Clock.getRoundNum() == 800) {\n BuildOrder.add(RobotType.HELIPAD);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n BuildOrder.add(RobotType.TANKFACTORY);\n BuildOrder.add(RobotType.SUPPLYDEPOT);\n\n //BuildOrder.printBuildOrder();\n }\n //---------------------------------------------------------------------\n **/\n \n //Spawn beavers\n if (hasFewBeavers()) { \n trySpawn(HQLocation.directionTo(enemyHQLocation), RobotType.BEAVER);\n }\n \n //Dispense supply\n Supply.dispense(suppliabilityMultiplier);\n \n //Debug\n //if(Clock.getRoundNum() == 700) Map.printRadio();\n //if(Clock.getRoundNum() == 1500) BuildOrder.print();\n\n }", "protected Vec3 maybeBackOffFromEdge(Vec3 debug1, MoverType debug2) {\n/* 1102 */ if (!this.abilities.flying && (debug2 == MoverType.SELF || debug2 == MoverType.PLAYER) && isStayingOnGroundSurface() && isAboveGround()) {\n/* 1103 */ double debug3 = debug1.x;\n/* 1104 */ double debug5 = debug1.z;\n/* 1105 */ double debug7 = 0.05D;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1110 */ while (debug3 != 0.0D && this.level.noCollision((Entity)this, getBoundingBox().move(debug3, -this.maxUpStep, 0.0D))) {\n/* 1111 */ if (debug3 < 0.05D && debug3 >= -0.05D) {\n/* 1112 */ debug3 = 0.0D; continue;\n/* 1113 */ } if (debug3 > 0.0D) {\n/* 1114 */ debug3 -= 0.05D; continue;\n/* */ } \n/* 1116 */ debug3 += 0.05D;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1121 */ while (debug5 != 0.0D && this.level.noCollision((Entity)this, getBoundingBox().move(0.0D, -this.maxUpStep, debug5))) {\n/* 1122 */ if (debug5 < 0.05D && debug5 >= -0.05D) {\n/* 1123 */ debug5 = 0.0D; continue;\n/* 1124 */ } if (debug5 > 0.0D) {\n/* 1125 */ debug5 -= 0.05D; continue;\n/* */ } \n/* 1127 */ debug5 += 0.05D;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1132 */ while (debug3 != 0.0D && debug5 != 0.0D && this.level.noCollision((Entity)this, getBoundingBox().move(debug3, -this.maxUpStep, debug5))) {\n/* 1133 */ if (debug3 < 0.05D && debug3 >= -0.05D) {\n/* 1134 */ debug3 = 0.0D;\n/* 1135 */ } else if (debug3 > 0.0D) {\n/* 1136 */ debug3 -= 0.05D;\n/* */ } else {\n/* 1138 */ debug3 += 0.05D;\n/* */ } \n/* */ \n/* 1141 */ if (debug5 < 0.05D && debug5 >= -0.05D) {\n/* 1142 */ debug5 = 0.0D; continue;\n/* 1143 */ } if (debug5 > 0.0D) {\n/* 1144 */ debug5 -= 0.05D; continue;\n/* */ } \n/* 1146 */ debug5 += 0.05D;\n/* */ } \n/* */ \n/* 1149 */ debug1 = new Vec3(debug3, debug1.y, debug5);\n/* */ } \n/* 1151 */ return debug1;\n/* */ }", "@SuppressWarnings(\"unused\")\r\n\tprivate void planTower(Direction freeDirection) throws GameActionException {\r\n\t\tstairs.clear();\r\n\t\tstairs.add(fluxInfo.location);\r\n\t\tif (true) return;\r\n\t\t\r\n\t\tList<MapLocation> blocks = new ArrayList<MapLocation>(Arrays.asList(myRC.senseNearbyBlocks()));\r\n\t\tint howMany = 0;\r\n\t\tint towerSize = 0;\r\n\t\tfor (MapLocation blockLocation : blocks) {\r\n\t\t\thowMany += myRC.senseNumBlocksAtLocation(blockLocation);\r\n\t\t}\r\n\t\t\r\n\t\tstairs.add(fluxInfo.location);\r\n\t\ttowerSize++;\r\n\t\thowMany -= 2;\r\n\t\t\r\n\t\tDirection towerDirection = freeDirection.rotateRight().rotateRight();\r\n\t\twhile ((howMany > 0) && (towerDirection != freeDirection)){\r\n\t\t\tstairs.add(1, fluxInfo.location.add(towerDirection));\r\n\t\t\ttowerSize++;\r\n\t\t\thowMany -= towerSize * 2;\r\n\t\t\ttowerDirection = towerDirection.rotateRight();\r\n\t\t}\r\n\t\t\r\n\t\tCollections.reverse(stairs);\r\n\t}", "private void deadvance() {\n if (currColumn == 0) {\n if (currRow != 0) {\n currColumn = 8;\n currRow--;\n }\n } else {\n currColumn--;\n }\n if (!(currRow == 0 && currColumn == 0)) {\n if (startingBoard[currRow][currColumn] != 0) {\n deadvance();\n }\n }\n }", "private void createChamber() {\n\n // Give all tiles coordinates for map and temp map\n int CurrentY = 0;\n for (Tile[] tiles : map) {\n int CurrentX = 0;\n for (Tile tile : tiles) {\n tile.setPosition(new Coordinates(CurrentX, CurrentY));\n tile.setTerrain(Terrain.WALL);\n CurrentX++;\n }\n CurrentY++;\n }\n\n for (int y = 0; y < CAST_HEIGHT; y++) {\n for (int x = 0; x < CAST_WIDTH; x++) {\n tempMap[y][x].setPosition(new Coordinates(x, y));\n }\n }\n\n // Initialize algorithm at starting position (0, 0)\n tempMap[0][0].setVisited(true);\n numberOfCellsVisited = 1; //setting number of cells visited to 1 because I have visited one now!\n mapStack.push(tempMap[0][0]); //Chamber start position\n createMaze(tempMap[0][0]); //Chamber start position\n\n // Reveal top edge, sides, and bottom edge\n for (Tile tile : map[0]) {\n tile.setVisible(true);\n }\n for (Tile[] tiles : map) {\n tiles[0].setVisible(true);\n tiles[CHAMBER_WIDTH].setTerrain(Terrain.WALL);\n tiles[CHAMBER_WIDTH].setVisible(true);\n }\n for (Tile tile : map[CHAMBER_HEIGHT]) {\n tile.setVisible(true);\n }\n\n // Clear bugged walls\n for (int i = 1; i < MAP_HEIGHT - 2; i += 2)\n map[i][MAP_WIDTH - 2].setTerrain(Terrain.EMPTY);\n\n // Randomly make regulated holes in walls to create cycles\n Random rand = new Random(); // Preset rng for performance purposes\n for (int i = 1; i < MAP_HEIGHT - 1; i++) {\n for (int j = 1; j < MAP_WIDTH - 1; j++) {\n Tile tile = map[i][j];\n if (tile.getTerrain().equals(Terrain.WALL)) {\n\n // Neighbourhood Check\n int neighbourCount = 0, index = 0;\n boolean[] neighbourhood = new boolean[]{false, false, false, false}; // validity flags\n\n for (Direction direction : Direction.cardinals) {\n Coordinates targetCoordinates = Utility.locateDirection(tile.getPosition(), direction);\n Tile neighbour = getTileAtCoordinates(targetCoordinates);\n if (neighbour.getTerrain().equals(Terrain.WALL)) {\n neighbourCount++;\n neighbourhood[index] = true;\n }\n index++;\n }\n\n // Corner exclusion test, tests vertical NS and horizontal EW\n boolean isStraight = false;\n if (neighbourhood[0] && neighbourhood[1]) isStraight = true;\n if (neighbourhood[2] && neighbourhood[3]) isStraight = true;\n\n if (neighbourCount == 2 && isStraight) {\n if (rand.nextInt(5) == 4) tile.setTerrain(Terrain.EMPTY);\n }\n }\n }\n }\n\n // Check for enclosed spaces and create openings\n for (int i = 1; i < MAP_HEIGHT - 2; i++) probe(map[i][MAP_WIDTH - 2], Direction.EAST);\n }", "private void addDownBlock(Position p, TETile te,\n int len, int leftWid, int rightWid) {\n int x = p.x;\n int y = p.y;\n for (int j = y; j > y - len; j -= 1) {\n for (int i = x - rightWid; i < x + leftWid + 1; i += 1) {\n world[i][j] = te;\n }\n }\n }", "public static void makeEnemyMove() { //all players after index 1 are enemies\n if (gameMode == EARTH_INVADERS) {//find leftmost and rightmost vehicle columns to see if we need to move down\n int leftMost = board[0].length;\n int rightMost = 0;\n int lowest = 0;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {//find left-most, right-most and lowest most vehicles (non aircraft/train) to determine how formation should move\n Player curr = players[i];\n if (curr == null)\n continue;\n String name = curr.getName();\n if (name.equals(\"NONE\") || curr.isFlying() || name.startsWith(\"TRAIN\") || (curr instanceof Monster))\n continue;\n if (curr.getCol() < leftMost)\n leftMost = curr.getCol();\n if (curr.getCol() > rightMost)\n rightMost = curr.getCol();\n if (curr.getRow() > lowest)\n lowest = curr.getRow();\n curr.setHeadDirection(DOWN);\n }\n for (int i = FIRST_VEHICLE; i < players.length; i++) {//***move aircraft and trains\n Player curr = players[i];\n if (curr == null)\n continue;\n String name = curr.getName();\n if (name.equals(\"NONE\") || curr.isFlying() || name.startsWith(\"TRAIN\") || (curr instanceof Monster)) {\n if (curr.isMoving())\n continue;\n ArrayList<Integer> dirs = new ArrayList(); //array of preferred directions - everything but the reverse of their body position\n int bodyDir = curr.getBodyDirection();\n curr.clearDirections();\n int r = curr.getRow();\n int c = curr.getCol();\n if (bodyDir == UP) {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n }\n } else if (bodyDir == RIGHT) {\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n }\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n } else if (bodyDir == DOWN) {\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n }\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n } else //if(curr.getBodyDirection()==LEFT)\n {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n }\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n }\n int rand = 0;\n if (dirs.size() > 0)\n rand = dirs.get((int) (Math.random() * dirs.size()));\n if (curr.isFlying()) { //if aircraft is flying in the visible board, don't change direction\n if (r == 1 && (c == 0 || c == board[0].length - 1)) //we are in the first row but behind a border\n { //we only want aircraft to appear in row 1 in EARTH INVADERS (like the UFO in space invaders)\n if (bodyDir == LEFT || bodyDir == RIGHT) {\n rand = UP;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (c == 0)\n rand = RIGHT;\n else if (c == board[0].length - 1)\n rand = LEFT;\n else\n //if(dirs.contains(bodyDir))\n rand = bodyDir;\n } else if (r == 0 || c == 0 || r == board.length - 1 || c == board[0].length - 1) {\n rand = bodyDir;\n if (r == 0 && c == 0) {\n rand = RIGHT;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (r == 0 && c == board[0].length - 1) {\n rand = LEFT;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (r == board.length - 1 && c == 0) {\n rand = RIGHT;\n if (Math.random() < .5)\n rand = UP;\n } else if (r == board.length - 1 && c == board[0].length - 1) {\n rand = LEFT;\n if (Math.random() < .5)\n rand = UP;\n }\n } else if (/*dirs.contains(bodyDir) && */(r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1))\n rand = bodyDir; //make it so aircraft prefer to keep going the same direciton\n\n } else if (name.startsWith(\"TRAIN\")) {//make it so trains prefer to follow the right wall\n for (int j = 0; j < dirs.size(); j++)\n if (dirs.get(j) != bodyDir) {\n rand = dirs.get(j);\n break;\n }\n }\n curr.setDirection(rand);\n curr.setBodyDirection(rand);\n }\n }//***end aircraft/train movement\n if (leftMost == 1) //move vehicles down and start them moving right\n {\n if (EI_moving == LEFT) {\n EI_moving = DOWN;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (lowest < board.length - 3 && !curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setRow(curr.getRow() + 1);\n }\n } else if (EI_moving == DOWN) {\n EI_moving = RIGHT;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\")) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n }\n }\n } else if (EI_moving == RIGHT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(RIGHT);\n }\n }//***end leftmost is first col\n else if (rightMost == board[0].length - 2) //move vehicles down and start them moving left\n {\n if (EI_moving == RIGHT) {\n EI_moving = DOWN;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (lowest < board.length - 3 && !curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setRow(curr.getRow() + 1);\n }\n } else if (EI_moving == DOWN) {\n EI_moving = LEFT;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\")) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n }\n }\n } else if (EI_moving == LEFT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(LEFT);\n }\n }//***end rightmost is last col\n else if (EI_moving == LEFT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(LEFT);\n }\n else if (EI_moving == RIGHT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(RIGHT);\n }\n return;\n }//***end EARTH INVADERS enemy movements\n for (int i = 2; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n String name = curr.getName();\n int r = curr.getRow();\n int c = curr.getCol();\n if (r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1 && (curr instanceof Vehicle))\n ((Vehicle) (curr)).setOnField(true);\n\n if (curr.isFlying() && webs[panel].size() > 0) {\n int x = curr.findX(cellSize);\n int y = curr.findY(cellSize);\n for (int p = 0; p < webs[panel].size(); p++) {\n int[] ray = webs[panel].get(p);\n if (Utilities.isPointOnRay(x, y, ray[0], ray[1], ray[2], ray[3])) {\n explosions.add(new Explosion(\"BIG\", x, y, explosionImages, animation_delay));\n Ordinance.radiusDamage(-1, x, y, 25, panel, .5);\n Spawner.resetEnemy(i);\n webs[panel].remove(p);\n p--;\n Structure str1 = structures[ray[4]][ray[5]][panel];\n Structure str2 = structures[ray[6]][ray[7]][panel];\n if (str1 != null)\n str1.setWebValue(0);\n if (str2 != null)\n str2.setWebValue(0);\n Utilities.updateKillStats(curr);\n break;\n }\n }\n }\n //reset any ground vehicle that ended up in the water\n //reset any train not on tracks - we need this because a player might change panels as a vehicle spawns\n if (name.startsWith(\"TRAIN\")) {\n Structure str = structures[r][c][panel];\n if (str != null && str.getName().equals(\"hole\") && str.getHealth() != 0) {\n explosions.add(new Explosion(\"BIG\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Utilities.updateKillStats(curr);\n Spawner.resetEnemy(i);\n continue;\n } else if (board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"BIG\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n } else if (!board[r][c][panel].startsWith(\"T\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else //ground vehicles\n if (!curr.isFlying() && !curr.getName().startsWith(\"BOAT\") && (curr instanceof Vehicle)) {\n\n if (((Vehicle) (curr)).getStunTime() > numFrames) //ground unit might be stunned by WoeMantis shriek\n continue;\n if (board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else //reset any water vehicle that ended up on land\n if (name.startsWith(\"BOAT\")) {\n if (!board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else if (curr.getHealth() <= 0) {\n Spawner.resetEnemy(i);\n continue;\n }\n\n //if a ground unit has been on the playable field and leaves it, respawn them\n if (!curr.isFlying() && !name.startsWith(\"TRAIN\") && (curr instanceof Vehicle)) {\n if ((r == 0 || c == 0 || r == board.length - 1 || c == board[0].length - 1) && ((Vehicle) (curr)).getOnField()) {\n ((Vehicle) (curr)).setOnField(false);\n Spawner.resetEnemy(i);\n continue;\n }\n }\n if (name.endsWith(\"nukebomber\")) {//for the nukebomber, set the detonation coordinates so nuke fires when the plane exits the field\n int dr = curr.getDetRow();\n int dc = curr.getDetCol();\n int bd = curr.getBodyDirection();\n int dd = curr.getDetDir();\n if (bd == dd && (((bd == LEFT || bd == RIGHT) && c == dc) || (bd == UP || bd == DOWN) && r == dr)) {\n Ordinance.nuke();\n curr.setDetRow(-1);\n curr.setDetCol(-1);\n }\n }\n\n if (curr.isMoving())\n continue;\n int bodyDir = curr.getBodyDirection();\n curr.clearDirections();\n int[] target = isMonsterInSight(curr);\n int mDir = target[0]; //direction of the monster, -1 if none\n int monsterIndex = target[1]; //index of the monster in the players array, -1 if none\n ArrayList<Integer> dirs = new ArrayList(); //array of preferred directions - everything but the reverse of their body position\n if (bodyDir == UP) {\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n }\n } else if (bodyDir == RIGHT) {\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n }\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n } else if (bodyDir == DOWN) {\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n }\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n } else //if(curr.getBodyDirection()==LEFT)\n {\n\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n }\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n }\n\n if (dirs.size() > 0) {\n if (curr instanceof Monster) {//***MONSTER AI*******************\n double headTurnProb = 0.25;\n double stompProb = 0.5;\n int vDir = isVehicleInSight(curr);\n if (vDir >= 0) {\n boolean airShot = false;\n int vD = vDir;\n if (vD >= 10) {\n airShot = true;\n vD -= 10;\n }\n if (curr.head360() || !Utilities.oppositeDirections(vD, curr.getHeadDirection())) {\n curr.setHeadDirection(vD);\n if ((curr.getName().startsWith(\"Gob\") || curr.getName().startsWith(\"Boo\")) && numFrames >= curr.getLastShotTime() + curr.getReloadTime()) {\n Bullet temp = null;\n if (curr.getName().startsWith(\"Boo\")) {\n temp = new Bullet(curr.getName() + vD, curr.getX(), curr.getY(), 50, beamImages, SPEED, \"BEAM\", SPEED * 10, airShot, i, -1, -1);\n } else if (curr.getName().startsWith(\"Gob\")) {\n temp = new Bullet(\"flame\" + vD, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", SPEED * 4, airShot, i, -1, -1);\n }\n if (temp != null) {\n temp.setDirection(vD);\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n continue;\n }\n }\n }\n } else if (Math.random() < headTurnProb) {\n String hd = \"right\";\n if (Math.random() < .5)\n hd = \"left\";\n Utilities.turnHead(curr, hd);\n }\n Structure str = structures[r][c][panel];\n if (str != null && str.getHealth() > 0 && str.isDestroyable() && !str.getName().startsWith(\"FUEL\") && Math.random() < stompProb)\n playerMove(KeyEvent.VK_SPACE, i);\n else {\n int dir = dirs.get((int) (Math.random() * dirs.size()));\n if (dir == UP) {\n if (curr.getBodyDirection() != UP) {\n curr.setBodyDirection(UP);\n curr.setHeadDirection(UP);\n } else {\n if (!curr.isSwimmer() && board[r - 1][c][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (r - 1 >= 1) {\n str = structures[r - 1][c][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_UP, i);\n }\n } else if (dir == DOWN) {\n if (curr.getBodyDirection() != DOWN) {\n curr.setBodyDirection(DOWN);\n curr.setHeadDirection(DOWN);\n } else {\n if (!curr.isSwimmer() && board[r + 1][c][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (r + 1 <= structures.length - 1) {\n str = structures[r + 1][c][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_DOWN, i);\n }\n } else if (dir == LEFT) {\n if (curr.getBodyDirection() != LEFT) {\n curr.setBodyDirection(LEFT);\n curr.setHeadDirection(LEFT);\n } else {\n if (!curr.isSwimmer() && board[r][c - 1][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (c - 1 >= 1) {\n str = structures[r][c - 1][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_LEFT, i);\n }\n } else if (dir == RIGHT) {\n if (curr.getBodyDirection() != RIGHT) {\n curr.setBodyDirection(RIGHT);\n curr.setHeadDirection(RIGHT);\n } else {\n if (!curr.isSwimmer() && board[r][c + 1][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (c + 1 <= board[0].length - 1) {\n str = structures[r][c + 1][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_RIGHT, i);\n }\n }\n }\n continue;\n }//end monster AI movement\n else //shoot at a target\n if (name.endsWith(\"troops\") || name.endsWith(\"jeep\") || name.endsWith(\"police\") || name.startsWith(\"TANK\") || name.endsWith(\"coastguard\") || name.endsWith(\"destroyer\") || name.endsWith(\"fighter\") || name.equals(\"AIR bomber\")) {\n boolean airShot = false;\n if (gameMode == EARTH_INVADERS) //we don't want vehicles to shoot each other\n {\n airShot = true;\n curr.setHeadDirection(DOWN);\n }\n if (monsterIndex >= 0 && monsterIndex < players.length && players[monsterIndex].isFlying())\n airShot = true;\n if (curr.getName().endsWith(\"fighter\"))\n curr.setDirection(bodyDir); //keep moving while shooting\n if (mDir != -1 && curr.getRow() > 0 && curr.getCol() > 0 && curr.getRow() < board.length - 1 && curr.getCol() < board[0].length - 1) { //don't shoot from off the visible board\n if ((mDir == bodyDir || ((curr.getName().startsWith(\"TANK\") || curr.getName().endsWith(\"jeep\") || name.equals(\"AIR bomber\")) && (mDir == curr.getHeadDirection() || name.equals(\"AIR bomber\")))) && numFrames >= curr.getLastShotTime() + curr.getReloadTime()) { //AIR bomber needs to be able to drop bombs if they see the monster in front of them or behind them, so we need to check the name in two conditions\n Bullet temp;\n if (name.endsWith(\"jeep\") || name.endsWith(\"coastguard\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 65, (int) (Math.random() * 10) + 30);\n temp = new Bullet(\"jeep\" + mDir, curr.getX(), curr.getY(), 5, machBulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, i, -1, -1);\n } else if (name.endsWith(\"troops\") || name.endsWith(\"police\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 70, (int) (Math.random() * 10) + 20);\n temp = new Bullet(\"troops\" + mDir, curr.getX(), curr.getY(), 3, bulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, i, -1, -1);\n } else if (name.endsWith(\"destroyer\") || name.endsWith(\"artillery\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n temp = new Bullet(\"destroyer\" + mDir, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", SPEED * 3, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n } else if (name.endsWith(\"fighter\")) {\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n temp = new Bullet(\"fighter\" + mDir, curr.getX(), curr.getY(), 30, rocketImages, SPEED, \"SHELL\", SPEED * 8, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n } else if (name.endsWith(\"missile\")) {\n temp = new Bullet(\"missile\" + mDir, curr.getX(), curr.getY(), 50, rocketImages, SPEED, \"SHELL\", SPEED * 3, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n } else if (name.endsWith(\"flame\")) {\n temp = new Bullet(\"flame\" + mDir, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", SPEED * 4, airShot, i, -1, -1);\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n } else if (name.equals(\"AIR bomber\")) {\n temp = null;\n if (!DISABLE_BOMBERS) {\n int mR = players[PLAYER1].getRow(); //main player row & col\n int mC = players[PLAYER1].getCol();\n int mR2 = -99; //possible 2nd monster row & col\n int mC2 = -99;\n if (p1partner) {\n mR2 = players[PLAYER2].getRow();\n mC2 = players[PLAYER2].getCol();\n }\n if (players[PLAYER1].getHealth() > 0 && (Math.abs(r - mR) <= 2 || Math.abs(c - mC) <= 2 || Math.abs(r - mR2) <= 2 || Math.abs(c - mC2) <= 2)) {//our bomber is in the same row & col as a monster + or - 1\n if (bodyDir == UP && r < board.length - 1) {\n Ordinance.bigExplosion(curr.getX(), curr.getY() + (cellSize * 2), panel);\n Ordinance.radiusDamage(-1, curr.getX(), curr.getY() + (cellSize * 2), 50, panel, .25);\n } else if (bodyDir == DOWN && r > 1) {\n Ordinance.bigExplosion(curr.getX(), curr.getY() - (cellSize * 2), panel);\n Ordinance.radiusDamage(-1, curr.getX(), curr.getY() - (cellSize * 2), 50, panel, .25);\n } else if (bodyDir == RIGHT && c < board[0].length - 1) {\n Ordinance.bigExplosion(curr.getX() - (cellSize * 2), curr.getY(), panel);\n Ordinance.radiusDamage(-1, curr.getX() - (cellSize * 2), curr.getY(), 50, panel, .25);\n } else if (bodyDir == LEFT && c > 1) {\n Ordinance.bigExplosion(curr.getX() + (cellSize * 2), curr.getY(), panel);\n Ordinance.radiusDamage(-1, curr.getX() + (cellSize * 2), curr.getY(), 50, panel, .25);\n }\n }\n }\n } else {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n temp = new Bullet(\"\" + mDir, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", SPEED * 5, airShot, i, -1, -1);\n }\n if (temp != null)\n temp.setDirection(mDir);\n\n if (name.endsWith(\"troops\") || name.endsWith(\"police\") && Math.random() < .5) //make the police move towards the monster half the time\n {\n if (mDir == UP && isValidMove(curr, curr.getRow() - 1, curr.getCol()))\n curr.setDirection(UP);\n else if (mDir == DOWN && isValidMove(curr, curr.getRow() + 1, curr.getCol()))\n curr.setDirection(DOWN);\n else if (mDir == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() - 1))\n curr.setDirection(LEFT);\n else if (mDir == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() + 1))\n curr.setDirection(RIGHT);\n else\n curr.setDirection(-1);\n }\n if (temp != null && players[PLAYER1].getHealth() > 0) {\n if (gameMode == EARTH_INVADERS && !curr.isFlying()) {\n } else {\n if (numFrames >= ceaseFireTime + ceaseFireDuration || gameMode == EARTH_INVADERS) {\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n continue;\n }\n }\n }\n } else //change to face the monster to line up a shot\n {\n if (name.endsWith(\"troops\") || name.endsWith(\"police\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.endsWith(\"artillery\")) {\n curr.setDirection(-1); //stop to shoot\n curr.setBodyDirection(mDir);\n } else if (curr.getName().startsWith(\"TANK\") || curr.getName().endsWith(\"jeep\"))\n curr.setHeadDirection(mDir);\n continue;\n }\n }\n }\n int rand = dirs.get((int) (Math.random() * dirs.size()));\n if (curr.isFlying() && (r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1)) {\n rand = bodyDir; //make it so aircraft prefer to keep going the same direciton\n } else if (name.startsWith(\"TRAIN\")) {//make it so trains prefer to follow the right wall\n for (int j = 0; j < dirs.size(); j++)\n if (dirs.get(j) != bodyDir) {\n rand = dirs.get(j);\n break;\n }\n }\n curr.setDirection(rand);\n curr.setBodyDirection(rand);\n\n continue;\n }\n //if no preferred direction, include the option to turn around\n //civilians should prefer to turn around rather than approach the monster\n if (name.endsWith(\"civilian\") || name.endsWith(\"bus\")) {\n if (bodyDir == mDir) //if we are facing the same direction as the monster, turn around\n {\n if (bodyDir == UP && isValidMove(curr, curr.getRow() + 1, curr.getCol())) {\n curr.setDirection(DOWN);\n curr.setBodyDirection(DOWN);\n continue;\n } else if (bodyDir == DOWN && isValidMove(curr, curr.getRow() - 1, curr.getCol())) {\n curr.setDirection(UP);\n curr.setBodyDirection(UP);\n continue;\n } else if (bodyDir == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() + 1)) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n continue;\n } else if (bodyDir == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() - 1)) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n continue;\n }\n }\n }\n int rand = (int) (Math.random() * 4);\n if (rand == UP && isValidMove(curr, curr.getRow() - 1, curr.getCol())) {\n curr.setDirection(UP);\n curr.setBodyDirection(UP);\n continue;\n }\n if (rand == DOWN && isValidMove(curr, curr.getRow() + 1, curr.getCol())) {\n curr.setDirection(DOWN);\n curr.setBodyDirection(DOWN);\n continue;\n }\n if (rand == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() - 1)) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n continue;\n }\n if (rand == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() + 1)) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n continue;\n }\n\n }\n }", "public void solucioInicial2() {\n int grupsRecollits = 0;\n for (int i=0; i<numCentres*helisPerCentre; ++i) {\n Helicopter hel = new Helicopter();\n helicopters.add(hel);\n }\n int indexHelic = 0;\n int indexGrup = 0;\n int places = 15;\n while (indexGrup < numGrups) {\n int trajecte[] = {-1,-1,-1};\n for (int i=0; i < 3 && indexGrup<numGrups; ++i) {\n Grupo grup = grups.get( indexGrup );\n if (places - grup.getNPersonas() >= 0) {\n places -= grup.getNPersonas();\n trajecte[i] = indexGrup;\n indexGrup++;\n\n }\n else i = 3;\n }\n Helicopter helicopter = helicopters.get( indexHelic );\n helicopter.addTrajecte( trajecte, indexHelic/helisPerCentre );\n places = 15;\n indexHelic++;\n if (indexHelic == numCentres*helisPerCentre) indexHelic = 0;\n }\n }", "private void decorateMountainsFloat(int xStart, int xLength, int floor, boolean enemyAddedBefore, ArrayList finalListElements, ArrayList states)\r\n\t {\n\t if (floor < 1)\r\n\t \treturn;\r\n\r\n\t // boolean coins = random.nextInt(3) == 0;\r\n\t boolean rocks = true;\r\n\r\n\t //add an enemy line above the box\r\n\t Random r = new Random();\r\n\t boolean enemyAdded=addEnemyLine(xStart + 1, xLength - 1, floor - 1);\r\n\r\n\t int s = 1;\r\n\t int e = 1;\r\n\r\n\t if(enemyAdded==false && enemyAddedBefore==false)\r\n\t {\r\n\t if (floor - 2 > 0){\r\n\t if ((xLength - e) - (xStart + s) > 0){\r\n\t for(int x = xStart + s; x < xLength- e; x++){\r\n\t \tboolean flag=true;\r\n\t \tfor(int i=0;i<states.size();i++)\r\n\t \t{\r\n\t \t\tElements element=(Elements)finalListElements.get(i);\r\n\t \t\t\tBlockNode state=(BlockNode)states.get(i);\r\n\t \t\t\t\r\n\t \t\t\tint xElement = (int)(initialStraight+state.getX());\r\n\t \t int floorC= (int)state.getY()+1;\r\n\t \t int widthElement=element.getWidth();\r\n\t \t int heigthElement=element.getHeigth()+2;\r\n\t \t \r\n\t \t int widthElementNext=1;\r\n\t \t int heigthElementNext=0;\r\n\t \t \r\n\t \t if(x+(widthElementNext-1)>=xElement && x<xElement+widthElement && (floor-1)-heigthElementNext<=floorC && (floor-1)>= floorC-heigthElement )\r\n\t \t {\r\n\t \t \tflag=false;\r\n\t \t \tbreak;\r\n\t \t }\r\n\t \t \t \t \t\t \t \r\n\t \t } \r\n\t \tif(flag==true)\r\n\t \t{\r\n\t \t\tsetBlock(x, floor - 1, COIN);\r\n\t \t}\r\n\t \r\n\t //COINS++;\r\n\t }\r\n\t }\r\n\t }\r\n\t }\r\n\r\n\t s = random.nextInt(4);\r\n\t e = random.nextInt(4);\r\n\t \r\n\t //this fills the set of blocks and the hidden objects inside them\r\n\t /*\r\n\t if (floor - 4 > 0)\r\n\t {\r\n\t if ((xLength - 1 - e) - (xStart + 1 + s) > 2)\r\n\t {\r\n\t for (int x = xStart + 1 + s; x < xLength - 1 - e; x++)\r\n\t {\r\n\t if (rocks)\r\n\t {\r\n\t if (x != xStart + 1 && x != xLength - 2 && random.nextInt(3) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_POWERUP);\r\n\t //BLOCKS_POWER++;\r\n\t }\r\n\t else\r\n\t {\t//the fills a block with a hidden coin\r\n\t setBlock(x, floor - 4, BLOCK_COIN);\r\n\t //BLOCKS_COINS++;\r\n\t }\r\n\t }\r\n\t else if (random.nextInt(4) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (2 + 1 * 16));\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (1 + 1 * 16));\r\n\t }\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_EMPTY);\r\n\t //BLOCKS_EMPTY++;\r\n\t }\r\n\t }\r\n\t }\r\n\t //additionElementToList(\"Block\", 1,(xLength - 1 - e)-(xStart + 1 + s));\r\n\t }\r\n\t \r\n\t }*/\r\n\t }", "public void seekWalls() {\n\t\t for (int j=0; j<visited[0].length; j++){\n\t\t\tfor (int i=visited.length-1; i>=0; i--) {\t\t\t\n\t\t\t\tif (i!=0 && j!= visited[0].length-1) {//general position\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;//not break!!!!! return to exit !\n\t\t\t\t\t}\n\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (i==0 && j!= visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (i!=0 && j== visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {//if (i==0 && j== visited[0].length-1) {\n\t\t\t\t\t//no solution\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void findHighestPowerUnitAnySize() {\r\n\t\ttimer.startAlgorithm(\"ChronalCharger.findHighestPowerUnitAnySize()\");\r\n\t\tfor (int i=1; i<=300; i++) {\r\n//\t\t\tcurrentGrid = new ShrinkingPowerGrid(i, 300);\r\n\t\t\tfindHighestPowerUnit(i);\r\n//\t\t\tpreviousGrids.add(currentGrid);\r\n\t\t}\r\n\t\ttimer.stopAlgorithm();\r\n\t}", "private void decorateMountains(int xStart, int xLength, int floor, ArrayList finalListElements, ArrayList states,boolean enemyAddedBefore)\r\n\t {\n\t if (floor < 1)\r\n\t \treturn;\r\n\r\n\t // boolean coins = random.nextInt(3) == 0;\r\n\t boolean rocks = true;\r\n\r\n\t //add an enemy line above the box\r\n\t Random r = new Random();\r\n\t boolean enemyAdded=addEnemyLine(xStart + 1, xLength - 1, floor - 1);\r\n\r\n\t int s = 1;\r\n\t int e = 1;\r\n\r\n\t if(enemyAdded==false && enemyAddedBefore==false)\r\n\t {\r\n\t if (floor - 2 > 0){\r\n\t if ((xLength - e) - (xStart + s) > 0){\r\n\t for(int x = xStart + s; x < xLength- e; x++){\r\n\t \tboolean flag=true;\r\n\t \tfor(int i=0;i<states.size();i++)\r\n\t \t{\r\n\t \t\tElements element=(Elements)finalListElements.get(i);\r\n\t \t\t\tBlockNode state=(BlockNode)states.get(i);\r\n\t \t\t\t\r\n\t \t\t\tint xElement = (int)(initialStraight+state.getX());\r\n\t \t int floorC= (int)state.getY()+1;\r\n\t \t int widthElement=element.getWidth();\r\n\t \t int heigthElement=element.getHeigth()+2;\r\n\t \t \r\n\t \t int widthElementNext=1;\r\n\t \t int heigthElementNext=0;\r\n\t \t \r\n\t \t if(x+(widthElementNext-1)>=xElement && x<xElement+widthElement && (floor-1)-heigthElementNext<=floorC && (floor-1)>= floorC-heigthElement )\r\n\t \t {\r\n\t \t \tflag=false;\r\n\t \t \tbreak;\r\n\t \t }\r\n\t \t \t \t \t\t \t \r\n\t \t } \r\n\t \tif(flag==true)\r\n\t \t{\r\n\t \t\tsetBlock(x, floor - 1, COIN);\r\n\t \t}\r\n\t \r\n\t //COINS++;\r\n\t }\r\n\t }\r\n\t }\r\n\t }\r\n\r\n\t s = random.nextInt(4);\r\n\t e = random.nextInt(4);\r\n\t \r\n\t //this fills the set of blocks and the hidden objects inside them\r\n\t /*\r\n\t if (floor - 4 > 0)\r\n\t {\r\n\t if ((xLength - 1 - e) - (xStart + 1 + s) > 2)\r\n\t {\r\n\t for (int x = xStart + 1 + s; x < xLength - 1 - e; x++)\r\n\t {\r\n\t if (rocks)\r\n\t {\r\n\t if (x != xStart + 1 && x != xLength - 2 && random.nextInt(3) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_POWERUP);\r\n\t //BLOCKS_POWER++;\r\n\t }\r\n\t else\r\n\t {\t//the fills a block with a hidden coin\r\n\t setBlock(x, floor - 4, BLOCK_COIN);\r\n\t //BLOCKS_COINS++;\r\n\t }\r\n\t }\r\n\t else if (random.nextInt(4) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (2 + 1 * 16));\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (1 + 1 * 16));\r\n\t }\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_EMPTY);\r\n\t //BLOCKS_EMPTY++;\r\n\t }\r\n\t }\r\n\t }\r\n\t //additionElementToList(\"Block\", 1,(xLength - 1 - e)-(xStart + 1 + s));\r\n\t }\r\n\t \r\n\t }*/\r\n\t }", "private void checkForConversions() {\n\n for(int r=0; r<COLUMN_ROW_COUNT; r++) {\n for(int c=0; c<COLUMN_ROW_COUNT; c++) {\n Piece p = cells[r][c];\n if(p == null) continue;\n\n if (p.getType().equals(Type.GUARD)) {\n int surroundingDragons = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c + 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+ 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n\n if (surroundingDragons >= 3) {\n cells[r][c].changeType(Type.DRAGON);\n }\n }\n\n /*\n if(p.getType().equals(Type.KING)) {\n int blockedDirections = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c - 2) >= COLUMN_ROW_COUNT && cells[r][c-2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r - 2) >= COLUMN_ROW_COUNT && cells[r-2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c+1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c + 2) < COLUMN_ROW_COUNT && cells[r][c+2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r + 2) < COLUMN_ROW_COUNT && cells[r+2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if(blockedDirections == 4) {\n //gameOver = true;\n }\n }*/\n }\n }\n }", "protected void calculatePathfindingGrid(Tile[] tiles) {\n \n if(tiles == null) {\n return;\n }\n \n /**\n * Problem:\n * Because the tile size used by the path finding engine will most likely be\n * different from that of the visual effect size, we have to\n * look at all the visual tiles and judge whether they are blocking of\n * particular kinds of unit.\n * \n * Algorithm:\n * For land, air and sea take a look at the number of blocking/non-blocking\n * tiles there are and if there is over 50% either way then that will be the\n * PathTiles result.\n */\n \n // First get the size of the map in PathTile(s)\n int rows = getActualHeightInTiles();\n int cols = getActualWidthInTiles();\n \n // Calculate the number of tiles to a PathTile\n int tilesPerActualTilesX = getActualTileWidth() / getTileWidth();\n int tilesPerActualTilesY = getActualTileHeight() / getTileHeight();\n int tileCount = tilesPerActualTilesX * tilesPerActualTilesY;\n \n int tileCols = getWidthInTiles();\n \n // Create an array\n mPathTiles = new PathTile[ rows * cols ];\n \n // Iterate through these tiles\n for(int x = 0; x < cols ; x++) {\n for(int y = 0; y < rows; y++) {\n \n // Setup some variables\n int blockSea, blockAir, blockLand;\n blockAir = blockLand = blockSea = 0;\n \n // Figure out the percentage of each block\n for(int tx = 0; tx < tilesPerActualTilesX; tx++) {\n for(int ty = 0; ty < tilesPerActualTilesY; ty++) {\n \n int tileX = (x * tilesPerActualTilesX) + tx;\n int tileY = (y * tilesPerActualTilesY) + ty;\n \n Tile thisTile = tiles[ (tileY * tileCols) + tileX ];\n \n if(thisTile.blockAir()) {\n blockAir++;\n }\n \n if(thisTile.blockLand()) {\n blockLand++;\n }\n \n if(thisTile.blockSea()) {\n blockSea++;\n }\n \n }\n }\n \n // Calculate percentage\n float a,b,c;\n a = (float)blockAir / (float)tileCount;\n b = (float)blockLand / (float)tileCount;\n c = (float)blockSea / (float)tileCount;\n \n // Set the new tile\n mPathTiles[ (y * cols) + x ] = new PathTile( (a >= .5f), (b >= .5f), (c >= .5f) );\n \n // System.out.println(\"Grid \" + ((y * cols) + x) + \" (\" + x + \", \" + y + \") Air: \" + a + \" Land: \" + b + \" Sea: \" + c);\n \n }\n }\n \n }", "private String buildIC() {\r\n List<Integer> emptyCellsPos = new ArrayList<Integer>();\r\n for(int i = 0; i < gameHeight; i++) {\r\n if (!myLaneInfo.get(i).get(3).isEmpty()) {\r\n emptyCellsPos.add(i);\r\n }\r\n }\r\n if (emptyCellsPos.isEmpty()) {\r\n return doNothingCommand();\r\n }\r\n int y = getRandomElementOfList(emptyCellsPos);\r\n return IRONCURTAIN.buildCommand(getRandomElementOfList(myLaneInfo.get(y).get(3)),y);\r\n }", "private float checkVertical(Point2D.Float position, int firepower, boolean pierce, int blockHeight) {\r\n float value = position.y; // Start at the origin tile\r\n\r\n outer: for (int i = 1; i <= firepower; i++) {\r\n // Expand one tile at a time\r\n value += blockHeight;\r\n\r\n // Check this tile for wall collision\r\n for (int index = 0; index < GameObjectCollection.tileObjects.size(); index++) {\r\n TileObject obj = GameObjectCollection.tileObjects.get(index);\r\n if (obj.collider.contains(position.x, value)) {\r\n if (!obj.isBreakable()) {\r\n // Hard wall found, move value back to the tile before\r\n value -= blockHeight;\r\n }\r\n\r\n // Stop checking for tile objects after the first breakable is found\r\n if (!pierce) {\r\n break outer;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return value;\r\n }", "public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }", "private Cell getBananaTarget() {\n Cell[][] blocks = gameState.map;\n int mostWormInRange = 0;\n Cell chosenCell = null;\n boolean wormAtCenter;\n\n for (int i = currentWorm.position.x - currentWorm.bananaBomb.range; i <= currentWorm.position.x + currentWorm.bananaBomb.range; i++){\n for (int j = currentWorm.position.y - currentWorm.bananaBomb.range; j <= currentWorm.position.y + currentWorm.bananaBomb.range; j++){\n wormAtCenter = false;\n if (isValidCoordinate(i, j)\n && euclideanDistance(i, j, currentWorm.position.x, currentWorm.position.y) <= 5) {\n List<Cell> affectedCells = getBananaAffectedCell(i, j);\n\n int wormInRange = 0;\n for (Cell cell : affectedCells) {\n for (Worm enemyWorm : opponent.worms) {\n if (enemyWorm.position.x == cell.x && enemyWorm.position.y == cell.y\n && enemyWorm.health > 0)\n wormInRange++;\n if (enemyWorm.position.x == i && enemyWorm.position.y == j)\n wormAtCenter = true;\n }\n for (Worm myWorm : player.worms) {\n if (myWorm.position.x == cell.x && myWorm.position.y == cell.y && myWorm.health > 0)\n wormInRange = -5;\n }\n }\n if (wormInRange > mostWormInRange) {\n mostWormInRange = wormInRange;\n chosenCell = blocks[j][i];\n } else if (wormInRange == mostWormInRange && wormAtCenter) {\n chosenCell = blocks[j][i];\n }\n }\n }\n }\n\n return chosenCell;\n }", "public void buildInCell() {\n this.level++;\n if (this.level == 4) {\n this.setFreeSpace(false);\n }\n }", "private void Step() {\n\t\tif (numberOfColumns == currentCycle) {\n\t\t\treturn;\n\t\t}\n\t\tif (numberOfRows != 1) {\n\n\t\t\tstall = 0;\n\t\t\tx = 0;\n\n\t\t\twhile (x < numberOfRows) {\n\t\t\t\tif (lstInstructionsPipeLine.get(x).issue_cycle == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (stall == 1) {\n\t\t\t\t\tDisplay_Stall(x, currentCycle);\n\t\t\t\t} else {\n\t\t\t\t\tswitch (lstInstructionsPipeLine.get(x).pipeline_stage) {\n\n\t\t\t\t\tcase \"IF\":\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"ID\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\tfor (int i = (x - 1); i >= 0; i--) {\n\n\t\t\t\t\t\t\tif (lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"EX\")\n\t\t\t\t\t\t\t\t\t&& lstInstructionsPipeLine.get(i).operator.functional_unit\n\t\t\t\t\t\t\t\t\t\t\t.equals(lstInstructionsPipeLine.get(x).operator.functional_unit)) {\n\t\t\t\t\t\t\t\t// *** Structural Hazard ***\n\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if ((lstInstructionsPipeLine.get(i).destination_register\n\t\t\t\t\t\t\t\t\t.equals(lstInstructionsPipeLine.get(x).source_register1)\n\t\t\t\t\t\t\t\t\t|| lstInstructionsPipeLine.get(i).destination_register\n\t\t\t\t\t\t\t\t\t\t\t.equals(lstInstructionsPipeLine.get(x).source_register2))) {\n\t\t\t\t\t\t\t\tif (dataForwarding == 1) {\n\n\t\t\t\t\t\t\t\t\tif (lstInstructionsPipeLine.get(i).operator.name.equals(\"ld\")\n\t\t\t\t\t\t\t\t\t\t\t|| lstInstructionsPipeLine.get(i).operator.name.equals(\"sd\")) {\n\t\t\t\t\t\t\t\t\t\tif (!lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"WB\")\n\t\t\t\t\t\t\t\t\t\t\t\t&& !lstInstructionsPipeLine.get(i).pipeline_stage.equals(\" \")) {\n\t\t\t\t\t\t\t\t\t\t\t// ** RAW Hazard **\n\t\t\t\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tif (!lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"MEM\")\n\t\t\t\t\t\t\t\t\t\t\t\t&& !lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"WB\")\n\t\t\t\t\t\t\t\t\t\t\t\t&& !lstInstructionsPipeLine.get(i).pipeline_stage.equals(\" \")) {\n\t\t\t\t\t\t\t\t\t\t\t// *** RAW Hazard **\n\t\t\t\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\telse if (dataForwarding == 0) {\n\t\t\t\t\t\t\t\t\t// If forwarding is disabled and the\n\t\t\t\t\t\t\t\t\t// previous instruction is not completed,\n\t\t\t\t\t\t\t\t\t// stall.\n\t\t\t\t\t\t\t\t\tif (!lstInstructionsPipeLine.get(i).pipeline_stage.equals(\" \")) {\n\t\t\t\t\t\t\t\t\t\t// *** RAW Hazard **\n\t\t\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if ((lstInstructionsPipeLine.get(i).destination_register\n\t\t\t\t\t\t\t\t\t.equals(lstInstructionsPipeLine.get(x).destination_register))\n\t\t\t\t\t\t\t\t\t&& (!lstInstructionsPipeLine.get(i).destination_register.equals(\"null\"))) {\n\n\t\t\t\t\t\t\t\tif ((lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"EX\"))\n\t\t\t\t\t\t\t\t\t\t&& ((lstInstructionsPipeLine.get(i).operator.execution_cycles\n\t\t\t\t\t\t\t\t\t\t\t\t- lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(i).execute_counter) >= (lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(x).operator.execution_cycles - 1))) {\n\t\t\t\t\t\t\t\t\t// *** WAW Hazard ***\n\t\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if ((lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"EX\"))\n\t\t\t\t\t\t\t\t\t&& ((lstInstructionsPipeLine.get(i).operator.execution_cycles\n\t\t\t\t\t\t\t\t\t\t\t- lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t\t\t\t\t\t.get(i).execute_counter) == (lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(x).operator.execution_cycles - 1))) {\n\n\t\t\t\t\t\t\t\t// *** WB will happen at the same time ***\n\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (stall != 1) {\n\t\t\t\t\t\t\tif (lstInstructionsPipeLine.get(x).operator.name == \"br_taken\") {\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \" \";\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).execute_counter++;\n\t\t\t\t\t\t\t\tif ((x + 1) < numberOfRows) {\n\t\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x + 1).pipeline_stage = \" \";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Complete the execution of the branch.\n\t\t\t\t\t\t\telse if (lstInstructionsPipeLine.get(x).operator.name == \"br_untaken\") {\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \" \";\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).execute_counter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Move the instruction into the EX stage.\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"EX\";\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).execute_counter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"EX\":\n\t\t\t\t\t\tif (lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t.get(x).execute_counter < lstInstructionsPipeLine.get(x).operator.execution_cycles) {\n\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"EX\";\n\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).execute_counter++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"MEM\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"MEM\":\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"WB\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"WB\":\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \" \";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \" \":\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \" \";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(), \"Unrecognized Pipeline Stage!\", \"Dialog\",\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (stall == 1) {\n\t\t\t\t\t\tDisplay_Stall(x, currentCycle);\n\t\t\t\t\t} else if (lstInstructionsPipeLine.get(x).pipeline_stage == \"EX\") {\n\t\t\t\t\t\tSystem.out.println(lstInstructionsPipeLine.get(x).operator.display_value + \" - row=\" + x\n\t\t\t\t\t\t\t\t+ \" col=\" + currentCycle);\n\t\t\t\t\t\tJPanel pnl_EXE_tmp = new JPanel();\n\t\t\t\t\t\tpnl_EXE_tmp.setBackground(col_EXE);\n\t\t\t\t\t\tpnl_EXE_tmp.setBounds(currentCycle * 40 + (50 + 100), x * 20 + 20, 40, 20);// (w+row_x)\n\t\t\t\t\t\tpanelShowResult.add(pnl_EXE_tmp);\n\t\t\t\t\t\tJLabel lblExe_tmp = new JLabel(lstInstructionsPipeLine.get(x).operator.display_value);\n\t\t\t\t\t\tpnl_EXE_tmp.add(lblExe_tmp);\n\t\t\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\t\t\tpanelShowResult.repaint();\n\n\t\t\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x,\"EX\");/// k,v\n\t\t\t\t\t}\n\t\t\t\t\t// Output the pipeline stage.\n\t\t\t\t\telse {\n\t\t\t\t\t\tJPanel pnl_tmp = new JPanel();\n\t\t\t\t\t\tswitch (lstInstructionsPipeLine.get(x).pipeline_stage) {\n\t\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\t\tpnl_tmp.setBackground(col_ID);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"MEM\":\n\t\t\t\t\t\t\tpnl_tmp.setBackground(col_MEM);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"WB\":\n\t\t\t\t\t\t\tpnl_tmp.setBackground(col_WB);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// pnl_tmp.setBackground(col_EXE);\n\t\t\t\t\t\tpnl_tmp.setBounds(currentCycle * 40 + (50 + 100), x * 20 + 20, 40, 20);// (w+row_x)\n\t\t\t\t\t\tpanelShowResult.add(pnl_tmp);\n\t\t\t\t\t\tJLabel lbl_tmp = new JLabel(lstInstructionsPipeLine.get(x).pipeline_stage);\n\t\t\t\t\t\tpnl_tmp.add(lbl_tmp);\n\t\t\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\t\t\tpanelShowResult.repaint();\n\n\t\t\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x, lstInstructionsPipeLine.get(x).pipeline_stage);/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// v\n\n\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage + \" - row=\" + x + \" col=\" + currentCycle);\n\t\t\t\t\t}\n\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"x:\" + x);\n\t\t\t\tx++;\n\t\t\t} // End of while loop\n\n\t\t\tif (stall != 1 && x < numberOfRows) {\n\t\t\t\t// Issue a new instruction.\n\t\t\t\tlstInstructionsPipeLine.get(x).issue_cycle = Integer.toString(currentCycle);\n\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"IF\";\n\t\t\t\tJPanel pnl_IF_tmp = new JPanel();\n\t\t\t\tpnl_IF_tmp.setBackground(col_IF);\n\t\t\t\tpnl_IF_tmp.setBounds(currentCycle * 40 + (50 + 100), x * 20 + 20, 40, 20);// (w+row_x)\n\t\t\t\tpanelShowResult.add(pnl_IF_tmp);\n\t\t\t\tJLabel lblIF_tmp = new JLabel(lstInstructionsPipeLine.get(x).pipeline_stage);\n\t\t\t\tpnl_IF_tmp.add(lblIF_tmp);\n\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\tpanelShowResult.repaint();\n\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x, lstInstructionsPipeLine.get(x).pipeline_stage);/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,v\n\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage + \" - row=\" + x + \" col=\" + currentCycle);\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Clk:\" + currentCycle);\n\t\t\tcurrentCycle++;\n\t\t} else {\n\n\t\t\tif (currentCycle == 0) {\n\t\t\t\tlstInstructionsPipeLine.get(0).issue_cycle = Integer.toString(currentCycle);\n\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"IF\";\n\t\t\t\tJPanel pnl_IF_tmp = new JPanel();\n\t\t\t\tpnl_IF_tmp.setBackground(col_IF);\n\t\t\t\tpnl_IF_tmp.setBounds(x * 40 + x, currentCycle * 20 + (20), 40, 20);// (w+row_x)\n\t\t\t\tpanelShowResult.add(pnl_IF_tmp);\n\t\t\t\tJLabel lblIF_tmp = new JLabel(lstInstructionsPipeLine.get(0).getPipeline_stage());\n\t\t\t\tpnl_IF_tmp.add(lblIF_tmp);\n\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\tpanelShowResult.repaint();\n\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x, lstInstructionsPipeLine.get(0).pipeline_stage);/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// v\n\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage + \" - row=\" + x + \" col=\" + currentCycle);\n\t\t\t\tSystem.out.println(\"Clk:\" + currentCycle);\n\t\t\t\tcurrentCycle++;\n\t\t\t} else {\n\t\t\t\tswitch (lstInstructionsPipeLine.get(0).pipeline_stage) {\n\t\t\t\tcase \"IF\":\n\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"ID\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ID\":\n\n\t\t\t\t\t// If branch is taken, complete this instruction.\n\t\t\t\t\tif (lstInstructionsPipeLine.get(0).operator.name.substring(0, 2) == \"br\") {\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \" \";\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).execute_counter++;\n\t\t\t\t\t}\n\t\t\t\t\t// Move the instruction into the EX stage.\n\t\t\t\t\telse {\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"EX\";\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).execute_counter++;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EX\":\n\t\t\t\t\t// If the instruction hasn't completed.\n\t\t\t\t\tif (lstInstructionsPipeLine\n\t\t\t\t\t\t\t.get(0).execute_counter < lstInstructionsPipeLine.get(0).operator.execution_cycles) {\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"EX\";\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).execute_counter++;\n\t\t\t\t\t}\n\t\t\t\t\t// Move the instruction to the MEM stage.\n\t\t\t\t\telse {\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"MEM\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MEM\":\n\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"WB\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"WB\":\n\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \" \";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \" \":\n\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \" \";\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(), \"Unrecognized Pipeline Stage!\", \"Dialog\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\n\t\t\t\t// If the instruction is in the EX stage, display the functional\n\t\t\t\t// unit.\n\t\t\t\tif (lstInstructionsPipeLine.get(0).pipeline_stage == \"EX\") {\n\t\t\t\t\tJPanel pnl_IF_tmp = new JPanel();\n\t\t\t\t\tpnl_IF_tmp.setBackground(col_EXE);\n\t\t\t\t\tpnl_IF_tmp.setBounds(x * 40 + x, currentCycle * 20 + (20), 40, 20);// (w+row_x)\n\t\t\t\t\tpanelShowResult.add(pnl_IF_tmp);\n\t\t\t\t\tJLabel lblIF_tmp = new JLabel(lstInstructionsPipeLine.get(0).pipeline_stage);\n\t\t\t\t\tpnl_IF_tmp.add(lblIF_tmp);\n\t\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\t\tpanelShowResult.repaint();\n\t\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x,\"EX\");/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,v\n\n\t\t\t\t\tSystem.out.println(lstInstructionsPipeLine.get(0).operator.display_value + \" - row=\" + x + \" col=\"\n\t\t\t\t\t\t\t+ currentCycle);\n\t\t\t\t} else {\n\t\t\t\t\tJPanel pnl_IF_tmp = new JPanel();\n\t\t\t\t\tswitch (lstInstructionsPipeLine.get(0).pipeline_stage) {\n\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\tpnl_IF_tmp.setBackground(col_ID);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"MEM\":\n\t\t\t\t\t\tpnl_IF_tmp.setBackground(col_MEM);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"WB\":\n\t\t\t\t\t\tpnl_IF_tmp.setBackground(col_WB);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// pnl_IF_tmp.setBackground(col_IF);\n\t\t\t\t\tpnl_IF_tmp.setBounds(x * 40 + x, currentCycle * 20 + (20), 40, 20);// (w+row_x)\n\t\t\t\t\tpanelShowResult.add(pnl_IF_tmp);\n\t\t\t\t\tJLabel lblIF_tmp = new JLabel(lstInstructionsPipeLine.get(0).pipeline_stage);\n\t\t\t\t\tpnl_IF_tmp.add(lblIF_tmp);\n\t\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\t\tpanelShowResult.repaint();\n\t\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x, lstInstructionsPipeLine.get(x).pipeline_stage);/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// v\n\n\t\t\t\t\t// s = \"document.instruction_table.column\" + currentCycle +\n\t\t\t\t\t// \".value =\n\t\t\t\t\t// parent.top_frame.lstInstructions[0].pipeline_stage;\";\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage + \" - row=\" + x + \" col=\" + currentCycle);\n\t\t\t\t}\n\t\t\t\t// eval(s);\n\t\t\t\tSystem.out.println(\"Clk:\" + currentCycle);\n\t\t\t\tcurrentCycle++;\n\t\t\t}\n\t\t}\n\t}", "private void cs8() {\n\t\t\t\n\t\n\t\t\tif(new Tile(3088,3092,0).matrix(ctx).reachable()){\n\t\t\t\t\n\t\t\t\tif(new Tile(3079,3084,0).distanceTo(ctx.players.local().tile())<7){\n\t\t\t\t\tMethod.interactO(9709, \"Open\", \"Door\");\n\t\t\t\t}else ctx.movement.step(new Tile(3079,3084,0));\n\t\t\t\t\n\t\t\t}else if(new Tile(3090,3092,0).distanceTo(ctx.players.local().tile())<7){\n\t\t\t\tfinal int[] bounds = {140, 108, -84, 144, -64, 136};\n\t\t\t\tGameObject gate = ctx.objects.select().id(GATEBYFISH).each(Interactive.doSetBounds(bounds)).select(Interactive.areInViewport()).nearest().poll();\n\t\t\t\tgate.interact(\"Open\",\"\");\n\t\t\t}else ctx.movement.step(new Tile(3090,3092,0));\n\t\t\t\n\t\t\t\n\t\t}", "private void relax(int x, int y, double[][] energyTo, int[] edgeTo) {\n if (width() == 1) {\n for (int i = 0; i < height(); i++)\n edgeTo[i] = 0;\n } else {\n if (x == 0) {\n if (y < height-1) {\n if (energyTo[x][y+1] >= energyTo[x][y] + energy[x][y+1]) {\n energyTo[x][y+1] = energyTo[x][y] + energy[x][y+1];\n }\n if (energyTo[x+1][y+1] >= energyTo[x][y] + energy[x+1][y+1]) {\n energyTo[x+1][y+1] = energyTo[x][y] + energy[x+1][y+1];\n }\n }\n } else if (x == width-1) {\n if (y < height-1) {\n if (energyTo[x][y+1] >= energyTo[x][y] + energy[x][y+1]) {\n energyTo[x][y+1] = energyTo[x][y] + energy[x][y+1];\n }\n if (energyTo[x-1][y+1] >= energyTo[x][y] + energy[x-1][y+1]) {\n energyTo[x-1][y+1] = energyTo[x][y] + energy[x-1][y+1];\n }\n }\n } else {\n if (y < height-1) {\n if (energyTo[x][y+1] >= energyTo[x][y] + energy[x][y+1]) {\n energyTo[x][y+1] = energyTo[x][y] + energy[x][y+1];\n }\n if (energyTo[x-1][y+1] >= energyTo[x][y] + energy[x-1][y+1]) {\n energyTo[x-1][y+1] = energyTo[x][y] + energy[x-1][y+1];\n }\n if (energyTo[x+1][y+1] >= energyTo[x][y] + energy[x+1][y+1]) {\n energyTo[x+1][y+1] = energyTo[x][y] + energy[x+1][y+1];\n }\n }\n }\n }\n }", "public int maxKilledEnemies(char[][] grid) {\n if( grid.length == 0 ) return 0;\n \n int m = grid.length, n = grid[0].length;\n \n MyNode[][] dp = new MyNode[m][n];\n \n //initialize matrix\n for(int i = 0; i < m; i++){\n for(int j = 0; j < n; j++){\n dp[i][j] = new MyNode();\n }\n }\n \n //scan the input and update matrix\n //read values from top left\n for(int i = 0; i < m; i++){\n for(int j = 0; j < n; j++){\n //skip walls\n if( grid[i][j] == 'W' ) continue;\n //accumulate enemys\n if( grid[i][j] == 'E' ){\n dp[i][j].top = 1;\n dp[i][j].left = 1;\n }\n //accumulate enemys from top\n dp[i][j].top += i > 0? dp[i-1][j].top : 0;\n //accumulate enemys from left\n dp[i][j].left += j > 0? dp[i][j-1].left : 0;\n }\n }\n \n int result = 0;\n \n //scan the input and update matrix\n //read values from bot right\n for(int i = m-1; i >= 0; i--){\n for(int j = n-1; j >= 0; j--){\n //skip walls\n if( grid[i][j] == 'W' ) continue;\n //accumulate enemys\n if( grid[i][j] == 'E' ){\n dp[i][j].bot = 1;\n dp[i][j].right = 1;\n }\n //accumulate enemys from bot\n dp[i][j].bot += i + 1 < m? dp[i+1][j].bot : 0;\n //accumulate enemys from right\n dp[i][j].right += j + 1 < n? dp[i][j+1].right : 0;\n \n //update result if possible \n if(grid[i][j] == '0') result = Math.max(result, dp[i][j].top + dp[i][j].bot + dp[i][j].left + dp[i][j].right );\n }\n } \n \n return result;\n }", "private void createMaze(Tile currentTile) {\n\n while (numberOfCellsVisited < CAST_WIDTH * CAST_HEIGHT) {\n\n // Get coordinates of current tile and set as visited\n int currentX = currentTile.getPosition().getX();\n int currentY = currentTile.getPosition().getY();\n tempMap[currentY][currentX].setVisited(true);\n\n // Begin neighbourhood scan\n ArrayList<Integer> neighbours = new ArrayList<>();\n\n // If a neighbour is not visited and its projected position is within bounds, add it to the list of valid neighbours\n // North neighbour\n if (currentY - 1 >= 0) {\n if (!tempMap[currentY - 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(0);\n }\n //Southern neighbour\n if (currentY + 1 < CAST_HEIGHT) { //y index if increased is not greater than height of the chamber\n if (!tempMap[currentY + 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(1);\n }\n //Eastern neighbour\n if (currentX + 1 < CAST_WIDTH) { //check edge case\n if (!tempMap[currentY][currentX + 1].isVisited()) { //check if visited\n neighbours.add(2);\n }\n }\n //Western neighbour\n if (currentX - 1 >= 0) {\n if (!tempMap[currentY][currentX - 1].isVisited()) {\n neighbours.add(3);\n }\n }\n if (!neighbours.isEmpty()) {\n\n //generate random number between 0 and 3 for direction\n Random rand = new Random();\n boolean randomizer;\n int myDirection;\n do {\n myDirection = rand.nextInt(4);\n randomizer = neighbours.contains(myDirection);\n } while (!randomizer);\n\n //knock down wall\n switch (myDirection) {\n case 0 -> { // North\n tempMap[currentY][currentX].getPathDirection()[0] = true;\n currentTile = tempMap[currentY - 1][currentX];\n }\n case 1 -> { // South\n tempMap[currentY][currentX].getPathDirection()[1] = true;\n currentTile = tempMap[currentY + 1][currentX];\n }\n case 2 -> { // East\n tempMap[currentY][currentX].getPathDirection()[2] = true;\n currentTile = tempMap[currentY][currentX + 1];\n }\n case 3 -> { // West\n tempMap[currentY][currentX].getPathDirection()[3] = true;\n currentTile = tempMap[currentY][currentX - 1];\n }\n }\n\n mapStack.push(currentTile);\n numberOfCellsVisited++;\n } else {\n currentTile = mapStack.pop(); //backtrack\n }\n }\n\n castMaze(tempMap[0][0], -1);\n }", "private Cell searchPowerUp() {\n for (Cell[] row : gameState.map) {\n for (Cell column : row) {\n if (column.powerUp != null)\n return column;\n }\n }\n\n return null;\n }", "private static Point findFarthestState(Cells[][] wallBoard, int column, int row)\n\t{\n\t\tint tries = 100;\n\t\tint farthest = 0;\n\t\tint farthestX = 0;\n\t\tint farthestY = 0;\n\t\tPoint farthestPos = new Point();\n\n\t\t_DF = new DeadlocksFinder(wallBoard);\n\n\t\tint[][] staticDLMap = _DF.getStaticDLMap();\n\n\t\tdo\n\t\t{\n\t\t\tint i = rn.nextInt(rows);\n\t\t\tint j = rn.nextInt(columns);\n\n\t\t\tif(board[i][j]==Cells.FLOOR && staticDLMap[i][j]!=1 && canStillReachEveryCrates(wallBoard, j, i))\n\t\t\t{\n\t\t\t\tArrayList<Point> path = _PF.findAReversedWay(column, row, j, i);\n\t\t\t\tint distance = path.size();\n\n\t\t\t\tif(distance==0)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tPoint ppos = new Point((int)path.get(path.size()-1).getX(), (int)path.get(path.size()-1).getY());\n\n\t\t\t\tif(distance > farthest)\n\t\t\t\t{\n\t\t\t\t\tfarthestX=j;\n\t\t\t\t\tfarthestY=i;\n\t\t\t\t\tfarthest=distance;\n\t\t\t\t\tfarthestPos=ppos;\n\t\t\t\t}\n\t\t\t}\n\t\t} while(tries-->0);\n\t\t\t\t\n\n\n\t\t/*for(int i=0; i<rows; i++)\n\t\t{\n\t\t\tfor(int j=0; j<columns; j++)\n\t\t\t{\n\t\t\t\tif(board[i][j]==Cells.FLOOR && staticDLMap[i][j]!=1)// && canStillReachEveryCrates(wallBoard, j, i))\n\t\t\t\t{\n\t\t\t\t\tArrayList<Point> path = _PF.findAReversedWay(column, row, j, i);\n\t\t\t\t\tint distance = path.size();\n\n\t\t\t\t\tif(distance==0)\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tPoint ppos = new Point((int)path.get(path.size()-1).getX(), (int)path.get(path.size()-1).getY());\n\n\t\t\t\t\tif(distance > farthest)\n\t\t\t\t\t{\n\t\t\t\t\t\tfarthestX=j;\n\t\t\t\t\t\tfarthestY=i;\n\t\t\t\t\t\tfarthest=distance;\n\t\t\t\t\t\tfarthestPos=ppos;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}*/\n\n\t\tplayerPos.add(farthestPos);\n\t\treturn new Point(farthestX, farthestY);\n\t}", "private void setAvailableFromLastMove(int large, int smallx) {\n clearAvailable();\n // Make all the tiles at the destination available\n if (large != -1) {\n\n\n for (int i = 0; i < 9; i++) {\n for (int dest = 0; dest < 9; dest++) {\n if (!phaseTwo) {\n if (!done) {\n if (i == large) {\n TileAssignment5 tile = mSmallTiles[large][dest];\n if ((tile.getOwner() == TileAssignment5.Owner.NOTCLICKED))\n addAvailable(tile);\n\n switch (smallx) {\n case 0:\n int a[] = adjacencyList.get(0);\n\n for (int x : a) {\n TileAssignment5 tile1 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n //}\n }\n break;\n case 1:\n int a1[] = adjacencyList.get(1);\n\n for (int x : a1) {\n TileAssignment5 tile2 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n //}\n }\n break;\n case 2:\n int a2[] = adjacencyList.get(2);\n for (int x : a2) {\n TileAssignment5 tile3 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile3)) {\n mAvailable.remove(tile3);\n // }\n }\n break;\n case 3:\n int a3[] = adjacencyList.get(3);\n for (int x : a3) {\n TileAssignment5 tile4 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile4)) {\n mAvailable.remove(tile4);\n // }\n }\n break;\n case 4:\n int a4[] = adjacencyList.get(4);\n for (int x : a4) {\n TileAssignment5 tile5 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile5)) {\n mAvailable.remove(tile5);//}\n\n }\n break;\n case 5:\n int a5[] = adjacencyList.get(5);\n for (int x : a5) {\n TileAssignment5 tile6 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile6)) {\n mAvailable.remove(tile6);//}\n\n }\n break;\n case 6:\n int a6[] = adjacencyList.get(6);\n for (int x : a6) {\n TileAssignment5 tile7 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile7)) {\n mAvailable.remove(tile7);//}\n\n }\n break;\n case 7:\n int a7[] = adjacencyList.get(7);\n for (int x : a7) {\n TileAssignment5 tile8 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile8)) {\n mAvailable.remove(tile8);//}\n\n }\n break;\n case 8:\n int a8[] = adjacencyList.get(8);\n for (int x : a8) {\n TileAssignment5 tile9 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile9)) {\n mAvailable.remove(tile9);//}\n\n }\n break;\n }\n\n } else {\n if (DoneTiles.contains(i)) {\n continue;\n }\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.FREEZED);\n tile.updateDrawableState('a', 0);\n }\n } else { //OnDOnePressed\n if (DoneTiles.contains(i)) {\n continue;\n }\n\n // Log.d(\"Comes \", \"Hereeee\");\n if (i != large) {//Correct answer\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.NOTCLICKED);\n addAvailable(tile);\n tile.updateDrawableState('a', 0);\n //done =false;\n }\n }\n\n\n }else {\n/*\n ileAssignment5 thistile = mSmallTiles[i][dest];\n if(((Button)thistile.getView()).getText().charAt(0)==' '){\n mAvailable.remove(thistile);\n thistile.updateDrawableState('a', 0);\n }\n*/\n\n\n if (i == large) {\n if (dest == smallx) {\n TileAssignment5 tile1 = mSmallTiles[large][dest];\n tile1.setOwner(TileAssignment5.Owner.CLICKED);\n if (mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n }\n tile1.updateDrawableState('a', 0);\n\n } else {\n TileAssignment5 tile2 = mSmallTiles[large][dest];\n if (!(tile2.getOwner() == TileAssignment5.Owner.CLICKED)) {\n\n tile2.setOwner(TileAssignment5.Owner.FREEZED);\n }\n if (mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n }\n tile2.updateDrawableState('a', 0);\n }\n\n\n } else {\n\n\n TileAssignment5 tile3 = mSmallTiles[i][dest];\n if (!(tile3.getOwner() == TileAssignment5.Owner.CLICKED)) {\n tile3.setOwner(TileAssignment5.Owner.NOTCLICKED);\n }\n // if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n\n if ((!mAvailable.contains(tile3))&&(tile3.getView().toString().charAt(0)!=' ')){\n mAvailable.add(tile3);\n }\n\n\n tile3.updateDrawableState('a', 0);\n\n\n\n TileAssignment5 tile = mSmallTiles[i][dest];\n if(((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' '){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }\n\n\n\n\n\n\n\n\n\n /*\n\n\n\n\n\n\n ileAssignment5 tile = mSmallTiles[i][dest];\n ileAssignment5 tile = mSmallTiles[i][dest];\n try{\n if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }}catch (ArrayIndexOutOfBoundsException e){\n\n\n }catch ( StringIndexOutOfBoundsException e){\n\n }\n\n*/\n }\n\n }\n }\n }\n }\n // If there were none available, make all squares available\n if (mAvailable.isEmpty()&&large==-1) {\n setAllAvailable();\n }\n }", "void checkCol() {\n Player player = gm.getP();\n int widthPlayer = (int) player.getImg().getWidth();\n int heightPlayer = (int) player.getImg().getHeight();\n Bullet dummyBuullet = new Bullet();\n int widthBullet = (int) dummyBuullet.getImg().getWidth();\n int heightBullet = (int) dummyBuullet.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n // the bullet must be an enemy bullet\n if (bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the bullet location is inside the rectangle of player\n if ( Math.abs( bullet.getX() - player.getX() ) < widthPlayer / 2\n && Math.abs( bullet.getY() - player.getY() ) < heightPlayer / 2 ) {\n // 1) destroy the bullet\n // 2) decrease the life of a player\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n bullet.setActive(false);\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n break;\n }\n }\n }\n // 2'nd case\n // the enemy is hit with player bullet\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n if (!bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the player bullet location is inside the rectangle of enemy\n if (Math.abs(enemy.getX() - bullet.getX()) < (widthBullet / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - bullet.getY()) < (heightBullet / 2 + heightEnemy / 2)) {\n // 1) destroy the player bullet\n // 2) destroy the enemy\n if (destroyedEnemy % 3 == 0 && destroyedEnemy != 0) onlyOnce = 0;\n destroyedEnemy++;\n gm.increaseScore();\n enemy.setActive(false);\n\n\n if(enemy.hTitanium()) {\n gm.getTitaniumList()[gm.getTitaniumIndex()].setX(enemy.getX());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setY(enemy.getY());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setActive(true);\n gm.increaseTitaniumIndex();\n }\n\n if(enemy.hBonus()) {\n \tgm.getBonusList()[gm.getBonusIndex()].setX(enemy.getX());\n \tgm.getBonusList()[gm.getBonusIndex()].setY(enemy.getY());\n \tgm.getBonusList()[gm.getBonusIndex()].setActive(true);\n \tgm.increaseBonusIndex();\n }\n bullet.setActive(false);\n break;\n }\n }\n }\n }\n }\n\n // 3'rd case\n // the player collided with enemy ship\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n // the condition when the enemy rectangle is inside the rectangle of player\n if (Math.abs(enemy.getX() - player.getX()) < (widthPlayer / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - player.getY()) < (heightPlayer / 2 + heightEnemy / 2)) {\n // 1) destroy the enemy\n // 2) decrease the player's life\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n enemy.setActive(false);\n\n break;\n }\n }\n }\n\n for (Bonus bonus : gm.getBonusList()) {\n if (bonus.isActive()) {\n int widthBonus = (int) bonus.getImg().getWidth();\n int heightBonus = (int) bonus.getImg().getHeight();\n if (Math.abs(bonus.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(bonus.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n bonus.setActive(false);\n if (bonus.getType() == 1) {\n if (player.getLives() < player.getMaxLives()) {\n player.setLives(player.getLives() + 1);\n }\n }\n else{\n superAttack = 1;\n }\n }\n }\n }\n\n for (Titanium titanium : gm.getTitaniumList()) {\n if (titanium.isActive()) {\n int widthBonus = (int) titanium.getImg().getWidth();\n int heightBonus = (int) titanium.getImg().getHeight();\n if (Math.abs(titanium.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(titanium.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n titanium.setActive(false);\n gm.getP().increaseTitanium();\n }\n }\n }\n\n }", "public void generate() {\n\n enemies.clear();\n\n for (int i = 0; i < (GRID_SIZE * ROOM_WIDTH); i++) {\n for (int j = 0; j < (GRID_SIZE * ROOM_HEIGHT); j++) {\n terrain[i][j] = null;\n }\n }\n\n RoomType[][] rooms = new RoomType[GRID_SIZE][GRID_SIZE];\n for(int i = 0; i < GRID_SIZE; i++) {\n for (int j = 0; j < GRID_SIZE; j++) {\n rooms[i][j] = RoomType.None;\n }\n }\n\n left = down = false;\n int x = random.nextInt(GRID_SIZE), y = 0;\n\n startPosition = new Vector2();\n startPosition.y = 4 * Tile.SIZE;\n startPosition.x = ((x + 1) * ROOM_WIDTH * Tile.SIZE) + 5 * Tile.SIZE;\n\n\n startRoom = true;\n while(true) {\n down = false;\n getDir();\n\n if(left) {\n x--;\n }\n else {\n x++;\n }\n\n if(x >= GRID_SIZE) {\n x--;\n down = true;\n }\n else if(x < 0) {\n x++;\n down = true;\n }\n\n if(down) {\n if(startRoom) {\n startRoomX = x;\n startRoomY = y;\n startRoom = false;\n }\n rooms[x][y] = RoomType.Down;\n y++;\n left = !left;\n if(y >= GRID_SIZE) {\n rooms[x][y - 1] = RoomType.Standard;\n endRoomX = x;\n endRoomY = y - 1;\n break;\n }\n }\n\n if(!down) {\n if(startRoom) {\n startRoomX = x;\n startRoomY = y;\n startRoom = false;\n }\n rooms[x][y] = RoomType.Standard;\n }\n else {\n if(startRoom) {\n startRoomX = x;\n startRoomY = y;\n startRoom = false;\n }\n rooms[x][y] = RoomType.getEnum(random.nextInt(1) + 3);\n }\n }\n\n for (int i = 0; i < GRID_SIZE; i++) {\n for (int j = 0; j < GRID_SIZE; j++) {\n System.out.print(rooms[i][j].VALUE + \" \");\n generateRoom(i, j, rooms[i][j]);\n }\n System.out.println(\"\");\n }\n }", "public void Update() {\r\n\t\t//if player is near and haven't fired in a while, fire a projectile\r\n\t\tif(!playerNear().equals(\"n\") && j > 250){\r\n\t\t\tfireProjectile(playerNear());\r\n\t\t\tj = 0;\r\n\t\t}\r\n\t\tj++;\r\n\r\n\t\t//COLLISION\r\n\t\tfor(int i = 0; i < AdventureManager.currentRoom.projectiles.size(); i++){ //Checks for collision with player projectiles\r\n\t\t\tif(((AdventureManager.currentRoom.projectiles.get(i).x + 50 > x) && (AdventureManager.currentRoom.projectiles.get(i).x + 50 < x+50) &&(AdventureManager.currentRoom.projectiles.get(i).y + 50> y) &&(AdventureManager.currentRoom.projectiles.get(i).y + 50< y+98) )\r\n\t\t\t\t\t|| ((AdventureManager.currentRoom.projectiles.get(i).x > x) && (AdventureManager.currentRoom.projectiles.get(i).x < x+50) &&(AdventureManager.currentRoom.projectiles.get(i).y + 50> y) &&(AdventureManager.currentRoom.projectiles.get(i).y + 50< y+98) )\r\n\r\n\t\t\t\t\t\t) {\r\n\r\n\t\t\t\t\tswitch(AdventureManager.currentRoom.projectiles.get(i).type) {\r\n\t\t\t\t\tcase \"fireball\": health -= AdventureManager.toon.intelligence; break;\r\n\t\t\t\t\tcase \"sword\": health -= AdventureManager.toon.strength;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tAdventureManager.currentRoom.projectiles.get(i).kill();\r\n\t\t\t\t}\r\n\t\t}\r\n\t\tif((AdventureManager.toon.y < y+50) && (AdventureManager.toon.y > y+40) && //Checks for collision with player\r\n\t\t\t\t(((AdventureManager.toon.x > x) && (AdventureManager.toon.x < x+50))\r\n\t\t\t\t|| ((AdventureManager.toon.x+50 > x) && AdventureManager.toon.x+50 < x+50))) {\r\n\t\t\tAdventureManager.toon.y = y+55; AdventureManager.toon.repaint();\r\n\t\t\tif(contact <= 0){\r\n\t\t\t\tAdventureManager.toon.damage(1);\r\n\t\t\t\tcontact = 50;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if((AdventureManager.toon.y+100 < y) && (AdventureManager.toon.y+100 > y-5) && (((AdventureManager.toon.x >= x) && (AdventureManager.toon.x <= x+50)) //Checks for collision with player\r\n\t\t\t\t|| ((AdventureManager.toon.x+50 >= x) && (AdventureManager.toon.x+50 <= x+50))\r\n\t\t\t\t|| ((AdventureManager.toon.x+25 >= x) && AdventureManager.toon.x+25 <= x+50))) {\r\n\t\t AdventureManager.toon.y = y-105; AdventureManager.toon.repaint();\r\n\t\t AdventureManager.toon.jumpCount = 25;\r\n\t\t if(contact <= 0){\r\n\t\t\t AdventureManager.toon.damage(1);\r\n\t\t\t contact = 50;\r\n\t\t }\r\n\t\t}\r\n\t\telse if(((AdventureManager.toon.x + 50) > x) && ((AdventureManager.toon.x+50)<x+20) && ( //Left Collision\r\n\t\t\t\t((AdventureManager.toon.y > y) && (AdventureManager.toon.y < y+50)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 25 > y) && (AdventureManager.toon.y + 25 < y+45)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 50 > y) && (AdventureManager.toon.y + 50 < y+45)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 75 > y) && (AdventureManager.toon.y + 75 < y+45)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 100 > y) && (AdventureManager.toon.y + 100 < y+45))\r\n\r\n\r\n\t\t\t\t) ) {\r\n\t\t\tAdventureManager.toon.x = x-51; AdventureManager.toon.repaint();\r\n\t\t\tif(contact <= 0){\r\n\t\t\t\tAdventureManager.toon.damage(1);\r\n\t\t\t\tcontact = 50;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(((AdventureManager.toon.x) > x+40) && ((AdventureManager.toon.x)<x+50) && ( //Right Collision\r\n\t\t\t\t((AdventureManager.toon.y > y) && (AdventureManager.toon.y < y+50)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 25 > y) && (AdventureManager.toon.y + 25 < y+50)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 50 > y) && (AdventureManager.toon.y + 50 < y+50)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 75 > y) && (AdventureManager.toon.y + 75 < y+50)) ||\r\n\t\t\t\t((AdventureManager.toon.y + 100 > y) && (AdventureManager.toon.y + 100 < y+50))\r\n\r\n\r\n\t\t\t\t) ) {\r\n\t\t\tAdventureManager.toon.x = x+51; AdventureManager.toon.repaint();\r\n\t\t\tif(contact <= 0){\r\n\t\t\t\tAdventureManager.toon.damage(1);\r\n\t\t\t\tcontact = 50;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcontact--;\r\n\t\tif(health<=0){\r\n\t\t\tsetVisible(false);\r\n\t\t\talive = false;\r\n\t\t\tAdventureManager.currentRoom.enemies.remove(this);\r\n\t\t}\r\n\r\n\r\n\r\n\t\t\tif((y+100)>=AdventureManager.floorHeight) {\r\n\t\t\t\ty= AdventureManager.floorHeight -100;\r\n\t\t\t\tgravity *= 0;\r\n\r\n\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tgravity = 3;}\r\n\r\n\t\t\ty += gravity; setLocation(x,y);\r\n\r\n\t\t\tswitch(movetype) {\r\n\t\t\tcase 0: chasePlayer(); break;\r\n\t\t\tcase 1: randomMove(); break;\r\n\t\t\tcase 2: dontMove(); break;\r\n\t\t\t}\r\n\r\n\t\t\t}", "public void harvestRow()\n {\n this.hopAndPick();\n this.hop();\n this.plant();\n this.hopAndPick();\n this.hop();\n this.plant();\n this.hopAndPick();\n this.hop();\n this.plant();\n }", "private static void updateNeighbourTileDoors(Creature creature, int tilex, int tiley) {\n/* 2989 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex, tiley - 1)))) {\n/* */ \n/* 2991 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley - 1, true);\n/* 2992 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 2996 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley - 1, false);\n/* 2997 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ \n/* */ \n/* 3001 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex + 1, tiley)))) {\n/* */ \n/* 3003 */ VolaTile newTile = Zones.getOrCreateTile(tilex + 1, tiley, true);\n/* 3004 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 3008 */ VolaTile newTile = Zones.getOrCreateTile(tilex + 1, tiley, false);\n/* 3009 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ \n/* */ \n/* 3013 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex, tiley + 1)))) {\n/* */ \n/* 3015 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley + 1, true);\n/* 3016 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 3020 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley + 1, false);\n/* 3021 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ \n/* */ \n/* 3025 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex - 1, tiley)))) {\n/* */ \n/* 3027 */ VolaTile newTile = Zones.getOrCreateTile(tilex - 1, tiley, true);\n/* 3028 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 3032 */ VolaTile newTile = Zones.getOrCreateTile(tilex - 1, tiley, false);\n/* 3033 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ }", "private void calculerChemin() {\n suiteDeDeplacement.clear();\n int[][] empreinte = lab.getEmpreinte();\n lee(empreinte, x / Case.TAILLE, y / Case.TAILLE, cibleX, cibleY);\n }", "public static List<int[]> getDeathCoords(Board lev, int col, double z){\n \t// return death explosion image coords\n \tint[][] coords = new int[15][3];\n \tColumn c = lev.getColumns().get(col);\n \tint[] p1 = c.getFrontPoint1();\n \tint[] p2 = c.getFrontPoint2();\n \tcoords[0][0] = p1[0] + (p2[0]-p1[0])/5;\n \tcoords[0][1] = p1[1] + (p2[0]-p1[0])/5;\n \tcoords[0][2] = (int) z;\n \tcoords[1][0] = p2[0] - (p2[0]-p1[0])/2; // center point\n \tcoords[1][1] = p2[1] - (p2[1]-p1[1])/2;\n \tcoords[1][2] = (int) z;\n \tcoords[2][0] = p1[0] + (p2[0]-p1[0])/3;\n \tcoords[2][1] = p1[1] + (p2[1]-p1[1])/3;\n \tcoords[2][2] = (int) (z + EXHEIGHT_H*2);\n \tcoords[3] = coords[1];\n \tcoords[4][0] = p2[0] - (p2[0]-p1[0])/2;\n \tcoords[4][1] = p2[1] - (p2[1]-p1[1])/2;\n \tcoords[4][2] = (int) (z + EXHEIGHT_H*4);\n \tcoords[5] = coords[1];\n \tcoords[6][0] = p2[0] - (p2[0]-p1[0])/3;\n \tcoords[6][1] = p2[1] - (p2[1]-p1[1])/3;\n \tcoords[6][2] = (int) (z+EXHEIGHT_H*2);\n \tcoords[7] = coords[1];\n \tcoords[8][0] = p2[0] - (p2[0]-p1[0])/5;\n \tcoords[8][1] = p2[1] - (p2[1]-p1[1])/5;\n \tcoords[8][2] = (int) z;\n \tcoords[9] = coords[1];\n \tcoords[10][0] = p2[0] - (p2[0]-p1[0])/3;\n \tcoords[10][1] = p2[1] - (p2[1]-p1[1])/3;\n \tcoords[10][2] = (int) (z-EXHEIGHT_H*2);\n \tcoords[11] = coords[1];\n \tcoords[12][0] = p2[0] - (p2[0]-p1[0])/2;\n \tcoords[12][1] = p2[1] - (p2[1]-p1[1])/2;\n \tcoords[12][2] = (int) (z - EXHEIGHT_H*4);\n \tcoords[13] = coords[1];\n \tcoords[14][0] = p1[0] + (p2[0]-p1[0])/3;\n \tcoords[14][1] = p1[1] + (p2[1]-p1[1])/3;\n \tcoords[14][2] = (int) (z - EXHEIGHT_H*2);\n \treturn Arrays.asList(coords);\n }", "public void eat(){\n if (threshold<=0 && !lapar) revLapar();\n if (lapar && Common.gamemap.get(getX()).get(getY()).showSymbol()=='@'){\n Common.gamemap.get(getX()).get(getY()).ungrowGrass();\n revLapar();\n threshold = 12;\n }\n }", "public void saturateNeighbourLists(GameEntity e, List<Larva> nearbyLarvae, List<Hive> nearbyHives, List<GameEntity> nearbyFoes) {\n\t\t\n\t\t// Get the adjacent tiles (including adjacent diagonals)\n\t\t\n\t\tGridTile current = e.tile();\n\t\t\n\t\tGridTile left = getRelative(current, 0, -1);\n\t\tGridTile right = getRelative(current, 0, 1);\n\t\tGridTile upper = getRelative(current, -1, 0);\n\t\tGridTile lower = getRelative(current, 1, 0);\n\t\t\n\t\tGridTile upperLeft = getRelative(current, -1, -1);\n\t\tGridTile upperRight = getRelative(current, -1, 1);\n\t\tGridTile botLeft = getRelative(current, 1, -1);\n\t\tGridTile botRight = getRelative(current, 1, 1);\n\t\t\n\t\t// Make a list of these tiles, which is essentially the tile neighbourhood\n\t\tList<GridTile> neighbourhood = new LinkedList<>();\n\t\tneighbourhood.add(current);\n\t\tneighbourhood.add(left);\n\t\tneighbourhood.add(right);\n\t\tneighbourhood.add(upper);\n\t\tneighbourhood.add(lower);\n\t\tneighbourhood.add(upperLeft);\n\t\tneighbourhood.add(upperRight);\n\t\tneighbourhood.add(botLeft);\n\t\tneighbourhood.add(botRight);\n\t\t\n\t\t// Iterate through all of the entities in the neighbourhood, and adding them to the relevant lists\n\t\tfor(GridTile tile : neighbourhood) {\n\t\t\t\n\t\t\t// Skip null tiles\n\t\t\tif(tile == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tIterator<GameEntity> it = tile.units().listIterator();\n\t\t\twhile(it.hasNext()) {\n\t\t\t\t\n\t\t\t\tGameEntity neighbour = it.next();\n\t\t\t\t\n\t\t\t\t// Skip the given entity\n\t\t\t\tif(neighbour == e) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Skip and remove dead entities\n\t\t\t\tif(!neighbour.alive()) {\n\t\t\t\t\t//System.out.println(\"A dead neighbour! of class \" + e.getClass().toString());\n\t\t\t\t\tit.remove(); // remove the dead neighbour\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// Add the neighbour to the relevant lists\n\t\t\t\t\n\t\t\t\tif(neighbour instanceof Larva) {\n\t\t\t\t\tnearbyLarvae.add((Larva) neighbour);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnearbyHives.add((Hive) neighbour);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(Player.getRelation(e.player(), neighbour.player()) == Player.FOES) {\n\t\t\t\t\tnearbyFoes.add(neighbour);\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\t}", "private void discoverCells(Cell[][] view) {\n\t\t// Clear the lists of new Cells and Tasks from last timestep\n\t\tevents.clear();\n\t\tnewFuel.clear();\n\t\tnewWells.clear();\n\t\tnewStations.clear();\n\t\tnewTasks.clear();\n\n\t\t// Iterate over each Cell in the Tanker's view\n\t\tfor (int ix = 0; ix < view.length; ix++) {\n\t\t\tfor (int iy = 0; iy < view[0].length; iy++) {\n\t\t\t\tCell cell = view[ix][iy];\n\n\t\t\t\tboolean discovered = false;\n\n\t\t\t\t// Ignore empty Cells and Stations which have been discovered but have no Task\n\t\t\t\tif (cell instanceof EmptyCell) continue;\n\t\t\t\tif (discoveredPoints.contains(cell.getPoint())) {\n\t\t\t\t\tif (!(cell instanceof Station)) continue;\n\t\t\t\t\tif (((Station) cell).getTask() == null) continue;\n\t\t\t\t\tdiscovered = true;\n\t\t\t\t}\n\n\t\t\t\t// Add the current Cell to the set of discovered cells\n\t\t\t\tdiscoveredPoints.add(cell.getPoint());\n\n\t\t\t\t// Infer the Cell's Position from its position in the Tanker's view\n\t\t\t\tPosition cellPos = new Position(\n\t\t\t\t\t\tposition.x + (ix - VIEW_RANGE),\n\t\t\t\t\t\tposition.y - (iy - VIEW_RANGE) // this is why +y is usually down and not up\n\t\t\t\t);\n\n\t\t\t\t// Create a new entry in advance\n\t\t\t\tRunnerList2.Entry<Position> newEntry = new RunnerList2.Entry<>(cellPos.x, cellPos.y, cellPos);\n\n\t\t\t\t// Add Pumps to the map and create a new PumpEvent\n\t\t\t\tif (cell instanceof FuelPump) {\n\t\t\t\t\tevents.add(new PumpEvent(cellPos));\n\t\t\t\t\tnewFuel.add(newEntry);\n\n\t\t\t\t// Add Wells to the map and create a new WellEvent\n\t\t\t\t} else if (cell instanceof Well) {\n\t\t\t\t\tevents.add(new WellEvent(cellPos));\n\t\t\t\t\tnewWells.add(newEntry);\n\n\t\t\t\t// Add Stations to the map. If there is a Task, add it to the map and create a new\n\t\t\t\t// TaskEvent\n\t\t\t\t} else if (cell instanceof Station) {\n\t\t\t\t\tif (!discovered) newStations.add(newEntry);\n\n\t\t\t\t\tTask task = ((Station) cell).getTask();\n\t\t\t\t\tif (task != null && !discoveredTasks.contains(cellPos)) {\n\t\t\t\t\t\tdiscoveredTasks.add(cellPos);\n\t\t\t\t\t\tevents.add(new TaskEvent(cellPos, task.getWasteRemaining()));\n\t\t\t\t\t\tnewTasks.add(new RunnerList2.Entry<>(cellPos.x, cellPos.y, new TaskPosition(cellPos, task)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add all Cells in bulk to their respective lists\n\t\tfuelList.addAll(newFuel);\n\t\twellList.addAll(newWells);\n\t\tstationList.addAll(newStations);\n\t\tstationTaskList.addAll(newTasks);\n\t}", "protected void attackEnemy(Path toOp) {\n int opX = toOp.getStep(toOp.getLength() - 1).getX();\n int opY = toOp.getStep(toOp.getLength() - 1).getY();\n if (this.player.getX() == opX || this.player.getY() == opY) {\n // in the same row or column\n if (toOp.getLength() <= this.player.getFirePower() + 1) {\n // and is reachable\n this.player.placeBomb(map);\n// System.out.println(\"Player #\"+player.getPID()+\" will attack block [\"+opX+\", \"+opY+\"]\");\n }\n }\n }", "void easy_ride_from_70kmh_down (double min_lift) { \n double start_speed = 70; // kmh\n double pitch = 0;\n double min_drag = 10000.0;\n double step = -10;\n velocity = start_speed;\n for (int count = 0; count < 10000; count++) {\n trace(\"velocity: \" + velocity + \" step: \" + step);\n steady_flight_at_given_speed(5, 0);\n double total_drag = total_drag();\n double foil_lift = foil_lift();\n if (Math.abs(step) < 0.01) break;\n if ((step < 0 && velocity+step <= 0) ||\n // (step > 0 && velocity >= 70) ||\n foil_lift < load ||\n total_drag > min_drag) { // can't pivot because of local max of drag before taking off.... \n velocity -= step;\n step *= 0.5;\n } else {\n velocity += step;\n min_drag = total_drag;\n }\n }\n make_cruising_info(min_lift, min_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + cruising_info);\n }", "private boolean thereispath(Move m, Tile tile, Integer integer, Graph g, Board B) {\n\n boolean result = true;\n boolean result1 = true;\n\n int start_dest_C = tile.COLUMN;\n int start_dest_R = tile.ROW;\n\n int move_column = m.getX();\n int move_row = m.getY();\n\n int TEMP = 0;\n int TEMP_ID = 0;\n int TEMP_ID_F = tile.id;\n int TEMP_ID_FIRST = tile.id;\n\n int final_dest_R = (integer / B.width);\n int final_dest_C = (integer % B.width);\n\n //System.out.println(\"* \" + tile.toString() + \" \" + integer + \" \" + m.toString());\n\n // Y ROW - X COLUMN\n\n for (int i = 0; i != 2; i++) {\n\n TEMP_ID_FIRST = tile.id;\n\n // possibility 1\n if (i == 0) {\n\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result != false; c++) {\n\n if (c == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n // System.out.println(\"OK\");\n\n } else {\n\n result = false;\n\n // System.out.println(\"NOPE\");\n\n\n }\n }\n\n for (int r = 0; r != Math.abs(move_row) && result != false; r++) {\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n // System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n\n } else {\n\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == true) {\n return true;\n }\n\n\n }\n\n TEMP_ID = 0;\n\n if (i == 1) {\n\n result = true;\n\n start_dest_C = tile.COLUMN;\n start_dest_R = tile.ROW;\n // first move row\n for (int r = 0; r != Math.abs(move_row) && result1 != false; r++) {\n\n if (r == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n\n //System.out.println(\"NOPE\");\n\n result = false;\n\n }\n\n\n }\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result1 != false; c++) {\n\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == false) {\n return false;\n\n }\n\n\n }\n\n\n }\n\n\n return true;\n }", "private void endFight(int i, int round) {\n\t\tcalcAndApplyDebrisfield();\t\n\t\tif(i == 0) { // Vicory for att\n\t\t\tdef_pb = getPb(defPlanetId);\n\t\t\tresDiff();\n\t\t\t\n\t\t\tint cargoSpace = getCargoSpace();\n\t\t\tlong maxMetal = (long)(def_pg.getMetal()/2);\n\t\t\tlong maxCrystal = (long)(def_pg.getCrystal()/2);\n\t\t\tlong maxDeut = (long)(def_pg.getDeut()/2);\n\t\t\tif((maxMetal+maxCrystal+maxDeut) <= cargoSpace) {\n\t\t\t\tbooty[0] = maxMetal;\n\t\t\t\tbooty[1] = maxCrystal;\n\t\t\t\tbooty[2] = maxDeut;\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlong min = Math.min(maxMetal, Math.min(maxCrystal, maxDeut));\n\t\t\t\tif(min*3 <= cargoSpace) {\n\t\t\t\t\tbooty[0] = min;\n\t\t\t\t\tbooty[1] = min;\n\t\t\t\t\tbooty[2] = min;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbooty[0] = cargoSpace/3;\n\t\t\t\t\tbooty[1] = cargoSpace/3;\n\t\t\t\t\tbooty[2] = cargoSpace/3;\n\t\t\t\t}\n\t\t\t\twhile((booty[0]+booty[1]+booty[2])<cargoSpace) {\n\t\t\t\t\tbooty[0] = booty[0] < maxMetal ? ++booty[0] : booty[0];\n\t\t\t\t\tbooty[1] = booty[1] < maxCrystal ? ++booty[1] : booty[1];\n\t\t\t\t\tbooty[2] = booty[2] < maxDeut ? ++booty[2] : booty[2];\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\tdef_pg.setMetal(def_pg.getMetal()-booty[0]);\n\t\t\tdef_pg.setCrystal(def_pg.getCrystal()-booty[1]);\n\t\t\tdef_pg.setDeut(def_pg.getDeut()-booty[2]);\n\t\t\t\n\t\t\twriteLog(true,true);\n\t\t\twriteLog(false,false);\n\t\t}\n\t\telse if(i == 1) { // Victory for def\n\t\t\twriteLog(false,true);\n\t\t\twriteLog(true,false);\n\t\t}\n\t\telse {// Draw\n\t\t\twriteLog(false,true);\n\t\t\twriteLog(false,false);\n\t\t}\n\t\trepairDef();\n\t\tapplyBattleResults();\t\t\n\t\tsaveDefDataset();\n\t}", "public void reproduce() {\n if (getSelfCount() >= getMinMates() && getLocation()\n .getEmptyCount() >= getMinEmpty()\n && getFoodCount() >= getMinFood() && dayCountDown != 0) {\n int index = RandomGenerator.nextNumber(getLocation()\n .getEmptyCount());\n Cell selectedCell = getLocation().getEmptyArray().get(index);\n createLife(selectedCell).init();\n \n }\n \n }", "private BDD buildEndGame(){\n\t\tBDD res = factory.makeOne();\n\n\t\tfor(int i = 0; i < this.dimension; i++){\n\t\t\tfor(int j = 0; j < this.dimension; j++){\n\t\t\t\tres.andWith(board[i][j].not());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn res;\n\t}", "private Pair decideMovement(Entity e) {\n Pair pos = gameMap.getCoordinatesFor(e.getId());\n Movable movable = mm.get(e);\n Array<Pair> reachableCells = gameMap.pathFinder.getReachableCells(pos.x, pos.y, movable);\n ImmutableBag<Integer> enemies = groupAI.getEnemies(e);\n if (enemies.size() == 0) return reachableCells.get(MathUtils.random(reachableCells.size-1));\n\n // The best enemy you are considering chasing and its score\n int targetEnemy = -1;\n float bestScore = 0f;\n\n // The current enemy you are checking out and its score\n int id;\n float score;\n\n // How far away is the enemy? How many enemies are within a small radius of it?\n int distance, count;\n\n for (int i = 0; i < enemies.size(); i++) {\n count = 1;\n Pair target = gameMap.getCoordinatesFor(enemies.get(i));\n distance = MapTools.distance(pos.x, pos.y, target.x, target.y);\n for (Pair cell : MapTools.getNeighbors(target.x, target.y, 6)) {\n id = gameMap.getEntityAt(cell.x, cell.y);\n if (!enemies.contains(id)) continue;\n count++;\n }\n\n score = groupAI.entityScores.get(enemies.get(i)) * count / (1 + distance / 5);\n if (score > bestScore) {\n bestScore = score;\n targetEnemy = enemies.get(i);\n }\n }\n\n if (targetEnemy > -1) {\n Pair target = gameMap.getCoordinatesFor(targetEnemy);\n Path path = gameMap.pathFinder.findPath(pos.x, pos.y, target.x, target.y, movable, true);\n for (int i = 0; i < path.getLength(); i++) {\n Step step = path.getStep(i);\n Pair p = new Pair(step.getX(),step.getY());\n if (reachableCells.contains(p, false)) return p;\n }\n }\n return reachableCells.get(MathUtils.random(reachableCells.size-1));\n }", "int removeObstacle(int numRows, int numColumns, List<List<Integer>> lot)\r\n {\r\n \tint m = 0;\r\n \tint n = 0;\r\n \tfor(List<Integer> rowList: lot) {\r\n \t\tfor(Integer num: rowList) {\r\n \t\t\tif(num == 9 ) {\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t\tn++;\r\n \t\t}\r\n \t\tm++;\r\n \t}\r\n \t// to store min cells required to be \r\n // covered to reach a particular cell \r\n int dp[][] = new int[numRows][numColumns]; \r\n \r\n // initially no cells can be reached \r\n for (int i = 0; i < numRows; i++) \r\n for (int j = 0; j < numColumns; j++) \r\n dp[i][j] = Integer.MAX_VALUE; \r\n \r\n // base case \r\n dp[0][0] = 1; \r\n \r\n for (int i = 0; i < lot.size(); i++) {\r\n \tList<Integer> columnList = lot.get(i);\r\n for (int j = 0; j < columnList.size(); j++) { \r\n \r\n // dp[i][j] != INT_MAX denotes that cell \r\n // (i, j) can be reached from cell (0, 0) \r\n // and the other half of the condition \r\n // finds the cell on the right that can \r\n // be reached from (i, j) \r\n if (dp[i][j] != Integer.MAX_VALUE && \r\n (j + columnList.get(j)) < numColumns && (dp[i][j] + 1) \r\n < dp[i][j + columnList.get(j)]\r\n \t\t && columnList.get(j) != 0) \r\n dp[i][j + columnList.get(j)] = dp[i][j] + 1; \r\n \r\n if (dp[i][j] != Integer.MAX_VALUE && \r\n (i + columnList.get(j)) < numRows && (dp[i][j] + 1) \r\n < dp[i + columnList.get(j)][j] && columnList.get(j) != 0) \r\n dp[i + columnList.get(j)][j] = dp[i][j] + 1; \r\n } \r\n } \r\n \r\n if (dp[m - 1][n - 1] != Integer.MAX_VALUE) \r\n return dp[m - 1][n - 1]; \r\n \r\n return -1; \r\n }", "@Test\n public void testJuvenilesSpreadFromOutsideInsideGrid() {\n params = new CompletelySpatiallyRandomParams(0.5, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n coloniser.updateJuvenilePresenceLayers();\n\n assertTrue(countJuvenilesInGrid(juvenilePine) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileOak) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileDeciduous) >= 5);\n }", "public Tile diveBomb() {\n List<Tile> targets = this.findTargets();\n Tile us_tile = this.gb.get(this.us_head_x, this.us_head_y);\n LinkedList<Tile> shortestPath = null;\n\n // Chose the shortest path\n //System.out.println(\"HeadX: \" + this.us_head_x + \" HeadY: \" + this.us_head_y);\n //System.out.println(\"EnemyX: \" + this.enemy_head_x + \" EnemyY: \" + this.enemy_head_y);\n // System.out.println(\"Targets - \" + targets);\n for (Tile target : targets) {\n LinkedList<Tile> path = this.dk.path(us_tile, target, this.gb);\n\n if (path != null) { // means we couldn't reach the desired target\n // System.out.println(\"Path - \" + path);\n if (shortestPath == null) {\n shortestPath = path;\n } else if (path.size() < shortestPath.size()) {\n shortestPath = path;\n }\n }\n }\n // System.out.println(\"Shortest Path - \" + shortestPath);\n if (shortestPath == null) return us_tile;\n return shortestPath.get(1);\n }", "@Test\n\tpublic void testRoomExit()\n\t{\n\t\t// Take one step, essentially just the adj list\n\t\tboard.calcTargets(18, 21, 1);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\t// Ensure doesn't exit through the wall\n\t\tassertEquals(1, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 21)));\n\t\t// Take two steps\n\t\tboard.calcTargets(18, 21, 2);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(3, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 20)));\n\t}", "public void hunt() {\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(cells[i].visited == false) {\n\t\t\t\t\n\t\t\t\tint currentIndex = i;\n\t\t\t\t\n\t\t\t\tArrayList<Integer> neighbors = setVisitedNeighbors(i);\n\t\t\t\tint nextIndex = getRandomVisitedNeighborIndex(neighbors);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(neighbors.size() != 0 ) {\n\t\t\t\t\tcells[currentIndex].visited = true;\n\t\t\t\t\t\n\t\t\t\t\tif(nextIndex == NOT_EXIST) {\n\t\t\t\t\t\tbreak; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if there is NO not visited neighbors \n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -1) {\n\t\t\t\t\t\tcells[currentIndex].border[EAST] = NO_WALL; \t\t\t\t\t\t\t//neighbor is right \n\t\t\t\t\t\tcells[nextIndex].border[WEST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == width) {\n\t\t\t\t\t\tcells[currentIndex].border[NORTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is up\n\t\t\t\t\t\tcells[nextIndex].border[SOUTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -width) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[SOUTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is down\n\t\t\t\t\t\tcells[nextIndex].border[NORTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == 1) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[WEST] = NO_WALL;\t\t\t\t\t\t\t\t//neighbor is left\n\t\t\t\t\t\tcells[nextIndex].border[EAST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\tkill(nextIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void teleopPeriodic() {\n \n boolean targetFound = false; \n int Xpos = -1; int Ypos = -1; int Height = -1; int Width = -1; Double objDist = -1.0; double []objAng = {-1.0,-1.0};\n\n //Getting the number of blocks found\n int blockCount = pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25);\n\t\tSystem.out.println(\"Found \" + blockCount + \" blocks!\"); // Reports number of blocks found\n\t\tif (blockCount <= 0) {\n System.err.println(\"No blocks found\");\n }\n ArrayList <Block> blocks = pixy.getCCC().getBlocks();\n Block largestBlock = null;\n\n //verifies the largest block and store it in largestBlock\n for (Block block:blocks){\n if (block.getSignature() == Pixy2CCC.CCC_SIG1) {\n\n\t\t\t\tif (largestBlock == null) {\n\t\t\t\t\tlargestBlock = block;\n\t\t\t\t} else if (block.getWidth() > largestBlock.getWidth()) {\n\t\t\t\t\tlargestBlock = block;\n }\n\t\t\t}\n }\n //loop\n while (pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25)>=0 && ButtonLB){\n\n if (largestBlock != null){\n targetFound = true; \n Xpos = largestBlock.getX();\n Ypos = largestBlock.getY();\n Height = largestBlock.getHeight();\n Width = largestBlock.getWidth();\n\n objDist = RobotMap.calculateDist((double)Height, (double)Width, (double)Xpos, (double)Ypos);\n objAng = RobotMap.calculateAngle(objDist, Xpos, Ypos);\n \n }\n //print out values to Dashboard\n SmartDashboard.putBoolean(\"Target found\", targetFound);\n SmartDashboard.putNumber (\"Object_X\", Xpos);\n SmartDashboard.putNumber (\"Object_Y\", Ypos);\n SmartDashboard.putNumber (\"Height\", Height);\n SmartDashboard.putNumber(\"Width\", Width);\n SmartDashboard.putNumber (\"Distance\", objDist);\n SmartDashboard.putNumber(\"X Angle\", objAng[0]);\n SmartDashboard.putNumber(\"Y Angle\", objAng[1]);\n }\n }", "public void generateNextGeneration() {\n int neighbours;\n int minimum = Integer.parseInt(PreferencesActivity\n .getMinimumVariable(this._context));\n int maximum = Integer.parseInt(PreferencesActivity\n .getMaximumVariable(this._context));\n int spawn = Integer.parseInt(PreferencesActivity\n .getSpawnVariable(this._context));\n\n minimum = 2;\n maximum = 3;\n spawn = 3;\n\n int[][] nextGenerationLifeGrid = new int[HEIGHT][WIDTH];\n\n\n\n for (int h = 0; h < HEIGHT; h++) {\n for (int w = 0; w < WIDTH; w++) {\n neighbours = calculateNeighbours(h, w);\n\n\n if (_lifeGrid[h][w] != 0) {\n if ((neighbours >= minimum) && (neighbours <= maximum)) {\n nextGenerationLifeGrid[h][w] = neighbours;\n }\n\n } else {\n if (neighbours == spawn) {\n nextGenerationLifeGrid[h][w] = spawn;\n\n }\n }\n\n }\n\n }\n\n copyGrid(nextGenerationLifeGrid, _lifeGrid);\n\n }", "void animalMove(int x,int y, Living[][] map,int gridLength, int gridWidth){\r\n \r\n boolean age=map[x][y].getAge();\r\n boolean gender=map[x][y].getGender();\r\n boolean checkRight=false;\r\n boolean checkLeft=false;\r\n boolean checkUp=false;\r\n boolean checkDown=false;\r\n boolean up=false;\r\n boolean down=false;\r\n boolean right=false;\r\n boolean left=false;\r\n boolean baby=false;\r\n boolean turn=map[x][y].getMovement(); //Check to see if it moved before in the array\r\n \r\n double random=Math.random();\r\n \r\n \r\n \r\n \r\n //Checks to see if it is possible to even see to the left first\r\n if(y-1>=0){\r\n left=true;\r\n \r\n if(turn && (map[x][y-1] instanceof Plant) ){ //Check to see if there is plants and goes to plants\r\n map[x][y].gainHealth((map[x][y-1].getHealth()));\r\n map[x][y].setMovement(false); \r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n turn=false; \r\n }\r\n if(turn && (map[x][y-1] instanceof Sheep) && (age==map[x][y-1].getAge()) ){ \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x][y-1].getGender()) && (map[x][y].getHealth()>19) && (map[x][y-1].getHealth()>19) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){ \r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null)&& !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n \r\n if( (x-1>=0) && (map[x-1][y]==null)&& !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if((y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){\r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x][y-1].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x][y-1].setMovement(false);\r\n turn=false;\r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n //If it can move to the left need to check if it can foresee more incase there wasn't any place for it to go\r\n if(y-2>=0){\r\n checkLeft=true;\r\n }\r\n }\r\n \r\n //Checks to see if it is possible to even see to the right first \r\n if(y+1<gridWidth){\r\n right=true;\r\n \r\n //Check to move on towards plants\r\n if(turn && (map[x][y+1] instanceof Plant)){\r\n map[x][y].gainHealth(map[x][y+1].getHealth()); \r\n map[x][y].setMovement(false); \r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null;\r\n turn=false; \r\n }\r\n \r\n if(turn && (map[x][y+1] instanceof Sheep && age==map[x][y+1].getAge()) ){ \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x][y+1].getGender()) && (map[x][y].getHealth()>19) && (map[x][y+1].getHealth()>19) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n \r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n \r\n if( (x-1>=0) && (map[x-1][y]==null) && !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheeps will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x][y+1].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x][y+1].setMovement(false);\r\n turn=false; \r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n \r\n //If it can move to the right need to check if it can foresee more incase there wasn't any place for it to go\r\n if(y+2<gridWidth){ \r\n checkRight=true;\r\n }\r\n } \r\n \r\n //Check to see if it can go up\r\n if(x-1>=0){\r\n up=true;\r\n \r\n //Check for plant to go on to upwards \r\n if(turn && (map[x-1][y] instanceof Plant) ){\r\n map[x][y].gainHealth(map[x-1][y].getHealth()); \r\n map[x][y].setMovement(false); \r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n turn=false;\r\n }\r\n \r\n if(turn && (map[x-1][y] instanceof Sheep) && (age==map[x-1][y].getAge()) ){ \r\n //If the ages match age must be false to be adults and both be opposite genders and have more then 19 health\r\n if(turn && !age && !(gender==map[x-1][y].getGender()) &&map[x][y].getHealth()>19 &&map[x-1][y].getHealth()>19){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n if( (y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n \r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null) && !(baby) ){\r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n \r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x-1][y].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x-1][y].setMovement(false);\r\n turn=false; \r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n \r\n //If it can move to upwards need to check if it can foresee more incase there wasn't any place for it to go\r\n if(x-2>=0){\r\n checkUp=true; \r\n }\r\n } \r\n //Check to see where to go downwards\r\n if(x+1<gridLength){\r\n down=true; \r\n \r\n //Check to see if any plants are downwards\r\n if(turn && (map[x+1][y] instanceof Plant) ){\r\n map[x][y].gainHealth( (map[x+1][y].getHealth()));\r\n map[x][y].setMovement(false);\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n turn=false;\r\n } \r\n \r\n if(turn && (map[x+1][y] instanceof Sheep) && (age==map[x+1][y].getAge()) ){ \r\n \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x+1][y].getGender()) && (map[x][y].getHealth()>=20) && (map[x+1][y].getHealth()>=20) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n if( (y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep \r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if( (x-1>=0) && (map[x+1][y]==null) && !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x+1][y].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x+1][y].setMovement(false);\r\n turn=false;\r\n baby=false;\r\n }\r\n }\r\n } \r\n } \r\n if(x+2<gridLength){\r\n checkDown=true;\r\n }\r\n } \r\n \r\n //Movement towards plant only if no immediate sheep/plants are there to move to\r\n if(turn && checkRight && (map[x][y+2] instanceof Plant) ){\r\n if(map[x][y+1]==null){\r\n \r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null;\r\n map[x][y+1].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n if(turn && checkDown && (map[x+2][y] instanceof Plant) ){\r\n if(map[x+1][y]==null){\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n map[x+1][y].setMovement(false);\r\n turn=false;\r\n }\r\n } \r\n if(turn && checkUp && (map[x-2][y] instanceof Plant) ){\r\n if(map[x-1][y]==null){\r\n \r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n map[x-1][y].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n \r\n if(turn && checkLeft && (map[x][y-2] instanceof Plant) ){\r\n if(map[x][y-1]==null){\r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n map[x][y-1].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n \r\n //Random Movement if there are no plants to move towards \r\n if(turn && right && (random<=0.2) ){\r\n if(map[x][y+1]==null){\r\n map[x][y].setMovement(false);\r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null; \r\n }\r\n }\r\n if(turn && left && (random>0.2) && (random<=0.4) ){\r\n if(map[x][y-1]==null){\r\n map[x][y].setMovement(false);\r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n if(turn && up && (random>0.4) && (random<=0.6) ){\r\n if(map[x-1][y]==null){\r\n map[x][y].setMovement(false);\r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n if(turn && down && (random>0.6) && (random<=0.8) ){\r\n if(map[x+1][y]==null){\r\n map[x][y].setMovement(false);\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n }", "private void generateMap(){\n int[] blockStepX = {X_STEP, 0, -X_STEP, -X_STEP, 0, X_STEP};\n int[] blockStepY = {Y_STEP_ONE, Y_STEP_TWO, Y_STEP_ONE, -Y_STEP_ONE, -Y_STEP_TWO, -Y_STEP_ONE};\n int blockSpecialValue = 0;\n int cellSpecial = 0;\n\n mapCells[origin.x/10][origin.y/10] = new EschatonCell(new CellPosition(0, 0, 0),\n new Point(origin.x, origin.y), blockSpecialValue);\n\n cellGrid[0][0][0] = new EschatonCell(new CellPosition(0, 0, 0),\n new Point(origin.x, origin.y), blockSpecialValue);\n\n for (int distanceFromOrigin = 0; distanceFromOrigin < config.getSizeOfMap();\n distanceFromOrigin++){\n\n int[] blockXVals = {origin.x,\n origin.x + X_STEP * distanceFromOrigin,\n origin.x + X_STEP * distanceFromOrigin,\n origin.x,\n origin.x - X_STEP * distanceFromOrigin,\n origin.x - X_STEP * distanceFromOrigin};\n\n int[] blockYVals = {origin.y - Y_STEP_TWO * distanceFromOrigin,\n origin.y - Y_STEP_ONE * distanceFromOrigin,\n origin.y + Y_STEP_ONE * distanceFromOrigin,\n origin.y + Y_STEP_TWO * distanceFromOrigin,\n origin.y + Y_STEP_ONE * distanceFromOrigin,\n origin.y - Y_STEP_ONE * distanceFromOrigin};\n\n blockSpecialValue = getRandomNumber(distanceFromOrigin, 0, 0);\n\n for (int block = 0; block < NUMBER_OF_BLOCKS; block ++){\n\n int blockXOrdinal = blockXVals[block];\n int blockYOrdinal = blockYVals[block];\n\n for (int blockSize = 0; blockSize < distanceFromOrigin; blockSize++){\n if(blockSpecialValue == blockSize){\n cellSpecial = getRandomNumber(2, 1, 1);\n }else {\n cellSpecial = 0;\n }\n cellGrid [distanceFromOrigin][block+1][blockSize+1] = makeNewCell(\n new CellPosition(distanceFromOrigin,block+1, blockSize+1),\n new Point(blockXOrdinal + blockStepX[block] * (blockSize + 1),\n blockYOrdinal + blockStepY[block] * (blockSize + 1)), cellSpecial);\n }\n }\n }\n }", "@Override\n public void updateAI(Entity entity, ServerGameModel model, double seconds) {\n BuildingSpawnerStratAIData data = entity.<BuildingSpawnerStratAIData>get(AI_DATA);\n data.elapsedTime += seconds;\n while (data.elapsedTime > timeBetweenSpawns(entity)) {\n data.elapsedTime -= timeBetweenSpawns(entity);\n if (data.spawnCounter < maxActive(entity)) {\n if (!canAttack()) {\n // Find possible spawn points: cells not blocked by hard entities.\n Set<GridCell> neighbors = model.getNeighbors(model.getCell((int) (double) entity.getX(),\n (int) (double) entity.getY()));\n Set<GridCell> passable = neighbors.stream().filter(GridCell::isPassable).collect(Collectors.toSet());\n\n // If cell directly below it is clear, spawn it there. Otherwise, find another\n // open neighboring cell to spawn the entity.\n if (passable.contains(model.getCell((int) (double) entity.getX(), (int) (double) entity.getY() + 1))) {\n Entity newEntity = makeEntity(entity.getX(), entity.getY() + 1, entity.getTeam(), entity, model);\n model.processMessage(new MakeEntityRequest(newEntity));\n newEntity.onDeath((e, serverGameModel) -> {\n data.spawnCounter--;\n data.spawned.remove(e);\n });\n data.spawnCounter++;\n data.spawned.add(newEntity);\n } else if (!passable.isEmpty()) {\n Entity newEntity = makeEntity(passable.iterator().next().getCenterX(),\n passable.iterator().next().getCenterY(), entity.getTeam(), entity, model);\n model.processMessage(new MakeEntityRequest(newEntity));\n newEntity.onDeath((e, serverGameModel) -> {\n data.spawnCounter--;\n data.spawned.remove(e);\n });\n data.spawnCounter++;\n data.spawned.add(newEntity);\n }\n } else {\n Collection<Entity> attackable = attackableEnemies(entity, model);\n if (!attackable.isEmpty()) {\n Entity closest = getClosestEnemy(attackable, entity, model);\n Entity newEntity = makeEntity(closest.getX(), closest.getY(), entity.getTeam(), entity, model);\n model.processMessage(new MakeEntityRequest(newEntity));\n newEntity.onDeath((e, serverGameModel) -> {\n data.spawnCounter--;\n data.spawned.remove(e);\n });\n data.spawnCounter++;\n data.spawned.add(newEntity);\n }\n }\n }\n if (entity.getUpgraded()) {\n for (Entity e : data.spawned) {\n e.setUpgraded(false);\n e.set(LEVEL, entity.get(LEVEL));\n // TODO UP grade other stuff\n }\n }\n }\n }", "private void addMountains() {\n int randRow = 0;\n int randColumn = 0;\n int randValue = 0;\n do {\n randRow = (int)(Math.round(Math.random()*(MAP_LENGTH-4))) + 2;\n randColumn = (int)(Math.round(Math.random()*(MAP_LENGTH-4))) + 2;\n for (int i = (randRow - 2); i < (randRow + 2); i++) {\n for (int j = (randColumn - 2); j < (randColumn + 2); j++) {\n if ((tileMap[i][j].getTerrain() instanceof Grass) && (tileMap[i][j].isEmpty())) {\n randValue = (int)(Math.round(Math.random()));\n if (randValue == 0) {\n tileMap[i][j] = new Space(new Mountain(i, j)); //Create a mountain\n }\n }\n }\n }\n } while (!checkMountainCoverage());\n }", "public void markEmptyFields(int shipSize){\n\t\tint x = hitLocation3.x;\n\t\tint y = hitLocation3.y;\n\t\t\n\t\tif( hitLocation2==null && hitLocation3 !=null ){\n\t\t\tif(x-1 >= 0 && y - 1 >= 0){\n\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\t//po skosie lewy gorny\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0){\n\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\t//gorny\n\t\t\t}\n\t\t\tif(y + 1 <sizeBoard){\n\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\t//prawy\t\n\t\t\t}\n\t\t\tif(x+1 < sizeBoard && y +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y+1] = true;\t\t\t\t//po skosie dol prawy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0 && y + 1 < sizeBoard){\n\t\t\t\topponentShootTable[x-1][y+1] = true;\t\t\t\t//po skosie prawy gora\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif( x +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y] = true;\t\t\t\t// dolny\n\t\t\t\tpossibleshoots.remove(new TabLocation(x+1,y));\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x+1 <sizeBoard && y - 1 >= 0){\n\t\t\t\topponentShootTable[x+1][y-1] = true;\t\t\t//po skosie dol lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(y - 1 >= 0){\n\t\t\t\topponentShootTable[x][y-1] = true;\t\t\t//lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tboolean orientacja = false;\n\t\t\tif( hitLocation3.x == hitLocation2.x ) orientacja = true;\n\t\t\tint tempshipSize = shipSize;\n\t\t\tif( orientacja ){\n\t\t\t\t\n\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//prawy skrajny\t\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x-1, y+tempshipSize ) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x, y+tempshipSize ) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 <sizeBoard && y+tempshipSize>=0){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y+1<sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+tempshipSize) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+tempshipSize) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( x-1 >= 0 ){\n\t\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y-i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y+i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(x + 1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.y < hitLocation3.y){\n\t\t\t\t\t\tfor(int i=0; i<shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y-i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y+i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//dolny skrajny\t\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x+1 < sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x+1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(y-1 >= 0){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y+1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y+1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y+1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void checkIfOccupied(int row, int col) {\n if (status == MotionStatus.DOWN || AIisAttacking) {\n\n// if (player && playerAttacks != null) {\n// // Ignore touch if player has previously committed an attack on that cell.\n// for (int i = 0; i < playerAttacks.size(); i++) {\n// if (playerAttacks.get(i).equals(row,col)) {\n// Log.i(\"for\", \"You Hit this Previously!\");\n// }\n// }\n// }\n\n for (int i = 0; i < occupiedCells.size(); i++) {\n if (occupiedCells.get(i).x == row && occupiedCells.get(i).y == col) {\n Point p = new Point(row, col);\n selectedShip = findWhichShip(p); //Touching View Updated\n Log.i(\"checkIfOccupied getHit\", \"\" + getHit() + \", (\" + row + \", \" + col + \")\");\n setHit(true);\n break;\n }\n }\n\n if (selectedShip == null) {\n setHit(false);\n Log.i(\"checkIfOccupied getHit\", \"\" + getHit() + \", (\" + row + \", \" + col + \")\");\n }\n\n } else if (status == MotionStatus.MOVE) {//MotionStatus.MOVE\n if (selectedShip != null) {//Need to make sure none of the current ship parts will overlap another.\n int rowHolder = selectedShip.getHeadCoordinatePoint().x;\n int colHolder = selectedShip.getHeadCoordinatePoint().y;\n int tempRow, tempCol;\n selectedShip.moveShipTo(row, col);\n for (Ship s : ships) {\n if (s != selectedShip) {\n\n for (int i = 0; i < selectedShip.getShipSize(); i++) {\n tempRow = selectedShip.getBodyLocationPoints()[i].x;\n tempCol = selectedShip.getBodyLocationPoints()[i].y;\n\n for (int j = 0; j < s.getShipSize(); j++) {\n if (tempRow == s.getBodyLocationPoints()[j].x && tempCol == s.getBodyLocationPoints()[j].y) {\n selectedShip.moveShipTo(rowHolder, colHolder);\n }\n }//for\n }//for\n }\n }//for\n }\n }//Move\n }", "@Test\n public void tieBreakByMeeples() throws Exception{\n\n islandMap.addTileToMap(606, 0);\n islandMap.addTileToMap(607, 60);\n islandMap.addTileToMap(809,0);\n buildme.build(player1, islandMap,1, 807);\n\n islandMap.addTileToMap(609,60);\n islandMap.addTileToMap(611,0);\n islandMap.addTileToMap(612,60);\n islandMap.addTileToMap(614,0);\n\n buildme.build(player2, islandMap, 1, 610);\n buildme.build(player2, islandMap, 1,815);\n\n Assert.assertEquals(2, final1.tieBreaker(player1,player2));\n }", "private List<List<Cell>> constructFireDirectionLines(int range) {\n List<List<Cell>> directionLines = new ArrayList<>();\n for (Direction direction : Direction.values()) {\n List<Cell> directionLine = new ArrayList<>();\n for (int directionMultiplier = 1; directionMultiplier <= range; directionMultiplier++) {\n\n int coordinateX = currentWorm.position.x + (directionMultiplier * direction.x);\n int coordinateY = currentWorm.position.y + (directionMultiplier * direction.y);\n\n if (!isValidCoordinate(coordinateX, coordinateY)) {\n break;\n }\n\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, coordinateX, coordinateY) > range) {\n break;\n }\n\n Cell cell = gameState.map[coordinateY][coordinateX];\n if (cell.type != CellType.AIR) {\n break;\n }\n\n directionLine.add(cell);\n }\n directionLines.add(directionLine);\n }\n\n return directionLines;\n }", "private void decorate(int xStart, int xLength, int floor, ArrayList finalListElements, ArrayList states)\r\n\t {\n\t if (floor < 1)\r\n\t \treturn;\r\n\r\n\t // boolean coins = random.nextInt(3) == 0;\r\n\t boolean rocks = true;\r\n\r\n\t //add an enemy line above the box\r\n\t Random r = new Random();\r\n\t boolean enemyAdded=addEnemyLine(xStart + 1, xLength - 1, floor - 1);\r\n\r\n\t int s = 1;\r\n\t int e = 1;\r\n\r\n\t if(enemyAdded==false)\r\n\t {\r\n\t if (floor - 2 > 0){\r\n\t \tif ((xLength - e) - (xStart + s) > 0){\r\n\t \t\tfor(int x = xStart + s; x < xLength- e; x++){\r\n\t \tboolean flag=true;\r\n\t \tfor(int i=0;i<states.size();i++)\r\n\t \t{\r\n\t \t\tElements element=(Elements)finalListElements.get(i);\r\n\t \t\t\tBlockNode state=(BlockNode)states.get(i);\r\n\t \t\t\t\r\n\t \t\t\tint xElement = (int)(initialStraight+state.getX());\r\n\t \t int floorC= (int)state.getY()+1;\r\n\t \t int widthElement=element.getWidth();\r\n\t \t int heigthElement=element.getHeigth()+2;\r\n\t \t \r\n\t \t int widthElementNext=1;\r\n\t \t int heigthElementNext=0;\r\n\t \t \r\n\t \t if(x+(widthElementNext-1)>=xElement && x<xElement+widthElement && (floor-1)-heigthElementNext<=floorC && (floor-1)>= floorC-heigthElement )\r\n\t \t {\r\n\t \t \tflag=false;\r\n\t \t \tbreak;\r\n\t \t }\r\n\t \t \t \t \t\t \t \r\n\t \t } \r\n\t \tif(flag==true)\r\n\t \t{\r\n\t \t\tsetBlock(x, floor - 1, COIN);\r\n\t \t}\r\n\t \r\n\t //COINS++;\r\n\t }\r\n\t }\r\n\t }\r\n\t }\r\n\r\n\t s = random.nextInt(4);\r\n\t e = random.nextInt(4);\r\n\t \r\n\t //this fills the set of blocks and the hidden objects inside them\r\n\t /*\r\n\t if (floor - 4 > 0)\r\n\t {\r\n\t if ((xLength - 1 - e) - (xStart + 1 + s) > 2)\r\n\t {\r\n\t for (int x = xStart + 1 + s; x < xLength - 1 - e; x++)\r\n\t {\r\n\t if (rocks)\r\n\t {\r\n\t if (x != xStart + 1 && x != xLength - 2 && random.nextInt(3) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_POWERUP);\r\n\t //BLOCKS_POWER++;\r\n\t }\r\n\t else\r\n\t {\t//the fills a block with a hidden coin\r\n\t setBlock(x, floor - 4, BLOCK_COIN);\r\n\t //BLOCKS_COINS++;\r\n\t }\r\n\t }\r\n\t else if (random.nextInt(4) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (2 + 1 * 16));\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (1 + 1 * 16));\r\n\t }\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_EMPTY);\r\n\t //BLOCKS_EMPTY++;\r\n\t }\r\n\t }\r\n\t }\r\n\t //additionElementToList(\"Block\", 1,(xLength - 1 - e)-(xStart + 1 + s));\r\n\t }\r\n\t \r\n\t }*/\r\n\t }", "@Override\n public void doDayEndActions() {\n if (this.getCurrentDay() == 1) {\n this.spawnTrees();\n }\n Iterator<GroundTile> allEditedTiles = this.editedTiles.iterator();\n Iterator<Tile> allTreeTiles = this.treeTiles.iterator();\n\n while (allTreeTiles.hasNext()) {\n Tile currentTile = allTreeTiles.next();\n TileComponent currentContent = currentTile.getContent();\n if ((currentContent != null) && (currentContent instanceof ExtrinsicTree)) {\n ((ExtrinsicTree)currentTile.getContent()).grow();\n }\n }\n\n while (allEditedTiles.hasNext()) {\n GroundTile currentTile = allEditedTiles.next();\n currentTile.determineImage(this.getCurrentDay());\n\n if (currentTile.getContent() != null) {\n TileComponent content = currentTile.getContent();\n if (content instanceof ExtrinsicCrop) {\n if (this.getSeason() != ((IntrinsicCrop)((ExtrinsicCrop)content).getIntrinsicSelf()).getPlantingSeason()) {\n currentTile.setContent(null); \n } else {\n if (currentTile.getLastWatered() == this.getCurrentDay() - 1) {\n ((ExtrinsicCrop)currentTile.getContent()).grow();\n //- Kill the crop if it wasn't watered for some time\n } else if (currentTile.getLastWatered() == this.getCurrentDay() - 3) {\n currentTile.setContent(null);\n }\n }\n }\n } else {\n //- If the tile is tilled but there's nothing on it, untill it\n if (currentTile.getTilledStatus()) { \n currentTile.setTilledStatus(false);\n currentTile.determineImage(this.getCurrentDay());\n //- Remove the tile from the iterator to prevent ConcurrentModificationException\n allEditedTiles.remove();\n this.editedTiles.remove(currentTile);\n }\n }\n }\n }", "public void moveTowards(){\n \n \n \n if(!exploded){\n \n \n move(speed);\n \n if(isTouching(Enemy.class)){\n move(explosionRadius); \n \n inRange = (ArrayList) getObjectsInRange(explosionRadius + 25, Enemy.class);\n for(Enemy e : inRange){\n e.hit(damage);\n }\n \n //explode\n exploded = true;\n \n image = new GreenfootImage(\"50x50 aoe.png\");\n image.scale(explosionRadius*2, explosionRadius*2);\n setImage(image);\n //getWorld().removeObject(this);\n }\n else if (isAtEdge())\n {\n getWorld().removeObject(this);\n }\n else if ( radius < distance) {\n getWorld().removeObject(this); \n }\n }\n else{\n setImage(image);\n image.setTransparency(image.getTransparency() - 5);\n if(image.getTransparency() <= 0) getWorld().removeObject(this);\n }\n }", "public double minPlacedRectWCET(Module m, double max_2F_wcet){\n\t\t// build the grid \n\t\tBiochip grid = new Biochip(m.width,m.height);\n\n\t\tdouble max_wcet = 0; \n\t\tfor (int x=0;x<grid.cells.size();x++){\n\t\t//for (int x=0;x<grid.cells.size();x++){\n\t\t\t//for (int y=x+1; y<4; y++){\n\t\t\tfor (int y=x+1; y<grid.cells.size()-1; y++){\n\t\t\t//\tfor (int z=y+1; z<5; z++){\n\t\t\t\t\t\n\t\t\t\tfor (int z=y+1; z<grid.cells.size()-2; z++){\n\t\t\t\t\tdouble min_wcet = 1000; \n\t\t\t\t\tArrayList<ModuleElement> fault_scen = new ArrayList<ModuleElement>(); \n\t\t\t\t\tfault_scen.add(new ModuleElement(grid.findRow(grid.cells.get(x)),grid.findColumn(grid.cells.get(x))));\n\t\t\t\t\tfault_scen.add(new ModuleElement(grid.findRow(grid.cells.get(y)),grid.findColumn(grid.cells.get(y))));\n\t\t\t\t\tfault_scen.add(new ModuleElement(grid.findRow(grid.cells.get(z)),grid.findColumn(grid.cells.get(z))));\n\t\t\t\t\tSystem.out.println(\"\\nFault scenario: \" + fault_scen.toString()); \n\n\t\t\t\t\t// mark the faulty cells as inactive\n\t\t\t\t\tfor (int k=0; k<fault_scen.size();k++){\n\t\t\t\t\t\tModuleElement f_cell = fault_scen.get(k);\n\t\t\t\t\t\tgrid.getCell(f_cell.x, f_cell.y).isActive = false; \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(grid.toString()); \n\t// calculate the min wcet \n\t\t\t\t\tfor (int k=0; k<fault_scen.size();k++){\n\t\t\t\t\t\tModuleElement f_cell = fault_scen.get(k);\n\t\t\t\t\t\tSystem.out.println(\"crt cell = (\" + f_cell.x + \" , \" + f_cell.y + \")\" ); \n\t\t\t\t\t\t// go around the fault - RIGHT \n\t\t\t\t\t\tif (f_cell.y+1<grid.width){\n\t\t\t\t\t\t\tModuleElement right_n = new ModuleElement(f_cell.x, f_cell.y+1); \n\t\t\t\t\t\t\tif(!this.findFault(right_n, fault_scen)){\n\t\t\t\t\t\t\t\tRectangle right_r = new Rectangle(1,1,right_n.y, grid.height - 1 - right_n.x);\n\t\t\t\t\t\t\t\t//System.out.println(\"Start rect = \" + right_r.toString()); \n\n\t\t\t\t\t\t\t\t// get the scaled ER\n\t\t\t\t\t\t\t\tthis.shiftRight(right_r,grid); \n\t\t\t\t\t\t\t\t//System.out.println(\" After right right rect = \" + right_r.toString()); \n\n\t\t\t\t\t\t\t\tthis.shiftBottom(right_r,grid);\n\t\t\t\t\t\t\t\t//System.out.println(\" After BOTTOM right rect = \" + right_r.toString()); \n\n\t\t\t\t\t\t\t\tthis.shiftTop(right_r,grid); \n\t\t\t\t\t\t\t\t//System.out.println(\" After up right rect = \" + right_r.toString()); \n\n\t\t\t\t\t\t\t\tif (right_r.height > 1 && right_r.width >1){\n\n\t\t\t\t\t\t\t\tif(min_wcet>this.nonFWCET(right_r.width, right_r.height))\n\t\t\t\t\t\t\t\t\tmin_wcet = this.nonFWCET(right_r.width, right_r.height); \n\t\t\t\t\t\t\t\t//System.out.println(\"Right rect = \" + right_r.toString()); \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// LEFT\n\t\t\t\t\t\tif (f_cell.y-1 >= 0){\n\t\t\t\t\t\t\tModuleElement left_n = new ModuleElement(f_cell.x, f_cell.y-1); \n\t\t\t\t\t\t\tif(!this.findFault(left_n, fault_scen)){\n\t\t\t\t\t\t\t\tRectangle left_r = new Rectangle(1,1,left_n.y, grid.height - 1 - left_n.x);\n\t\t\t\t\t\t\t\t// get the scaled ER\n\t\t\t\t\t\t\t\tthis.shiftLeft(left_r,grid); \n\n\t\t\t\t\t\t\t\tthis.shiftBottom(left_r,grid); \n\n\t\t\t\t\t\t\t\tthis.shiftTop(left_r,grid); \n\t\t\t\t\t\t\t\tif (left_r.height > 1 && left_r.width >1){\n\n\t\t\t\t\t\t\t\tif(min_wcet>this.nonFWCET(left_r.width, left_r.height))\n\t\t\t\t\t\t\t\t\tmin_wcet = this.nonFWCET(left_r.width, left_r.height); \n\t\t\t\t\t\t\t\t//System.out.println(\"Left rect = \" + left_r.toString()); \n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// UP\n\t\t\t\t\t\tif (f_cell.x-1>=0){\n\t\t\t\t\t\t\tModuleElement up_n = new ModuleElement(f_cell.x-1, f_cell.y); \n\t\t\t\t\t\t\tif(!this.findFault(up_n, fault_scen)){\n\t\t\t\t\t\t\t\tRectangle up_r = new Rectangle(1,1,up_n.y, grid.height - 1 - up_n.x);\n\t\t\t\t\t\t\t\t// get the scaled ER\n\t\t\t\t\t\t\t\tthis.shiftLeft(up_r, grid); \n\t\t\t\t\t\t\t\tthis.shiftRight(up_r, grid); \n\t\t\t\t\t\t\t\tthis.shiftTop(up_r, grid); \n\t\t\t\t\t\t\t\tif (up_r.height > 1 && up_r.width >1){\n\t\t\t\t\t\t\t\t\tif(min_wcet>this.nonFWCET(up_r.width, up_r.height))\n\t\t\t\t\t\t\t\t\t\tmin_wcet = this.nonFWCET(up_r.width, up_r.height); \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//System.out.println(\"UP rect = \" + up_r.toString()); \n\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// DOWN\n\t\t\t\t\t\tif (f_cell.x+1<grid.height){\n\n\t\t\t\t\t\t\tModuleElement down_n = new ModuleElement(f_cell.x+1, f_cell.y);\n\t\t\t\t\t\t\t//System.out.println(\"Down cell = \" + down_n.toString()); \n\t\t\t\t\t\t\tif(!this.findFault(down_n, fault_scen)){\n\t\t\t\t\t\t\t\tRectangle down_r = new Rectangle(1,1,down_n.y, grid.height - 1 - down_n.x);\n\t\t\t\t\t\t\t\t//System.out.println(\"Start rect = \" + down_r.toString()); \n\t\t\t\t\t\t\t\t// get the scaled ER\n\t\t\t\t\t\t\t\tthis.shiftLeft(down_r,grid);\n\t\t\t\t\t\t\t\t//System.out.println(\" After Left Down rect = \" + down_r.toString()); \n\t\t\t\t\t\t\t\tthis.shiftRight(down_r,grid);\n\t\t\t\t\t\t\t\t//System.out.println(\" After Right Down rect = \" + down_r.toString()); \n\t\t\t\t\t\t\t\tthis.shiftBottom(down_r,grid); \n\t\t\t\t\t\t\t\t//System.out.println(\" After Down Down rect = \" + down_r.toString()); \n\t\t\t\t\t\t\t\tif (down_r.height > 1 && down_r.width >1){\n\n\t\t\t\t\t\t\t\tif(min_wcet>this.nonFWCET(down_r.width, down_r.height))\n\t\t\t\t\t\t\t\t\tmin_wcet = this.nonFWCET(down_r.width, down_r.height); \n\t\t\t\t\t\t\t\t//System.out.println(\"Down rect = \" + down_r.toString()); \n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"local minimum = \" + min_wcet + \" max_wcet = \" + max_wcet);\n\t\t\t\t\tif (min_wcet > max_2F_wcet) min_wcet = max_2F_wcet; \n\t\t\t\t\t//if(max_wcet > 4) System.exit(1); \n\t\t\t\t\tif (max_wcet < min_wcet) max_wcet = min_wcet; \n\t\t\t\t\t// clean the marked cells \n\t\t\t\t\tfor (int k=0; k<fault_scen.size();k++){\n\t\t\t\t\t\tModuleElement f_cell = fault_scen.get(k);\n\t\t\t\t\t\tgrid.getCell(f_cell.x, f_cell.y).isActive = true; \n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t\n\t\treturn max_wcet; \n\t}", "public void verifyDestroyedBoatsOnColumns(){ \n for (int i = 0; i < canvasNumberOfColumns; i++){\n int start = 0;\n int startCopy = 0;\n \n for (int j = 0; j < canvasNumberOfLines; j++){\n if (gameMatrix[j][i] != 0 && booleanMatrixUserChoices[j][i] == 1 && booleanFoundBoats[j][i] == 0){\n if (startCopy != gameMatrix[j][i] || start == 0){\n start = gameMatrix[j][i]+1;\n startCopy = gameMatrix[j][i];\n }\n }\n \n if (gameMatrix[j][i] == 0){\n start = 0;\n startCopy = 0;\n }\n \n if (start > 0 && booleanMatrixUserChoices[j][i] == 1){\n start--;\n }\n \n if (start == 1){\n if (startCopy == 1){\n boatsNumber[0] -= 1;\n booleanFoundBoats[j][i] = 1;\n }\n else if (startCopy == 2){\n boatsNumber[1] -= 1;\n booleanFoundBoats[j][i] = 1;\n booleanFoundBoats[j-1][i] = 1;\n }\n else if (startCopy == 3){\n boatsNumber[2] -= 1;\n booleanFoundBoats[j][i] = 1;\n booleanFoundBoats[j-1][i] = 1;\n booleanFoundBoats[j-2][i] = 1;\n }\n else if (startCopy == 4){\n boatsNumber[3] -= 1;\n booleanFoundBoats[j][i] = 1;\n booleanFoundBoats[j-1][i] = 1;\n booleanFoundBoats[j-2][i] = 1;\n booleanFoundBoats[j-3][i] = 1;\n }\n else if (startCopy == 5){\n boatsNumber[4] -= 1;\n booleanFoundBoats[j][i] = 1;\n booleanFoundBoats[j-1][i] = 1;\n booleanFoundBoats[j-2][i] = 1;\n booleanFoundBoats[j-3][i] = 1;\n booleanFoundBoats[j-4][i] = 1;\n }\n \n start = 0;\n startCopy = 0;\n }\n \n } \n } \n }", "public void spawnEnemy(){\n\t\tint initTile = 0;\n\t\n\t\tfor(int i=0; i<screen.maps[screen.currentMap].path.getHeight(); i++){\n\t\t\tif(screen.maps[screen.currentMap].path.getCell(0, i).getTile().getProperties().containsKey(\"ground\") == true){\n\t\t\t\tinitTile = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\txCoor = 2;\n\t\tyCoor = (initTile)*64 + 2;\n\t\tbound = new Circle(xCoor+30, yCoor+30, 30);\n\t\tinGame = true;\n\t}", "public static void worldTimeStep() {\r\n \t\r\n \t//remake the hash map based on the x and y coordinates of the critters\r\n \tremakeMap(population);\r\n \t\r\n \t//Iterate through the grid positions in the population HashMap\r\n \tIterator<String> populationIter = population.keySet().iterator();\r\n \twhile (populationIter.hasNext()) { \r\n String pos = populationIter.next();\r\n ArrayList<Critter> critterList = population.get(pos);\r\n \r\n //Iterate through the critters ArrayList \r\n ListIterator<Critter> currCritter = critterList.listIterator();\r\n while(currCritter.hasNext()) {\r\n \tCritter thisCritter = currCritter.next();\r\n \tthisCritter.hasMoved = false;\r\n \tthisCritter.doTimeStep();\r\n \tif(thisCritter.hasMoved || thisCritter.getEnergy() <= 0) {\r\n \t\tcurrCritter.remove();\r\n \t} else {\r\n \t\tcurrCritter.set(thisCritter);\r\n \t}\r\n }\r\n population.replace(pos, critterList);\r\n }\r\n \t\r\n \tfixPopulation();\r\n \tmergePopulationMoved(populationMoved);\r\n \t\r\n \tdoEncounters();\r\n \t\r\n \tfixPopulation();\r\n \tmergePopulationMoved(populationMoved); //Stage 1 Complete\r\n \r\n \t//deduct resting energy cost from all critters in the hash map\r\n \t//could do a FOR EACH loop instead of iterator -- fixed\r\n \tpopulationIter = population.keySet().iterator();\r\n \twhile(populationIter.hasNext()) {\r\n \t\tString pos = populationIter.next();\r\n ArrayList<Critter> critterList = population.get(pos);\r\n \r\n //Iterate through the Critters attached to the keys in the Hash Map\r\n ListIterator<Critter> currCritter = critterList.listIterator();\r\n while(currCritter.hasNext()) {\r\n \tCritter thisCritter = currCritter.next();\r\n \t//deduct the rest energy cost from each critter\r\n \tthisCritter.energy = thisCritter.energy - Params.REST_ENERGY_COST;\r\n \t//remove all critters that have died after reducing the rest energy cost\r\n \tif(thisCritter.getEnergy() <= 0) {\r\n \t\tcurrCritter.remove();\r\n \t} else {\r\n \t\tcurrCritter.set(thisCritter);\r\n \t}\r\n }\r\n population.replace(pos, critterList);\r\n \t}\r\n \t\r\n \tmergePopulationMoved(babies);\r\n \t\r\n \t\r\n \t//add the clovers in each refresh of the world \r\n \ttry {\r\n \t\tfor(int j = 0; j < Params.REFRESH_CLOVER_COUNT; j++) {\r\n \t\t\tcreateCritter(\"Clover\");\r\n \t\t}\r\n \t} catch(InvalidCritterException p) {\r\n \t\tp.printStackTrace();\r\n \t}\r\n }", "public void build(Cell[][] map, Action[][][] actions, int[] position ) {\n int[] destination=new int[2];\n TypeBlock typeBlock=null;\n for (int i = Math.max(0, position[0] - 1); (i <= Math.min(4, position[0] + 1)); i++) {\n for (int j = Math.max(0, position[1] - 1); j <= Math.min(4, position[1] + 1); j++) {\n if (!map[i][j].getBlock(map[i][j].getSize() - 1).getTypeBlock().equals(TypeBlock.WORKER)\n && !map[i][j].getBlock(map[i][j].getSize() - 1).getTypeBlock().equals(TypeBlock.DOME)) {\n switch (map[i][j].getBlock(map[i][j].getSize() - 1).getTypeBlock()) {\n case LEVEL1:\n typeBlock = TypeBlock.LEVEL2;\n destination[0] = i;\n destination[1] = j;\n ((Build) actions[i][j][1]).set(true, typeBlock, destination);\n break;\n case LEVEL2:\n typeBlock = TypeBlock.LEVEL3;\n destination[0] = i;\n destination[1] = j;\n ((Build) actions[i][j][1]).set(true, typeBlock, destination);\n break;\n case LEVEL3:\n typeBlock = TypeBlock.DOME;\n destination[0] = i;\n destination[1] = j;\n ((Build) actions[i][j][2]).set(true, typeBlock, destination);\n break;\n default:\n typeBlock = TypeBlock.LEVEL1;\n destination[0] = i;\n destination[1] = j;\n ((Build) actions[i][j][1]).set(true, typeBlock, destination);\n }\n }\n }\n\n }\n }", "public void update() {\r\n\r\n\t\tfor(int p=0;p<200;p++) {\r\n\t\t\tfor(int k=0;k<200;k++) {\r\n\r\n\t\t\t\tif(tileMap[p][k].getBuilding()!=null) {\r\n\t\t\t\t\tBuilding m=tileMap[p][k].getBuilding();\r\n\t\t\t\t\t//update the buildings\r\n\t\t\t\t\ttileMap[p][k].getBuilding().update();\r\n\r\n\t\t\t\t\t//Check if battery is giving off power\r\n\t\t\t\t\tif( (m instanceof LowTierBattery) || (m instanceof LargeBattery) || (m instanceof IndustrialGradeBattery) ) {\r\n\r\n\t\t\t\t\t\t//If it's a Battery\r\n\t\t\t\t\t\tLowTierBattery f =(LowTierBattery) tileMap[p][k].getBuilding();\t\r\n\r\n\t\t\t\t\t\t//Check if its getting power and charging\r\n\t\t\t\t\t\tif(checkPowerLine(p,k,3)) {\r\n\t\t\t\t\t\t\tpowerSwitcher(p,k,2,true); //If it is then give off power\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tpowerSwitcher(p,k,2,f.getCapacity()>0); ///if it isnt then only give power if there is capacity\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//If a building is generating power add power to tiles;\r\n\t\t\t\t\t}else if( (m instanceof SteamEngine) || (m instanceof HandCrankGenerator) || (m instanceof SteamTurbine) || (m instanceof WindTurbine) ) {\r\n\r\n\t\t\t\t\t\tpowerSwitcher(p,k,3,((PoweredBuilding) m).getPower()); //Adds power or remove power based on the status of the generators\r\n\r\n\t\t\t\t\t\t//Powerline only get power from other powerline or buildings\r\n\t\t\t\t\t}else if(m instanceof PowerLine) {\r\n\r\n\t\t\t\t\t\tpowerSwitcher(p,k,5,checkPowerLine(p,k,5)); //Checks if the powerline is powered by other buildings then give it to powerSwitch method\r\n\r\n\t\t\t\t\t}else if(m instanceof LargePowerLine) {\r\n\t\t\t\t\t\tpowerSwitcher(p,k,10,checkPowerLine(p,k,10)); //Checks if the powerline is powered by other buildings then give it to powerSwitch method\r\n\r\n\t\t\t\t\t\t//If its just a powered building enable it if the tile under it is powered;\r\n\t\t\t\t\t}else if((m instanceof PoweredBuilding)) {\r\n\t\t\t\t\t\t((PoweredBuilding) tileMap[p][k].getBuilding()).setPower(tileMap[p][k].getPowered());\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t//Pipe movement\r\n\t\t\t\t\tif(m instanceof Pipe ) {\r\n\t\t\t\t\t\tpipeCheck(p,k,m);\r\n\t\t\t\t\t}else if(m.getOutputInventorySize()>0) {\r\n\t\t\t\t\t\tbuildingPipeCheck(p,k,m);\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void createFinalLine() {\n //Up\n if (orOpActive.row > origin.row) {\n for (int i = origin.row + 1; i <= orOpActive.row; i++) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);\n //setState(gridMap.get(i).get(origin.column), STATE_FINAL);\n }\n }\n\n //Down\n if (orOpActive.row < origin.row) {\n for (int i = origin.row - 1; i >= orOpActive.row; i--) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);\n //setState(gridMap.get(i).get(origin.column), STATE_FINAL);\n }\n }\n //Right\n if (orOpActive.column > origin.column) {\n for (int i = origin.column + 1; i <= orOpActive.column; i++) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);\n //setState(gridMap.get(origin.row).get(i), STATE_FINAL);\n }\n }\n //Left\n if (orOpActive.column < origin.column) {\n for (int i = origin.column - 1; i >= orOpActive.column; i--) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);\n //setState(gridMap.get(origin.row).get(i), STATE_FINAL);\n }\n }\n }", "public ArrayList<Entity> getAdjacentCreature(int row, int col, int type) {\n\t\tint topRow = row-1;\n\t\tint bottomRow = row+1;\n\t\tint leftCol = col-1;\n\t\tint rightCol = col+1;\n\t\tArrayList<Entity> allAround = new ArrayList<Entity>(); \n\t\tArrayList<Entity> adjacentMonsterList = new ArrayList<Entity>();\n\t\tArrayList<Entity> adjacentHeroList = new ArrayList<Entity>();\n\t\t\n\t\ttry {\n\t\t\tQolTile Center = (QolTile)curboard[row][col];\n\t\t\tEntity[] heroTile = Center.getOccupants();\n\t\t\tfor (int i = 0; i < heroTile.length; i++) {\n\t\t\t\tallAround.add(heroTile[i]);\n\t\t\t}\t\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t} catch (ClassCastException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t\ttry {\n\t\t\tQolTile TopLeft = (QolTile)curboard[topRow][leftCol];\n\t\t\tEntity[] monster1 = TopLeft.getOccupants();\n\t\t\tfor (int i = 0; i < monster1.length; i++) {\n\t\t\t\tallAround.add(monster1[i]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t} catch (ClassCastException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tQolTile TopCenter = (QolTile)curboard[topRow][col];\n\t\t\tEntity[] monster2 = TopCenter.getOccupants();\n\t\t\tfor (int i = 0; i < monster2.length; i++) {\n\t\t\t\tallAround.add(monster2[i]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t} catch (ClassCastException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tQolTile TopRight = (QolTile)curboard[topRow][rightCol];\n\t\t\tEntity[] monster3 = TopRight.getOccupants();\n\t\t\tfor (int i = 0; i < monster3.length; i++) {\n\t\t\t\tallAround.add(monster3[i]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t} catch (ClassCastException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tQolTile CenterLeft = (QolTile)curboard[row][leftCol];\n\t\t\tEntity[] monster4 = CenterLeft.getOccupants();\n\t\t\tfor (int i = 0; i < monster4.length; i++) {\n\t\t\t\tallAround.add(monster4[i]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t} catch (ClassCastException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tQolTile CenterRight = (QolTile)curboard[row][col+1];\n\t\t\tEntity[] monster5 = CenterRight.getOccupants();\n\t\t\tfor (int i = 0; i < monster5.length; i++) {\n\t\t\t\tallAround.add(monster5[i]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t} catch (ClassCastException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tQolTile BottomLeft = (QolTile)curboard[bottomRow][leftCol];\n\t\t\tEntity[] monster6 = BottomLeft.getOccupants();\n\t\t\tfor (int i = 0; i < monster6.length; i++) {\n\t\t\t\tallAround.add(monster6[i]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t} catch (ClassCastException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tQolTile BottomCenter = (QolTile)curboard[bottomRow][col];\n\t\t\tEntity[] monster7 = BottomCenter.getOccupants();\n\t\t\tfor (int i = 0; i < monster7.length; i++) {\n\t\t\t\tallAround.add(monster7[i]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t} catch (ClassCastException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tQolTile BottomRight = (QolTile)curboard[bottomRow][rightCol];\n\t\t\tEntity[] monster8 = BottomRight.getOccupants();\n\t\t\tfor (int i = 0; i < monster8.length; i++) {\n\t\t\t\tallAround.add(monster8[i]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t} catch (ClassCastException e) {\n\t\t\t// TODO: handle exception\n//\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\t\n\t\t\n\t\tfor(Entity e : allAround) {\n\t\t\tif (e instanceof Monster) {\n\t\t\t\tadjacentMonsterList.add(e);\n\t\t\t} else if (e instanceof Hero) {\n\t\t\t\tadjacentHeroList.add(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Negative Type is a hero looking for nearby monster\n\t\t//Positive Type is a monster looking for nearby hero\n\t\t//Return respective list\n\t\t\n\t\tif (type < 0) {\n\t\t\treturn adjacentMonsterList;\n\t\t} else if (type > 0) {\n\t\t\treturn adjacentHeroList;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public int[] findHorizontalSeam() {\n int[][] matrixTo = new int[height()][width()];\n double[][] energyMatrix = new double[height()][width()];\n //reset(energyMatrix);\n\n for(int i = 0; i < energyMatrix.length; i++) {\n for(int j = 0; j < energyMatrix[i].length; j++) {\n energyMatrix[i][j] = Double.MAX_VALUE;\n }\n }\n\n for (int row = 0; row < height(); row++) {\n energyMatrix[row][0] = 1000;\n }\n // this is for relaxation.\n for (int col = 0; col < width() - 1; col++) {\n for (int row = 0; row < height(); row++) {\n //relaxH(row, col, matrixTo, energyMatrix);\n int nextcol = col + 1;\n for (int i = -1; i <= 1; i++) {\n int nextrow = row + i;\n if (nextrow < 0 || nextrow >= height()) continue;\n if(i == 0) {\n if(energyMatrix[nextrow][nextcol] >= energyMatrix[row][col] + energy(nextcol, nextrow)) {\n energyMatrix[nextrow][nextcol] = energyMatrix[row][col] + energy(nextcol, nextrow);\n matrixTo[nextrow][nextcol] = i;\n }\n }\n if (energyMatrix[nextrow][nextcol] > energyMatrix[row][col] + energy(nextcol, nextrow)) {\n energyMatrix[nextrow][nextcol] = energyMatrix[row][col] + energy(nextcol, nextrow);\n matrixTo[nextrow][nextcol] = i;\n }\n }\n\n }\n }\n\n double minDist = Double.MAX_VALUE;\n int minRow = 0;\n for (int row = 0; row < height(); row++) {\n if (minDist > energyMatrix[row][width() - 1]) {\n minDist = energyMatrix[row][width() - 1];\n minRow = row;\n }\n }\n\n int[] indices = new int[width()];\n for (int col = width() - 1, row = minRow; col >= 0; col--) {\n indices[col] = row;\n row -= matrixTo[row][col];\n }\n return indices;\n }", "private Sq<Sq<Cell>> explosionArmTowards(Direction dir) {\n\t\tSq<Cell> pos = Sq.iterate(position, c -> c.neighbor(dir)).limit(range);\n\t\tSq<Sq<Cell>> arm = Sq.repeat(Ticks.EXPLOSION_TICKS, pos);\n\t\treturn arm;\n\n\t}", "public void getFertileLands() {\n int land = 1;\n int i = 0;\n int j = 0;\n\n while (i < XLIM && j < YLIM) {\n\n if (queue.isEmpty()) {\n Integer node[] = {i, j};\n\n // If node[i][j] has not been visited add to queue\n // As the queue was empty, this is a new fertile land\n if (mColor[i][j] == 0) {\n land++;\n areasMap.put(land, 0);\n queue.add(node);\n }\n // Make sure we pass through all the Land\n if (i == (XLIM - 1)) {\n i = 0;\n j++;\n } else {\n i++;\n }\n }\n\n if (!queue.isEmpty()) {\n Integer node[] = queue.pop();\n\n int x = node[0];\n int y = node[1];\n\n if (mColor[x][y] == 0) {\n if (x > 0) {\n addQueue(x - 1, y);\n }\n if (x < (XLIM - 1)) {\n addQueue(x + 1, y);\n }\n if (y > 0) {\n addQueue(x, y - 1);\n }\n if (y < (YLIM - 1)) {\n addQueue(x, y + 1);\n }\n\n mColor[x][y] = land;\n areasMap.put(land, (areasMap.get(land) + 1));\n }\n }\n }\n\n }", "public void buildTile(int column, int row) {\r\n tiles[column][row].buildUp();\r\n }", "private boolean columnOkay(int row, int column) throws Exception {\n ArrayList<Integer> clue = puzzle.getColumnClue(column);\n var filledGroups = searchBoard.getFilledGroups(column, TraversalType.COLUMN);\n if(filledGroups.size() > clue.size()) {\n return false;\n }\n int availableSquares = puzzle.getRows()-row-1;\n int tilesRequired;\n if(filledGroups.size() == 0) {\n tilesRequired = clue.size()-1;\n for(int s : clue) {\n tilesRequired += s;\n }\n } else {\n int index = filledGroups.size()-1;\n if(filledGroups.get(index) > clue.get(index)) {\n return false;\n }\n if(searchBoard.getState(row, column) == CellState.EMPTY && !filledGroups.get(index).equals(clue.get(index))) {\n return false;\n }\n tilesRequired = clue.get(index)-filledGroups.get(index);\n tilesRequired += clue.size()-filledGroups.size();\n if(searchBoard.getState(row, column) == CellState.EMPTY) {\n --tilesRequired;\n }\n for(int i = index+1; i < clue.size(); ++i) {\n tilesRequired += clue.get(i);\n }\n }\n return availableSquares >= tilesRequired;\n }", "public void buildingPipeCheck(int x, int y, Building m){\r\n\r\n\t\tItem item=null;\r\n\t\t//find an item to send to pipe\r\n\t\tfor(int k=0;k<m.getOutputInventorySize();k++) {\r\n\t\t\t//check for items in the inventory\r\n\t\t\tif(m.getOutputItem(k)!=null) {\r\n\t\t\t\titem=m.getOutputItem(k);\r\n\t\t\t\tk=99; //leave the for loop\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//only check for pipes if there is an item in question\r\n\t\tif(item!=null) {\r\n\t\t\t//Add item to pipe if there is one and if its the right input direction\r\n\t\t\tif( (x-1>=0) && (tileMap[x-1][y].getBuilding() instanceof Pipe) && (((Pipe) tileMap[x-1][y].getBuilding()).getInput().equals(\"right\")) ) {\t\t\t\t\r\n\t\t\t\tBuilding pipe= tileMap[x-1][y].getBuilding();\r\n\t\t\t\tif( (pipe.getInputItem(0)==null) || (pipe.getInputItem(0).getClass().equals(item.getClass())) ) { //Add item to pipe only if there is space or already in there\r\n\t\t\t\t\ttileMap[x-1][y].getBuilding().addInputItem(item);\r\n\t\t\t\t}\r\n\t\t\t} \r\n\r\n\t\t\t//Add item to pipe if there is one and if its the right input direction\r\n\t\t\tif( (x+1<201) && (tileMap[x+1][y].getBuilding() instanceof Pipe) && (((Pipe) tileMap[x+1][y].getBuilding()).getInput().equals(\"left\")) ) {\r\n\r\n\t\t\t\tBuilding pipe= tileMap[x+1][y].getBuilding();\r\n\t\t\t\tif( (pipe.getInputItem(0)==null) || (pipe.getInputItem(0).getClass().equals(item.getClass())) ) { //Add item to pipe only if there is space or already in there\r\n\t\t\t\t\ttileMap[x+1][y].getBuilding().addInputItem(item);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//Add item to pipe if there is one and if its the right input direction\r\n\t\t\tif( (y-1>=0) && (tileMap[x][y-1].getBuilding() instanceof Pipe) && (((Pipe) tileMap[x][y-1].getBuilding()).getInput().equals(\"down\")) ) {\r\n\r\n\t\t\t\tBuilding pipe= tileMap[x][y-1].getBuilding();\r\n\t\t\t\tif( (pipe.getInputItem(0)==null) || (pipe.getInputItem(0).getClass().equals(item.getClass())) ) { //Add item to pipe only if there is space or already in there\r\n\t\t\t\t\ttileMap[x][y-1].getBuilding().addInputItem(item);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif( (y+1<201) && (tileMap[x][y+1].getBuilding() instanceof Pipe) && (((Pipe) tileMap[x][y+1].getBuilding()).getInput().equals(\"up\")) ) {\r\n\r\n\t\t\t\tSystem.out.println(\"pipe found\");\r\n\t\t\t\tBuilding pipe= tileMap[x][y+1].getBuilding();\r\n\t\t\t\tif( (pipe.getInputItem(0)==null) || (pipe.getInputItem(0).getClass().equals(item.getClass())) ) { //Add item to pipe only if there is space or already in there\r\n\t\t\t\t\ttileMap[x][y+1].getBuilding().addInputItem(item);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static long getPawnEastAttacks(long board, int side) {\n\t\tlong result;\n\t\tif (side == 0) {\n\t\t\tresult = ((board << 9) & ~CoreConstants.FILE_A);\n\n\t\t} else {\n\t\t\tresult = ((board >>> 7) & ~CoreConstants.FILE_A);\n\t\t}\n\t\treturn result;\n\t}", "private void consumeEnergyIfExist() {\n\n\t\tif (newPlayerCell.isHasEnergy()) {\n\t\t\tGame.getPlayer().getExperience().addStars(1);\n\t\t\tnewPlayerCell.setHasEnergy(false);\n\t\t\tnewPlayerCell.setType(RealmCellType.EMPTY);\n\t\t}\n\t}", "public void moverCeldaArriba(){\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J'&& laberinto.celdas[item.x][item.y-1].tipo !='P' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n }\n if (laberinto.celdas[item.x][item.y-1].tipo == 'C') {\n \n laberinto.celdas[item.x][item.y].tipo = 'V';\n laberinto.celdas[anchuraMundoVirtual/2][alturaMundoVirtual/2].tipo = 'I';\n \n player1.run();\n player2.run();\n }\n /* if (item.y > 0) {\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n if (laberinto.celdas[item.x][item.y-1].tipo == 'I') {\n if (item.y-2 > 0) {\n laberinto.celdas[item.x][item.y-2].tipo = 'I';\n laberinto.celdas[item.x][item.y-1].tipo = 'V';\n }\n }else{\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n // laberinto.celdas[item.x][item.y].indexSprite=Rand_Mod_Sprite()+3;\n } \n } \n }*/\n }", "public void doOffensiveMicro(RobotInfo[] engageableEnemies, MapLocation rallyPoint) throws GameActionException {\n\n if (engageableEnemies.length > 0) {\n // returns {is winning, is lowest health and not alone}\n int[] metrics = getBattleMetrics(engageableEnemies);\n if (metrics[0] > 0) {\n //rc.setIndicatorString(1, \"winning...\" + Clock.getRoundNum());\n\n if (metrics[1] != -1 || metrics[2] != -1) {\n Messaging.setBattleFront(new MapLocation(metrics[1], metrics[2]));\n }\n MapLocation nearestBattle = Messaging.getClosestBattleFront(rc.getLocation());\n RobotInfo[] attackableEnemies = Cache.getAttackableEnemies();\n if (attackableEnemies.length > 0) {\n if (rc.isWeaponReady()) {\n attackLeastHealthPrioritized(attackableEnemies);\n }\n } else {\n if (metrics[1] != -1 || metrics[2] != -1) {\n if (nearestBattle != null && nearestBattle.distanceSquaredTo(rc.getLocation()) <= 50) {\n //rc.setIndicatorString(1, \"Going to battlefront: \" + nearestBattle + \", \" + Clock.getRoundNum());\n Nav.goTo(nearestBattle, Engage.UNITS);\n } else {\n Nav.goTo(rallyPoint, Engage.NONE);\n }\n }\n }\n } else {\n // \"are we definitely going to die?\"\n if (metrics[1] > 0) {\n SupplyDistribution.setDyingMode();\n SupplyDistribution.manageSupply();\n if (rc.isWeaponReady()) {\n attackLeastHealthPrioritized(Cache.getAttackableEnemies());\n }\n \n // Retreat\n } else {\n if (rc.isCoreReady()) {\n int[] attackingEnemyDirs = calculateNumAttackingEnemyDirs();\n Nav.retreat(attackingEnemyDirs);\n }\n }\n }\n } else {\n if (rc.isCoreReady()) {\n MapLocation nearestBattle = Messaging.getClosestBattleFront(curLoc);\n if (nearestBattle != null ) {\n //rc.setIndicatorString(1, \"Going to battlefront: \" + nearestBattle + \", \" + Clock.getRoundNum());\n Nav.goTo(nearestBattle, Engage.UNITS);\n } else if (rallyPoint != null) {\n Nav.goTo(rallyPoint, Engage.NONE);\n }\n }\n }\n }", "private void checkEdges() {\n\n //Check for alive cells on right hand side\n for (int y = 0; y < height; y++) {\n if (getCell(this.width - 1, y).isAlive()) {\n grid = increaseWidthRight(grid);\n break;\n }\n }\n\n //Check for alive cells on left side\n for (int y = 0; y < height; y++) {\n if (getCell(0, y).isAlive()) {\n grid = increaseWidthLeft(grid);\n break;\n }\n }\n\n // Check for alive cells at bottom\n for (int x = 0; x < width; x++) {\n if (getCell(x, this.height - 1).isAlive()) {\n grid = increaseHeightBottom(grid);\n break;\n }\n }\n\n //Check for alive cells at top\n for (int x = 0; x < width; x++) {\n if (getCell(x, 0).isAlive()) {\n grid = increaseHeightTop(grid);\n break;\n }\n }\n\n }", "public void getPossibleMoves() { \n\t\t\tsuper.getPossibleMoves();\n\t\t\tfor (int i = 0; i < Math.abs(xrange); i++) {\n\t\t\t\tif (currentx + xrange - ((int) Math.pow(-1,color)*i) >= 0) { \n\t\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + xrange - ((int) Math.pow(-1,color)*i) ][currenty]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( currentx - 1 >= 0 && currenty - 1 >= 0 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1].isOccupiedByOpponent()) {\t// Diagonol left space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1]);\n\t\t\t}\n\t\t\tif (currentx - 1 >= 0 && currenty + 1 <= 7 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1].isOccupiedByOpponent()) { \t//Diagonol right space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1]);\n\t\t\t}\n\t\t\t\n\t}", "public int[] findVerticalSeam() {\n\n double[][] energyMatrix = new double[width()][height()];\n int[][] matrixTo = new int[width()][height()];\n\n for(int x =0; x< width(); x++) {\n for(int y=0; y< height(); y++) {\n energyMatrix[x][y] = Double.POSITIVE_INFINITY;\n }\n }\n for(int x =0; x < width(); x++) {\n energyMatrix[x][0] = 1000;\n }\n \n for(int j=0; j< height() - 1; j++) {\n for(int i=0; i < width(); i++ ) {\n if(i>0) {\n if(energyMatrix[i-1][j+1] > energyMatrix[i][j] + energy(i-1,j+1)) {\n energyMatrix[i-1][j+1] = energyMatrix[i][j] + energy(i-1,j+1);\n matrixTo[i-1][j+1] = i;\n }\n\n }\n\n if(energyMatrix[i][j+1] > energyMatrix[i][j] + energy(i,j+1)) {\n energyMatrix[i][j+1] = energyMatrix[i][j] + energy(i,j+1);\n matrixTo[i][j+1] = i;\n }\n \n\n if(i < width()-1) {\n if(energyMatrix[i+1][j+1] > energyMatrix[i][j] + energy(i+1,j+1)) {\n energyMatrix[i+1][j+1] = energyMatrix[i][j] + energy(i+1,j+1);\n matrixTo[i+1][j+1] = i;\n }\n }\n }\n }\n \n double minEnergy = Double.POSITIVE_INFINITY;\n int minEnergyX = -1;\n for(int w =0; w < width() ; w++) {\n if(energyMatrix[w][height()-1] < minEnergy) {\n minEnergyX = w;\n minEnergy = energyMatrix[w][height() - 1];\n }\n }\n\n int[] seam = new int[height()];\n seam[height() -1] = minEnergyX;\n int prevX = matrixTo[minEnergyX][height() - 1];\n\n for(int h = height() - 2; h >= 0 ; h--) {\n seam[h] = prevX;\n prevX = matrixTo[prevX][h];\n }\n return seam;\n \n }", "private Cell getSnowballTarget() {\n Cell[][] blocks = gameState.map;\n int mostWormInRange = 0;\n Cell chosenCell = null;\n\n for (int i = currentWorm.position.x - 5; i <= currentWorm.position.x + 5; i++) {\n for (int j = currentWorm.position.y - 5; j <= currentWorm.position.y + 5; j++) {\n if (isValidCoordinate(i, j)\n && euclideanDistance(i, j, currentWorm.position.x, currentWorm.position.y) <= 5) {\n List<Cell> affectedCells = getSurroundingCells(i, j);\n affectedCells.add(blocks[j][i]);\n int wormInRange = 0;\n for (Cell cell : affectedCells) {\n for (Worm enemyWorm : opponent.worms) {\n if (enemyWorm.position.x == cell.x && enemyWorm.position.y == cell.y\n && enemyWorm.roundsUntilUnfrozen == 0 && enemyWorm.health > 0)\n wormInRange++;\n }\n for (Worm myWorm : player.worms) {\n if (myWorm.position.x == cell.x && myWorm.position.y == cell.y && myWorm.health > 0)\n wormInRange = -5;\n }\n }\n if (wormInRange > mostWormInRange) {\n mostWormInRange = wormInRange;\n chosenCell = blocks[j][i];\n }\n }\n }\n }\n\n return chosenCell;\n }", "private Location[] overrunsTop () {\n Location nextLocation;\n Location nextCenter;\n \n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == THREE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(getX(), 0);\n nextCenter = new Location(getX(), myCanvasBounds.getHeight());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = FULL_TURN_DEGREES - getHeading();\n if (getHeading() < THREE_QUARTER_TURN_DEGREES) {\n angle = -(getHeading() - HALF_TURN_DEGREES);\n }\n angle = Math.toRadians(angle);\n nextLocation = new Location(getX() + getY() / Math.tan(angle), 0);\n nextCenter = new Location(getX() + getY() / Math.tan(angle),\n myCanvasBounds.getHeight());\n \n // eliminates race condition - if next location overruns left/right AND top/bottom it checks\n // to see which is overrun first and corrects\n if (nextLocation.getX() > myCanvasBounds.getWidth())\n // right\n return overrunRight();\n else if (nextLocation.getX() < 0) // left\n return overrunLeft();\n \n return new Location[] { nextLocation, nextCenter };\n }", "private void completeGameBoard() {\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < column; j++) {\n if (game[i][j].equals(open)) {\n int replaceOpen = getNearbyMines(i, j); //calls to get nearby mines\n game[i][j] = String.valueOf(replaceOpen);\n }\n }\n }\n }" ]
[ "0.58357865", "0.5811127", "0.5702922", "0.5697034", "0.56463784", "0.5558136", "0.5552624", "0.5530122", "0.54909664", "0.548597", "0.5453517", "0.5452944", "0.54341537", "0.54073006", "0.5377038", "0.53568465", "0.5353041", "0.5343741", "0.53074414", "0.5303391", "0.5301228", "0.529603", "0.5294595", "0.52893597", "0.5279172", "0.5277935", "0.5268526", "0.5264694", "0.5256404", "0.5236257", "0.52330106", "0.52169037", "0.5207862", "0.5206466", "0.52000314", "0.5189758", "0.5183693", "0.5180277", "0.5157009", "0.51539844", "0.51498663", "0.51329356", "0.51268804", "0.51247454", "0.51184523", "0.5117231", "0.51168823", "0.5109759", "0.51069283", "0.50993705", "0.50960726", "0.50935334", "0.5085919", "0.5085913", "0.5080271", "0.5073267", "0.5072979", "0.5065224", "0.5062725", "0.50623137", "0.5062274", "0.5056226", "0.50542533", "0.5038947", "0.50376266", "0.5036938", "0.5035391", "0.50348836", "0.50337887", "0.50281", "0.50269675", "0.50220376", "0.5021215", "0.5018334", "0.5017814", "0.5011586", "0.50112045", "0.50044155", "0.4998854", "0.49962884", "0.49949282", "0.49897158", "0.49877137", "0.49866435", "0.49861252", "0.49835488", "0.49780625", "0.49777633", "0.49755004", "0.49726373", "0.49678108", "0.49668452", "0.49643946", "0.49643937", "0.49604332", "0.49585918", "0.4957836", "0.4952615", "0.49484813", "0.49448818" ]
0.6781615
0
/ Build Iron Curtain
private String buildIC() { List<Integer> emptyCellsPos = new ArrayList<Integer>(); for(int i = 0; i < gameHeight; i++) { if (!myLaneInfo.get(i).get(3).isEmpty()) { emptyCellsPos.add(i); } } if (emptyCellsPos.isEmpty()) { return doNothingCommand(); } int y = getRandomElementOfList(emptyCellsPos); return IRONCURTAIN.buildCommand(getRandomElementOfList(myLaneInfo.get(y).get(3)),y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IronArmour()\n {\n name = \"iron armour\";\n hitpoints = 10;\n damageBlocked = 5;\n }", "public void build()\n {\n\t\tPoint3d loc;\n\t\n\t\tcomputeFPS(0);\n\t\n\t\t// Make random number generator\n\t\tif (seed == -1) {\n\t\t seed = System.currentTimeMillis() % 10000;\n\t\t System.out.println(\"Seed value: \" + seed);\n\t\t}\n\t\trgen = new Random(seed);\n\t\n\t\t// Create empty scene\n\t\tobstacles = new Vector<Obstacle>();\n\t\tcritters = new Vector<Critter>();\n\t\n\t\t// ---------------\n\n // Create a couple of trees, one big and one smaller\n obstacles.addElement(new Tree(rgen, 5, 6, 4.5f, 0.4f, 0.0f, 0.0f));\n obstacles.addElement(new Tree(rgen, 4, 6, 2.5f, 0.15f, 8.0f, -5.0f));\n\n // Create a few rocks\n obstacles.addElement(new Rock(rgen, 4, 2, 2, 1));\n obstacles.addElement(new Rock(rgen, 3, 4, 8, 1));\n obstacles.addElement(new Rock(rgen, 3, 7, 2, 2));\n obstacles.addElement(new Rock(rgen, 2, -2.6, -9, 2));\n obstacles.addElement(new Rock(rgen, 4, -2, -3, 1));\n obstacles.addElement(new Rock(rgen, 3, -2, -1.11, 1));\n \n // Create the main bug\n mainBug = new Bug(rgen, 0.4f, -1, 1, 0.1f, 0.0f);\n critters.addElement(mainBug);\n \n // baby critters\n critters.addElement(new Bug(rgen, 0.1f, -5, 6, 0.1, 0.0f));\n critters.addElement(new Bug(rgen, 0.15f, -7, -6, 0.1, 0.0f));\n critters.addElement(new Bug(rgen, 0.2f, -8, 1, 0.1, 0.0f));\n \n //predator\n predator = new Predator(rgen, 0.3f, -9, 9, 0, 0);\n critters.addElement(predator);\n \n \n goal = new Point3d(rgen.nextDouble()*5, rgen.nextDouble()*5, 0);\n target = 0;\n\n\t\t// Reset computation clock\n\t\tcomputeClock = 0;\n }", "public Building (Pixmap image,\n Location3D center,\n Dimension size,\n Sound sound,\n int playerID,\n int health,\n double buildTime) {\n super(image, center, size, sound, playerID, MAXHEALTH, buildTime);\n myRallyPoint = new Location3D(getWorldLocation().getX(), getWorldLocation().getY() + 150, 0);\n \n }", "@Override\n public void run() {\n ElapsedTime time = new ElapsedTime();\n time.reset();\n sleep(3000);\n sh.hitRing();\n sleep(600);\n sh.hitRing();\n sleep(600);\n sh.hitRing();\n sleep(600);\n //sh.pivotStop.setPosition(.55);\n sh.hitRing();\n sleep(500);\n //sh.pivotDown();\n sh.hitRing();\n sleep(500);\n sh.withdraw();\n sh.lift.setPower(0);\n sh.lift.setPower(0);\n wobble.wobbleUp();\n sh.pivotStop.setPosition(1);\n loop.end();\n\n\n }", "public void lightBuild() {\n buildPawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }", "@Override\n\tpublic void pintar() {\n\t\n\t\tapp.image(water, this.px, this.py);\n\t\t\n\t}", "public void Boom()\r\n {\r\n image1 = new GreenfootImage(\"Explosion1.png\");\r\n image2 = new GreenfootImage(\"Explosion2.png\");\r\n image3 = new GreenfootImage(\"Explosion3.png\");\r\n image4 = new GreenfootImage(\"Explosion4.png\");\r\n image5 = new GreenfootImage(\"Explosion5.png\");\r\n image6 = new GreenfootImage(\"Explosion6.png\");\r\n setImage(image1);\r\n\r\n }", "public void usa(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(192,0,11);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,0,67);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n //green\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n //green\n fill(192,0,11);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n }", "public void act() {\n if (System.currentTimeMillis() - lastTime > 5000) {\n lastTime = System.currentTimeMillis();\n int y = (int)(Math.random() * ((BackGround1.height-30)+1)+30);\n int x = (int)(Math.random() * ((BackGround1.width-15)+1)+15);\n addObject(new Coin(),x ,y);\n }\n }", "public void act() \n {\n age += 1;\n \n RandomTerrain world = (RandomTerrain)getWorld();\n \n int centreX = getX();\n \n int leftX = centreX - WHEEL_BASE;\n int rightX = centreX + WHEEL_BASE;\n \n int leftY = world.getTerrainHeight(leftX) - WHEEL_RADIUS;\n int rightY = world.getTerrainHeight(rightX) - WHEEL_RADIUS;\n \n double angle = Math.atan2(rightY - leftY, WHEEL_BASE * 2);\n \n /*\n {\n int midY = (leftY + rightY) / 2;\n leftY = midY + (int)(-WHEEL_BASE * Math.sin(angle));\n rightY = midY + (int)(WHEEL_BASE * Math.sin(angle));\n }\n */\n \n exactX += velocity * Math.cos(Math.max(-Math.PI/4, Math.min(Math.PI/4, angle)));\n \n setLocation((int)exactX, (leftY + rightY) / 2);\n \n GreenfootImage img = new GreenfootImage(WHEEL_BASE * 3, WHEEL_BASE * 3);\n img.setColor(java.awt.Color.RED);\n \n int leftWheelX = (img.getWidth()/2) - WHEEL_BASE;\n int rightWheelX = (img.getWidth()/2) + WHEEL_BASE;\n int leftWheelY = leftY - getY() + (img.getHeight()/2);\n int rightWheelY = rightY - getY() + (img.getHeight()/2);\n \n drawWheel(img, leftWheelX, leftWheelY);\n drawWheel(img, rightWheelX, rightWheelY);\n \n int perpX = (int)(WHEEL_BASE * Math.cos(angle - Math.PI/2));\n int perpY = (int)(WHEEL_BASE * Math.sin(angle - Math.PI/2));\n \n int[] xs = new int[] {leftWheelX, leftWheelX + perpX, rightWheelX + perpX, rightWheelX};\n int[] ys = new int[] {leftWheelY, leftWheelY + perpY, rightWheelY + perpY, rightWheelY};\n \n img.fillPolygon(xs, ys, 4);\n \n setImage(img);\n \n if ((exactX < 0 && velocity < 0 )|| (exactX >= getWorld().getWidth() && velocity > 0))\n {\n getWorld().removeObject(this);\n }\n }", "public void crown();", "public static void shovelSnow() {\n currentBackground.getSnow().shovelSnow(currentShovel.getShovelPower(),\n currentBackground.getSnowFall());\n }", "public void act()\r\n {\n if (Greenfoot.getRandomNumber(1000)< flyRate)\r\n {\r\n addObject(new Fly(), getWidth(), Greenfoot.getRandomNumber(300));\r\n //flyRate++;\r\n }\r\n }", "public void act()\n {\n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Cabbage(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Eggplant(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Onion(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(300) < 3)\n {\n addObject(new Pizza(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(400) < 3)\n {\n addObject(new Cake(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(400) < 3)\n {\n addObject(new Icecream(), Greenfoot.getRandomNumber(600), 0);\n }\n countTime();\n }", "@Override\n void planted() {\n super.planted();\n TimerTask Task = new TimerTask() {\n @Override\n public void run() {\n\n for (Drawable drawables : gameState.getDrawables()) {\n if (drawables instanceof Zombie) {\n int distance = (int) Math.sqrt(Math.pow((drawables.x - x), 2) + Math.pow((drawables.y - y), 2));\n if (distance <= explosionradious) {\n ((Zombie) drawables).hurt(Integer.MAX_VALUE);\n }\n }\n }\n\n life = 0;\n }\n\n };\n\n Timer timer = new Timer();\n timer.schedule(Task, 2000);\n }", "private boolean checkGreedyIronCurtain() {\r\n return (myself.health < 30 || enTotal.get(0) >= 8 || opponent.isIronCurtainActive || this.myTotal.get(0) < this.enTotal.get(0));\r\n }", "private void aimlessScout() {\n\t\ttargetFlower = null;\n\t\t// if bee is sufficiently far from flower, look for other flowers\n\t\tif((clock.time - tempTime) > 0.15) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying\n\t\telse{\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\t//energy -= exhaustionRate;\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "private void rocketLaunch2() {\n AnimatorSet launch = new AnimatorSet();\n ObjectAnimator y = ObjectAnimator.ofFloat(cool_rocket, \"translationY\", -2000);\n ObjectAnimator x = ObjectAnimator.ofFloat(cool_rocket, \"translationX\", 1500);\n launch.playTogether(x,y);\n launch.setInterpolator(new LinearInterpolator());\n launch.setDuration(10000);\n launch.start();\n }", "public PokeSceneWithBlastoiseCharizard() {\n BackgroundImage blastoise = new BackgroundImage(\"blastoise.png\", 350, 80, 300);\n BackgroundImage charizard = new BackgroundImage(\"charizard.png\", 400, 800, 300);\n\n sceneNodes.getChildren().add(blastoise);\n sceneNodes.getChildren().add(charizard);\n }", "public void syria(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(206,17,38);//red\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(0);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,122,61);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,122,61);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,122,61);//green\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(206,17,38);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(0);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n\n fill(206,17,38);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "public void uk(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings--england\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n noStroke();\n fill(255);\n rect(15,286,74,20);\n rect(212,284,74,20);\n rect(48,248,20,74);\n rect(233,248,20,74);\n quad(26,272,35,260,83,312,72,320);\n quad(262,260,272,272,229,312,220,318);\n quad(25,318,38,328,85,278,75,263);\n quad(264,324,280,316,228,262,214,274);\n\n fill(207,20,43);\n rect(51,248,15,74);\n rect(235,247,15,74);\n rect(15,289,74,15);\n rect(211,286,74,15);\n\n stroke(1);\n fill(0);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(0,36,125);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //gray\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n\n fill(207,20,43);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n fill(0,36,125);\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n fill(200);\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(0,36,125);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n\n fill(0,36,125);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "private void drawHeart2 (float sx, float sy, float sz, Appearance[] app)\n {\n\tfloat x, y, z, r;\n \n BranchGroup tBG = new BranchGroup();\n\ttBG.setCapability (BranchGroup.ALLOW_DETACH);\n\n System.out.println(\"Aqui\");\n \n\tx = sx+0f; y = sy+0.04f; z = sz+0f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[0]);\n\t//tBG.addChild (makeText (new Vector3d (sx+0,sy+1.1,sz+0), \"AP\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[1]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz+1.5), \"IS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[2]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz+1.5), \"IL\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[3]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz+0.5), \"SI\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[4]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz+0.5), \"LI\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[5]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz-0.5), \"SA\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[6]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz-0.5), \"LA\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[7]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz-1.5), \"AS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[8]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz-1.5), \"AL\"));\n\n\tsceneBG.addChild (tBG);\n }", "public void act() \n {\n gravity();\n animate();\n }", "public Critter(){\n\tthis.x_location = (int) (Math.random()*99);\n\tthis.y_location = (int) (Math.random()*99);\n\tthis.wrap();\n\t}", "public Boss() {\n\t\tlife = 3;\n\t\timage = new Image(\"/Model/boss3.png\", true);\n\t\tboss = new ImageView(image);\n\t\tRandom r = new Random();\n\t\tboss.setTranslateX(r.nextInt(900));\n\t\tboss.setTranslateY(0);\n\t\tisAlive = true;\n\t}", "@Override\n public void execute() {\n //\"Making dough\"\n Component pastryDough = ctx.widgets.component(1371,44).component(5);\n Component mix = ctx.widgets.component(1370, 38);\n\n //Makes sure that pastry dough is highlighted, if not it clicks it\n if(pastryDough.textureId() != 15201) {\n ctx.widgets.component(1371, 44).component(4).click();\n }\n\n ctx.input.send(\"{VK_SPACE}\");\n ctx.backpack.select().id(ItemIds.PASTRY_DOUGH);\n int doughCountBefore = ctx.backpack.count();\n\n Condition.sleep(Random.nextInt(500,1500));\n Condition.wait(new Callable<Boolean>() {\n public Boolean call() throws Exception {\n System.out.println(\"Within Loop...\");\n return !ctx.widgets.component(1251, 0).component(0).visible();\n }\n }, 1000, 19);\n\n ctx.backpack.select().id(ItemIds.PASTRY_DOUGH);\n Vars.PASTRY_DOUGH_MIXED += ctx.backpack.count() - doughCountBefore;\n System.out.println(\"We have made it, created pastry dough.\");\n\n }", "private void drawHeart (float sx, float sy, float sz, Appearance[] app)\n {\n\tfloat x, y, z, r;\n\n BranchGroup tBG = new BranchGroup();\n\ttBG.setCapability (BranchGroup.ALLOW_DETACH);\n\n\tx = sx+0f; y = sy+0.04f; z = sz+0f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[0]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+0,sy+1.1,sz+0), \"AP\"));\n\t\n\tx = sx-0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[1]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz+1.5), \"IS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[2]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz+1.5), \"IL\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[3]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz+0.5), \"SI\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[4]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz+0.5), \"LI\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[5]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz-0.5), \"SA\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[6]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz-0.5), \"LA\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[7]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz-1.5), \"AS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[8]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz-1.5), \"AL\"));\n\n\tsceneBG.addChild (tBG);\n }", "public gameWorld()\n { \n // Create a new world with 600x600 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n addObject(new winSign(), 310, 300);\n addObject(new obscureDecorative(), 300, 400);\n addObject(new obscureDecorative(), 300, 240);\n \n for(int i = 1; i < 5; i++) {\n addObject(new catchArrow(i * 90), 125 * i, 100);\n }\n for (int i = 0; i < 12; i++) {\n addObject(new damageArrowCatch(), 50 * i + 25, 50); \n }\n \n \n //Spawning Interval\n\n if(timerInterval >= 10) {\n arrowNumber = Greenfoot.getRandomNumber(3);\n }\n if(arrowNumber == 0) {\n addObject(new upArrow(directionOfArrow[0], imageOfArrow[0]), 125, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 1) {\n addObject(new upArrow(directionOfArrow[1], imageOfArrow[1]), 125 * 2, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 2) {\n addObject(new upArrow(directionOfArrow[2], imageOfArrow[2]), 125 * 3, 590);\n arrowNumber = 5;\n }\n if( arrowNumber == 3) {\n addObject(new upArrow(directionOfArrow[3], imageOfArrow[3]), 125 * 4, 590);\n arrowNumber = 5;\n }\n \n \n\n \n }", "private void yellow(){\n\t\tthis.arretes_fY();\n\t\tthis.coins_fY();\n\t\tthis.coins_a1Y();\n\t\tthis.coins_a2Y();\n\t\tthis.aretes_aY();\n\t\tthis.cube[49] = \"Y\";\n\t}", "public void lookAround() {\n\t\t\tdisplay(\"The room is full of gold!\");\n\t\t}", "public Stage1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 900, 1);\n \n GreenfootImage image = getBackground();\n image.setColor(Color.BLACK);\n image.fill();\n star();\n \n \n \n //TurretBase turretBase = new TurretBase();\n playerShip = new PlayerShip();\n scoreDisplay = new ScoreDisplay();\n addObject(scoreDisplay, 100, 50);\n addObject(playerShip, 100, 450);\n \n }", "public void act() \n {\n EggFactory eggFactory = new EggFactory();\n \n move(4);\n int random = Greenfoot.getRandomNumber(5000);\n if((random>200 & random<300) || ((Farm)getWorld()).atWorldEdge(this))\n {\n turn(180);\n getImage().mirrorVertically();\n move(4);\n \n }\n\n if( Greenfoot.getRandomNumber(100) ==0)\n {\n\n Farm farm = (Farm)getWorld();\n Egg egg = null; \n int eggPicker = Greenfoot.getRandomNumber(80);\n //DropEggStrategy dropEgg = new DropEggStrategy(); //Strategy pattern\n\n IEggStrategy whiteStrategy = new WhiteEggStrategy(eggFactory);\n IEggStrategy blackStrategy = new BlackEggStrategy(eggFactory);\n IEggStrategy goldenStrategy = new GoldenEggStrategy(eggFactory);\n \n DropEggContext context = new DropEggContext();\n \n if(eggPicker >= 50 && eggPicker <= 60){\n \n context.setIEggStrategy(goldenStrategy);\n egg = context.dropEgg();\n getWorld().addObject(egg, this.getX(), this.getY()+45);\n }\n else if(eggPicker >= 60 && eggPicker <= 70){\n\n context.setIEggStrategy(blackStrategy);\n egg = context.dropEgg();\n getWorld().addObject(egg, this.getX(), this.getY()+45);\n }\n else{\n context.setIEggStrategy(whiteStrategy);\n egg = context.dropEgg();\n getWorld().addObject(egg, this.getX(), this.getY()+45);\n }\n \n egg.register(farm.getLifeObserver());//register life creator observer into egg subject \n\n \n\n }\n\n }", "private Node generateView() {\n Text text = new Text(\"Click to\\nextinguish!\");\n text.setFont(Font.font(Font.getDefault().getFamily(), FontWeight.BOLD, Font.getDefault().getSize()));\n text.setTextAlignment(TextAlignment.CENTER);\n text.setPickOnBounds(false);\n text.setMouseTransparent(true);\n\n VBox box = new VBox(5.0);\n\n AnimationChannel animChannel = new AnimationChannel(FXGL.image(\"flames.png\"), 4, 20, 20,\n Duration.seconds(ANIM_TIME), 0, 3);\n AnimatedTexture texture = new AnimatedTexture(animChannel).loop();\n texture.setFitWidth(SIZE);\n texture.setFitHeight(SIZE);\n texture.setSmooth(false);\n texture.setPickOnBounds(true);\n texture.setOnMousePressed(pEvt -> {\n FXGL.play(\"sizzle.wav\");\n FXGL.removeUINode(box);\n mCount--;\n if (mCount <= 0) {\n onCompleted();\n }\n pEvt.consume();\n });\n\n // Wrap in entity so animation plays\n mEntity = FXGL.entityBuilder().view(texture).buildAndAttach();\n\n box.getChildren().addAll(text, texture);\n box.setAlignment(Pos.CENTER);\n box.setPickOnBounds(false);\n\n // Fix width for accurate location generation\n box.setMinWidth(SIZE * 2.0);\n box.setMaxWidth(SIZE * 2.0);\n box.setPrefWidth(SIZE * 2.0);\n\n return box;\n }", "public void makeCyan() {\n lastHit = System.currentTimeMillis();\n isCyan = true;\n ((Geometry)model.getChild(\"Sphere\")).getMaterial().setColor(\"Color\", ColorRGBA.Cyan);\n }", "@Override\n\tprotected void buildCircuit() {\n\t\tthis.circuit.add(new Point2f(97, -98));\n\t\tthis.circuit.add(new Point2f(-3, -98));\n\t\tthis.circuit.add(new Point2f(-3, -2));\n\t\t\n\t\t// U-turn (step 2)\n\t\tthis.circuit.add(new Point2f(-111, -2));\n\t\tthis.circuit.add(new Point2f(-111, 2));\n\t\t\n\t\t// Semi-Loop, bottom-left block (step 3)\n\t\tthis.circuit.add(new Point2f(-3, 2));\n\t\tthis.circuit.add(new Point2f(-3, 106));\n\t\tthis.circuit.add(new Point2f(97, 106));\n\t}", "public void act()\r\n {\n \r\n if (Background.enNum == 0)\r\n {\r\n length = Background.length;\r\n width = Background.width;\r\n getWorld().addObject (new YouWon(), length / 2, width / 2);\r\n \r\n //long lastAdded2 = System.currentTimeMillis();\r\n //long curTime3 = System.currentTimeMillis();\r\n //long curTime3 = System.currentTimeMillis();\r\n //long seconds = curTime3 / 1000;\r\n //sleep = 3;\r\n //try {\r\n //TimeUnit.SECONDS.sleep(sleep);\r\n //} catch(InterruptedException ex) {\r\n //Thread.currentThread().interrupt();\r\n //}\r\n //Greenfoot.delay(3);\r\n //long curTime3 = System.currentTimeMillis();\r\n //long secs2 = curTime3 / 1000;\r\n //long curTime4;\r\n //long secs3;\r\n //do\r\n //{\r\n //getWorld().addObject (new YouWon(), length / 2, width / 2);\r\n //curTime4 = System.currentTimeMillis();\r\n //secs3 = curTime3 / 1000;\r\n //} while (curTime4 / 1000 < curTime3 / 1000 + 3);\r\n //if (System.currentTimeMillis()/1000 - 3 >= secs2)\r\n //{\r\n //do\r\n //{\r\n pause(3000);\r\n Actor YouWon;\r\n YouWon = getOneObjectAtOffset(0, 0, YouWon.class);\r\n World world;\r\n world = getWorld();\r\n world.removeObject(this);\r\n Background.xp += 50;\r\n Background.myGold += 100;\r\n if (Background.xp >= 50 && Background.xp < 100){\r\n Background.myLevel = 2;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 100 && Background.xp < 200){\r\n Background.myLevel = 3;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 200 && Background.xp < 400){\r\n Background.myLevel = 4;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 400 && Background.xp < 800){\r\n Background.myLevel = 5;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 800 && Background.xp < 1600){\r\n Background.myLevel = 6;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 1600 && Background.xp < 3200){\r\n Background.myLevel = 7;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 3200 && Background.xp < 6400){\r\n Background.myLevel = 8;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 6400 && Background.xp < 12800){\r\n Background.myLevel = 9;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 12800){\r\n Background.myLevel = 10;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n }\r\n //curTime3 = System.currentTimeMillis();\r\n //secs2 = curTime3 / 1000;\r\n //index2++;\r\n //Greenfoot.setWorld(new YouWon());\r\n //lastAdded2 = curTime3;\r\n //}\r\n //} while (index2 <= 0);\r\n }\r\n }", "Ground(Sprite sprite) {Collect.Hit(\"BoardFactory.java\",\"Ground(Sprite sprite)\");this.background = sprite; Collect.Hit(\"BoardFactory.java\",\"Ground(Sprite sprite)\", \"3015\");}", "@Override\n\tpublic Cup getCup() {\n\t\treturn new IronCup();\n\t}", "public Evolver(int width, int height)\n {\n\tsuper(width,height);\n\tsetBackground(Color.white);\n\n\ttimer = null;\n\tmodelSpeed(50);\n\taddMouseListener(new smallMouseListener());\n\taddMouseMotionListener(new smallMouseMotionListener());\n\tup_color = true;\n\t\n }", "private void launch(){\r\n \r\n //Acceleration is zero at time = 0\r\n double acc = 0.0;\r\n //dt is the incremental change in time, which is used to update rocket performance characteristics\r\n double dt = .01;\r\n //time\r\n double t;\r\n //Change in mass is initial mass - final mass. This is the amount of fuel that was burned.\r\n double dmass = initMass - finalMass;\r\n //The mass is the initial mass at time = 0.\r\n double mass = initMass;\r\n \r\n //From time = 0 until the motor burns out (Boost Phase)\r\n for(t = 0.0; t<=burnTime; t=t+dt){\r\n \r\n //add current time, velocity, height and acceleration to respective lists.\r\n time.add((int)(t*100));\r\n v.add(velocity);\r\n h.add(height);\r\n a.add(acc);\r\n \r\n //Update acceleration using net Force divded by current mass. Drag changes with velocity\r\n acc = (thrust - mass*9.81 - .5*airDensity*dragCoeff*refArea*velocity*velocity)/mass;\r\n \r\n //Acceleration will never be negative during boost.\r\n if(acc < 0)\r\n acc = 0;\r\n \r\n //Update velocity, height and mass for the time increment\r\n velocity += acc*dt;\r\n height += velocity*dt + .5*acc*dt*dt;\r\n mass = mass - dmass/burnTime*dt;\r\n }\r\n \r\n //Max velocity is the velocity at burn out\r\n maxVelocity = velocity;\r\n \r\n //While the velocity is positive, the model rocket will remain in coast phase moving upward. Mass will remain constant.\r\n while(velocity >0){\r\n //Increment time, update acceleration, velocity and height... then add them to their respective lists\r\n t += dt;\r\n acc = ( - mass*9.81 - .5*airDensity*dragCoeff*refArea*velocity*velocity)/mass;\r\n velocity += acc*dt;\r\n height +=velocity*dt + .5*acc*dt*dt;\r\n time.add((int)(t*100));\r\n h.add(height);\r\n v.add(velocity);\r\n a.add(acc);\r\n }\r\n //Create a graph of the performance based on the lists\r\n graph = new RocketGraph(a, v, h, time, burnTime, t, formatDouble(maxVelocity), formatDouble(h.get(h.size()-1)));\r\n }", "@Override\r\n\tprotected void draw() {\n\t\tgoodCabbage = new Oval(center.x - CABBAGE_RADIUS, center.y\r\n\t\t\t\t- CABBAGE_RADIUS, 2 * CABBAGE_RADIUS, 2 * CABBAGE_RADIUS,\r\n\t\t\t\tColor.red, true);\r\n\t\twindow.add(goodCabbage);\r\n\t}", "public void newlevel() {\n\t\tblack = new Background(COURT_WIDTH, COURT_HEIGHT); // reset background\n\t\tcannon = new Cannon(COURT_WIDTH, COURT_HEIGHT); // reset cannon\n\t\tdeadcannon = null;\n\t\tbullet = null;\n\t\tshot1 = null;\n\t\tshot2 = null;\n\t\t// reset top row\n\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\talien1[i] = new Alien(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien1[i].pos_x = alien1[i].pos_x + 30*i;\n\t\t\talien1[i].v_x = level + alien1[i].v_x;\n\t\t}\n\t\t// reset second row\n\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\talien2[i] = new Alien2(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien2[i].pos_x = alien2[i].pos_x + 30*i;\n\t\t\talien2[i].v_x = level + alien2[i].v_x;\n\t\t}\n\t\t// reset third row\n\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\talien3[i] = new Alien3(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien3[i].pos_x = alien3[i].pos_x + 30*i;\n\t\t\talien3[i].v_x = level + alien3[i].v_x;\n\t\t}\n\t}", "private void render()\n\t{\n\t\ttheta = (float) (velocity.heading() + Math.toRadians(90.0));\n\n\t\t// se baser sur le temps écoulé depuis le lancement\n\t\tf = parent.frameCount / 4;\n\t\tint fi = f + 1;\n\t\tfloat x = fi % DIM * W;\n\t\tfloat y = fi / DIM % DIM * H;\n\n\t\tparent.pushMatrix();\n\t\tparent.translate(location.x, location.y);\n\t\tparent.rotate(theta);\n\t\tparent.beginShape();\n\t\tparent.texture(spritesheet);\n\t\tparent.vertex(0, 0, x, y);\n\t\tparent.vertex(100, 0, x + W, y);\n\t\tparent.vertex(100, 100, x + W, y + H);\n\t\tparent.vertex(0, 100, x, y + H);\n\t\tparent.endShape();\n\t\tparent.popMatrix();\n\t}", "@Override\n public void hero_dies() {\n SoundPlayer.playHeroDies();\n this.stop();\n\n get_hero().setPosition(PLAYER_START_POSITION);\n start();\n\n // setting every flower to its original position\n //reason: hero can knock the flower out of the pipe when it hits it\n for (int i = 0; i < get_pipes().size(); i++) {\n if (get_pipes().get(i).with_flower()) {\n get_pipes().get(i).get_flower().setLinearVelocity(new Vec2(0f, 0f));\n get_pipes().get(i).get_flower().setPosition(get_pipes().get(i).get_flower().get_original_position());\n }\n }\n \n for (int i = 0; i < get_fire_rods().size(); i++) {\n get_fire_rods().get(i).reset_position();\n }\n get_hero().addLife(-1);\n if (get_hero().get_life() < 1){\n getGameController().gameOver();\n //get_sound_player().stop_level_two_music();\n }\n }", "Wall(Sprite sprite) {Collect.Hit(\"BoardFactory.java\",\"Wall(Sprite sprite)\");this.background = sprite; Collect.Hit(\"BoardFactory.java\",\"Wall(Sprite sprite)\", \"2420\");}", "@Override\n public void setup() {\n background(bgColor);\n \n \n \nfor (int i = 0; i < 5; i++) {\nfloat\tyt=height/2+width/2-(i*60);\nfloat\tht = map(y,height/2-100,height/2+200,0,40);\nfloat\t xt = 400 - 200;\n\t float wt = 2 * 200;\nRectangle r = new Rectangle(xt,yt,wt,ht);\nmissingSun.add(r);\nfill(bgColor);\nrect(xt,yt, wt,ht);\n}\n\n \n }", "private void makePlay() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\n\t\tplay = new Sprite(6, 6, 360, 379, new Image(\"file:./res/images/basketball.png\"), 1, 1000);\n\t\tplay.setLayoutX(140);\n\t\tplay.setLayoutY(190);\n\t\tplay.setScaleX(0.5);\n\t\tplay.setScaleY(0.5);\n\t\tgrid.getChildren().addAll(play);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(1000));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(play);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().playWith();\n\t\t});\n\t\tpause.play();\n\n\t}", "public void russia(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(165,0,0);//gray\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(0);//black\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(18,39,148);//blue\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //red\n fill(194,24,11);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n fill(194,24,11);\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n\n fill(194,24,11);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(160,0,0);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "private void circleCollison() {\n\t\t\n\t}", "public DumbEnemy(){\n setImage(new GreenfootImage(SPRITE_W,SPRITE_H));\n }", "public static void main(String[] args) {\n\t\tDisplay.openWorld(\"maps/pasture.map\");\n\n Display.setSize(15, 15);\n Display.setSpeed(7);\n Robot andre = new Wanderer(int i, int j);\n for(int n = 0; n<36; n++) {\n for(int k=0; k<36; k++) {\n andre.wander(); \n }\n explode();\n \n\t\t// TODO Create an instance of a Horse inside the pasture\n\t\t// TODO Have the horse wander for 36 steps with a timer of 7\n\t\t// TODO Have the horse explode()\n\t}\n\n}", "public static void launchFirewor(Player p) {\n Firework fw = (Firework) p.getWorld().spawnEntity(p.getLocation(), EntityType.FIREWORK);\n FireworkMeta fwm = fw.getFireworkMeta();\n \n //Our random generator\n Random r = new Random(); \n\n //Get the type\n int rt = r.nextInt(4) + 1;\n Type type = Type.BALL; \n if (rt == 1) type = Type.BALL;\n if (rt == 2) type = Type.BALL_LARGE;\n if (rt == 3) type = Type.BURST;\n if (rt == 4) type = Type.CREEPER;\n if (rt == 5) type = Type.STAR;\n \n //Get our random colours \n Color c1 = Color.AQUA;\n Color c2 = Color.BLACK;\n \n //Create our effect with this\n FireworkEffect effect = FireworkEffect.builder().flicker(r.nextBoolean()).withColor(c1).withFade(c2).with(type).trail(r.nextBoolean()).build();\n \n //Then apply the effect to the meta\n fwm.addEffect(effect);\n \n //Generate some random power and set it\n int rp = r.nextInt(2) + 1;\n fwm.setPower(rp);\n \n //Then apply this to our rocket\n fw.setFireworkMeta(fwm); \n\t}", "public void newCandy() {\n\t\tDebugger.print(\"Making new candy\");\n\t\tint x = (Random.nextInt(1, this.SIZE * 2) - 2);\n\t\tint y = (Random.nextInt(1, this.SIZE - 2));\n\n\t\tTile t = new Tile(x, y);\n\t\tboolean foundFreeTile = false;\n\t\twhile (!foundFreeTile) {\n\t\t\tfor (Snake snake : this.snakes) {\n\t\t\t\tif (snake != null) {\n\n\t\t\t\t\tif (snake.find(t)) {\n\t\t\t\t\t\tx = (Random.nextInt(1, this.SIZE * 2) - 1);\n\t\t\t\t\t\ty = (Random.nextInt(1, this.SIZE - 1));\n\t\t\t\t\t\tt.setX(x);\n\t\t\t\t\t\tt.setY(y);\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfoundFreeTile = true;\n\t\t}\n\t\tif (this.getGui() != null) {\n\t\t\tthis.getGui().print(\"New candy made\");\n\t\t}\n\t\tthis.setCandy(new Candy(x, y));\n\t}", "public Glow() {}", "public void sunRise()\n {\n sun.slowMoveHorizontal(180);\n sun.slowMoveVertical(-200);\n sunset1.makeVisible();\n sun.makeVisible();\n fruitRegrow();\n }", "public CubeEscape() {\n currentRoom = MapGenerator.generateRandomMap(MapGenerator.CUBE_LENGTH_HARD);\n parser = new Parser();\n finished = false; \n }", "public void effect() {\n if (course == 2) {\n //RIGHT\n x += fac;\n } else if (course == 5) {\n //LEFT\n x -= fac;\n } else {\n y = (int)(origY + fac * f * Math.tan(angle)) + offsetY;\n x = (int)(origX + fac * f) + offsetX;\n }\n boolean b = computeCell();\n\n if (b) {\n //Detect ennemy\n if (current != null) {\n Player p = current.getOccupied();\n if (p != null && p != thrower) {\n p.makeHimWait((Params.howLongBlockingMagician * 1000) / 2);\n this.destroy();\n }\n }\n }\n //Detect ennemy's cell\n if (current != null) {\n Team te = current.getOwner();\n if (te != thrower.getTeam() && current.getType() == 1) {\n current.setHp(current.getHp() - Params.archerDammage);\n if (current.getHp() <= 0) {\n current.setOwner(thrower.getTeam());\n current.setHp(thrower.getInitHP());\n }\n }\n if (current.isHeight()) {\n this.destroy();\n }\n } else {\n int bound = 10;\n //System.out.println(game.getWidth());\n if (this.x < -bound || this.x > game.getWidth() + bound || this.y < -bound ||\n this.y > game.getHeight() + bound) {\n this.destroy();\n }\n }\n\n f++;\n }", "private void paintTheImage() {\n SPainter klee = new SPainter(\"Red Cross\", 600,600);\n SRectangle rectangle = new SRectangle(500, 100);\n klee.setColor(Color.RED);\n klee.paint(rectangle);\n klee.tl();\n klee.paint(rectangle);\n }", "public void food ()\r\n {\r\n\t//local colour variable for the food container\r\n\tColor container = new Color (191, 175, 178); //black shadows\r\n\t//local variable for the label\r\n\tColor label = new Color (196, 30, 58); //cardinal\r\n\t//local variable for the fish on the container\r\n\tColor fish = new Color (30, 133, 255); //dodger blue\r\n\t//local colour variable for the fish food\r\n\tColor fishFood = new Color (131, 105, 83); //pastel brown\r\n\r\n\t//loop used to animate the food container\r\n\tfor (int x = 0 ; x < 400 ; x++)\r\n\t{\r\n\t //array of local variable of x coordinates to the fish upper tail\r\n\t int upX[] = {832 - x, 832 - x, 845 - x};\r\n\t //array of local variable of y coordinates to the fish upper tail\r\n\t int upY[] = {88, 100, 85};\r\n\t //array of local variable of x coordinates to the fish lower tail\r\n\t int bottomX[] = {832 - x, 832 - x, 845 - x};\r\n\t //array of local variable of y coordinates to the fish lower tail\r\n\t int bottomY[] = {90, 102, 105};\r\n\r\n\t c.setColor (container);\r\n\t //container\r\n\t c.fillRect (775 - x, 20, 80, 110);\r\n\r\n\t c.setColor (label);\r\n\t //label\r\n\t c.fillRect (775 - x, 45, 80, 20);\r\n\r\n\t c.setColor (Color.black);\r\n\t c.setFont (new Font (\"Calibri\", 1, 15));\r\n\t //letters\r\n\t c.drawString (\"FISH FOOD\", 775 - x, 60);\r\n\r\n\t c.setColor (Color.white);\r\n\t //mouth\r\n\t c.fillArc (794 - x, 90, 10, 9, 220, 280);\r\n\r\n\t c.setColor (fish);\r\n\t //fish body\r\n\t c.fillOval (800 - x, 80, 35, 30);\r\n\t //fish tail\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (upX, upY, 3);\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (bottomX, bottomY, 3);\r\n\r\n\t c.setColor (Color.white);\r\n\t //eye\r\n\t c.fillOval (805 - x, 85, 17, 17);\r\n\r\n\t c.setColor (Color.black);\r\n\t //inner eye\r\n\t c.fillOval (808 - x, 92, 6, 6);\r\n\r\n\t c.setColor (fishFood);\r\n\t //food\r\n\t c.fillOval (788 - x, 92, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (785 - x, 87, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (782 - x, 96, 5, 5);\r\n\r\n\t //delay\r\n\t try\r\n\t {\r\n\t\tsleep (7);\r\n\t }\r\n\t catch (Exception e)\r\n\t {\r\n\t }\r\n\r\n\t}\r\n\r\n\t//loop used to animate the fish food container going down\r\n\tfor (int x = 0 ; x < 30 ; x++)\r\n\t{\r\n\t //array of local variable of x coordinates to the fish upper tail\r\n\t int upX[] = {432, 432, 445};\r\n\t //array of local variable of y coordinates to the fish upper tail\r\n\t int upY[] = {88 - x, 100 - x, 85 - x};\r\n\t //array of local variable of x coordinates to the fish lower tail\r\n\t int bottomX[] = {432, 432, 445};\r\n\t //array of local variable of y coordinates to the fish lower tail\r\n\t int bottomY[] = {90 - x, 102 - x, 105 - x};\r\n\r\n\t c.setColor (container);\r\n\t //container\r\n\t c.fillRect (375, 20 - x, 80, 110);\r\n\r\n\t c.setColor (label);\r\n\t //label\r\n\t c.fillRect (375, 45 - x, 80, 20);\r\n\r\n\t c.setColor (Color.black);\r\n\t c.setFont (new Font (\"Calibri\", 1, 15));\r\n\t //letters\r\n\t c.drawString (\"FISH FOOD\", 382, 60 - x);\r\n\r\n\t c.setColor (Color.white);\r\n\t //mouth\r\n\t c.fillArc (394, 90 - x, 10, 9, 220, 280);\r\n\r\n\t c.setColor (fish);\r\n\t //fish body\r\n\t c.fillOval (400, 80 - x, 35, 30);\r\n\t //fish tail\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (upX, upY, 3);\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (bottomX, bottomY, 3);\r\n\r\n\t c.setColor (Color.white);\r\n\t //eye\r\n\t c.fillOval (405, 85 - x, 17, 17);\r\n\r\n\t c.setColor (Color.black);\r\n\t //inner eye\r\n\t c.fillOval (408, 92 - x, 6, 6);\r\n\r\n\t c.setColor (fishFood);\r\n\t //food\r\n\t c.fillOval (388, 92 - x, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (385, 87 - x, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (382, 96 - x, 5, 5);\r\n\r\n\t //delay\r\n\t try\r\n\t {\r\n\t\tsleep (7);\r\n\t }\r\n\t catch (Exception e)\r\n\t {\r\n\t }\r\n\r\n\t}\r\n\r\n\t//loop used to animate the fish food going down\r\n\tfor (int x = 0 ; x < 30 ; x++)\r\n\t{\r\n\t //array of local variable of x coordinates to the fish upper tail\r\n\t int upX[] = {432, 432, 445};\r\n\t //array of local variable of y coordinates to the fish upper tail\r\n\t int upY[] = {58 + x, 70 + x, 55 + x};\r\n\t //array of local variable of x coordinates to the fish lower tail\r\n\t int bottomX[] = {432, 432, 445};\r\n\t //array of local variable of y coordinates to the fish lower tail\r\n\t int bottomY[] = {60 + x, 72 + x, 75 + x};\r\n\r\n\t c.setColor (container);\r\n\t //container\r\n\t c.fillRect (375, -10 + x, 80, 110);\r\n\r\n\t c.setColor (label);\r\n\t //label\r\n\t c.fillRect (375, 15 + x, 80, 20);\r\n\r\n\t c.setColor (Color.black);\r\n\t c.setFont (new Font (\"Calibri\", 1, 15));\r\n\t //letters\r\n\t c.drawString (\"FISH FOOD\", 382, 30 + x);\r\n\r\n\t c.setColor (Color.white);\r\n\t //mouth\r\n\t c.fillArc (394, 60 + x, 10, 9, 220, 280);\r\n\r\n\t c.setColor (fish);\r\n\t //fish body\r\n\t c.fillOval (400, 50 + x, 35, 30);\r\n\t //fish tail\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (upX, upY, 3);\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (bottomX, bottomY, 3);\r\n\r\n\t c.setColor (Color.white);\r\n\t //eye\r\n\t c.fillOval (405, 55 + x, 17, 17);\r\n\r\n\t c.setColor (Color.black);\r\n\t //inner eye\r\n\t c.fillOval (408, 62 + x, 6, 6);\r\n\r\n\t c.setColor (fishFood);\r\n\t //food\r\n\t c.fillOval (388, 62 + x, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (385, 57 + x, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (382, 66 + x, 5, 5);\r\n\r\n\t //delay\r\n\t try\r\n\t {\r\n\t\tsleep (7);\r\n\t }\r\n\t catch (Exception e)\r\n\t {\r\n\t }\r\n\t}\r\n\r\n\t//loop used to animate the fish food container going out\r\n\tfor (int x = 0 ; x < 400 ; x++)\r\n\t{\r\n\t //array of local variable of x coordinates to the fish upper tail\r\n\t int upX[] = {432 + x, 432 + x, 445 + x};\r\n\t //array of local variable of y coordinates to the fish upper tail\r\n\t int upY[] = {88, 100, 85};\r\n\t //array of local variable of x coordinates to the fish lower tail\r\n\t int bottomX[] = {432 + x, 432 + x, 445 + x};\r\n\t //array of local variable of y coordinates to the fish lower tail\r\n\t int bottomY[] = {90, 102, 105};\r\n\r\n\t c.setColor (container);\r\n\t //container\r\n\t c.fillRect (375 + x, 20, 80, 110);\r\n\r\n\t c.setColor (label);\r\n\t //label\r\n\t c.fillRect (375 + x, 45, 80, 20);\r\n\r\n\t c.setColor (Color.black);\r\n\t c.setFont (new Font (\"Calibri\", 1, 15));\r\n\t //letters\r\n\t c.drawString (\"FISH FOOD\", 382 + x, 60);\r\n\r\n\t c.setColor (Color.white);\r\n\t //mouth\r\n\t c.fillArc (394 + x, 90, 10, 9, 220, 280);\r\n\r\n\t c.setColor (fish);\r\n\t //fish body\r\n\t c.fillOval (400 + x, 80, 35, 30);\r\n\t //fish tail\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (upX, upY, 3);\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (bottomX, bottomY, 3);\r\n\r\n\t c.setColor (Color.white);\r\n\t //eye\r\n\t c.fillOval (405 + x, 85, 17, 17);\r\n\r\n\t c.setColor (Color.black);\r\n\t //inner eye\r\n\t c.fillOval (408 + x, 92, 6, 6);\r\n\r\n\t c.setColor (fishFood);\r\n\t //food\r\n\t c.fillOval (388 + x, 92, 5, 5);\r\n\t c.setColor (fishFood);;\r\n\t c.fillOval (385 + x, 87, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (382 + x, 96, 5, 5);\r\n\r\n\t //delay\r\n\t try\r\n\t {\r\n\t\tsleep (7);\r\n\t }\r\n\t catch (Exception e)\r\n\t {\r\n\t }\r\n\r\n\t}\r\n }", "void sharpen();", "void sharpen();", "public void initialize() {\r\n /**********************************/\r\n //this.numOfLives=new hitevent.Counter(START_NUM_LIVES);\r\n //this.blocksCounter = new hitevent.Counter(this.levelInformation.numberOfBlocksToRemove());\r\n //this.gui = new GUI(\"jumping\", WIDTH_SCREEN, HI_SCREEN);\r\n /*****************************************/\r\n //create new point to create the edges of the screen\r\n Point p1 = new Point(-5, 20);\r\n Point p2 = new Point(-5, -5);\r\n Point p3 = new Point(WIDTH_SCREEN - 20, -5);\r\n Point p4 = new Point(-5, HI_SCREEN - 15);\r\n //an array to the blocks of the edges\r\n Block[] edges = new Block[4];\r\n //create the adges of the screen\r\n Counter[] edgeCount = new Counter[4];\r\n edgeCount[0] = new Counter(1);\r\n edges[0] = new Block(new Rectangle(p1, WIDTH_SCREEN + 20, 25), Color.RED, edgeCount[0]);\r\n edgeCount[1] = new Counter(1);\r\n edges[1] = new Block(new Rectangle(p2, 25, HI_SCREEN + 20), Color.RED, edgeCount[1]);\r\n edgeCount[2] = new Counter(1);\r\n edges[2] = new Block(new Rectangle(p3, 25, HI_SCREEN + 20), Color.RED, edgeCount[2]);\r\n edgeCount[3] = new Counter(1);\r\n edges[3] = new Block(new Rectangle(p4, WIDTH_SCREEN + 20, 25), Color.RED, edgeCount[3]);\r\n\r\n //initilize the paddle\r\n initializePaddle();\r\n //sprite collection and game evnironment\r\n SpriteCollection sprite = new SpriteCollection();\r\n GameEnvironment game1 = new GameEnvironment();\r\n\r\n //add the Background of the level to the sprite collection\r\n this.addSprite(this.levelInformation.getBackground());\r\n //create score Indicator, lives Indicator and level name\r\n ScoreIndicator scoreIndicator1 = new ScoreIndicator(score);\r\n LivesIndicator livesIndicator1 = new LivesIndicator(numOfLives);\r\n LevelIndicator levelName = new LevelIndicator(this.levelInformation.levelName());\r\n\r\n game1.addCollidable((Collidable) this.paddle);\r\n sprite.addSprite((Sprite) this.paddle);\r\n sprite.addSprite((Sprite) scoreIndicator1);\r\n sprite.addSprite((Sprite) livesIndicator1);\r\n sprite.addSprite((Sprite) levelName);\r\n\r\n //add the paddle, score Indicator, lives Indicator and level name to the game\r\n this.paddle.addToGame(this);\r\n scoreIndicator1.addToGame(this);\r\n livesIndicator1.addToGame(this);\r\n levelName.addToGame(this);\r\n\r\n //initilize the Blocks\r\n initializeBlocks();\r\n\r\n }", "public Robots(PApplet p) {\n\t\tbSpeed = 6;\n\t\tbSize = 1;\n\t\tparent = p;\n\t\tx = parent.random (bobWidth, parent.width/2 - bobWidth); // Bob starts in a random place on the screen\n\t\ty = parent.random (bobWidth,parent.width/2 - bobWidth); \n\t}", "@Override\r\n\tpublic void fly() {\n\t\t\r\n\t}", "private void cs8() {\n\t\t\t\n\t\n\t\t\tif(new Tile(3088,3092,0).matrix(ctx).reachable()){\n\t\t\t\t\n\t\t\t\tif(new Tile(3079,3084,0).distanceTo(ctx.players.local().tile())<7){\n\t\t\t\t\tMethod.interactO(9709, \"Open\", \"Door\");\n\t\t\t\t}else ctx.movement.step(new Tile(3079,3084,0));\n\t\t\t\t\n\t\t\t}else if(new Tile(3090,3092,0).distanceTo(ctx.players.local().tile())<7){\n\t\t\t\tfinal int[] bounds = {140, 108, -84, 144, -64, 136};\n\t\t\t\tGameObject gate = ctx.objects.select().id(GATEBYFISH).each(Interactive.doSetBounds(bounds)).select(Interactive.areInViewport()).nearest().poll();\n\t\t\t\tgate.interact(\"Open\",\"\");\n\t\t\t}else ctx.movement.step(new Tile(3090,3092,0));\n\t\t\t\n\t\t\t\n\t\t}", "private void turnAround() {\n d = Math.random();\n if (d < 0.1) {\n changeAppearance();\n }\n }", "private ContainerWithMostWater() {\n }", "public void act() \n {\n setImage(\"1up.png\");\n setImage(\"acrate.png\");\n setImage(\"Betacactus.png\");\n setImage(\"bullet1.png\");\n setImage(\"bullet2.png\");\n setImage(\"burst.png\");\n setImage(\"cowboy.png\");\n setImage(\"fOxen1.png\");\n setImage(\"fOxen2.png\");\n setImage(\"fOxen3.png\");\n setImage(\"fOxen4.png\");\n setImage(\"fOxenH.png\");\n setImage(\"fWagon1.png\");\n setImage(\"fWagon2.png\");\n setImage(\"fWagon3.png\");\n setImage(\"fWagon4.png\");\n setImage(\"fWagonH.png\");\n setImage(\"health.png\");\n setImage(\"indian.png\");\n setImage(\"normal.png\");\n setImage(\"oxen.png\");\n setImage(\"oxen2.png\");\n setImage(\"oxen3.png\");\n setImage(\"oxen4.png\");\n setImage(\"oxen-hit.png\");\n setImage(\"plasma.png\");\n setImage(\"rapid.png\");\n setImage(\"snake1.png\");\n setImage(\"snake2.png\");\n setImage(\"snake3.png\");\n setImage(\"snake4.png\");\n setImage(\"spread.png\");\n setImage(\"theif.png\");\n setImage(\"train1.png\");\n setImage(\"train-hit.png\");\n setImage(\"wagon.png\");\n setImage(\"wagonhit.png\");\n setImage(\"wave.png\");\n getWorld().removeObject(this);\n }", "private void reactMain_region_digitalwatch_Display_glowing_GlowOn() {\n\t\tif (sCIButtons.topRightReleased) {\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\ttimer.setTimer(this, 5, 2 * 1000, false);\n\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowDelay;\n\t\t}\n\t}", "public ProjectGame() {\n\n super(\"BulletHell\", 1200, 900);\n die = new Event();\n backgroundMusic = new SoundManagerClass();\n playButton.setPositionX(420);\n playButton.setPositionY(180);\n quitButton.setPositionX(623);\n quitButton.setPositionY(181);\n //x = 0;\n reduceLife = new Event();\n fadeOutEvent = new Event();\n PickedUpEvent = new Event();\n die.setEventType(\"playerDeath\");\n fadeOutEvent.setEventType(\"FadeOut\");\n reduceLife.setEventType(\"Collision\");\n collidedEvent = new Event();\n collidedEvent.setEventType(\"CollidedEvent\");\n throwKnife = new Event();\n throwKnife.setEventType(\"throwKnife\");\n\n\n keyIcon.setPositionX(200);\n keyIcon.setPositionY(40);\n\n knifeIcon.setPositionX(205);\n knifeIcon.setPositionY(95);\n\n currentLevel = 0;//0 = base , 3=brigham's level\n\n\n PickedUpEvent.setEventType(\"CoinPickedUp\");\n\n this.addEventListener(myQuestManager, collidedEvent.getEventType());\n\n\n background.setScaleX(5);\n background.setScaleY(5);\n\n background.setScaleX(5);\n background.setScaleY(5);\n\n\n player = new Player(\"player\", \"resources/player_sheet.png\", \"idle_right\");\n player.setSpriteSheetJson(\"resources/player_sheet.json\");\n player.setDelay(100);\n\n player.getLifeArray().get(0).setPositionX(390);\n player.getLifeArray().get(0).setPositionY(40);\n player.getLifeArray().get(1).setPositionX(420);\n player.getLifeArray().get(1).setPositionY(40);\n player.getLifeArray().get(2).setPositionX(450);\n player.getLifeArray().get(2).setPositionY(40);\n // player.setHasPhysics(true);\n keyCount = 0;\n knifeCount = 4;\n // player.setHasPhysics(true);\n\n // platform.setPositionX(50);\n // platform.setPositionY(550);\n\n\n // platform1.setPositionX(150);\n // platform1.setPositionY(150);\n\n\n player.setPositionX(550);\n player.setPositionY(700);\n\n pressE = new Sprite(\"pressE\", \"pressE.png\");\n player.addChild(pressE);\n pressE.setPositionY(-50);\n\n\n coin.setPositionY(250);\n coin.setPositionX(660);\n\n findKey.setPositionX(500);\n findKey.setPositionY(-20);\n\n getToRoom.setPositionX(500);\n getToRoom.setPositionY(-20);\n\n killTurtle.setPositionX(500);\n killTurtle.setPositionY(-20);\n\n\n //Rectangle2D rect = new Rectangle2D.Float(600,400,700,500);\n //coverList = new ArrayList<Rectangle2D>(); //list of cover sprites\n //coverList.add(rect);\n\n ///////////////////////////////////////LEVEL 0 ////////////////////////////////////////////////////////////////\n\n if (currentLevel == 0) {\n\n tutorial = new TutorialLevel1(\"Tutorial\");\n tutorial.run();\n addChild(tutorial);\n\n myLevel = new Level0(\"Room1\");\n myLevel.run();\n addChild(myLevel);\n\n\n myLevel1 = new Level1(\"Room2\");\n myLevel1.run();\n myLevel1.hide();\n addChild(myLevel1);\n\n myLevel2 = new ahmedslevel(\"Room3\", player);\n myLevel2.run();\n myLevel2.hide();\n addChild(myLevel2);\n\n myLevel3 = new BrighamLevel(\"Room4\");\n myLevel3.run();\n myLevel3.hide();\n addChild(myLevel3);\n\n level4 = new AlternatingSpikesLevel(\"Room6\");\n level4.run();\n level4.hide();\n addChild(level4);\n\n bossLevel = new BossLevel(\"Room5\", player);\n bossLevel.run();\n bossLevel.hide();\n addChild(bossLevel);\n\n\n\n tutorial.mapDoorToRoom(0,myLevel);\n myLevel.mapDoorToRoom(0, myLevel1);\n myLevel1.mapDoorToRoom(0, myLevel2);\n myLevel2.mapDoorToRoom(0, myLevel3);\n myLevel3.mapDoorToRoom(0, level4);\n level4.mapDoorToRoom(0, bossLevel);\n //myLevel3.mapDoorToRoom(0,bossLevel);\n\n\n currentRoom = tutorial;\n\n //myLevel1.mapDoorToRoom(0,myLevel2);\n\n //myLevel2.run();\n //myLevel2.hide();\n\n\n //myLevel2.mapDoorToRoom(0,myLevel3);\n //myLevel3.run();\n //myLevel3.hide();\n currentQuestObjective = 0;\n\n }\n\n if (currentLevel == 4) {\n\n\n bossLevel = new BossLevel(\"Room4\", player);\n bossLevel.run();\n currentRoom = bossLevel;\n\n\n }\n\n enemies = currentRoom.enemies;\n pickpocketEnemy = null;\n\n transitionY = 615;\n transitionYCurrent = 615;\n\n\n backgroundMusic.playSoundEffect(\"resources/oceanOperator.wav\", 100);\n\n }", "@Override\n public void setup()\n { \n background(100);\n quadrate();\n }", "protected void fallingSnow(){\r\n\t\tsnowPileImage = new Image(GameData.getRegion(\"snow\"));\r\n\t\tsnowPileImage.setWidth(Gdx.graphics.getWidth());\r\n\t\t\r\n\t\tdouble snowRatio = GameData.getRegion(\"snow\").getRegionWidth()/GameData.getRegion(\"snow\").getRegionHeight();\r\n\t\tsnowPileImage.setHeight((int)(snowPileImage.getWidth()/snowRatio));\r\n\t\tsnowPileImage.setName(SNOW_PILE_Z);\r\n\t\t\r\n\t\tfor(int i=0; i<SNOW_FLAKES_NUMBER; i++){\r\n\t\t\tstage.addActor(new Snowflake(GameData.getRegion(\"snowflake\"), 1f, true, stage));\r\n\t\t\tstage.addActor(new Snowflake(GameData.getRegion(\"snowflake\"), 0.5f, false, stage));\r\n\t\t}\r\n\t\tstage.addActor(snowPileImage);\r\n\r\n\t}", "public void levelUp() {\n\t\t\tpauseGame(500);//pause the game, play a nice song, and make more bricks!\n\t\t\tmakeBricks(12,8);\n\t\t\tlevelUp.play();\n\t\t}", "@Override\n\tpublic void build() {\n\t\tif(this.getContainer().isEmpty()){\n\t\t\tthis.addBuilding(new Building(BuildingType.CABSTAND, 150));\n\t\t\tMonopolyTheGame.getInstance().getActivePlayer().decBalance(150);\n\t\t\tsetEnabler(false);\n\t\t\t//currentSquare.setRent(currentSquare.getRent()*2);\n\t\t}else {\n\t\t\tSystem.out.println(\"You cannot bould multiple cab stands on a cab company\");\n\t\t}\n\t\t\n\t}", "private void white(){\n\t\tthis.arretes_fW();\n\t\tthis.coins_fW();\n\t\tthis.coins_a1W();\n\t\tthis.coins_a2W();\n\t\tthis.aretes_aW();\n\t\tthis.cube[4] = \"W\";\n\t}", "private final void segmentsFrameEffects() {\n\t\tif (alive) {\n\t\t\tint i;\n\t\t\t// Energy obtained through photosynthesis\n\t\t\tdouble photosynthesis = 0;\n\t\t\t_nChildren = 1;\n\t\t\t_indigo =0;\n\t\t\t_lowmaintenance =0;\n\t\t\tint fertility =0;\n\t\t\tint yellowCounter =0;\n\t\t\tint reproduceearly =0;\n\t\t\tdouble goldenage =0;\n\t\t\t_isfrozen =false;\n\t\t\tboolean trigger =false;\n\t\t\tfor (i=_segments-1; i>=0; i--) {\n\t\t\t\t// Manteniment\n\t\t\t\tswitch (getTypeColor(_segColor[i])) {\n\t\t\t\t// \tMovement\n\t\t\t\tcase CYAN:\n\t\t\t\t\tif (Utils.random.nextInt(100)<8 && useEnergy(Utils.CYAN_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\tdx=Utils.between(dx+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\tdy=Utils.between(dy+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\tdtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase TEAL:\n\t\t\t\t\tif (_geneticCode.getPassive()) {\n\t\t\t\t\t\tif (_hasdodged == false) {\n\t\t\t\t\t\t\t_dodge =true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_lowmaintenance += 0.9 * _m[i];\n\t\t\t\t\t} else \n\t\t\t\t\t if (Utils.random.nextInt(100)<8 && useEnergy(Utils.CYAN_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t dx=Utils.between(dx+12d*(x2[i]-x1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dy=Utils.between(dy+12d*(y2[i]-y1[i])/_mass, -Utils.MAX_VEL, Utils.MAX_VEL);\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+Utils.randomSign()*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Photosynthesis\n\t\t\t\tcase SPRING:\n\t\t\t\t\t if (_geneticCode.getClockwise()) {\n\t\t\t\t\t\t dtheta=Utils.between(dtheta+0.1*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t\t\t photosynthesis += Utils.SPRING_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t} else {\n\t\t\t\t\t dtheta=Utils.between(dtheta-0.1*_m[i]*FastMath.PI/_I, -Utils.MAX_ROT, Utils.MAX_ROT);\n\t\t\t\t\t photosynthesis += Utils.SPRING_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIME:\n\t\t\t\t\tif (trigger == false) {\n\t\t\t\t\t\ttrigger =true;\n\t\t\t\t\t if (_world.fastCheckHit(this) != null) {\n\t\t\t\t\t \t_crowded =true;\n\t\t\t\t\t } else {\n\t\t\t\t\t \t_crowded =false;\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\tif (_crowded == true) {\n\t\t\t\t\t photosynthesis += Utils.CROWDEDLIME_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tphotosynthesis += Utils.LIME_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase JADE:\n\t\t\t\t\t_isjade =true;\n\t\t\t\t\tphotosynthesis += Utils.JADE_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase GREEN:\n\t\t\t\t\tphotosynthesis += Utils.GREEN_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase FOREST:\n\t\t\t\t\tphotosynthesis += Utils.FOREST_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase BARK:\n\t\t\t\t\tphotosynthesis += Utils.BARK_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase GRASS:\n\t\t\t\t\tphotosynthesis += Utils.GRASS_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase C4:\n\t\t\t\t\t_lowmaintenance += _m[i];\n\t\t\t\t\tphotosynthesis += Utils.C4_ENERGY_CONSUMPTION * _mphoto[i];\n\t\t\t\t\tbreak;\n\t\t\t\t// is a consumer\n\t\t\t\tcase RED:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase FIRE:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase ORANGE:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase MAROON:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\t_lowmaintenance += 0.9 * _m[i];\n\t\t\t\t\tbreak;\n\t\t\t\tcase PINK:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tif (_isakiller < 2) {\n\t\t\t\t\t\t_lowmaintenance += 0.8 * _m[i];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase CREAM:\n\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Organisms with yellow segments have more children\n\t\t\t\tcase YELLOW:\n\t\t\t\t\tyellowCounter++;\n\t\t\t\t\tfertility += _m[i];\n\t\t\t\t break;\n\t\t\t\t// Experienced parents have more children\n\t\t\t\tcase SILVER:\n\t\t\t\t\tif (_isaconsumer == false) {\n\t\t\t\t\tfor (int c = 0; c < _segments; c++) {\n\t\t\t\t\t\tswitch (getTypeColor(_segColor[c])) {\n\t\t\t\t\t\tcase DARKGRAY:\n\t\t\t\t\t\tcase GRAY:\n\t\t\t\t\t\tcase LILAC:\n\t\t\t\t\t\tcase SPIKE:\n\t\t\t\t\t\tcase PLAGUE:\n\t\t\t\t\t\tcase CORAL:\n\t\t\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\t}}}\n\t\t\t\t\t if (_nTotalChildren >= 1 && _nTotalChildren < 5) {\n\t\t\t\t\t\t_nChildren = 2; \n\t\t\t\t\t} else if (_nTotalChildren >= 5 && _nTotalChildren < 14) {\n\t\t\t\t\t\t_nChildren = 3; \n\t\t\t\t\t} else if (_nTotalChildren >= 14 && _nTotalChildren < 30) {\n\t\t\t\t\t\t_nChildren = 4; \n\t\t\t\t\t} else if (_nTotalChildren >= 30 && _nTotalChildren < 55) {\n\t\t\t\t\t\t_nChildren = 5;\n\t\t\t\t\t} else if (_nTotalChildren >= 55 && _nTotalChildren < 91) {\n\t\t\t\t\t _nChildren = 6;\n\t\t\t\t\t} else if (_nTotalChildren >= 91 && _nTotalChildren < 140) {\n\t\t\t\t\t\t_nChildren = 7; \n\t\t\t\t\t} else if (_nTotalChildren >= 140) {\n\t\t\t\t\t\t_nChildren = 8;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Auburn always has one real child if infected\n\t\t\t\tcase AUBURN:\n\t\t\t\t\t_isauburn =true;\n\t\t\t\t\t_lowmaintenance += _m[i] - (Utils.AUBURN_ENERGY_CONSUMPTION * _m[i]);\n\t\t\t\t\tif (_infectedGeneticCode != null && _nChildren == 1) {\n\t\t\t\t\t\t_nChildren = 2;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Organisms with blond segments reproduce earlier\n\t\t\t\tcase BLOND:\n\t\t\t\t\treproduceearly += 3 + _m[i];\n\t\t\t\t\tbreak;\n\t\t\t\t// Organisms with indigo segments reduce the energy the new born virus receives\n\t\t\t\tcase INDIGO:\n\t\t\t\t\t_indigo += _m[i];\n\t\t\t\t\t_lowmaintenance += 0.8 * _m[i];\n\t\t\t\t\tbreak;\n\t\t\t\t// Plague forces an organism to reproduce the virus\n\t\t\t\tcase PLAGUE:\n\t\t\t\t\t_isplague =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Coral transforms particles and viruses\n\t\t\t\tcase CORAL:\n\t\t\t\t\t_iscoral =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Mint immunity against infections\t\n\t\t\t\tcase MINT:\n\t\t\t\t\t_isantiviral =true;\n\t\t\t\t\tif (_infectedGeneticCode != null && Utils.random.nextInt(Utils.IMMUNE_SYSTEM)<=_m[i] && useEnergy(Utils.MINT_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t_infectedGeneticCode = null;\n\t\t\t\t\t\tsetColor(Utils.ColorMINT);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Healing\n\t\t\t\tcase MAGENTA:\n\t\t\t\t _isregenerative =true;\n\t\t\t\t for (int j = 0; j < _segments; j++) {\n\t\t\t\t if ((_segColor[j] == Utils.ColorLIGHTBROWN) || (_segColor[j] == Utils.ColorGREENBROWN) || (_segColor[j] == Utils.ColorPOISONEDJADE)\n\t\t\t\t\t\t|| (_segColor[j] == Utils.ColorBROKEN) || (_segColor[j] == Utils.ColorLIGHT_BLUE) || (_segColor[j] == Utils.ColorICE)\n\t\t\t\t\t\t|| (_segColor[j] == Utils.ColorDARKJADE) || (_segColor[j] == Utils.ColorDARKFIRE)) {\n\t\t\t\t\tif (Utils.random.nextInt(Utils.HEALING)<=_m[i] && useEnergy(Utils.MAGENTA_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t _segColor[j] = _geneticCode.getGene(j%_geneticCode.getNGenes()).getColor(); \n\t\t\t\t\t}}}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DARKFIRE:\n\t\t\t\t\tif (Utils.random.nextInt(100)<_geneticCode.getSymmetry() && useEnergy(Utils.MAGENTA_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t_segColor[i] = _geneticCode.getGene(i%_geneticCode.getNGenes()).getColor(); \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DARKJADE:\n\t\t\t\t\t_isjade =true;\n\t\t\t\t\tif (Utils.random.nextInt(Utils.DARKJADE_DELAY * _geneticCode.getSymmetry() * _geneticCode.getSymmetry())<8) {\n\t\t\t\t\t\t_segColor[i] = Utils.ColorJADE; \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Normalize spike\n\t\t\t\tcase SPIKEPOINT:\n\t\t\t\t\t_segColor[i] = Utils.ColorSPIKE;\n\t\t\t\t\tbreak;\n\t\t\t\t// is a killer\n\t\t\t\tcase SPIKE:\n\t\t\t\t\tif (_isenhanced) {\n\t\t\t\t\t\t_isaconsumer =true;\n\t\t\t\t\t}\n\t\t\t\t\tif (_isakiller == 0) {\n\t\t\t\t\t\t_isakiller = 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LILAC:\n\t\t\t\t\tif (_isakiller == 0) {\n\t\t\t\t\t\t_isakiller = 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase GRAY:\n\t\t\t\t\tif (_isakiller < 2) {\n\t\t\t\t\t _isakiller = 2;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// is poisonous\n\t\t\t\tcase VIOLET:\n\t\t\t\t\t_ispoisonous =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// is a freezer\n\t\t\t\tcase SKY:\n\t\t\t\t\t_isafreezer =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// is enhanced\n\t\t\t\tcase DARKGRAY:\n\t\t\t\t\t_isenhanced =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Energy transfer\n\t\t\t\tcase ROSE:\n\t\t\t\t\t_lowmaintenance += 0.99 * _m[i];\n\t\t\t\t\tif (_transfersenergy == false) {\n\t\t\t\t\t\t_transfersenergy =true;\n\t\t\t\t\t _lengthfriend = _geneticCode.getGene(i%_geneticCode.getNGenes()).getLength();\n\t\t\t\t\t _thetafriend = _geneticCode.getGene(i%_geneticCode.getNGenes()).getTheta();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Low maintenance\n\t\t\t\tcase DARK:\n\t\t\t\t\t_lowmaintenance += 0.99 * _m[i];\n\t\t\t\t\tbreak;\n\t\t\t\t// Organisms with gold segments live longer\n\t\t\t\tcase GOLD:\n\t\t\t\t\t_lowmaintenance += 0.9 * _m[i];\n\t\t\t\t\tgoldenage += (_m[i]/Utils.GOLD_DIVISOR);\n\t\t\t\t\t_geneticCode._max_age = Utils.MAX_AGE + ((_geneticCode.getNGenes() * _geneticCode.getSymmetry())/Utils.AGE_DIVISOR) + (int)goldenage;\n\t\t\t\t\tbreak;\n\t\t\t\t// is weakened\n\t\t\t\tcase LIGHTBROWN:\n\t\t\t\tcase GREENBROWN:\n\t\t\t\tcase POISONEDJADE:\n\t\t\t\t\tif (_remember) {\n\t\t\t\t\t\t_isjade =false;\n\t\t\t\t\t\t_isenhanced =false;\n\t\t\t\t\t\t_isantiviral =false;\n\t\t\t\t\t\t_isregenerative =false;\n\t\t\t\t\t\tfor (int c = 0; c < _segments; c++) {\n\t\t\t\t\t\t\tswitch (getTypeColor(_segColor[c])) {\n\t\t\t\t\t\t\tcase JADE:\n\t\t\t\t\t\t\t\t_isjade =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase DARKJADE:\n\t\t\t\t\t\t\t\t_isjade =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase DARKGRAY:\n\t\t\t\t\t\t\t\t_isenhanced =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase MINT:\n\t\t\t\t\t\t\t\t_isantiviral =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase MAGENTA:\n\t\t\t\t\t\t\t\t_isregenerative =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t _geneticCode._max_age = Utils.MAX_AGE + ((_geneticCode.getNGenes() * _geneticCode.getSymmetry())/Utils.AGE_DIVISOR) + (int)goldenage;\n\t\t\t\t\t _remember =false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIGHT_BLUE:\n\t\t\t\t\tif (_isafreezer) {\n\t\t\t\t\t\t_isafreezer =false;\n\t\t\t\t\t\tfor (int c = 0; c < _segments; c++) {\n\t\t\t\t\t\t\tswitch (getTypeColor(_segColor[c])) {\n\t\t\t\t\t\t\tcase SKY:\n\t\t\t\t\t\t\t\t_isafreezer =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase DEEPSKY:\n\t\t\t\t\t\t\t\t_isafreezer =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// is frozen\n\t\t\t\tcase ICE:\n\t\t\t\t\t_isfrozen =true;\n\t\t\t\t\tif (_isjade) {\n\t\t\t\t\t\t_isjade =false;\n\t\t\t\t\t\tfor (int c = 0; c < _segments; c++) {\n\t\t\t\t\t\t\tswitch (getTypeColor(_segColor[c])) {\n\t\t\t\t\t\t\tcase JADE:\n\t\t\t\t\t\t\t\t_isjade =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase DARKJADE:\n\t\t\t\t\t\t\t\t_isjade =true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEADBARK:\n\t\t\t\t\t_isfrozen =true;\n\t\t\t\t\tbreak;\n\t\t\t\t// Restore abilities\n\t\t\t\tcase DARKLILAC:\n\t\t\t\t\tif (_isakiller == 0) {\n\t\t\t\t\t\t_isakiller = 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (Utils.random.nextInt(100)<8) {\n\t\t\t\t\t\t_segColor[i] = Utils.ColorLILAC;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DEEPSKY:\n\t\t\t\t\t_isafreezer =true;\n\t\t\t\t\tif (Utils.random.nextInt(100)<8) {\n\t\t\t\t\t\t_segColor[i] = Utils.ColorSKY;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DARKOLIVE:\n\t\t\t\t\tif (Utils.random.nextInt(100)<8 && useEnergy(Utils.OLIVE_ENERGY_CONSUMPTION)) {\n\t\t\t\t\t\t_segColor[i] = Utils.ColorOLIVE;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Reset dodging\n\t\t\tif (_hasdodged == true) {\n\t\t\t\t_dodge =false;\n\t\t\t\t_hasdodged =false;\n\t\t\t}\n\t\t\t//Get sun's energy\n\t\t\tif (photosynthesis > 0) {\n\t\t\t\t_isaplant =true;\n\t\t\t _energy += _world.photosynthesis(photosynthesis);\t\t\t\n\t\t\t}\n\t\t\t// Calculate number of children\n\t\t\tif (fertility > 0) {\n\t\t\t\tif (_geneticCode.getSymmetry() != 3) {\n\t\t\t\t _nChildren += (yellowCounter / _geneticCode.getSymmetry()) + (fertility / 23);\n\t\t\t } else {\n\t\t\t \t_nChildren += (yellowCounter / _geneticCode.getSymmetry()) + (fertility / 34);\n\t\t\t }\n\t\t\t}\n\t\t\t// Calculate reproduction energy for blond segments\n\t\t\tif ((reproduceearly > 0) && (_infectedGeneticCode == null)) {\n\t\t\t\tif (_energy > _geneticCode.getReproduceEnergy() - reproduceearly + Utils.YELLOW_ENERGY_CONSUMPTION*(_nChildren-1)) {\n\t\t\t\t\tif ((!_isaplant) && (!_isaconsumer)) {\n\t\t\t\t\t\tif ((_energy >= 10) && (_growthRatio<16) && (useEnergy(Utils.BLOND_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t\t_nChildren = 1;\n\t\t\t\t\t _geneticCode._reproduceEnergy = Math.max((40 + 3 * _geneticCode.getNGenes() * _geneticCode.getSymmetry()) - reproduceearly, 10);\n\t\t\t\t\t reproduce();\n\t\t\t\t\t _geneticCode._reproduceEnergy = 40 + 3 * _geneticCode.getNGenes() * _geneticCode.getSymmetry();\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((_energy >= 30) && (_growthRatio==1) && (_timeToReproduce==0) && (useEnergy(Utils.BLOND_ENERGY_CONSUMPTION))) {\n\t\t\t\t\t\t _geneticCode._reproduceEnergy = Math.max((40 + 3 * _geneticCode.getNGenes() * _geneticCode.getSymmetry()) - reproduceearly, 30);\n\t\t\t\t\t\t reproduce();\n\t\t\t\t\t\t _geneticCode._reproduceEnergy = 40 + 3 * _geneticCode.getNGenes() * _geneticCode.getSymmetry();\t\t\t\t\t\t\t\n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t}\n\t}", "public abstract void ratCrewGo();", "public void win()\r\n {\n Actor win;\r\n win=getOneObjectAtOffset(0,0,Goal.class);\r\n if (win !=null)\r\n {\r\n World myWorld=getWorld();\r\n Congrats cong=new Congrats();\r\n myWorld.addObject(cong,myWorld.getWidth()/2,myWorld.getHeight()/2); //(Greenfoot,2013) \r\n \r\n Greenfoot.stop();\r\n Greenfoot.playSound(\"finish.wav\"); //(Sound-Ideas,2014)\r\n \r\n }\r\n }", "void setup() {\n size(2048, 2048); //sets size of canvas\n \n //names entities and their position\n player = new Sprite(tankURL, 100, 400, 100, 100);\n smbulletbase = new Sprite(tankbulletURL, 100, 400, 100, 100);\n enemyBase = new Sprite(enemytankURL, 100, 400, 100, 100);\n medkit = new Sprite(healthURL, 100, 400, 100, 100);\n kaboomBase = new Sprite(explosionURL, 100, 400, 100, 100);\n minigun = new Sprite(minigunURL, 100, 400, 100, 100);\n coilgun = new Sprite(coilgunURL, 100, 400, 100, 100);\n \n \n //sets size of some pictures\n smbulletbase.setSize(50, 50);\n minigun.setSize(150,150);\n coilgun.setSize(150,150);\n \n //initialization of scene switcher library\n scsw = new SceneSwitcher();\n scsw.addScene(\"Title\", new Scene(() -> drawTitle()));\n scsw.addScene(\"Game\", new Scene(() -> drawGame()));\n scsw.addScene(\"Death\", new Scene(() -> drawDeath()));\n \n \n //sets players front angle\n player.frontAngle(90);\n \n //sets up audio library\n ktAudio = new KTAudioController(this);\n clickEffect = new KTSound(this, gunshotURL);\n ktAudio.add(clickEffect);\n \n\n}", "public void act() \n {\n move(-16);\n \n \n if (isAtEdge())\n {\n setLocation(700,getY());\n }\n \n if (isTouching(Shots.class))\n {\n getWorld().addObject(new SpaceObject(), 500,Greenfoot.getRandomNumber(400));\n }\n \n }", "public void render(){\r\n if(getLives() >= 10){\r\n StdDraw.picture(super.xCoord,super.yCoord,\"EnemyPurple.png\",super.radius*2,super.radius*2);\r\n }\r\n if(getLives() < 10){\r\n StdDraw.picture(super.xCoord,super.yCoord,\"EnemyPink.png\",super.radius*2,super.radius*2);\r\n }\r\n }", "@Override\n\tpublic void Render() {\n\t\t\n\t\tSystem.out.println(\"Chocolater Ice Cream\");\n\t\t\n\t}", "public Zombie() {\r\n\t\tsuper(myAnimationID, 0, 0, 60, 60);\r\n\t}", "void toyPlacingfStuff(){\n //nu stiu daca asta ramane\n gettingBackToInitial();\n nearingTheWallBefore();\n parallelToTheWall();\n actualToyPlacing();\n }", "public zombie_bg()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1010,900, 1); \n setPaintOrder(ScoreBoard.class, player.class, zomb_gen.class, options.class);\n populate();\n \n }", "void fly();", "public void clawOpen(){\n claw.setPosition(0.1);\n }", "private void prepare()\n {\n /**build the outer wall actor\n * width of wall: 50\n */\n //top wall\n for(int top = 0; top < 59; top++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(25 + top * 50, 25);\n }\n //down wall\n for(int down = 0; down < 59; down++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(25 + down * 50, 675);\n }\n //left wall\n for(int left = 1; left < 13; left++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(25, 25 + left * 50);\n }\n //right wall\n for(int right = 1; right < 13; right++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2925, 25 + right * 50);\n }\n \n /**starting point of the cat */\n P1 p1 = new P1();\n addObject(p1, 133, 321);\n p1.setLocation(575, 125);\n \n //attach obsever to the cat\n HealthPointObserver hpObserver = new HealthPointObserver(p1);\n addObject(hpObserver, 800, 100);\n \n \n \n \n \n /**first page\n * x: 25 - 1025\n */\n //starting location\n for(int start = 0; start < 17; start++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(175 + start * 50, 175);\n }\n //page seperator\n for(int right = 1; right < 10; right++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1025, 25 + right * 50);\n }\n //jumpers\n Wall wall1 = new Wall();\n addObject(wall1, 32, 382);\n wall1.setLocation(175, 625);\n for(int jump = 0; jump < 2; jump++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(275, 575 + jump * 50);\n }\n for(int jump = 0; jump < 4; jump++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(375, 475 + jump * 50);\n }\n for(int jump = 0; jump < 4; jump++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(525, 475 + jump * 50);\n }\n //set thorn\n Thorn thorn1 = new Thorn();\n addObject(thorn1, 32, 382);\n thorn1.setLocation(625, 625);\n Thorn thorn2 = new Thorn();\n addObject(thorn2, 32, 382);\n thorn2.setLocation(775, 625);\n Thorn thorn3 = new Thorn();\n addObject(thorn3, 32, 382);\n thorn3.setLocation(825, 625);\n \n /**second page \n * x: 1025 - 1975\n */\n //steps for left-top area\n for(int step = 0; step < 2; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1225 + step * 50, 575);\n }\n for(int step = 0; step < 3; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1075 + step * 50, 475);\n }\n for(int step = 0; step < 2; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1225 + step * 50, 375);\n }\n for(int step = 0; step < 3; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1075 + step * 50, 275);\n }\n Wall step1 = new Wall();\n addObject(step1, 32, 382);\n step1.setLocation(1225, 175);\n Wall step2 = new Wall();\n addObject(step2, 32, 382);\n step2.setLocation(1775, 125);\n for(int step = 0; step < 2; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1875 + step * 50, 125);\n }\n //area seperator\n for(int right = 3; right < 13; right++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1325, 25 + right * 50);\n }\n for(int right = 0; right < 8; right++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1375 + right * 50, 175);\n }\n //steps for right-down area\n for(int step = 0; step < 4; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1575 + step * 50, 575);\n }\n for(int step = 0; step < 4; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1375 + step * 50, 475);\n }\n for(int step = 0; step < 2; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1825, step * 50 + 275);\n }\n for(int step = 0; step < 7; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1575 + step * 50, 375);\n }\n for(int step = 0; step < 5; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1775, step * 50 + 425);\n }\n //page seperator\n for(int right = 1; right < 11; right++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1975, 25 + right * 50);\n }\n //set thorn\n Thorn thorn4 = new Thorn();\n addObject(thorn4, 32, 382);\n thorn4.setLocation(1125, 225);\n Thorn thorn5 = new Thorn();\n addObject(thorn5, 32, 382);\n thorn5.setLocation(1275, 325);\n Thorn thorn6 = new Thorn();\n addObject(thorn6, 32, 382);\n thorn6.setLocation(1875, 325);\n Thorn thorn7 = new Thorn();\n addObject(thorn7, 32, 382);\n thorn7.setLocation(1825, 625);\n Thorn thorn8 = new Thorn();\n addObject(thorn8, 32, 382);\n thorn8.setLocation(1825, 225);\n \n /**third page \n * x: 1975 - 2925\n */\n for(int step = 0; step < 4; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2125 + step * 150, 625);\n }\n //jumper\n for(int step = 0; step < 3; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2025, step * 150 + 225);\n }\n for(int step = 0; step < 3; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2125, step * 150 + 175);\n }\n // Wall jump1 = new Wall();\n //addObject(jump1, 32, 382);\n //jump1.setLocation(2125, 525);\n for(int step = 0; step < 8; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2175, step * 50 + 175);\n }\n //hidden thorn\n Thorn thorn9 = new Thorn();\n addObject(thorn9, 32, 382);\n thorn9.setLocation(2225, 165);\n Wall jump2 = new Wall();\n addObject(jump2, 32, 382);\n jump2.setLocation(2275, 175);\n Wall jump3 = new Wall();\n addObject(jump3, 32, 382);\n jump3.setLocation(2225, 175);\n Wall jump4 = new Wall();\n addObject(jump4, 32, 382);\n jump4.setLocation(2325, 275);\n Wall jump5 = new Wall();\n addObject(jump5, 32, 382);\n jump5.setLocation(2525, 275);\n Wall jump6 = new Wall();\n addObject(jump6, 32, 382);\n jump6.setLocation(2225, 375);\n Wall jump7 = new Wall();\n addObject(jump7, 32, 382);\n jump7.setLocation(2275, 425);\n for(int step = 0; step < 6; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2425 + step * 50, 425);\n }\n for(int step = 0; step < 3; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2625 + step * 50, 375);\n }\n for(int step = 0; step < 2; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2725 + step * 50, 325);\n }\n Wall jump8 = new Wall();\n addObject(jump8, 32, 382);\n jump8.setLocation(2825, 275);\n for(int step = 0; step < 2; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2825 + step * 50, 125);\n }\n for(int step = 0; step < 3; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2675, step * 50 + 475);\n }\n //set thorn\n Thorn thorn10 = new Thorn();\n addObject(thorn10, 32, 382);\n thorn10.setLocation(2825, 175);\n Thorn thorn11 = new Thorn();\n addObject(thorn11, 32, 382);\n thorn11.setLocation(2825, 625);\n Thorn thorn12 = new Thorn();\n addObject(thorn12, 32, 382);\n thorn12.setLocation(2775, 275);\n Thorn thorn13 = new Thorn();\n addObject(thorn13, 32, 382);\n thorn13.setLocation(2675, 325);\n Thorn thorn14 = new Thorn();\n addObject(thorn14, 32, 382);\n thorn14.setLocation(2875, 425);\n for(int sharp = 0; sharp < 2; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2025, sharp * 150 + 275);\n }\n for(int sharp = 0; sharp < 2; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2125, sharp * 150 + 225);\n }\n //wheel-thorn\n for(int sharp = 0; sharp < 2; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2275 + sharp * 200, 275);\n }\n for(int sharp = 0; sharp < 2; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2325 + sharp * 200, 225);\n }\n for(int sharp = 0; sharp < 2; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2375 + sharp * 200, 275);\n }\n for(int sharp = 0; sharp < 2; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2325 + sharp * 200, 325);\n }\n //three-limit\n for(int sharp = 0; sharp < 3; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2275 + sharp * 150, 475);\n }\n for(int sharp = 0; sharp < 3; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2275 + sharp * 150, 575);\n }\n for(int sharp = 0; sharp < 3; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2225 + sharp * 150, 525);\n }\n for(int sharp = 0; sharp < 3; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2325 + sharp * 150, 525);\n }\n }", "public void act() \n {\n if (Greenfoot.mouseClicked(this))\n {\n Peter.lb=2; \n Greenfoot.playSound(\"click.mp3\");\n Greenfoot.setWorld(new StartEngleza());\n };\n }", "public BlasticFantastic()\r\n {\r\n super(\"BlasticFantastic 0.1\");\r\n AppGameContainer app;\r\n\t\ttry {\r\n\t\t\tapp = new AppGameContainer(this);\r\n\t\t\tapp.setDisplayMode(1024, 600, false);\r\n\t\t\tapp.setVSync(true);\r\n\t\t\tapp.start();\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n }", "void ponderhit();", "Hero()\n\t{\n\t\t\n\t\tsuper(152,500,97,124);\n\t\tlife = 3;\n\t\tdoubleFire = 0;\n\t\t\n\t}", "private void scout() {\n\t\ttargetFlower = null;\n\t\t// fly to flower if nearby\n\t\tif(foundFlower()) {\n\t\t\tstate = \"TARGETING\";\n\t\t}\n\t\t// otherwise keep scouting\n\t\telse{\n\t\t\t// change angle randomly during flight\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "private TextureRegion createJumpingAnimation(MyCumulusGame game) {\n Texture jumping = game.getAssetManager().get(\"bird.png\");\n //todo check if this is correct\n return new TextureRegion(jumping, 2/3f,0f,1f,1/3f);\n }", "public Comets()\n {\n \n draw();\n }", "public StormCloud() {\n moveStop = true;\n stormCloud = new Sprite();\n cloudRectangle = new Rectangle(0,0,1280,384);\n stormCloud.setPosition(0, -stormCloud.getHeight() * 2);\n }", "private void init(){\n \tdimension.set(0.5f, 0.5f);\n \tsetAnimation(Assets.instance.goldCoin.animGoldCoin);\n \tstateTime = MathUtils.random(0.0f,1.0f);\n \t\n \t//regGoldCoin = Assets.instance.goldCoin.goldCoin;\n \t // Set bounding box for collision detection\n \tbounds.set(0,0,dimension.x, dimension.y);\n \tcollected = false;\n }", "private void makeSnack() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\t\t\n\t\tsnack = new Sprite(3, 3, 22, 25, new Image(\"file:./res/images/snack.png\"), 1, 1000);\n\t\tsnack.setLayoutX(150);\n\t\tsnack.setLayoutY(150);\n\t\tsnack.setScaleX(0.3);\n\t\tsnack.setScaleY(0.3);\n\t\tgrid.getChildren().addAll(snack);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(1500));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(snack);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().eatSnack();\n//\t\t\tif(!model.isHealthy()){\n//\t\t\t\tsetSickImg();\n//\t\t\t}\n\t\t});\n\t\tpause.play();\n\t\t\n\t}", "Parent Background(){\r\n \r\n Group root = new Group();\r\n Scene scene = new Scene(root, w, h,null);\r\n \r\n Group circles = new Group();\r\n for (int i = 0; i < 30; i++) {\r\n Circle circle = new Circle(150, Color.web(\"white\", 0.05));\r\n circle.setStrokeType(StrokeType.OUTSIDE);\r\n circle.setStroke(Color.web(\"white\", 0.16));\r\n circle.setStrokeWidth(4);\r\n circles.getChildren().add(circle);\r\n }\r\n Rectangle colors = new Rectangle(scene.getWidth(), scene.getHeight(),\r\n new LinearGradient(1f, 1f, 0f, 1f, true, CycleMethod.NO_CYCLE, new Stop[]{\r\n new Stop(0, Color.web(\"#f8bd55\")),\r\n new Stop(0.14, Color.web(\"#c0fe56\")),\r\n new Stop(0.28, Color.web(\"#5dfbc1\")),\r\n new Stop(0.43, Color.web(\"#64c2f8\")),\r\n new Stop(0.57, Color.web(\"#be4af7\")),\r\n new Stop(0.71, Color.web(\"#ed5fc2\")),\r\n new Stop(0.85, Color.web(\"#ef504c\")),\r\n new Stop(1, Color.web(\"#f2660f\")),}));\r\n Group blendModeGroup =\r\n new Group(new Group(new Rectangle(scene.getWidth(), scene.getHeight(),\r\n Color.DARKCYAN.brighter()), circles), colors);\r\n colors.setBlendMode(BlendMode.OVERLAY);\r\n root.getChildren().add(blendModeGroup);\r\n circles.setEffect(new BoxBlur(10, 10, 3));\r\n Timeline timeline = new Timeline();\r\n for (Node circle : circles.getChildren()) {\r\n timeline.getKeyFrames().addAll(\r\n new KeyFrame(Duration.ZERO, // set start position at 0\r\n new KeyValue(circle.translateXProperty(), random() * w),\r\n new KeyValue(circle.translateYProperty(), random() * h)),\r\n new KeyFrame(new Duration(40000), // set end position at 40s\r\n new KeyValue(circle.translateXProperty(), random() * w),\r\n new KeyValue(circle.translateYProperty(), random() * h)));\r\n }\r\n \r\n // play 40s of animation\r\n timeline.play();\r\n return root;\r\n }", "Parent Background(){\r\n \r\n Group root = new Group();\r\n Scene scene = new Scene(root, w, h,null);\r\n \r\n Group circles = new Group();\r\n for (int i = 0; i < 30; i++) {\r\n Circle circle = new Circle(150, Color.web(\"white\", 0.05));\r\n circle.setStrokeType(StrokeType.OUTSIDE);\r\n circle.setStroke(Color.web(\"white\", 0.16));\r\n circle.setStrokeWidth(4);\r\n circles.getChildren().add(circle);\r\n }\r\n Rectangle colors = new Rectangle(scene.getWidth(), scene.getHeight(),\r\n new LinearGradient(1f, 1f, 0f, 1f, true, CycleMethod.NO_CYCLE, new Stop[]{\r\n new Stop(0, Color.web(\"#f8bd55\")),\r\n new Stop(0.14, Color.web(\"#c0fe56\")),\r\n new Stop(0.28, Color.web(\"#5dfbc1\")),\r\n new Stop(0.43, Color.web(\"#64c2f8\")),\r\n new Stop(0.57, Color.web(\"#be4af7\")),\r\n new Stop(0.71, Color.web(\"#ed5fc2\")),\r\n new Stop(0.85, Color.web(\"#ef504c\")),\r\n new Stop(1, Color.web(\"#f2660f\")),}));\r\n Group blendModeGroup =\r\n new Group(new Group(new Rectangle(scene.getWidth(), scene.getHeight(),\r\n Color.DARKCYAN.brighter()), circles), colors);\r\n colors.setBlendMode(BlendMode.OVERLAY);\r\n root.getChildren().add(blendModeGroup);\r\n circles.setEffect(new BoxBlur(10, 10, 3));\r\n Timeline timeline = new Timeline();\r\n for (Node circle : circles.getChildren()) {\r\n timeline.getKeyFrames().addAll(\r\n new KeyFrame(Duration.ZERO, // set start position at 0\r\n new KeyValue(circle.translateXProperty(), random() * w),\r\n new KeyValue(circle.translateYProperty(), random() * h)),\r\n new KeyFrame(new Duration(40000), // set end position at 40s\r\n new KeyValue(circle.translateXProperty(), random() * w),\r\n new KeyValue(circle.translateYProperty(), random() * h)));\r\n }\r\n \r\n // play 40s of animation\r\n timeline.play();\r\n return root;\r\n }", "private void initialize() {\n\n this.levelName = \"Green 3\";\n this.numberOfBalls = 2;\n int ballsRadius = 5;\n Color ballsColor = Color.white;\n this.paddleHeight = (screenHeight / 27);\n this.paddleWidth = (screenWidth / 8);\n this.paddleSpeed = 11;\n int surroundingBlocksWidth = 30;\n this.paddleColor = new Color(1.0f, 0.699f, 0.000f);\n this.paddleUpperLeft = new Point(screenWidth / 2.2, screenHeight - surroundingBlocksWidth\n - this.paddleHeight);\n Color backgroundColor = new Color(0.000f, 0.420f, 0.000f);\n this.background = new Block(new Rectangle(new Point(0, 0), screenWidth + 1\n , screenHeight + 2), backgroundColor);\n this.background.setNumber(-1);\n\n Color[] colors = {Color.darkGray, Color.red, Color.yellow, Color.blue, Color.white};\n int blocksRowsNum = 5;\n int blocksInFirstRow = 10;\n int blocksWidth = screenWidth / 16;\n int blockHeight = screenHeight / 20;\n int firstBlockYlocation = screenHeight / 4;\n int removableBlocks = 0;\n Block[][] stairs = new Block[blocksRowsNum][];\n //blocks initialize.\n for (int i = 0; i < blocksRowsNum; i++, blocksInFirstRow--) {\n int number;\n for (int j = 0; j < blocksInFirstRow; j++) {\n if (i == 0) {\n number = 2; //top row.\n } else {\n number = 1;\n }\n stairs[i] = new Block[blocksInFirstRow];\n Point upperLeft = new Point(screenWidth - (blocksWidth * (j + 1)) - surroundingBlocksWidth\n , firstBlockYlocation + (blockHeight * i));\n stairs[i][j] = new Block(new Rectangle(upperLeft, blocksWidth, blockHeight), colors[i % 5]);\n if (stairs[i][j].getHitPoints() != -2 && stairs[i][j].getHitPoints() != -3) { // not death or live block\n stairs[i][j].setNumber(number);\n removableBlocks++;\n }\n this.blocks.add(stairs[i][j]);\n }\n\n }\n this.numberOfBlocksToRemove = (int) (removableBlocks * 0.5); //must destroy half of them.\n this.ballsCenter.add(new Point(screenWidth / 1.93, screenHeight * 0.9));\n this.ballsCenter.add(new Point(screenWidth / 1.93, screenHeight * 0.9));\n List<Velocity> v = new ArrayList<>();\n v.add(Velocity.fromAngleAndSpeed(45, 9));\n v.add(Velocity.fromAngleAndSpeed(-45, 9));\n this.ballsFactory = new BallsFactory(this.ballsCenter, ballsRadius, ballsColor,\n screenWidth, screenHeight, v);\n\n //bodies.\n //tower.\n Block base = new Block(new Rectangle(new Point(surroundingBlocksWidth + screenWidth / 16, screenHeight * 0.7)\n , screenWidth / 6, screenHeight * 0.3), Color.darkGray);\n base.setNumber(-1);\n this.bodies.add(base);\n Block base2 = new Block(new Rectangle(new Point(base.getCollisionRectangle().getUpperLine()\n .middle().getX() - base.getWidth() / 6\n , base.getCollisionRectangle().getUpperLeft().getY() - base.getHeight() / 2.5), base.getWidth() / 3\n , base.getHeight() / 2.5), Color.gray);\n base2.setNumber(-1);\n this.bodies.add(base2);\n Block pole = new Block(new Rectangle(new Point(base2.getCollisionRectangle().getUpperLine().middle().getX()\n - base2.getWidth() / 6, base2.getCollisionRectangle().getUpperLeft().getY() - screenHeight / 3)\n , base2.getWidth() / 3, screenHeight / 3), Color.lightGray);\n pole.setNumber(-1);\n this.bodies.add(pole);\n\n double windowWidth = base.getWidth() / 10;\n double windowHeight = base.getHeight() / 7;\n double b = base.getWidth() / 12;\n double h = base.getHeight() / 20;\n for (int i = 0; i < 6; i++) { //windows of tower.\n for (int j = 0; j < 5; j++) {\n Block window = new Block(new Rectangle(new Point(base.getCollisionRectangle().getUpperLeft().getX() + b\n + (windowWidth + b) * j,\n base.getCollisionRectangle().getUpperLeft().getY() + h + (windowHeight + h) * i), windowWidth\n , windowHeight), Color.white);\n window.setNumber(-1);\n this.bodies.add(window);\n }\n }\n\n //circles on the top of the tower.\n Circle c1 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 17, Color.black, \"fill\");\n Circle c2 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 12, Color.darkGray, \"fill\");\n Circle c3 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 7, Color.red, \"fill\");\n this.bodies.add(c1);\n this.bodies.add(c2);\n this.bodies.add(c3);\n\n\n }" ]
[ "0.6207773", "0.60074764", "0.59807396", "0.5946659", "0.5879985", "0.5840474", "0.58039653", "0.5799071", "0.57915074", "0.5779771", "0.576227", "0.5744934", "0.5713729", "0.56924385", "0.5682228", "0.5680098", "0.56783664", "0.5658477", "0.565615", "0.56507915", "0.56465167", "0.5642204", "0.56325495", "0.56188303", "0.5612505", "0.559959", "0.5597332", "0.55783004", "0.55762315", "0.5571419", "0.55595386", "0.5551541", "0.55502284", "0.5548691", "0.5546118", "0.55408883", "0.5537066", "0.55321145", "0.55124676", "0.550679", "0.55031276", "0.54922116", "0.5491809", "0.54917216", "0.5489185", "0.5483816", "0.5480678", "0.5463447", "0.54624534", "0.54603463", "0.5456271", "0.5447793", "0.54433936", "0.5437438", "0.54329675", "0.5424744", "0.54243475", "0.5411973", "0.540257", "0.54023045", "0.54023045", "0.54005307", "0.53903997", "0.5388907", "0.5387114", "0.53852165", "0.53824925", "0.5380602", "0.5377825", "0.53715897", "0.5371447", "0.536892", "0.53627044", "0.5356107", "0.53510725", "0.5350618", "0.5348657", "0.53292555", "0.53289753", "0.5328054", "0.5324039", "0.53236455", "0.53223896", "0.5321038", "0.5318332", "0.5313827", "0.53097343", "0.53094065", "0.53074545", "0.5307076", "0.5299374", "0.5299239", "0.5296599", "0.52960366", "0.52952254", "0.5295171", "0.5291555", "0.52908427", "0.52899057", "0.52899057", "0.5284355" ]
0.0
-1
/ Check if I can buy building with type x
private boolean canBuy(BuildingType x) { return gameDetails.buildingsStats.get(x).price <= myself.energy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isBuyable();", "public static boolean hasBuildingsToProduce(UnitType unitType) {\n\n // Need to have every prerequisite building\n for (Integer unitTypeID : unitType.getRequiredUnits().keySet()) {\n UnitType requiredUnitType = UnitType.getByID(unitTypeID);\n \n// if (requiredUnitType.isLarva()) {\n// continue;\n// }\n// System.out.println(\"=req: \" + requiredUnitType);\n if (!requiredUnitType.isBuilding()) {\n// System.out.println(\" continue\");\n continue;\n }\n \n int requiredAmount = unitType.getRequiredUnits().get(unitTypeID);\n int weHaveAmount = requiredUnitType.isLarva() ? \n SelectUnits.ourLarva().count() : SelectUnits.our().ofType(requiredUnitType).count();\n// System.out.println(requiredUnitType + \" x\" + requiredAmount);\n// System.out.println(\" and we have: \" + weHaveAmount);\n if (weHaveAmount < requiredAmount) {\n return false;\n }\n }\n return true;\n }", "public boolean canBuildEquipment(EquipmentType equipmentType) {\n for (AbstractGoods requiredGoods : equipmentType.getGoodsRequired()) {\n if (getGoodsCount(requiredGoods.getType()) < requiredGoods.getAmount()) {\n return false;\n }\n }\n return true;\n }", "boolean hasGoodsType();", "boolean CanBuyRoad();", "public boolean canBuild(int numToBuild) \n\t{\n\t\t return (numBuildings+numToBuild) <= MAX_NUM_UNITS;\n\t}", "boolean isSatisfiableFor(AResourceType type, int amount) ;", "public boolean isSomethingBuyable(GameClient game){\n for(Level l : Level.values()){\n for(ColorDevCard c : ColorDevCard.values()){\n try {\n NumberOfResources cost = dashBoard[l.ordinal()][c.ordinal()].getCost();\n cost = cost.safe_sub(game.getMe().getDiscounted());\n game.getMe().getDepots().getResources().sub(cost);\n return true;\n } catch (OutOfResourcesException | NullPointerException ignored) {}\n }\n }\n return false;\n }", "public boolean canBuild(Vertex vertex, int type) {\n \t\tif (type == Vertex.TOWN && towns >= MAX_TOWNS)\n \t\t\treturn false;\n \t\telse if (type == Vertex.CITY && cities >= MAX_CITIES)\n \t\t\treturn false;\n \n \t\treturn vertex.canBuild(this, type, board.isSetupPhase());\n \t}", "boolean canBuy( final Item item )\n {\n return !ship.contains( item ) && item.getPrice() <= credits;\n }", "boolean hasReqardTypeThirty();", "boolean canBuildDome(Tile t);", "boolean CanBuySettlement();", "boolean hasReqardTypeTen();", "public boolean canProvidePower(PowerTypes type);", "boolean canCarry(Item specifiedItem);", "private void checkBuyCard(PropertyCard card) {\n\t\tboolean almostComplete = checkCollection(this, card);\n\t\tif(almostComplete) {\n\t\t\tboolean boughtCard = buyCard(card);\n\t\t\tif(!boughtCard) {\n\t\t\t\tboolean madeChanges = checkPayment(card.getPrice());\n\t\t\t\tif(madeChanges) {\n\t\t\t\t\tbuyCard(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tboolean opponentAlmostComplete = false;\n\t\t\tfor(Player p: getPlayers()) {\n\t\t\t\tif(checkCollection(p,card)) {\n\t\t\t\t\topponentAlmostComplete = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(opponentAlmostComplete) {\n\t\t\t\tbuyCard(card);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(getMoney()-card.getPrice()>=100) {\n\t\t\t\t\tbuyCard(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "boolean hasReqardTypeThree();", "boolean CanBuyCity();", "@Override\n public boolean checkBuilding(Integer recherche, Integer money) {\n if (money <= Constantes.IMPROVE_HOUSE){\n System.out.println(\"Vous n'avez pas les fonds suffisants pour acheter une nouvelle maison.\");\n return false;\n }\n else {\n return true;\n }\n }", "public boolean buyBuildings(String naam, int wood, int brick, int grain, int wool, int ore,\n\t\t\tboolean automaticBuyCheck) {\n\t\tboolean canBuy = false;\n\n\t\tif (pTSM.playerOnTurn(this.gameID) == this.userID) {\n\t\t\tString kind = \"\";\n\n\t\t\tif (naam.equals(\"Straat\")) {\n\t\t\t\tkind = STREET;\n\t\t\t} else if (naam.equals(\"Dorp\")) {\n\t\t\t\tkind = VILLAGE;\n\t\t\t} else if (naam.equals(\"Stad\")) {\n\t\t\t\tkind = CITY;\n\t\t\t} else if (naam.equals(\"Ontwikkelingskaart\")) {\n\t\t\t\tkind = DEVELOPMENTCARD;\n\t\t\t} else {\n\t\t\t\treturn canBuy;\n\t\t\t}\n\n\t\t\t// Check what kind of card/object the player want to buy\n\t\t\tif (kind.equals(DEVELOPMENTCARD) && !automaticBuyCheck) {\n\n\t\t\t\tif (canBuy = bbm.hasEnoughMaterials(wood, brick, grain, wool, ore)) {\n\t\t\t\t\tthis.bbm.takeMaterials(wood, brick, grain, wool, ore);\n\t\t\t\t\tthis.oc.buyDev(dcs, userID);\n\t\t\t\t} else {\n\t\t\t\t\tthis.message = bbm.getMessage();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tcanBuy = bbm.buyBuilding(kind, wood, brick, grain, wool, ore, automaticBuyCheck);\n\t\t\t\tif (bbm.getMessage() != null) {\n\t\t\t\t\tthis.message = bbm.getMessage();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.message = NOT_YOUR_TURN;\n\t\t}\n\n\t\treturn canBuy;\n\t}", "public boolean canProvideEquipment(EquipmentType equipmentType) {\n for (AbstractGoods goods : equipmentType.getGoodsRequired()) {\n int available = getGoodsCount(goods.getType());\n \n int breedingNumber = goods.getType().getBreedingNumber();\n if (breedingNumber != GoodsType.INFINITY) {\n available -= breedingNumber;\n }\n \n if (available < goods.getAmount()) return false;\n }\n return true;\n }", "boolean CanBuyDevCard();", "boolean canCharge(ItemStack me);", "public Boolean checkIfValidBuild(){\r\n int buildValue = 0;\r\n for (Card card: userChosenCards){\r\n buildValue += card.getNumValue();\r\n }\r\n\r\n buildValue += card.getNumValue();\r\n\r\n switch (option){\r\n case 1:\r\n if(userChosenCards.size() == 0){\r\n Toast.makeText(ChooseTableCardActivity.this,\r\n \"Invalid Build - Cannot create a build with just one card\",\r\n Toast.LENGTH_LONG).show();\r\n return false;\r\n }\r\n\r\n return player.checkBuildValueInHand(player.getPlayerHandVec(), buildValue);\r\n case 2:\r\n if (buildValue == round.getBuilds().get(player.getId()).getNumValue()){\r\n return true;\r\n }\r\n return false;\r\n }\r\n return false;\r\n }", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "boolean hasBuild();", "private boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "public static boolean canAfford(UnitType unitType) {\n return hasMinerals(unitType.getMineralPrice()) && hasGas(unitType.getGasPrice());\n }", "boolean hasIsPerformOf();", "private boolean canRent(SportEquipment unit, Map<SportEquipment, Integer> shop) {\n boolean ans = false;\n for (SportEquipment item : shop.keySet()) {\n if (item.equals(unit)) {\n if (shop.get(item) >= 1) {\n ans = true;\n }\n }\n }\n return ans;\n }", "public boolean isUseful(Buildable buildable,HashSet<Class> useful){\n Boolean isUseful = false;\n //Iterate through each class in the set, and if the class is the same as the buildable's class, set isUseful to true\n for (Class i: useful\n ) {\n if(i.equals(buildable.getClass())){\n isUseful=true;\n }\n }\n return isUseful;\n }", "public abstract boolean isUsable();", "private void checkBuildHouse() {\n\t\tdouble moneyToSpend = calculateMoneyToSpend();\n\t\tif(moneyToSpend > 0) {\n\t\t\tArrayList<PropertyCard> cardsToBuildOn = new ArrayList<>();\n\t\t\tfor(PropertyCard c: getCards()) {\n\t\t\t\tif(isCollectionFull(c)) {\n\t\t\t\t\tcardsToBuildOn.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sorts so that the most expensive properties are at the start\n\t\t\tCollections.sort(cardsToBuildOn, Collections.reverseOrder());\n\t\t\tint moneySpent = 0;\n\t\t\tfor(PropertyCard c: cardsToBuildOn) {\n\t\t\t\twhile(c.getHousePrice()+moneySpent<=moneyToSpend && c.hasSpaceForHouse()) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, getName()+ \" built a house on \" + c.getName());\n\t\t\t\t\tbuildHouse(c);\n\t\t\t\t\tmoneySpent+=c.getHousePrice();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean canBuy(@NotNull AmmoAmountUncapped cost){\n return cost.canBeBought(this);\n }", "boolean canBuildBlock(Tile t);", "public boolean canDoBuyRoad(){\n\t\t // If the player doesn't have resources for a road, or has already played all his roads, he can't buy another\n\t\t if(resourceCardHand.canDoPayForRoad() == false || playerPieces.hasAvailableRoad() == false) {\n\t\t\t return false;\n\t\t }\n\t\t if(playerPieces.getNumberOfRoads() > 13){\n\t\t\t return true;\n\t\t }\n\t\t // If the player has no legal place to put a road on the map, he shouldn't be allowed to buy one.\n\t\t if(playerPieces.canPlaceARoadOnTheMap() == false) {\n\t\t\t return false;\n\t\t }\n\t\t return true;\n\t }", "public boolean canGrabWeapon(CardWeapon cw){\n List<Color> priceTmp;\n if(cw.getPrice().size()>1) {\n priceTmp = new ArrayList<>(cw.getPrice().subList(1, cw.getPrice().size()));\n return controlPayment(priceTmp);\n }\n else\n return true;\n }", "boolean hasReqardTypeFifteen();", "private void isAbleToBuild() throws RemoteException {\n int gebouwdeGebouwen = speler.getGebouwdeGebouwen();\n int bouwLimiet = speler.getKarakter().getBouwLimiet();\n if (gebouwdeGebouwen >= bouwLimiet) {\n bouwbutton.setDisable(true); // Disable button\n }\n }", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasOccupation();", "boolean hasQuantity();", "public final boolean inUse()\n{\n\tif (_buildTime > 0)\n\t{\n\t\treturn false;\n\t}\n\treturn (_base.getAvailableQuarters() - _rules.getPersonnel() < _base.getUsedQuarters() ||\n\t\t\t_base.getAvailableStores() - _rules.getStorage() < _base.getUsedStores() ||\n\t\t\t_base.getAvailableLaboratories() - _rules.getLaboratories() < _base.getUsedLaboratories() ||\n\t\t\t_base.getAvailableWorkshops() - _rules.getWorkshops() < _base.getUsedWorkshops() ||\n\t\t\t_base.getAvailableHangars() - _rules.getCrafts() < _base.getUsedHangars());\n}", "private boolean canTakeBandanaFrom(Unit other) {\n return getCalories() >= (2 * other.getCalories());\n }", "public boolean canTakeCharge();", "public static boolean hasTechAndBuildingsToProduce(UnitType unitType) {\n return hasTechToProduce(unitType) && hasBuildingsToProduce(unitType);\n }", "private void isValidBuild(List<ICard> build) {\n // count the number of free open piles\n int numFreeOpen = 0;\n for (IPile<ICard> pile : this.open) {\n if (pile.getPile().isEmpty()) {\n numFreeOpen++;\n }\n }\n // count the number of empty cascade piles\n int numFreeCascade = 0;\n for (IPile<ICard> pile : this.cascade) {\n if (pile.getPile().isEmpty()) {\n numFreeCascade++;\n }\n }\n // check that there are enough open intermediate slots\n if (build.size() > ((numFreeOpen + 1) * (int) Math.pow(2, numFreeCascade))) {\n throw new IllegalArgumentException(\"Build is invalid\");\n }\n }", "boolean isAchievable();", "public boolean canReceiveItem(Player character) {\n boolean canPick = true;\n Item item = character.items.get(character.getItemOwned2().getName());\n double totalWeight = items.getTotalWeight() + item.getWeight();\n if(totalWeight > maxWeight) {\n canPick = false;\n }\n return canPick; \n }", "@Override\n public boolean check(RealPlayer realPlayer) {\n for (Map.Entry<Resource, Integer> entry : productionPowerInput.entrySet()) {\n if (entry.getValue() > realPlayer.getPersonalBoard().getSpecificResourceCount(entry.getKey().getResourceType()))\n return false;\n }\n return true;\n }", "public boolean canCombine(ILootProperty loot);", "private boolean CheckCostToBuildOrUpgrade(double cost)\r\n {\r\n return cost <= this.bitcoins;\r\n }", "public boolean needsAllocation(TypeReference type) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n if (seenTypes.containsKey(type)) {\n if (seenTypes.get(type).size() > 1) { // TODO INCORRECT may all be UNALLOCATED\n return false;\n } else {\n return (seenTypes.get(type).get(0).status == ValueStatus.UNALLOCATED);\n }\n } else {\n return true;\n }\n }", "private boolean isAvailable() {\n\t\tfor (int i = 0; i < lawsuitsAsClaimant.size(); i++) {\n\t\t\tif (lawsuitsAsClaimant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check lawsuits as Defendant\n\t\tfor (int i = 0; i < lawsuitsAsDefendant.size(); i++) {\n\t\t\tif (lawsuitsAsDefendant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean hasCardType();", "boolean hasHasAlcoholSpecimanType();", "protected abstract boolean isSatisfiedBy(Design design, AUndertaking t);", "public boolean isTicketable();", "public boolean canBecombo(){\n \treturn price <5;\n }", "public static boolean hasTechToProduce(UnitType unitType) {\n\n // Needs to have tech\n TechType techType = TechType.TechTypes.getTechType(unitType.getRequiredTechID());\n if (techType != null && techType != TechType.TechTypes.None && !AtlantisTech.isResearched(techType)) {\n return false;\n }\n\n return true;\n }", "boolean hasSoftware();", "public boolean buildBuilding(String buildingType) {\n\t\tString type = buildingType.toLowerCase();\n\t\tthis.gc.placeBuilding(type);\n\n\t\tboolean placementSuccesfull = this.gc.isPlacementSuccesfull();\n\n\t\treturn placementSuccesfull;\n\n\t}", "public boolean canBuild(Player player) {\n\t\treturn canBuild(player.getUsername());\n\t}", "public boolean affordCard() {\n \t\treturn (FREE_BUILD || getResources(Type.WOOL) >= 1\n \t\t\t\t&& getResources(Type.GRAIN) >= 1 && getResources(Type.ORE) >= 1);\n \t}", "private static boolean checkIfNeedMore(int[] costToPayToCheck){\n boolean result = false;\n List<PowerUpLM> copyOfPowerUpLMList = copyOf(tmpAmmoInPowerUp);\n\n if(costToPayToCheck[GeneralInfo.RED_ROOM_ID] > 0){\n result = true;\n }\n else{\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID] = 0;\n for(PowerUpLM power: copyOfPowerUpLMList){\n if(power.getGainAmmoColor().equals(AmmoType.RED))\n tmpAmmoInPowerUp.remove(power);\n }\n }\n\n if(costToPayToCheck[GeneralInfo.BLUE_ROOM_ID] > 0){\n result = true;\n }\n else{\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID] = 0;\n for(PowerUpLM power: copyOfPowerUpLMList){\n if (power.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpAmmoInPowerUp.remove(power);\n }\n }\n\n if(costToPayToCheck[GeneralInfo.YELLOW_ROOM_ID] > 0){\n result = true;\n }\n else{\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID] = 0;\n for(PowerUpLM power: copyOfPowerUpLMList){\n if(power.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpAmmoInPowerUp.remove(power);\n }\n }\n\n return result;\n }", "private boolean isAllowed(ProcessInstance instance) {\r\n return true; // xoxox\r\n }", "private boolean checkValidity() {\n \n switch (referenceTypeChosen) {\n \n case AIRBUSPN_TYPEARTICLE:\n \n AirbusPN lAirbusPN = null;\n if (!StringUtil.isEmptyOrNull(selectedReferenceName)) {\n lAirbusPN =\n articleBean.findAirbusPNByName(selectedReferenceName);\n // check the Airbus PN existence\n if (lAirbusPN == null) {\n \n // reset the Article Type since Airbus PN is not found\n selectedTypeArticle = null;\n \n Utils.addFacesMessage(\n NavigationConstants.OBSO_MGMT_ERROR_ID,\n MessageBundle\n .getMessage(Constants.AIRBUS_PN_NOT_FOUND));\n return false;\n }\n }\n \n // search corresponding Article Types...\n if (lAirbusPN != null) {\n List<TypeArticle> lAirbusPNTypeArticles =\n articleBean.findAllTypeArticleForPN(lAirbusPN);\n if (lAirbusPNTypeArticles != null) {\n if (lAirbusPNTypeArticles.size() == 1) {\n // if only one Article Type is found, select it\n selectedTypeArticle = lAirbusPNTypeArticles.get(0);\n }\n else if (lAirbusPNTypeArticles.size() == 0) {\n // reset the Article Type since no one has been found\n selectedTypeArticle = null;\n }\n else {\n if (selectedTypeArticle != null\n && !lAirbusPNTypeArticles\n .contains(selectedTypeArticle)) {\n // reset the Article Type since it is no more\n // contained by the available Article Types for the\n // Airbus PN\n selectedTypeArticle = null;\n }\n }\n }\n else {\n // reset the Article Type since no one has been found\n selectedTypeArticle = null;\n }\n }\n \n // if at least one reference is empty, no check can be performed\n if (lAirbusPN == null || selectedTypeArticle == null) {\n return true;\n }\n \n // check that the Airbus PN and the Type Article are not already\n // obsolescence managed\n ObsolescenceReference lAirbusObsolescenceReference =\n new ObsolescenceReference(lAirbusPN, selectedTypeArticle);\n if (obsoBean\n .isReferenceAlreadyManagedIntoObso(lAirbusObsolescenceReference)) {\n \n Utils.addFacesMessage(\n NavigationConstants.OBSO_MGMT_ERROR_ID,\n MessageBundle\n .getMessage(Constants.OBSO_REFERENCE_ALREADY_MANAGED_INTO_OBSOLESCENCE));\n return false;\n }\n \n // check that no article is already obsolescence managed with its\n // manufacturer PN\n if (!obsoBean.isObsoCreationValidForExistingPN(lAirbusPN,\n selectedTypeArticle)) {\n \n Utils.addFacesMessage(\n NavigationConstants.OBSO_MGMT_ERROR_ID,\n MessageBundle\n .getMessage(Constants.OBSO_ALREADY_AIRBUSPN_MANAGED_CONFLICT_ERROR));\n return false;\n }\n \n return true;\n \n case MANUFACTURERPN_TYPEARTICLE:\n \n ManufacturerPN lManufacturerPN = null;\n if (!StringUtil.isEmptyOrNull(selectedReferenceName)) {\n lManufacturerPN =\n articleBean\n .findManufacturerPNByName(selectedReferenceName);\n // check the Manufacturer PN existence\n if (lManufacturerPN == null) {\n \n // reset the Article Type since Manufacturer PN is not found\n selectedTypeArticle = null;\n \n Utils.addFacesMessage(\n NavigationConstants.OBSO_MGMT_ERROR_ID,\n MessageBundle\n .getMessage(Constants.MANUFACTURER_PN_NOT_FOUND));\n return false;\n }\n }\n \n // search corresponding Article Types...\n if (lManufacturerPN != null) {\n List<TypeArticle> lManufacturerPNTypeArticles =\n articleBean.findAllTypeArticleForPN(lManufacturerPN);\n if (lManufacturerPNTypeArticles != null) {\n if (lManufacturerPNTypeArticles.size() == 1) {\n // if only one Type Article is found, select it\n selectedTypeArticle =\n lManufacturerPNTypeArticles.get(0);\n }\n else if (lManufacturerPNTypeArticles.size() == 0) {\n // reset the Article Type since no one has been found\n selectedTypeArticle = null;\n }\n else {\n if (selectedTypeArticle != null\n && !lManufacturerPNTypeArticles\n .contains(selectedTypeArticle)) {\n // reset the Article Type since it is no more\n // contained by the available Article Types for the\n // Manufacturer PN\n selectedTypeArticle = null;\n }\n }\n }\n else {\n // reset the Article Type since no one has been found\n selectedTypeArticle = null;\n }\n }\n \n // if at least one reference is empty, no check can be performed\n if (lManufacturerPN == null || selectedTypeArticle == null) {\n return true;\n }\n \n ObsolescenceReference lManufacturerObsolescenceReference =\n new ObsolescenceReference(lManufacturerPN,\n selectedTypeArticle);\n // check that the Manufacturer PN and the Type Article are not\n // already obsolescence managed\n if (obsoBean\n .isReferenceAlreadyManagedIntoObso(lManufacturerObsolescenceReference)) {\n \n Utils.addFacesMessage(\n NavigationConstants.OBSO_MGMT_ERROR_ID,\n MessageBundle\n .getMessage(Constants.OBSO_REFERENCE_ALREADY_MANAGED_INTO_OBSOLESCENCE));\n return false;\n }\n \n // check that no article is already obsolescence managed with its\n // Airbus PN\n if (!obsoBean.isObsoCreationValidForExistingPN(lManufacturerPN,\n selectedTypeArticle)) {\n \n Utils.addFacesMessage(\n NavigationConstants.OBSO_MGMT_ERROR_ID,\n MessageBundle\n .getMessage(Constants.OBSO_ALREADY_MANUFACTURERPN_MANAGED_CONFLICT_ERROR));\n return false;\n }\n \n return true;\n \n case SOFTWARE:\n \n Software lSoftware = null;\n if (!StringUtil.isEmptyOrNull(selectedReferenceName)) {\n lSoftware = softBean.findByCompleteName(selectedReferenceName);\n // check the software existence\n if (lSoftware == null) {\n \n Utils.addFacesMessage(\n NavigationConstants.OBSO_MGMT_ERROR_ID,\n MessageBundle\n .getMessage(MessageConstants.SOFTWARE_COMPLETENAME_INCORRECT));\n return false;\n }\n }\n \n // if the reference is empty, no check can be performed\n if (lSoftware == null) {\n return true;\n }\n \n ObsolescenceReference lSoftwareObsolescenceReference =\n new ObsolescenceReference(lSoftware);\n // check that the software is not already obsolescence managed\n if (obsoBean\n .isReferenceAlreadyManagedIntoObso(lSoftwareObsolescenceReference)) {\n \n Utils.addFacesMessage(\n NavigationConstants.OBSO_MGMT_ERROR_ID,\n MessageBundle\n .getMessage(Constants.OBSO_REFERENCE_ALREADY_MANAGED_INTO_OBSOLESCENCE));\n return false;\n }\n \n return true;\n \n case TYPEPC:\n TypePC lTypePC = null;\n if (!StringUtil.isEmptyOrNull(selectedReferenceName)) {\n lTypePC = articleBean.findTypePCByName(selectedReferenceName);\n // check the PC Type existence\n if (lTypePC == null) {\n \n Utils.addFacesMessage(\n NavigationConstants.OBSO_MGMT_ERROR_ID,\n MessageBundle\n .getMessage(Constants.PC_TYPE_NOT_FOUND));\n return false;\n }\n }\n \n // if the reference is empty, no check can be performed\n if (lTypePC == null) {\n return true;\n }\n \n ObsolescenceReference lTypePCObsolescenceReference =\n new ObsolescenceReference(lTypePC);\n // check that the PC Type is not already obsolescence managed\n if (obsoBean\n .isReferenceAlreadyManagedIntoObso(lTypePCObsolescenceReference)) {\n \n Utils.addFacesMessage(\n NavigationConstants.OBSO_MGMT_ERROR_ID,\n MessageBundle\n .getMessage(Constants.OBSO_REFERENCE_ALREADY_MANAGED_INTO_OBSOLESCENCE));\n \n return false;\n }\n \n return true;\n \n default:\n return false;\n }\n }", "private boolean checkCost(int owner, ItemType item) {\n\t\tint[] cost = item.getCost();\n\t\tResourceManager rm = (ResourceManager) GameManager.get()\n\t\t\t\t.getManager(ResourceManager.class);\n\t\tif (rm.getRocks(owner) < cost[0]) {\n\t\t\treturn false;\n\t\t} else if (rm.getCrystal(owner) < cost[1]) {\n\t\t\treturn false;\n\t\t} else if (rm.getBiomass(owner) < cost[2]) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean canProtectPieces() {\r\n\t\treturn (cityCards.stream().anyMatch(c -> (c.isSmallGods() && !c.isDisabled())\r\n\t\t\t\t&& money >= PROTECTION_COST)); \r\n\t}", "public boolean enoughSpaceToBuy(Player p, int numGoods) {\n // check size of cargoArr\n return numGoods <= p.getShip().numOpenSlots();\n }", "boolean hasUses();", "private boolean canPickUpPackage(Drone drone, WorldDelivery delivery){\n\t\t//check if the drone ID and the delivery drone ID match\n\t\tString droneID = drone.getDroneID();\n\t\tString deliveryDroneID = delivery.getDeliveryDroneID();\n\t\t//if not return false\n\t\tif(!droneID.equals(deliveryDroneID)){\n\n\t\t\treturn false;\n\t\t}\n\t\t//get the package source airport and position\n\t\tint sourceAirportID = delivery.getSourceAirport();\n//\t\tint sourceGateNumber = delivery.getSourceAirportGate();\n\t\t//get the position of the gate\n\t\tMap<Integer, WorldAirport> airports = this.getAirportMap();\n\t\tWorldAirport airport = airports.get(sourceAirportID);\n//\t\tVector dronePos = drone.getPosition();\n//\t\tfloat distanceToGate = airport.distanceToGate(sourceGateNumber, dronePos);\n//\n//\t\treturn distanceToGate <= MAX_TRANSFER_DISTANCE\n//\t\tif(drone.getDroneID().equals(\"0\")){\n//\t\t\tSystem.out.println(\"drone is at gate zone: \" + airport.isAtGateZone(drone.getPosition(), drone.getDroneID()));\n//\t\t}\n\t\treturn airport.isAtGateZone(drone.getPosition());\n\t}", "private boolean isBuilt() {\n\t\t\tif (name == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (WeaponFlavor flavor: WeaponFlavor.values()) {\n\t\t\t\tif (flavors.get(flavor) == null) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "boolean containsRequirementFor(AResourceType type);", "public abstract boolean canUse();", "private static boolean canPack(int bigCount, int smallCount, int goal) {\n\n//Check if all parameters are in valid range\n if (bigCount < 0 || smallCount < 0 || goal < 0)\n return false;\n\n int pack = 0;\n\n //While we haven't created a pack\n while (pack < goal) {\n //see if a big flour bag can fit in the package\n if (bigCount > 0 && (pack + 5) <= goal) {\n bigCount--;\n pack += 5;\n\n }\n //see there is a small flour bag left, to add to the package\n else if (smallCount > 0) {\n smallCount--;\n pack += 1;\n }\n //if a big bag won't fit (or doesnt exist) and we dont have enough small bags\n else\n return false;\n }\n return (pack == goal);\n }", "boolean hasIsAutoBet();", "public boolean canBuildNextStage() {\r\n\t\tSystem.out.print(\"Checking if \" + stages[stagesCompleted]\r\n\t\t\t\t+ \" can be built:\");\r\n\t\tSimpleResList costSRL = SimpleResList\r\n\t\t\t\t.buildCostList(stages[stagesCompleted]);\r\n\t\tSystem.out\r\n\t\t\t\t.println((canBuildStage(stages[stagesCompleted], costSRL) ? \" true \"\r\n\t\t\t\t\t\t: \" false \"));\r\n\t\t// TODO needs code to see if there is enough money to buy the goods from\r\n\t\t// the neighbors(if they have the goods).....look buildCommandOptions\r\n\t\treturn canBuildStage(stages[stagesCompleted], costSRL); // this is only\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// checking to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// see if this\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// board can\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// afford it\r\n\t}", "public boolean canAdd(UnitType unitType) {\n return workPlaces > 0\n && unitType.hasSkill()\n && unitType.getSkill() >= minSkill\n && unitType.getSkill() <= maxSkill;\n }", "boolean isMake();", "public final boolean canUse(){\n\t\tmaintain();\n\t\t//check if grown if not try to grow\n\t\tif(grown){\t\n\t\t\tif(host.getStrength()>USE_COST){\n\t\t\t\thost.expend(USE_COST);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\thost.expend(host.getStrength());\n\t\t\t}\n\t\t}\n\t\telse{\t\t\t\n\t\t\tcanGrow(host, this);\n\t\t}\t\n\t\treturn false;\n\t}", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();" ]
[ "0.6831638", "0.6604014", "0.65768814", "0.6565732", "0.64890563", "0.64875805", "0.6456215", "0.6440018", "0.63317156", "0.6276554", "0.62732947", "0.6235771", "0.61760056", "0.61466277", "0.6137382", "0.6131244", "0.6096523", "0.60842127", "0.60649526", "0.60590434", "0.60432994", "0.6034459", "0.59903896", "0.5970811", "0.591116", "0.5896049", "0.58908725", "0.5883233", "0.587548", "0.58639705", "0.586295", "0.5862492", "0.5857039", "0.5846295", "0.5843471", "0.58194625", "0.5813265", "0.5790696", "0.5788638", "0.5782787", "0.57786727", "0.57786727", "0.57786727", "0.57786727", "0.57786727", "0.5765282", "0.576219", "0.57608163", "0.5750879", "0.5749471", "0.5741287", "0.571867", "0.56880087", "0.5680475", "0.56714296", "0.5658019", "0.5651649", "0.5636773", "0.5633039", "0.5627948", "0.5627009", "0.5621907", "0.5613943", "0.56132585", "0.560444", "0.56011957", "0.5590318", "0.5590163", "0.5584469", "0.5583428", "0.5580428", "0.5573432", "0.55724454", "0.5562955", "0.55583686", "0.55462956", "0.55340874", "0.5533426", "0.55171454", "0.5515401", "0.55123115", "0.55060184", "0.5499715", "0.54985803", "0.54876", "0.548381", "0.548381", "0.548381", "0.548381", "0.548381", "0.548381", "0.548381", "0.548381", "0.548381", "0.548381", "0.548381", "0.548381", "0.548381", "0.548381", "0.548381" ]
0.8236937
0
/ Put wall on a lane with turret and no wall, on the 7th row
private String defendRow() { for (int i = 0; i < gameHeight; i++) { if (!enLaneInfo.get(i).get(0).isEmpty() && myLaneInfo.get(i).get(1).isEmpty()) { return DEFENSE.buildCommand(7,i); } } return buildTurret(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void handleRightWall(){\n for(int i = 0; i < 15; i ++){\n if(i % 2 == 1 ){\n maze[18][i] = VISIBLESPACE;\n }\n }\n }", "public void buildBoundaryWall() {\n for (int i = 0; i < worldWidth; i += 1) {\n for (int j = 0; j < worldHeight; j += 1) {\n if (i == 0 || i == worldWidth - 1\n || j == 0 || j == worldHeight - 1) {\n world[i][j] = Tileset.WALL;\n }\n }\n }\n }", "private void createWalls(){\n\t \tfloat wallWidth = GameRenderer.BOARD_WIDTH ;\n\t \tfloat wallHeight = GameRenderer.BOARD_HEIGHT ;\n\t \tint offset = -2;\n\t \tint actionBaOffset = 2;\n\t \t\n\t \t//Left Wall\n\t \tnew SpriteWall(0, actionBaOffset, 0, wallHeight+offset);\n\t \t\n\t \t//Right Wall\n\t \tnew SpriteWall(wallWidth+offset, actionBaOffset, wallWidth+offset, wallHeight+offset);\n\t \t\n\t \t//Top Wall\n\t \tnew SpriteWall(0, actionBaOffset, wallWidth+offset, actionBaOffset);\n\t \t\n\t \t//Bottom Wall\n\t \tnew SpriteWall(0, wallHeight+offset, wallWidth+offset, wallHeight+offset);\n\t \t\n\t }", "public void buildWall() {\n for (int i = 0; i < worldWidth; i += 1) {\n for (int j = 0; j < worldHeight; j += 1) {\n if (world[i][j].equals(Tileset.NOTHING)\n && isAdjacentFloor(i, j)) {\n world[i][j] = Tileset.WALL;\n }\n }\n }\n }", "public HitWall() {\n\t\ttouch_r = Settings.TOUCH_R;\n\t\ttouch_l = Settings.TOUCH_L;\n\t\tpilot = Settings.PILOT;\n\t}", "private void goAcrossWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.move();\n\t\tthis.turnRight();\n\t}", "private void addWalls() {\n wallList.add(new RectF(0, 0, wallSize, screenHeight / 2 - doorSize));\n wallList.add(new RectF(0, screenHeight / 2 + doorSize, wallSize, screenHeight));\n wallList.add(new RectF(0, 0, screenWidth / 2 - doorSize, wallSize));\n wallList.add(new RectF(screenWidth / 2 + doorSize, 0, screenWidth, wallSize));\n wallList.add(new RectF(screenWidth - wallSize, 0, screenWidth, screenHeight / 2 - doorSize));\n wallList.add(new RectF(screenWidth - wallSize, screenHeight / 2 + doorSize, screenWidth, screenHeight));\n wallList.add(new RectF(0, screenHeight - wallSize, screenWidth / 2 - doorSize, screenHeight));\n wallList.add(new RectF(screenWidth / 2 + doorSize, screenHeight - wallSize, screenWidth, screenHeight));\n }", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "void nearingTheWallBefore(){\n robot.absgyroRotation(0, \"absolute\");\n\n //alligning with the wall before going for the toy\n while(robot.leftDistanceSensor.getDistance(DistanceUnit.CM) > 15 && !isStopRequested()){\n if(robot.leftDistanceSensor.getDistance(DistanceUnit.CM) < 30)\n robot.mecanumMovement(0, .3, 0);\n else\n robot.mecanumMovement(0, .7, 0);\n\n telemetry.addLine(\"Distance from sensor: \" + robot.leftDistanceSensor.getDistance(DistanceUnit.CM));\n telemetry.update();\n }\n robot.mecanumMovement(0, 0, 0);\n\n robot.absgyroRotation(45, \"absolute\");\n }", "private void wrap() {\n if (myCurrentLeftX % (Grass.TILE_WIDTH * Grass.CYCLE) == 0) {\n if (myLeft) {\n myCowboy.move(Grass.TILE_WIDTH * Grass.CYCLE, 0);\n myCurrentLeftX += (Grass.TILE_WIDTH * Grass.CYCLE);\n for (int i = 0; i < myLeftTumbleweeds.length; i++) {\n myLeftTumbleweeds[i]\n .move(Grass.TILE_WIDTH * Grass.CYCLE, 0);\n }\n for (int i = 0; i < myRightTumbleweeds.length; i++) {\n myRightTumbleweeds[i].move(Grass.TILE_WIDTH * Grass.CYCLE,\n 0);\n }\n } else {\n myCowboy.move(-(Grass.TILE_WIDTH * Grass.CYCLE), 0);\n myCurrentLeftX -= (Grass.TILE_WIDTH * Grass.CYCLE);\n for (int i = 0; i < myLeftTumbleweeds.length; i++) {\n myLeftTumbleweeds[i].move(-Grass.TILE_WIDTH * Grass.CYCLE,\n 0);\n }\n for (int i = 0; i < myRightTumbleweeds.length; i++) {\n myRightTumbleweeds[i].move(-Grass.TILE_WIDTH * Grass.CYCLE,\n 0);\n }\n }\n }\n }", "public static void removeSomeWalls(TETile[][] t) {\n for (int x = 1; x < WIDTH - 1; x++) {\n for (int y = 1; y < HEIGHT - 1; y++) {\n if (t[x][y] == Elements.TREE\n && t[x + 1][y] == Elements.FLOOR) {\n if (t[x - 1][y] == Elements.FLOOR\n && t[x][y + 1] == Elements.FLOOR) {\n if (t[x][y - 1] == Elements.FLOOR\n && t[x + 1][y + 1] == Elements.FLOOR) {\n if (t[x + 1][y - 1] == Elements.FLOOR\n && t[x - 1][y + 1] == Elements.FLOOR) {\n if (t[x - 1][y - 1] == Elements.FLOOR) {\n t[x][y] = Elements.FLOOR;\n }\n }\n }\n }\n }\n }\n }\n }", "private void climbWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.goUpWall();\n\t\tthis.goAcrossWall();\n\t\tthis.goDownWall();\n\t}", "public void createWall() { // make case statement?\n\t\tRandom ran = new Random();\n\t\tint range = 6 - 1 + 1; // max - min + min\n\t\tint random = ran.nextInt(range) + 1; // add min\n\n\t\t//each wall is a 64 by 32 chunk \n\t\t//which stack to create different structures.\n\t\t\n\t\tWall w; \n\t\tPoint[] points = new Point[11];\n\t\tpoints[0] = new Point(640, -32);\n\t\tpoints[1] = new Point(640, 0);\n\t\tpoints[2] = new Point(640, 32); // top\n\t\tpoints[3] = new Point(640, 384);\n\t\tpoints[4] = new Point(640, 416);\n\n\t\tif (random == 1) {\n\t\t\tpoints[5] = new Point(640, 64);\n\t\t\tpoints[6] = new Point(640, 96);\n\t\t\tpoints[7] = new Point(640, 128); // top\n\t\t\tpoints[8] = new Point(640, 288);\n\t\t\tpoints[9] = new Point(640, 320);\n\t\t\tpoints[10] = new Point(640, 352); // bottom\n\t\t} else if (random == 2) {\n\t\t\tpoints[5] = new Point(640, 64);\n\t\t\tpoints[6] = new Point(640, 96); // top\n\t\t\tpoints[7] = new Point(640, 256);\n\t\t\tpoints[8] = new Point(640, 288); // bottom\n\t\t\tpoints[9] = new Point(640, 320);\n\t\t\tpoints[10] = new Point(640, 352); // bottom\n\t\t} else if (random == 3) {\n\t\t\tpoints[5] = new Point(640, 64);\n\t\t\tpoints[6] = new Point(640, 96);\n\t\t\tpoints[7] = new Point(640, 128); // top\n\t\t\tpoints[8] = new Point(640, 160);\n\t\t\tpoints[9] = new Point(640, 192); // top\n\t\t\tpoints[10] = new Point(640, 352); // bottom\n\t\t} else if (random == 4) {\n\t\t\tpoints[5] = new Point(640, 64);\n\t\t\tpoints[6] = new Point(640, 96);\n\t\t\tpoints[7] = new Point(640, 128); // top\n\t\t\tpoints[8] = new Point(640, 160);\n\t\t\tpoints[9] = new Point(640, 192);\n\t\t\tpoints[10] = new Point(640, 224); // top\n\t\t} else if (random == 5) {\n\t\t\tpoints[5] = new Point(640, 64); // top\n\t\t\tpoints[6] = new Point(640, 224);\n\t\t\tpoints[7] = new Point(640, 256);\n\t\t\tpoints[8] = new Point(640, 288); // bottom\n\t\t\tpoints[9] = new Point(640, 320);\n\t\t\tpoints[10] = new Point(640, 352); // bottom\n\t\t} else if (random == 6) {\n\t\t\tpoints[5] = new Point(640, 192);\n\t\t\tpoints[6] = new Point(640, 224);\n\t\t\tpoints[7] = new Point(640, 256); // bottom\n\t\t\tpoints[8] = new Point(640, 288);\n\t\t\tpoints[9] = new Point(640, 320);\n\t\t\tpoints[10] = new Point(640, 352); // bottom\n\t\t}\n\n\t\tfor (int i = 0; i < points.length; i++) { // adds walls\n\t\t\tw = new Wall();\n\t\t\tw.setBounds(new Rectangle(points[i].x, points[i].y, 64, 32));\n\t\t\twalls.add(w);\n\t\t}\n\t\tWall c; // adds a single checkpoint\n\t\tc = new Wall();\n\t\tcheckPoints.add(c);\n\t\tc.setBounds(new Rectangle(640, 320, 32, 32));\n\t}", "private void renderPlayerWalls() {\n\t\tfor(List<Tile> list : game.tiles()) {\n\t\t\tfor(Tile tile : list) {\n\t\t\t\t//Why does this not work?!\n\t\t\t\tif(tile.hasWall()) {\n\t\t\t\t\tthis.output[tile.position().y][tile.position().x] = WALL_SIGN;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"unused\")\r\n\tprivate void planTower(Direction freeDirection) throws GameActionException {\r\n\t\tstairs.clear();\r\n\t\tstairs.add(fluxInfo.location);\r\n\t\tif (true) return;\r\n\t\t\r\n\t\tList<MapLocation> blocks = new ArrayList<MapLocation>(Arrays.asList(myRC.senseNearbyBlocks()));\r\n\t\tint howMany = 0;\r\n\t\tint towerSize = 0;\r\n\t\tfor (MapLocation blockLocation : blocks) {\r\n\t\t\thowMany += myRC.senseNumBlocksAtLocation(blockLocation);\r\n\t\t}\r\n\t\t\r\n\t\tstairs.add(fluxInfo.location);\r\n\t\ttowerSize++;\r\n\t\thowMany -= 2;\r\n\t\t\r\n\t\tDirection towerDirection = freeDirection.rotateRight().rotateRight();\r\n\t\twhile ((howMany > 0) && (towerDirection != freeDirection)){\r\n\t\t\tstairs.add(1, fluxInfo.location.add(towerDirection));\r\n\t\t\ttowerSize++;\r\n\t\t\thowMany -= towerSize * 2;\r\n\t\t\ttowerDirection = towerDirection.rotateRight();\r\n\t\t}\r\n\t\t\r\n\t\tCollections.reverse(stairs);\r\n\t}", "private synchronized void removeWall(int desiredRow, int desiredColumn) {\n \tint topBlock = m.maze[desiredRow - 1][desiredColumn];\t\t\t\t\t// block directly above the current block\r\n \tint leftBlock = m.maze[desiredRow][desiredColumn - 1];\t\t\t\t\t// block directly left of the current block\r\n \tint bottomBlock = m.maze[desiredRow + 1][desiredColumn];\t\t\t\t// block directly below the current block\r\n \tint rightBlock = m.maze[desiredRow][desiredColumn + 1];\t\t\t\t\t// block directly right of the current block\r\n \t\r\n if (desiredRow % 2 == 1 && leftBlock != rightBlock) {\t\t\t\t\t// wall is vertical\r\n \tm.fixBlocks(desiredRow, desiredColumn - 1, leftBlock, rightBlock);\t// fix all blocks so a loop is not created when the wall is removed\r\n m.maze[desiredRow][desiredColumn] = rightBlock;\t\t\t\t\t\t// set current block with wall to be empty (no wall) thus removing the wall\r\n } else if (desiredRow % 2 == 0 && topBlock != bottomBlock) {\t\t\t// wall is horizontal\r\n \tm.fixBlocks(desiredRow - 1, desiredColumn, topBlock, bottomBlock);\t// fix all blocks so a loop is not created when the wall is removed\r\n m.maze[desiredRow][desiredColumn] = bottomBlock;\t\t\t\t\t// set current block with wall to be empty (no wall) thus removing the wall\r\n }\r\n repaint();\r\n try { wait(1); }\r\n catch (InterruptedException e) { }\r\n }", "private void createWalls() {\n int environmentWidth = config.getEnvironmentWidth();\n int environmentHeight = config.getEnvironmentHeight();\n // Left\n Double2D pos = new Double2D(0, environmentHeight / 2.0);\n Double2D v1 = new Double2D(0, -pos.y);\n Double2D v2 = new Double2D(0, pos.y);\n WallObject wall = new WallObject(physicsWorld, pos, v1, v2);\n drawProxy.registerDrawable(wall.getPortrayal());\n\n // Right\n pos = new Double2D(environmentWidth, environmentHeight / 2.0);\n wall = new WallObject(physicsWorld, pos, v1, v2);\n drawProxy.registerDrawable(wall.getPortrayal());\n\n // Top\n pos = new Double2D(environmentWidth / 2.0, 0);\n v1 = new Double2D(-pos.x, 0);\n v2 = new Double2D(pos.x, 0);\n wall = new WallObject(physicsWorld, pos, v1, v2);\n drawProxy.registerDrawable(wall.getPortrayal());\n\n // Bottom\n pos = new Double2D(environmentWidth / 2.0, environmentHeight);\n wall = new WallObject(physicsWorld, pos, v1, v2);\n drawProxy.registerDrawable(wall.getPortrayal());\n }", "public void preyMovement(WallBuilding wb, int x1, int x2, int y1, int y2){\r\n int b1 = wb.block.get(wb.block.stx(x1), wb.block.sty(y1));//one away\r\n int b2 = wb.block.get(wb.block.stx(x2), wb.block.sty(y2));//two away\r\n if(b1 == 0){//if there are no blocks, we can move normally\r\n if(wb.food.getObjectsAtLocation(x1, y1) == null){//if there is no food in that space\r\n wb.prey.setObjectLocation(this, wb.prey.stx(x1),wb.prey.sty(y1));\r\n }\r\n }else if(b1 == 1){//if there is one block\r\n if(b2 == 0){//if the space after is empty, we can move too!\r\n if(wb.food.getObjectsAtLocation(x2, y2) == null){//if there is no food in that space\r\n wb.block.set(wb.block.stx(x2), wb.block.sty(y2), b2+1);\r\n wb.block.set(wb.block.stx(x1), wb.block.sty(y1), b1-1);\r\n wb.prey.setObjectLocation(this, wb.prey.stx(x1),wb.prey.sty(y1));\r\n }\r\n }else if(b2 < 3){//there is space to move the block\r\n wb.block.set(wb.block.stx(x2), wb.block.sty(y2), b2+1);\r\n wb.block.set(wb.block.stx(x1), wb.block.sty(y1), b1-1);\r\n }\r\n }else{//if there are 2 or 3 blocks\r\n if(b2 < 3){//there is space to move the block\r\n if(wb.food.getObjectsAtLocation(x2, y2) == null){//if there is no food in that space\r\n wb.block.set(wb.block.stx(x2), wb.block.sty(y2), b2+1);\r\n wb.block.set(wb.block.stx(x1), wb.block.sty(y1), b1-1);\r\n }\r\n }\r\n }\r\n }", "public Wall() {\n\t\tcanHold = false;\n\t\tisPassable = false;\n\t\ttype = TileTypes.WALL;\n\t}", "public int moveToWall() {\n return moveToWall(false);\n }", "public void Wall()\n {\n if (this.getX() > 50 -this.getScale()) \n { \n this.setX(this.getX()-0.5); \n } \n else if (this.getX() < getScale()) \n {\n this.setX(this.getX()+0.5);\n \n }else if (this.getZ() > 50-this.getScale() ) \n {\n this.setZ(this.getZ()-0.5);\n \n }else if (this.getScale() > this.getZ()) \n {\n this.setZ(this.getZ()+0.5);\n }\n }", "void toyPlacingfStuff(){\n //nu stiu daca asta ramane\n gettingBackToInitial();\n nearingTheWallBefore();\n parallelToTheWall();\n actualToyPlacing();\n }", "public void printWalls(){\n\t\tSystem.out.printf(\"Cell [%d][%d] -- (%d, %d, %d, %d)\\n\",position[0],\n\t\t\t\t\t\tposition[1],eastWall, northWall, westWall, southWall);\n\t}", "public void explore() {\n\t\t\tif(getSpeed() < CAR_MAX_SPEED){ // Need speed to turn and progress toward the exit\n\t\t\t\tapplyForwardAcceleration(); // Tough luck if there's a wall in the way\n\t\t\t}\n\t\t\tif (isFollowingWall) {\n\t\t\t\t// if already been to this tile, stop following the wall\n\t\t\t\tif (travelled.contains(new Coordinate(getPosition()))) {\n\t\t\t\t\tisFollowingWall = false;\n\t\t\t\t} else {\n\t\t\t\t\tif(!checkFollowingWall(getOrientation(), map)) {\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If wall on left and wall straight ahead, turn right\n\t\t\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\t\t\tif (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Start wall-following (with wall on left) as soon as we see a wall straight ahead\n\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\tif (!checkWallRight(getOrientation(), map) && !checkWallLeft(getOrientation(), map)) {\n\t\t\t\t\t\t// implementing some randomness so doesn't get stuck in loop\n\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\tint n = rand.nextInt(2);\n\t\t\t\t\t\tif (n==0) {\n\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private void wentOffWall() {\n //random location\n b.numX = r.nextInt(2400) + 100;\n b.numY = r.nextInt(1400) + 100;\n //random speed\n b.xSpeed = this.newSpeed();\n b.ySpeed = this.newSpeed();\n }", "private boolean wall(int cell) {\n\t\treturn cell >= 0 && (cell >= size || DungeonTileSheet.wallStitcheable(Dungeon.level.map[cell]));\n\t}", "private void testForWallCollision() {\n\t\tVector2 n1 = temp;\n\t\tVector2 hitPoint = temp2;\n\t\t\n\t\tArrayList<Vector2> list;\n\t\tdouble angleOffset;\n\t\t\n\t\tfor (int w=0; w < 2; w++) {\n\t\t\tif (w == 0) {\n\t\t\t\tlist = walls1;\n\t\t\t\tangleOffset = Math.PI/2;\n\t\t\t} else {\n\t\t\t\tlist = walls2;\n\t\t\t\tangleOffset = -Math.PI/2;\n\t\t\t}\n\t\t\tn1.set(list.get(0));\n\t\t\t\n\t\t\tfor (int i=1; i < list.size(); i++) {\n\t\t\t\tVector2 n2 = list.get(i);\n\t\t\t\tif (Intersector.intersectSegments(n1, n2, oldPos, pos, hitPoint)) {\n\t\t\t\t\t// bounceA is technically the normal. angleOffset is used\n\t\t\t\t\t// here to get the correct side of the track segment.\n\t\t\t\t\tfloat bounceA = (float) (Math.atan2(n2.y-n1.y, n2.x-n1.x) + angleOffset);\n\t\t\t\t\tVector2 wall = new Vector2(1, 0);\n\t\t\t\t\twall.setAngleRad(bounceA).nor();\n\t\t\t\t\t\n\t\t\t\t\t// move the car just in front of the wall.\n\t\t\t\t\tpos.set(hitPoint.add((float)Math.cos(bounceA)*0.05f, (float)Math.sin(bounceA)*0.05f));\n\t\t\t\t\t\n\t\t\t\t\t// Lower the speed depending on which angle you hit the wall in.\n\t\t\t\t\ttemp2.setAngleRad(angle).nor();\n\t\t\t\t\tfloat wallHitDot = wall.dot(temp2);\n\t\t\t\t\tspeed *= (1 - Math.abs(wallHitDot)) * 0.85;\n\t\t\t\t\t\n\t\t\t\t\t// calculate the bounce using the reflection formula.\n\t\t\t\t\tfloat dot = vel.dot(wall);\n\t\t\t\t\tvel.sub(wall.scl(dot*2));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tn1.set(n2);\n\t\t\t}\n\t\t}\n\t}", "private void goUpWall() {\n\t\t// TODO Auto-generated method stub\n\t\tthis.turnLeft();\n\t\tthis.move(2);\n\t\tthis.turnRight();\n\t}", "public void turnSmaround()\n { \n Wall w= (Wall)getOneIntersectingObject(Wall.class);\n wX=w.getX();\n wY=w.getY();\n }", "public void setupWorld()\r\n\t{\r\n\t\t//build walls\r\n\t\twall1.add(new PointD(-500, 500));\r\n\t\twall1.add(new PointD(-490, 500));\r\n\t\twall1.add(new PointD(-490, -500));\r\n\t\twall1.add(new PointD(-500, -500));\r\n\r\n\t\twall2.add(new PointD(-500, 500));\r\n\t\twall2.add(new PointD(2000, 500));\r\n\t\twall2.add(new PointD(2000, 490));\r\n\t\twall2.add(new PointD(-500, 490));\r\n\t\t\r\n\t\twall3.add(new PointD(2000, 500));\r\n\t\twall3.add(new PointD(1990, 500));\r\n\t\twall3.add(new PointD(1990, -500));\r\n\t\twall3.add(new PointD(2000, -500));\r\n\r\n\t\twall4.add(new PointD(-500, -500));\r\n\t\twall4.add(new PointD(2000, -500));\r\n\t\twall4.add(new PointD(2000, -490));\r\n\t\twall4.add(new PointD(-500, -490));\r\n\r\n\t\tobjects.add(wall1);\r\n\t\tobjects.add(wall2);\r\n\t\tobjects.add(wall3);\r\n\t\tobjects.add(wall4);\r\n\t\t\r\n\t\t\r\n\t\t//add people\r\n\t\tGameVars.people = people;\r\n\t\tGameVars.aSquare = aSquare;\r\n\t\t\r\n\t\tobjects.add(grandson.boundary);\r\n\t\tpeople.add(grandson);\r\n\t\t\r\n\t\tobjects.add(son.boundary);\r\n\t\tpeople.add(son);\r\n\t\t\r\n\t\tobjects.add(triangle.boundary);\r\n\t\tpeople.add(triangle);\r\n\r\n\t\tobjects.add(wife.boundary);\r\n\t\tpeople.add(wife);\r\n\r\n\t\tobjects.add(runaway.boundary);\r\n\t\tpeople.add(runaway);\r\n\t\t\r\n\t\t\r\n\t\t//set aSquare's position\r\n\t\taSquare.rotate(220);\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n Tron.init();\n\n //We'll want to keep track of the turn number to make debugging easier.\n int turnNumber = 0;\n\n // Execute loop forever (or until game ends)\n while (true) {\n //Update turn number:\n turnNumber++;\n\n /* Get an integer map of the field. Each int\n * can either be Tron.Tile.EMPTY, Tron.Tile.ME,\n * Tron.Tile.OPPONENT, Tron.Tile.TAKEN_BY_ME,\n * Tron.Tile.TAKEN_BY_OPPONENT, or Tron.Tile.WALL */\n ArrayList<ArrayList<Tron.Tile>> mList = Tron.getMap();\n int[][] m = new int[mList.size()][mList.get(0).size()];\n for (int i = 0; i < mList.size(); i++) {\n for (int j = 0; j < mList.get(i).size(); j++) {\n m[i][j] = mList.get(i).get(j).ordinal();\n }\n }\n\n //Let's figure out where we are:\n int myLocX = 0, myLocY = 0;\n for(int y = 0; y < 16; y++) {\n for(int x = 0; x < 16; x++) {\n //I want to note that this is a little bit of a disgusting way of doing this comparison, and that you should change it later, but Java makes this uglier than C++\n if(Tron.Tile.values()[m[y][x]] == Tron.Tile.ME) {\n myLocX = x;\n myLocY = y;\n }\n }\n }\n\n //Let's find out which directions are safe to go in:\n boolean [] safe = emptyAdjacentSquares(m, myLocX, myLocY);\n\n //Let's look at the counts of empty squares around the possible squares to go to:\n int [] dirEmptyCount = new int[4];\n for(int a = 0; a < 4; a++) {\n if(safe[a]) {\n //Get the location we would be in if we went in a certain direction (specified by a).\n int[] possibleSquare = getLocation(myLocX, myLocY, a);\n //Make sure that square exists:\n if(possibleSquare[0] != -1 && possibleSquare[1] != -1) {\n //Find the squares around that square:\n boolean [] around = emptyAdjacentSquares(m, possibleSquare[0], possibleSquare[1]);\n //Count the number of empty squares around that square and set it in our array:\n dirEmptyCount[a] = 0;\n for(int b = 0; b < 4; b++) if(around[b]) dirEmptyCount[a]++;\n }\n }\n else dirEmptyCount[a] = 5; //Irrelevant, but we must ensure it's as large as possible because we don't want to go there.\n }\n\n //Log some basic information.\n Tron.log(\"-----------------------------------------------------\\nDebug for turn #\" + turnNumber + \":\\n\");\n for(int a = 0; a < 4; a++) Tron.log(\"Direction \" + stringFromDirection(a) + \" is \" + (safe[a] ? \"safe.\\n\" : \"not safe.\\n\"));\n\n /* Send your move. This can be Tron.Direction.NORTH,\n * Tron.Direction.SOUTH, Tron.Direction.EAST, or\n * Tron.Direction.WEST. */\n int minVal = 1000, minValLoc = 0;\n for(int a = 0; a < 4; a++) {\n if(dirEmptyCount[a] < minVal) {\n minVal = dirEmptyCount[a];\n minValLoc = a;\n }\n }\n Tron.sendMove(Tron.Direction.values()[minValLoc]);\n }\n }", "private void moveToWall() {\n\t\t// TODO Auto-generated method stub\n\t\t// if front is clear then keep moving\n\t\twhile (this.frontIsClear()) {\n\t\t\tthis.move();\n\t\t}\n\t}", "public boolean canMove(int forX , int forY)\n {\n\n\n int tankX = locX + width/2;\n int tankY = locY + height/2;\n\n\n for(WallMulti wall : walls)\n {\n if(wall.getType().equals(\"H\"))\n {\n\n int disStart = (wall.getX()-tankX)*(wall.getX()-tankX) + (wall.getY()-tankY)*(wall.getY()-tankY);\n if(disStart<=700)\n {\n int dis2 = (wall.getX()-(tankX+forX))*(wall.getX()-(tankX+forX)) + (wall.getY()-(tankY+forY))*(wall.getY()-(tankY+forY));\n if(dis2<disStart)\n return false;\n }\n\n int disEnd = ((wall.getX()+wall.getLength())-tankX)*((wall.getX()+wall.getLength())-tankX) + (wall.getY()-tankY)*(wall.getY()-tankY);\n if(disEnd<=1700)\n {\n int dis2 = ((wall.getX()+wall.getLength())-(tankX+forX))*((wall.getX()+wall.getLength())-(tankX+forX)) + (wall.getY()-(tankY+forY))*(wall.getY()-(tankY+forY));\n if(dis2<disEnd)\n return false;\n }\n\n if(tankX >= wall.getX() && tankX <= (wall.getX() + wall.getLength()))\n {\n //tank upper than wall\n if( tankY+20 < wall.getY() && wall.getY()-(tankY+40)<=20 )\n {\n if( wall.getY() <= (tankY+20 + forY) )\n {\n return false;\n }\n }\n\n //tank lower than wall\n if( (tankY-35) > wall.getY() && (tankY-35)-wall.getY()<=25 )\n {\n if( wall.getY() >= (tankY - 35 + forY) )\n {\n return false;\n }\n }\n }\n }\n\n if(wall.getType().equals(\"V\"))\n {\n\n int disStart = (wall.getX()-tankX)*(wall.getX()-tankX) + (wall.getY()-tankY)*(wall.getY()-tankY);\n if(disStart<=700)\n {\n int dis2 = (wall.getX()-(tankX+forX))*(wall.getX()-(tankX+forX)) + (wall.getY()-(tankY+forY))*(wall.getY()-(tankY+forY));\n if(dis2<disStart)\n return false;\n }\n\n int disEnd = (wall.getX()-tankX)*(wall.getX()-tankX) + ((wall.getY()+wall.getLength())-tankY)*((wall.getY()+wall.getLength())-tankY);\n if(disEnd<=3600)\n {\n int dis2 = (wall.getX()-(tankX+forX))*(wall.getX()-(tankX+forX)) + ((wall.getY()+wall.getLength())-(tankY+forY))*((wall.getY()+wall.getLength())-(tankY+forY));\n if(dis2<disEnd)\n return false;\n }\n\n\n if(tankY >= wall.getY() && tankY <= (wall.getY() + wall.getLength()))\n {\n //tank at the left side of the wall\n if( tankX+20 < wall.getX() && wall.getX()-(tankX+40)<=20 )\n {\n if( wall.getX() <= (tankX+20 + forX) )\n {\n return false;\n }\n }\n\n //tank lower than wall\n if( (tankX-35) > wall.getX() && (tankX-35)-wall.getX()<=25 )\n {\n if( wall.getX() >= (tankX - 35 + forX) )\n {\n return false;\n }\n }\n }\n }\n }\n return true;\n }", "public Square createWall() {Collect.Hit(\"BoardFactory.java\",\"createWall()\"); Collect.Hit(\"BoardFactory.java\",\"createWall()\", \"1976\");return new Wall(sprites.getWallSprite()) ; }", "private boolean nextIsWall()\n {\n return this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].isHasWall();\n }", "public void landPiece() {\n\t\t// current rotation of piece\n\t\tint rot = currentPiece.getPieceRotation();\n\t\t\n\t\t// x coordinate of current piece's northwest corner\n\t\tint row = currentPieceGridPosition[0];\n\t\t\n\t\t// y coordinate of current piece's northwest corner\n\t\tint col = currentPieceGridPosition[1];\t\n\n\t\t// adds currentPiece's landing positions to be true in blockMatrix\n\t\tfor(int i = 0; i < 4; i++) { \n\t\t\tfor(int j = 0; j < 4; j++) { \n\t\t\t\tif(currentPiece.isFilled(rot, i, j)) {\n\t\t\t\t\tblockMatrix[i + row][j + col] = true; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//add up scores\n\t\tnumLines += numberOfFormedLines(); \n\t\tif(numberOfFormedLines() >= 4) {\n\t\t\tnumTetrises++; \n\t\t}\n\t\t\n\t\t//clear out full lines\n\t\tfor(int i = 0; i < blockMatrix.length; i++) { \n\t\t\tif(fullLine(i)) { \n\t\t\t\tremoveLine(i);\n\t\t\t\t//find rows with blocks filled above cleared line to drop those down\n\t\t\t\tfor(int m = i-1; m >= 0; m--) { \n\t\t\t\t\tfor(int n = 0; n < NUM_COLS; n++) {\n\t\t\t\t\t\t// fill in space below, clear out current row \n\t\t\t\t\t\tif(hasBlock(m, n)) { \n\t\t\t\t\t\t\tblockMatrix[m][n] = false;\n\t\t\t\t\t\t\tblockMatrix[m+1][n] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// ready for next piece\n\t\taddNewPiece();\n\t}", "public void stepForwad() {\n\t\t\t\n\t\t\tswitch(this.direction) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7: \n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tthis.x = (this.worldWidth + this.x)%this.worldWidth;\n\t\t\tthis.y = (this.worldHeight + this.y)%this.worldHeight;\n\t\t}", "public void thrust() {\n // Offset the angle since we drew the ship vertically\n float angle = heading - PI/2;\n // Polar to cartesian for force vector!\n PVector force = new PVector(cos(angle),sin(angle));\n force.mult(5); // original shiffman code =.5\n applyForce(force); \n // To draw booster\n thrust = true;\n }", "public Wall(int x1, int y1,int x2,int y2) {\r\n\tthis.x1 = x1 + TRANSLATION;\r\n\tthis.x2 = x2 + TRANSLATION;\r\n\tthis.y1 = y1 + TRANSLATION;\r\n\tthis.y2 = y2 + TRANSLATION;\r\n\tbustedWall = false; \r\n}", "public void border() {\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tmaze[x][0] = Block.WALL;\n\t\t\tmaze[x][height - 1] = Block.WALL;\n\t\t}\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tmaze[0][y] = Block.WALL;\n\t\t\tmaze[width - 1][y] = Block.WALL;\n\t\t}\n\t}", "public void create() {\n int emptyBlocks = 0; \t\t\t\t\t\t\t\t// count of empty blocks\r\n int walls = 0; \t\t\t\t\t\t\t\t\t// count of walls\r\n int[] wallsRow = new int[(m.rows*m.columns)/2]; \t// temporary wall positions (half the total maze size)\r\n int[] wallsColumn = new int[(m.rows*m.columns)/2];\r\n \r\n for (int i = 0; i < m.rows; i++) \t\t\t\t\t// for each row\r\n for (int j = 0; j < m.columns; j++)\t\t\t\t// for each column (each block in a row)\r\n \tm.maze[i][j] = 1;\t\t\t\t\t\t\t// make the block a wall\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t// the maze is all walls\r\n \r\n for (int i = 1; i < m.rows - 1; i += 2) \t\t\t// loop over every other block\r\n for (int j = 1; j < m.columns - 1; j += 2) {\r\n \tm.maze[i][j] = -emptyBlocks; \t\t\t\t// make every other block an empty block\r\n \temptyBlocks++;\t\t\t\t\t\t\t\t// so increment our empty blocks\r\n if (i < m.rows - 2) { \t\t\t\t\t\t// if there is a block below this room\r\n \twallsRow[walls] = i + 1;\t\t\t\t// set this block to be a wall in the temporary wall array\r\n \twallsColumn[walls] = j;\r\n walls++;\t\t\t\t\t\t\t\t// increment because we added a wall to the maze\r\n }\r\n if (j < m.columns - 2) { \t\t\t\t\t// if there is a block below this room\r\n \twallsRow[walls] = i;\t\t\t\t\t// set this block to be a wall in the temporary wall array\r\n \twallsColumn[walls] = j + 1;\r\n walls++;\t\t\t\t\t\t\t\t// increment because we added a wall to the maze\r\n }\r\n }\r\n repaint();\r\n for (int i = walls - 1; i > 0; i--) {\t\t\t\t// loop over the number of walls generated (half the total maze size)\r\n int r = (int)(Math.random() * i); \t\t\t\t// choose a random wall\r\n removeWall(wallsRow[r], wallsColumn[r]);\t\t// remove the wall if it doesn't form a loop\r\n wallsRow[r] = wallsRow[i];\r\n wallsColumn[r] = wallsColumn[i];\r\n }\r\n for (int i = 1; i < m.rows - 1; i++) \t\t\t\t// for each row\r\n for (int j = 1; j < m.columns - 1; j++)\t\t\t// for each column (each block in a row)\r\n if (m.maze[i][j] < 0)\t\t\t\t\t\t// set the empty blocks to finalized blocks \r\n \tm.maze[i][j] = 3;\r\n }", "public void spawnInLattice() throws GameActionException {\n boolean isMyCurrentSquareGood = checkIfGoodSquare(Cache.CURRENT_LOCATION);\n\n // if in danger from muckraker, get out\n if (runFromMuckrakerMove() != 0) {\n return;\n }\n\n if (isMyCurrentSquareGood) {\n currentSquareIsGoodExecute();\n } else {\n currentSquareIsBadExecute();\n }\n\n }", "private void createMaze(Tile currentTile) {\n\n while (numberOfCellsVisited < CAST_WIDTH * CAST_HEIGHT) {\n\n // Get coordinates of current tile and set as visited\n int currentX = currentTile.getPosition().getX();\n int currentY = currentTile.getPosition().getY();\n tempMap[currentY][currentX].setVisited(true);\n\n // Begin neighbourhood scan\n ArrayList<Integer> neighbours = new ArrayList<>();\n\n // If a neighbour is not visited and its projected position is within bounds, add it to the list of valid neighbours\n // North neighbour\n if (currentY - 1 >= 0) {\n if (!tempMap[currentY - 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(0);\n }\n //Southern neighbour\n if (currentY + 1 < CAST_HEIGHT) { //y index if increased is not greater than height of the chamber\n if (!tempMap[currentY + 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(1);\n }\n //Eastern neighbour\n if (currentX + 1 < CAST_WIDTH) { //check edge case\n if (!tempMap[currentY][currentX + 1].isVisited()) { //check if visited\n neighbours.add(2);\n }\n }\n //Western neighbour\n if (currentX - 1 >= 0) {\n if (!tempMap[currentY][currentX - 1].isVisited()) {\n neighbours.add(3);\n }\n }\n if (!neighbours.isEmpty()) {\n\n //generate random number between 0 and 3 for direction\n Random rand = new Random();\n boolean randomizer;\n int myDirection;\n do {\n myDirection = rand.nextInt(4);\n randomizer = neighbours.contains(myDirection);\n } while (!randomizer);\n\n //knock down wall\n switch (myDirection) {\n case 0 -> { // North\n tempMap[currentY][currentX].getPathDirection()[0] = true;\n currentTile = tempMap[currentY - 1][currentX];\n }\n case 1 -> { // South\n tempMap[currentY][currentX].getPathDirection()[1] = true;\n currentTile = tempMap[currentY + 1][currentX];\n }\n case 2 -> { // East\n tempMap[currentY][currentX].getPathDirection()[2] = true;\n currentTile = tempMap[currentY][currentX + 1];\n }\n case 3 -> { // West\n tempMap[currentY][currentX].getPathDirection()[3] = true;\n currentTile = tempMap[currentY][currentX - 1];\n }\n }\n\n mapStack.push(currentTile);\n numberOfCellsVisited++;\n } else {\n currentTile = mapStack.pop(); //backtrack\n }\n }\n\n castMaze(tempMap[0][0], -1);\n }", "public void SpiritBomb()\r\n {\r\n\r\n\t \r\n\t\tLocation loc = new Location(userRow+1, userCol);\r\n\t\tLocation loc1 = new Location(userRow+1, userCol1);\r\n\t\tLocation loc2 = new Location(userRow+1, userCol2);\r\n\t\tLocation loc3 = new Location(userRow+1, userCol3);\r\n\t\t\r\n\t\tLocation loc4 = new Location(userRow, userCol);\r\n\t\tLocation loc5 = new Location(userRow, userCol1);\r\n\t\tLocation loc6 = new Location(userRow, userCol2);\r\n\t\tLocation loc7 = new Location(userRow, userCol3);\r\n\t\t\r\n\t\tLocation loc8 = new Location(userRow-1, userCol);\r\n\t\tLocation loc9 = new Location(userRow-1, userCol1);\r\n\t\tLocation loc10 = new Location(userRow-1, userCol2);\r\n\t\tLocation loc11 = new Location(userRow-1, userCol3);\r\n\t\t\r\n\t\tLocation loc12 = new Location(userRow-2, userCol);\r\n\t\tLocation loc13= new Location(userRow-2, userCol1);\r\n\t\tLocation loc14 = new Location(userRow-2, userCol2);\r\n\t\tLocation loc15 = new Location(userRow-2, userCol3);\r\n\r\n\t \r\n\r\n\r\n\r\n\t\t\r\n\t\tLocation base1 = new Location(userRow,0);\r\n\t\t\r\n\t\t\tgrid.setImage(base1, \"FSpiritHold.png\");\r\n\t\t\t\r\n\t\tfor(int a = 0; a<9; a++) {\r\n\t\tif(userCol>0 && userCol3 !=15 && userCol2!=15 && userCol1!=15 && userCol!=15 && userRow>0)\r\n\t\t{\r\n\t\r\n\t\t\t Location next101 = new Location(userRow+1,userCol);\r\n\t\t\t Location next102 = new Location(userRow+1,userCol1);\r\n\t\t\t Location next103 = new Location(userRow+1,userCol2);\r\n\t\t\t Location next104 = new Location(userRow+1,userCol3);\r\n\r\n\t\t\t\tLocation next201 = new Location(userRow,userCol);\r\n\t\t\t\tLocation next202 = new Location(userRow,userCol1);\r\n\t\t\t\tLocation next203 = new Location(userRow,userCol2);\r\n\t\t\t\tLocation next204 = new Location(userRow,userCol3);\r\n\t\t\t\t\r\n\t\t\t\tLocation next301 = new Location(userRow-1,userCol);\r\n\t\t\t\tLocation next302 = new Location(userRow-1,userCol1);\r\n\t\t\t\tLocation next303 = new Location(userRow-1,userCol2);\r\n\t\t\t\tLocation next304 = new Location(userRow-1,userCol3);\r\n\t\t\t\t\r\n\t\t\t Location next401 = new Location(userRow-2,userCol);\r\n\t\t\t Location next402 = new Location(userRow-2,userCol1);\r\n\t\t\t Location next403 = new Location(userRow-2,userCol2);\r\n\t\t\t Location next404 = new Location(userRow-2,userCol3);\r\n\t\t\t userCol+=1;\r\n\t\t\t userCol1+=1;\r\n\t\t\t\tuserCol2+=1;\r\n\t\t\t\tuserCol3+=1;\r\n\t\t\t grid.setImage(next101, \"SB401.png\");\r\n\t\t\t grid.setImage(loc1, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next102, \"SB402.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next103, \"SB403.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next104, \"SB404.png\");\r\n\t\t\t grid.setImage(loc3, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next201, \"SB301.png\");\r\n\t\t\t grid.setImage(loc4, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next202, \"SB302.png\");\r\n\t\t\t grid.setImage(loc5, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next203, \"SB303.png\");\r\n\t\t\t grid.setImage(loc6, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next204, \"SB304.png\");\r\n\t\t\t grid.setImage(loc7, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next301, \"SB201.png\");\r\n\t\t\t grid.setImage(loc8, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next302, \"SB202.png\");\r\n\t\t\t grid.setImage(loc9, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next303, \"SB203.png\");\r\n\t\t\t grid.setImage(loc10, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next304, \"SB204.png\");\r\n\t\t\t grid.setImage(loc11, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next401, \"SB101.png\");\r\n\t\t\t grid.setImage(loc12, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next402, \"SB102.png\");\r\n\t\t\t grid.setImage(loc13, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next403, \"SB103.png\");\r\n\t\t\t grid.setImage(loc14, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next404, \"SB104.png\");\r\n\t\t\t grid.setImage(loc15, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t \r\n\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n }\r\n }", "public void executeWallGameStrategy(int row, int col) {\n gameStrategy.wall(row, col);\n }", "public void uTurnFormation() {\n // First, move all troops down column wise\n for (int j = 0; j < width; j ++) {\n for (int i = 0; i < depth; i++) {\n if (aliveTroopsFormation[i][j] == null) {\n int numSteps = depth - i;\n for (int rev = depth - 1; rev >= numSteps; rev--) {\n swapTwoTroopPositions( rev - numSteps, j, rev, j);\n }\n break;\n }\n }\n }\n\n // Then reverse the order\n for (int index = 0; index < width * depth / 2; index++) {\n int row = index / width;\n int col = index % width;\n swapTwoTroopPositions(row, col, depth - row - 1, width - col - 1);\n }\n\n // Reset the flankers\n resetFlanker();\n }", "private void checkBulletWallCollision() {\n\t\tArrayList<Missile> heroMissiles = hero.getMissiles();\n\t\tArrayList<Missile> hero2Missile = computer.getMissiles();\n\n\t\tdouble x1Wall, y1Wall, x2Wall, y2Wall, x1Bullet, y1Bullet, x2Bullet, y2Bullet;\n\t\tboolean left, right, top, bottom;\n\n\t\t// tank 1 bullets and wall collision\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m1 = heroMissiles.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// tank 2 bullets and wall collision\n\t\tfor (int i = 0; i < hero2Missile.size(); i++) {\n\t\t\tMissile m1 = hero2Missile.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void resetWall() {\r\n\tbustedWall = false;\r\n}", "public void setWalls (Array<Rectangle> walls) {\n\t\tthis.walls = walls;\n\t}", "public void frighten(ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n Random r = new Random();\r\n int targetX = 25;\r\n int targetY = 25;\r\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls,0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if(isIntersection) {\r\n\r\n if(!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - targetX,2) + Math.pow(yPos - targetY,2);\r\n }\r\n if(!isLeftCollision && this.direction !=2) {\r\n leftDistance = Math.pow((xPos - 20) - targetX,2) + Math.pow(yPos - targetY,2);\r\n }\r\n if(!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - targetX,2) + Math.pow((yPos-20) - targetY,2);\r\n }\r\n if(!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - targetX,2) + Math.pow((yPos+20) - targetY,2);\r\n }\r\n if(upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n }\r\n else if(downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n }\r\n\r\n else if(rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n }\r\n\r\n else if(leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if(this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if(this.direction ==1) {\r\n yPos = yPos + 5;\r\n }\r\n if(this.direction ==2) {\r\n xPos = xPos + 5;\r\n }\r\n if(this.direction == 3) {\r\n xPos = xPos - 5;\r\n }\r\n }", "public void update() {\n double newAngle = angle - 90;\n Coordinate nextCenterPointCoordinate = new Coordinate(\n this.centerPointCoordinate.getXCoordinate() - (Constants.BULLET_SPEED * Math.cos(Math.toRadians(newAngle))),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(newAngle)))\n );\n\n\n ArrayList<Wall> walls = new ArrayList<>();\n walls.addAll(TankTroubleMap.getDestructibleWalls());\n walls.addAll(TankTroubleMap.getIndestructibleWalls());\n ArrayList<Coordinate> nextCoordinatesArrayList = makeCoordinatesFromCenterCoordinate(nextCenterPointCoordinate);\n Wall wallToCheck = null;\n for (Wall wall : walls) {\n if (TankTroubleMap.checkOverLap(wall.getPointsArray(), nextCoordinatesArrayList)) {\n wallToCheck = wall;\n }\n }\n\n if (wallToCheck != null) {\n if (horizontalCrash(wallToCheck)) { //if the bullet would only go over horizontal side of any walL\n nextCenterPointCoordinate = flipH();\n } else if (verticalCrash(wallToCheck)) { // if the bullet would only go over vertical side any wall\n nextCenterPointCoordinate = flipV();\n } else {// if the bullet would only go over corner of any wall\n int cornerCrashState = cornerCrash(wallToCheck);\n nextCenterPointCoordinate = flipCorner(cornerCrashState);\n }\n\n if (wallToCheck.isDestroyable()) {//crashing destructible\n //System.out.println(\"bullet damage:\"+ damage);\n //System.out.println(\"wall health:\"+ ((DestructibleWall) wallToCheck).getHealth());\n ((DestructibleWall) wallToCheck).receiveDamage(damage);\n if (((DestructibleWall) wallToCheck).getHealth() <= 0) {\n TankTroubleMap.getDestructibleWalls().remove(wallToCheck);\n }\n bulletsBlasted = true;\n tankTroubleMap.getBullets().remove(this);\n }\n }\n this.centerPointCoordinate = nextCenterPointCoordinate;\n updateArrayListCoordinates();\n\n // Tanks / users\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getUsers().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getUsers().get(i).getUserTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getUsers().get(i).getUserTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getUsers().get(i).getUserTank().getHealth());\n if (tankTroubleMap.getUsers().get(i).getUserTank().getHealth() <= 0) {\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().remove(finalI);\n gameOverCheck();\n if (isUserTank) {\n tankTroubleMap.getUsers().get(tankIndex).getUserTank().setNumberOfDestroyedTank(tankTroubleMap.getUsers().get(tankIndex).getUserTank().getNumberOfDestroyedTank() + 1);\n }\n tankTroubleMap.getAudience().add(tankTroubleMap.getUsers().get(finalI));\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n\n // Tanks / bots\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getBots().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getBots().get(i).getAiTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getBots().get(i).getAiTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getBots().get(i).getAiTank().getHealth());\n if (tankTroubleMap.getBots().get(i).getAiTank().getHealth() <= 0) {\n // System.out.println(\"Blasted Tank.......\");\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().remove(finalI);\n gameOverCheck();\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n }", "public void step()\n {\n\t int rows = grid.length-1;\n\t int cols = grid[0].length-1;\n\t int direction = (int) (Math.random()*3);\n\t direction--;\n\t int row = (int) (Math.random()*rows);\n\t //System.out.println(row);\n\t int col = (int) (Math.random()*cols);\n\t //System.out.println(col);\n\t if(grid[row][col] == SAND && (grid[row+1][col] == EMPTY || grid[row+1][col] == WATER)) {\n\t\t grid[row+1][col] = SAND;\n\t\t grid[row][col] = EMPTY;\n\t }\n\t if(grid[row][col] == WATER && grid[row+1][col] == EMPTY) {\n\t\t if(col != 0) {\n\t\t\t grid[row+1][col+direction] = WATER;\n\t\t\t grid[row][col] = EMPTY;\n\t\t }\n\t\t else {\n\t\t\t grid[row+1][col] = WATER;\n\t\t\t grid[row][col] = EMPTY;\n\t\t }\n\t }\n }", "private void fly() {\n\t\tint xTarget = 12 *Board.TILE_D;\r\n\t\tint yTarget = 12 * Board.TILE_D;\r\n\t\tif(centerX - xTarget >0) {\r\n\t\t\tcenterX--;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcenterX++;\r\n\t\t}\r\n\t\tif(centerY - yTarget > 0) {\r\n\t\t\tcenterY --;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcenterY ++;\r\n\t\t}\r\n\t}", "public void seekWalls() {\n\t\t for (int j=0; j<visited[0].length; j++){\n\t\t\tfor (int i=visited.length-1; i>=0; i--) {\t\t\t\n\t\t\t\tif (i!=0 && j!= visited[0].length-1) {//general position\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;//not break!!!!! return to exit !\n\t\t\t\t\t}\n\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (i==0 && j!= visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (i!=0 && j== visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {//if (i==0 && j== visited[0].length-1) {\n\t\t\t\t\t//no solution\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void drawWall(Graphics g, Wall wall) {\n int x = wall.x;\n int y = wall.y;\n if(wall.horz) {\n g.drawLine(BORDER + x*SIZE, BORDER + y*SIZE, BORDER + (x+1)*SIZE, BORDER + y*SIZE);\n } else {\n g.drawLine(BORDER + x*SIZE, BORDER + y*SIZE, BORDER + x*SIZE, BORDER + (y+1)*SIZE);\n }\n }", "void animalMove(int x,int y, Living[][] map,int gridLength, int gridWidth){\r\n \r\n boolean age=map[x][y].getAge();\r\n boolean gender=map[x][y].getGender();\r\n boolean checkRight=false;\r\n boolean checkLeft=false;\r\n boolean checkUp=false;\r\n boolean checkDown=false;\r\n boolean up=false;\r\n boolean down=false;\r\n boolean right=false;\r\n boolean left=false;\r\n boolean baby=false;\r\n boolean turn=map[x][y].getMovement(); //Check to see if it moved before in the array\r\n \r\n double random=Math.random();\r\n \r\n \r\n \r\n \r\n //Checks to see if it is possible to even see to the left first\r\n if(y-1>=0){\r\n left=true;\r\n \r\n if(turn && (map[x][y-1] instanceof Plant) ){ //Check to see if there is plants and goes to plants\r\n map[x][y].gainHealth((map[x][y-1].getHealth()));\r\n map[x][y].setMovement(false); \r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n turn=false; \r\n }\r\n if(turn && (map[x][y-1] instanceof Sheep) && (age==map[x][y-1].getAge()) ){ \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x][y-1].getGender()) && (map[x][y].getHealth()>19) && (map[x][y-1].getHealth()>19) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){ \r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null)&& !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n \r\n if( (x-1>=0) && (map[x-1][y]==null)&& !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if((y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){\r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x][y-1].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x][y-1].setMovement(false);\r\n turn=false;\r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n //If it can move to the left need to check if it can foresee more incase there wasn't any place for it to go\r\n if(y-2>=0){\r\n checkLeft=true;\r\n }\r\n }\r\n \r\n //Checks to see if it is possible to even see to the right first \r\n if(y+1<gridWidth){\r\n right=true;\r\n \r\n //Check to move on towards plants\r\n if(turn && (map[x][y+1] instanceof Plant)){\r\n map[x][y].gainHealth(map[x][y+1].getHealth()); \r\n map[x][y].setMovement(false); \r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null;\r\n turn=false; \r\n }\r\n \r\n if(turn && (map[x][y+1] instanceof Sheep && age==map[x][y+1].getAge()) ){ \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x][y+1].getGender()) && (map[x][y].getHealth()>19) && (map[x][y+1].getHealth()>19) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n \r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n \r\n if( (x-1>=0) && (map[x-1][y]==null) && !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheeps will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x][y+1].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x][y+1].setMovement(false);\r\n turn=false; \r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n \r\n //If it can move to the right need to check if it can foresee more incase there wasn't any place for it to go\r\n if(y+2<gridWidth){ \r\n checkRight=true;\r\n }\r\n } \r\n \r\n //Check to see if it can go up\r\n if(x-1>=0){\r\n up=true;\r\n \r\n //Check for plant to go on to upwards \r\n if(turn && (map[x-1][y] instanceof Plant) ){\r\n map[x][y].gainHealth(map[x-1][y].getHealth()); \r\n map[x][y].setMovement(false); \r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n turn=false;\r\n }\r\n \r\n if(turn && (map[x-1][y] instanceof Sheep) && (age==map[x-1][y].getAge()) ){ \r\n //If the ages match age must be false to be adults and both be opposite genders and have more then 19 health\r\n if(turn && !age && !(gender==map[x-1][y].getGender()) &&map[x][y].getHealth()>19 &&map[x-1][y].getHealth()>19){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n if( (y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n \r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null) && !(baby) ){\r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n \r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x-1][y].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x-1][y].setMovement(false);\r\n turn=false; \r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n \r\n //If it can move to upwards need to check if it can foresee more incase there wasn't any place for it to go\r\n if(x-2>=0){\r\n checkUp=true; \r\n }\r\n } \r\n //Check to see where to go downwards\r\n if(x+1<gridLength){\r\n down=true; \r\n \r\n //Check to see if any plants are downwards\r\n if(turn && (map[x+1][y] instanceof Plant) ){\r\n map[x][y].gainHealth( (map[x+1][y].getHealth()));\r\n map[x][y].setMovement(false);\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n turn=false;\r\n } \r\n \r\n if(turn && (map[x+1][y] instanceof Sheep) && (age==map[x+1][y].getAge()) ){ \r\n \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x+1][y].getGender()) && (map[x][y].getHealth()>=20) && (map[x+1][y].getHealth()>=20) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n if( (y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep \r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if( (x-1>=0) && (map[x+1][y]==null) && !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x+1][y].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x+1][y].setMovement(false);\r\n turn=false;\r\n baby=false;\r\n }\r\n }\r\n } \r\n } \r\n if(x+2<gridLength){\r\n checkDown=true;\r\n }\r\n } \r\n \r\n //Movement towards plant only if no immediate sheep/plants are there to move to\r\n if(turn && checkRight && (map[x][y+2] instanceof Plant) ){\r\n if(map[x][y+1]==null){\r\n \r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null;\r\n map[x][y+1].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n if(turn && checkDown && (map[x+2][y] instanceof Plant) ){\r\n if(map[x+1][y]==null){\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n map[x+1][y].setMovement(false);\r\n turn=false;\r\n }\r\n } \r\n if(turn && checkUp && (map[x-2][y] instanceof Plant) ){\r\n if(map[x-1][y]==null){\r\n \r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n map[x-1][y].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n \r\n if(turn && checkLeft && (map[x][y-2] instanceof Plant) ){\r\n if(map[x][y-1]==null){\r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n map[x][y-1].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n \r\n //Random Movement if there are no plants to move towards \r\n if(turn && right && (random<=0.2) ){\r\n if(map[x][y+1]==null){\r\n map[x][y].setMovement(false);\r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null; \r\n }\r\n }\r\n if(turn && left && (random>0.2) && (random<=0.4) ){\r\n if(map[x][y-1]==null){\r\n map[x][y].setMovement(false);\r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n if(turn && up && (random>0.4) && (random<=0.6) ){\r\n if(map[x-1][y]==null){\r\n map[x][y].setMovement(false);\r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n if(turn && down && (random>0.6) && (random<=0.8) ){\r\n if(map[x+1][y]==null){\r\n map[x][y].setMovement(false);\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n }", "protected void checkForWalls(int x, int y, ArrayList<Position> walls) {\n int x1 = x - 1;\n int x2 = x + 2;\n int y1 = y - 1;\n int y2 = y + 2;\n\n if (x == 0) // We want to avoid an OutOfBounds exception\n x1 = x;\n if (x == sizeOfFloor - 1)\n x2 = sizeOfFloor;\n if (y == 0)\n y1 = y;\n if (y == sizeOfFloor - 1)\n y2 = sizeOfFloor;\n\n\n for (int i = x1; i < x2; i++) {\n for (int j = y1; j < y2; j++) {\n if (layout[i][j].getContent() == 'a')\n walls.add(layout[i][j]);\n }\n }\n }", "private void bounceOffHorizontalWall() {\n vy = -vy;\n }", "private void addWall(int positionX, int positionY) {\n for (int i = Math.max(0, positionX - 1);\n i < Math.min(size.width, positionX + 2); i++) {\n for (int j = Math.max(0, positionY - 1);\n j < Math.min(size.height, positionY + 2); j++) {\n if (world[i][j] == Tileset.NOTHING) {\n world[i][j] = Tileset.WALL;\n }\n }\n }\n }", "private void initialize() {\n\n this.levelName = \"Green 3\";\n this.numberOfBalls = 2;\n int ballsRadius = 5;\n Color ballsColor = Color.white;\n this.paddleHeight = (screenHeight / 27);\n this.paddleWidth = (screenWidth / 8);\n this.paddleSpeed = 11;\n int surroundingBlocksWidth = 30;\n this.paddleColor = new Color(1.0f, 0.699f, 0.000f);\n this.paddleUpperLeft = new Point(screenWidth / 2.2, screenHeight - surroundingBlocksWidth\n - this.paddleHeight);\n Color backgroundColor = new Color(0.000f, 0.420f, 0.000f);\n this.background = new Block(new Rectangle(new Point(0, 0), screenWidth + 1\n , screenHeight + 2), backgroundColor);\n this.background.setNumber(-1);\n\n Color[] colors = {Color.darkGray, Color.red, Color.yellow, Color.blue, Color.white};\n int blocksRowsNum = 5;\n int blocksInFirstRow = 10;\n int blocksWidth = screenWidth / 16;\n int blockHeight = screenHeight / 20;\n int firstBlockYlocation = screenHeight / 4;\n int removableBlocks = 0;\n Block[][] stairs = new Block[blocksRowsNum][];\n //blocks initialize.\n for (int i = 0; i < blocksRowsNum; i++, blocksInFirstRow--) {\n int number;\n for (int j = 0; j < blocksInFirstRow; j++) {\n if (i == 0) {\n number = 2; //top row.\n } else {\n number = 1;\n }\n stairs[i] = new Block[blocksInFirstRow];\n Point upperLeft = new Point(screenWidth - (blocksWidth * (j + 1)) - surroundingBlocksWidth\n , firstBlockYlocation + (blockHeight * i));\n stairs[i][j] = new Block(new Rectangle(upperLeft, blocksWidth, blockHeight), colors[i % 5]);\n if (stairs[i][j].getHitPoints() != -2 && stairs[i][j].getHitPoints() != -3) { // not death or live block\n stairs[i][j].setNumber(number);\n removableBlocks++;\n }\n this.blocks.add(stairs[i][j]);\n }\n\n }\n this.numberOfBlocksToRemove = (int) (removableBlocks * 0.5); //must destroy half of them.\n this.ballsCenter.add(new Point(screenWidth / 1.93, screenHeight * 0.9));\n this.ballsCenter.add(new Point(screenWidth / 1.93, screenHeight * 0.9));\n List<Velocity> v = new ArrayList<>();\n v.add(Velocity.fromAngleAndSpeed(45, 9));\n v.add(Velocity.fromAngleAndSpeed(-45, 9));\n this.ballsFactory = new BallsFactory(this.ballsCenter, ballsRadius, ballsColor,\n screenWidth, screenHeight, v);\n\n //bodies.\n //tower.\n Block base = new Block(new Rectangle(new Point(surroundingBlocksWidth + screenWidth / 16, screenHeight * 0.7)\n , screenWidth / 6, screenHeight * 0.3), Color.darkGray);\n base.setNumber(-1);\n this.bodies.add(base);\n Block base2 = new Block(new Rectangle(new Point(base.getCollisionRectangle().getUpperLine()\n .middle().getX() - base.getWidth() / 6\n , base.getCollisionRectangle().getUpperLeft().getY() - base.getHeight() / 2.5), base.getWidth() / 3\n , base.getHeight() / 2.5), Color.gray);\n base2.setNumber(-1);\n this.bodies.add(base2);\n Block pole = new Block(new Rectangle(new Point(base2.getCollisionRectangle().getUpperLine().middle().getX()\n - base2.getWidth() / 6, base2.getCollisionRectangle().getUpperLeft().getY() - screenHeight / 3)\n , base2.getWidth() / 3, screenHeight / 3), Color.lightGray);\n pole.setNumber(-1);\n this.bodies.add(pole);\n\n double windowWidth = base.getWidth() / 10;\n double windowHeight = base.getHeight() / 7;\n double b = base.getWidth() / 12;\n double h = base.getHeight() / 20;\n for (int i = 0; i < 6; i++) { //windows of tower.\n for (int j = 0; j < 5; j++) {\n Block window = new Block(new Rectangle(new Point(base.getCollisionRectangle().getUpperLeft().getX() + b\n + (windowWidth + b) * j,\n base.getCollisionRectangle().getUpperLeft().getY() + h + (windowHeight + h) * i), windowWidth\n , windowHeight), Color.white);\n window.setNumber(-1);\n this.bodies.add(window);\n }\n }\n\n //circles on the top of the tower.\n Circle c1 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 17, Color.black, \"fill\");\n Circle c2 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 12, Color.darkGray, \"fill\");\n Circle c3 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 7, Color.red, \"fill\");\n this.bodies.add(c1);\n this.bodies.add(c2);\n this.bodies.add(c3);\n\n\n }", "public void scrollWalls(){\n\t\tfor(int i = 0; i < walls.length; i+=2) {\n\t\t\tif (walls[i].getX() > -150) {\n\t\t\t\twalls[i].setX(walls[i].getX() - 2);\n\t\t\t\twalls[i + 1].setX(walls[i + 1].getX() - 2);\n\t\t\t} else {\n\t\t\t\twalls[i].setX(700);\n\t\t\t\twalls[i + 1].setX(700);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void loop() {\n\n //double armRot = robot.Pivot.getPosition();\n\n double deadzone = 0.2;\n\n double trnSpdMod = 0.5;\n\n float xValueRight = gamepad1.right_stick_x;\n float yValueLeft = -gamepad1.left_stick_y;\n\n xValueRight = Range.clip(xValueRight, -1, 1);\n yValueLeft = Range.clip(yValueLeft, -1, 1);\n\n // Pressing \"A\" opens and closes the claw\n if (gamepad1.a) {\n\n if (robot.Claw.getPosition() < 0.7)\n while(gamepad1.a){\n robot.Claw.setPosition(1);}\n else if (robot.Claw.getPosition() > 0.7)\n while(gamepad1.a){\n robot.Claw.setPosition(0.4);}\n else\n while(gamepad1.a)\n robot.Claw.setPosition(1);\n }\n\n // Pressing \"B\" changes the wrist position\n if (gamepad1.b) {\n\n if (robot.Wrist.getPosition() == 1)\n while(gamepad1.b)\n robot.Wrist.setPosition(0.5);\n else if (robot.Wrist.getPosition() == 0.5)\n while(gamepad1.b)\n robot.Wrist.setPosition(1);\n else\n while(gamepad1.b)\n robot.Wrist.setPosition(1);\n }\n\n // Turn left/right, overrides forward/back\n if (Math.abs(xValueRight) > deadzone) {\n\n robot.FL.setPower(xValueRight * trnSpdMod);\n robot.FR.setPower(-xValueRight * trnSpdMod);\n robot.BL.setPower(xValueRight * trnSpdMod);\n robot.BR.setPower(-xValueRight * trnSpdMod);\n\n\n } else {//Forward/Back On Solely Left Stick\n if (Math.abs(yValueLeft) > deadzone) {\n robot.FL.setPower(yValueLeft);\n robot.FR.setPower(yValueLeft);\n robot.BL.setPower(yValueLeft);\n robot.BR.setPower(yValueLeft);\n }\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n\n\n telemetry.addData(\"Drive Encoder Ticks\", robot.FL.getCurrentPosition());\n telemetry.addData(\"Winch Encoder Ticks\", robot.Winch.getCurrentPosition());\n telemetry.addData(\"ColorArm Position\", robot.ColorArm.getPosition());\n telemetry.addData(\"Wrist Position\", robot.Wrist.getPosition());\n telemetry.addData(\"Claw Position\", robot.Claw.getPosition());\n telemetry.addData(\"Grip Position\", robot.Grip.getPosition());\n telemetry.addData(\"Color Sensor Data Red\", robot.Color.red());\n telemetry.addData(\"Color Sensor Data Blue\", robot.Color.blue());\n\n /*\n\n // This is used for an Omniwheel base\n\n // Group a is Front Left and Rear Right, Group b is Front Right and Rear Left\n float a;\n float b;\n float turnPower;\n if(!gamepad1.x) {\n if (Math.abs(xValueRight) <= deadzone && Math.abs(yValueRight) <= deadzone) {\n // And is used here because both the y and x values of the right stick should be less than the deadzone\n\n a = Range.clip(yValueLeft + xValueLeft, -1, 1);\n b = Range.clip(yValueLeft - xValueLeft, -1, 1);\n\n\n robot.FL.setPower(a);\n robot.FR.setPower(b);\n robot.BL.setPower(b);\n robot.BR.setPower(a);\n\n telemetry.addData(\"a\", \"%.2f\", a);\n telemetry.addData(\"b\", \"%.2f\", b);\n\n } else if (Math.abs(xValueRight) > deadzone || Math.abs(yValueRight) > deadzone) {\n\n // Or is used here because only one of the y and x values of the right stick needs to be greater than the deadzone\n turnPower = Range.clip(xValueRight, -1, 1);\n\n robot.FL.setPower(-turnPower);\n robot.FR.setPower(turnPower);\n robot.BL.setPower(-turnPower);\n robot.BR.setPower(turnPower);\n\n } else {\n\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n\n } else {\n\n if (Math.abs(xValueRight) <= deadzone && Math.abs(yValueRight) <= deadzone) {\n\n // And is used here because both the y and x values of the right stick should be less than the deadzone\n a = Range.clip(yValueLeft + xValueLeft, -0.6f, 0.6f);\n b = Range.clip(yValueLeft - xValueLeft, -0.6f, 0.6f);\n\n\n robot.FL.setPower(a);\n robot.FR.setPower(b);\n robot.BL.setPower(b);\n robot.BR.setPower(a);\n\n telemetry.addData(\"a\", \"%.2f\", a);\n telemetry.addData(\"b\", \"%.2f\", b);\n\n } else if (Math.abs(xValueRight) > deadzone || Math.abs(yValueRight) > deadzone) {\n\n // Or is used here because only one of the y and x values of the right stick needs to be greater than the deadzone\n turnPower = Range.clip(xValueRight, -1, 1);\n\n robot.FL.setPower(-turnPower);\n robot.FR.setPower(turnPower);\n robot.BL.setPower(-turnPower);\n robot.BR.setPower(turnPower);\n\n } else {\n\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n }\n\n\n if (gamepad1.dpad_up) {\n\n robot.Swing.setPower(.6);\n\n } else if (gamepad1.dpad_down) {\n\n robot.Swing.setPower(-.6);\n\n } else {\n\n robot.Swing.setPower(0);\n }\n\n if(gamepad1.a){\n\n robot.Claw.setPosition(.4);\n\n } else if(gamepad1.b){\n\n robot.Claw.setPosition(0);\n }\n\n if(gamepad1.left_bumper) {\n\n robot.Pivot.setPosition(armRot+0.0005);\n\n } else if(gamepad1.right_bumper) {\n\n robot.Pivot.setPosition(armRot-0.0005);\n\n } else{\n\n robot.Pivot.setPosition(armRot);\n }\n\n telemetry.addData(\"position\", position);\n\n */\n\n /*\n * Code to run ONCE after the driver hits STOP\n */\n }", "@Test\n public void testTankMovingOutsideBoundaries() {\n tank.moveRight();\n tank.notMoveLeft();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n assertEquals(tank.x(), 460);\n\n tank.moveLeft();\n tank.notMoveRight();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n\n assertEquals(tank.x(), 180);\n }", "private void drawWalls(Graphics g) {\n\t\tfor(int i=0; i<grid.length; i++){\n\t\t\tfor(int j=0; j<grid[0].length; j++){\n\t\t\t\tif(grid[i][j].getNorth()!=null) {\n\t\t\t\t\tg.setColor(Color.decode(\"#CC3300\"));//Brown\n\t\t\t\t\tg.drawLine(j*widthBlock+padding+doorX, i*heightBlock+padding, j*widthBlock+padding+doorWidth, i*heightBlock+padding);\n\t\t\t\t}else {\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.drawLine(j*widthBlock+padding, i*heightBlock+padding, j*widthBlock+padding+widthBlock, i*heightBlock+padding);\n\t\t\t\t}\n\t\t\t\tif(grid[i][j].getEast()!=null) {\n\t\t\t\t\tg.setColor(Color.decode(\"#CC3300\"));//Brown\n\t\t\t\t\tg.drawLine((j+1)*widthBlock+padding, i*heightBlock+padding+doorX, (j+1)*widthBlock+padding, i*heightBlock+padding+doorWidth);\n\t\t\t\t}else {\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.drawLine((j+1)*widthBlock+padding, i*heightBlock+padding, (j+1)*widthBlock+padding, (i+1)*heightBlock+padding);\n\t\t\t\t}\n\t\t\t\tif(grid[i][j].getSouth()!=null) {\n\t\t\t\t\tg.setColor(Color.decode(\"#CC3300\"));//Brown\n\t\t\t\t\tg.drawLine(j*widthBlock+padding+doorX, (i+1)*heightBlock+padding, j*widthBlock+padding+doorWidth, (i+1)*heightBlock+padding);\n\t\t\t\t}else {\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.drawLine(j*widthBlock+padding, (i+1)*heightBlock+padding, (j+1)*widthBlock+padding, (i+1)*heightBlock+padding);\n\t\t\t\t}\n\t\t\t\tif(grid[i][j].getWest()!=null) {\n\t\t\t\t\tg.setColor(Color.decode(\"#CC3300\"));//Brown\n\t\t\t\t\tg.drawLine(j*widthBlock+padding, i*heightBlock+padding+doorX, j*widthBlock+padding, i*heightBlock+padding+doorWidth);\n\t\t\t\t}else {\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.drawLine(j*widthBlock+padding, i*heightBlock+padding, j*widthBlock+padding, (i+1)*heightBlock+padding);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void boxOfMortys() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(-10, -10, 0);\n pos2 = new Triple(110, -10, 0);\n pos3 = new Triple(110, -10, 120);\n pos4 = new Triple(-10, -10, 120);\n pos5 = new Triple(-10, 110, 0);\n pos6 = new Triple(110, 110, 0);\n pos7 = new Triple(110, 110, 120);\n pos8 = new Triple(-10, 110, 120);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, 1, 0),\n new Vertex(pos3, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos5, 1, 0),\n new Vertex(pos8, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos3, 0, 1),\n new Vertex(pos2, 0, 0),\n 22 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos8, 0, 1),\n new Vertex(pos5, 0, 0),\n 22 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "private void UpdateSurround(int row, int col) {\n\t\t\n\t\t// updates the 3 positions below the bomb\n\t\tif(row - 1 >= 0) {\n\t\t\tif(grid[row-1][col] < 9)\n\t\t\t\tgrid[row-1][col] = grid[row-1][col] + 1;\n\t\t\tif(col - 1 >= 0) {\n\t\t\t\tif(grid[row-1][col-1] < 9)\n\t\t\t\t\tgrid[row-1][col-1] = grid[row-1][col-1] + 1;\n\t\t\t}\n\t\t\tif(col + 1 < width) {\n\t\t\t\tif(grid[row-1][col+1] < 9)\n\t\t\t\t\tgrid[row-1][col+1] = grid[row-1][col+1] + 1;\n\t\t\t}\n\t\t}\n\t\t// updates the 3 positions above the bomb\n\t\tif(row + 1 < height) {\n\t\t\tif(grid[row+1][col] < 9)\n\t\t\t\tgrid[row+1][col] = grid[row+1][col] + 1;\n\t\t\tif(col - 1 >= 0) {\n\t\t\t\tif(grid[row+1][col-1] <9)\n\t\t\t\t\tgrid[row+1][col-1] = grid[row+1][col-1] + 1;\n\t\t\t}\n\t\t\tif(col + 1 < width) {\n\t\t\t\tif(grid[row+1][col+1] < 9)\n\t\t\t\t\tgrid[row+1][col+1] = grid[row+1][col+1] + 1;\n\t\t\t}\n\t\t}\n\t\t// updates position to the left\n\t\tif(col - 1 >= 0) {\n\t\t\tif(grid[row][col-1] < 9)\n\t\t\t\tgrid[row][col-1] = grid[row][col-1] + 1;\n\t\t}\n\t\t// updates position to the right\n\t\tif(col + 1 < width) {\n\t\t\tif(grid[row][col+1] < 9)\n\t\t\t\tgrid[row][col+1] = grid[row][col+1] + 1;\n\t\t}\n\t}", "public void render() {\n int pixel = getPixelSize();\n for (int xx = x; xx<x+w; xx += pixel) {\n for (int yy = y; yy<y+h; yy += pixel) {\n Location next = getLocation(xx, yy);\n if (next != null) { // This way if a wall is spawned at the edge it's ok\n next.setColor(color(255,255,255));\n next.setType(LocationType.WALL);\n getGridCache().add(next);\n }\n }\n }\n }", "private void buildWalls() {\n for (Position floor : floors) {\n addWall(floor.xCoordinate, floor.yCoordinate);\n }\n }", "public void setNeighbors(){\t\t\t\t\n\t\tint row = position[0];\n\t\tint column = position[1];\t\t\n\t\tif(column+1 < RatMap.SIDELENGTH){\n\t\t\teastCell = RatMap.getMapCell(row,column+1);\t\t\t\n\t\t}else{\n\t\t\teastCell = null;\n\t\t}\t\n\t\tif(row+1 < RatMap.SIDELENGTH){\n\t\t\tnorthCell = RatMap.getMapCell(row+1,column);\n\t\t}else{\n\t\t\tnorthCell = null;\n\t\t}\t\n\t\tif(column-1 > -1){\n\t\t\twestCell = RatMap.getMapCell(row, column-1);\t\t\t\n\t\t}else{\n\t\t\twestCell = null;\n\t\t}\n\t\tif(row-1 > -1){\n\t\t\tsouthCell = RatMap.getMapCell(row-1, column);\n\t\t}else{\n\t\t\tsouthCell = null;\n\t\t}\n\t}", "public void movbolitas() {\n x += vx;\n y += vy;\n if (x > width || x < 0) {\n vx *= -1;\n }\n if (y > height || y < 0) {\n vy *= -1;\n }\n }", "public void onHitWall(int whichWall) {\n\t\t\r\n\t}", "private static void updateNeighbourTileDoors(Creature creature, int tilex, int tiley) {\n/* 2989 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex, tiley - 1)))) {\n/* */ \n/* 2991 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley - 1, true);\n/* 2992 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 2996 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley - 1, false);\n/* 2997 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ \n/* */ \n/* 3001 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex + 1, tiley)))) {\n/* */ \n/* 3003 */ VolaTile newTile = Zones.getOrCreateTile(tilex + 1, tiley, true);\n/* 3004 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 3008 */ VolaTile newTile = Zones.getOrCreateTile(tilex + 1, tiley, false);\n/* 3009 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ \n/* */ \n/* 3013 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex, tiley + 1)))) {\n/* */ \n/* 3015 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley + 1, true);\n/* 3016 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 3020 */ VolaTile newTile = Zones.getOrCreateTile(tilex, tiley + 1, false);\n/* 3021 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ \n/* */ \n/* 3025 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tilex - 1, tiley)))) {\n/* */ \n/* 3027 */ VolaTile newTile = Zones.getOrCreateTile(tilex - 1, tiley, true);\n/* 3028 */ newTile.getSurfaceTile().doorCreatureMoved(creature, 0, 0);\n/* */ }\n/* */ else {\n/* */ \n/* 3032 */ VolaTile newTile = Zones.getOrCreateTile(tilex - 1, tiley, false);\n/* 3033 */ newTile.getCaveTile().doorCreatureMoved(creature, 0, 0);\n/* */ } \n/* */ }", "public static void part2(){\n\t\n System.out.println(\"\\\\\"); //Outer wall\n System.out.println(\"\\\\\");\n System.out.println(\"\\\\\");\n for(int i = 0; i <= 16; i++){ //loop created to display top of the door\n\n \tSystem.out.print(\"-\");\n\n\t}\n System.out.println(\"\");\n System.out.println(\"\\\\\\t\\t| \\t(\\\")\"); //The door and the stick figure\n System.out.println(\"\\\\\\t\\t|\\t-|-\");\n System.out.println(\"\\\\\\t o | \\t |\");\n System.out.println(\"\\\\\\t\\t|\\t /\\\\\");\n System.out.println(\"\\\\\\t\\t|\\t/ \\\\\");\n\t\t\n }", "public WallTile()\n\t{\n\t\t\n\t}", "public boolean isWall() {\n return type == CellType.WALL;\n }", "void maze(char[][] mz, int p_row, int p_col, int h_row, int h_col){\n \n if (mz[p_row][p_col] == 'F'){\n //Base case -End maze\n printMaze(mz);\n System.out.println(\"Maze Successfully Completed!\");\n } else {\n if (h_row-1 == p_row){\n //If facing East\n if(mz[h_row][h_col] != '#'){ //If right turn available\n //Update player\n mz[p_row][p_col] = 'X'; \n p_row += 1;\n p_col += 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 0;\n h_col -= 1;\n printMaze(mz); \n } else { \n //If hand position is a wall check in front of player\n if(mz[p_row][p_col+1] != '#'){\n //Update player\n mz[p_row][p_col] = 'X';\n p_row += 0;\n p_col += 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 0;\n h_col += 1;\n printMaze(mz);\n } else if (mz[p_row-1][p_col] != '#'){\n //Turn left 90 and if not a wall move up\n //Update player\n mz[p_row][p_col] = 'X';\n p_row -= 1;\n p_col += 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row -= 2;\n h_col += 1;\n printMaze(mz);\n } else {\n //Turn around\n //Update player\n mz[p_row][p_col] = 'X';\n p_row += 0;\n p_col -= 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row -= 2;\n h_col -= 1;\n printMaze(mz);\n }\n }\n } else if (h_row+1 == p_row){\n //If facing West\n if(mz[h_row][h_col] != '#'){\n //Look right\n mz[p_row][p_col] = 'X'; \n p_row -= 1;\n p_col += 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row -= 0;\n h_col += 1;\n printMaze(mz);\n } else { \n //If hand position is a wall check in front of player\n if(mz[p_row][p_col-1] != '#'){\n //Update player\n mz[p_row][p_col] = 'X';\n p_row += 0;\n p_col -= 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 0;\n h_col -= 1;\n printMaze(mz);\n } else if (mz[p_row+1][p_col] != '#'){\n //Turn left 90 and if not a wall move up\n //Update player\n mz[p_row][p_col] = 'X';\n p_row += 1;\n p_col -= 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 2;\n h_col -= 1;\n printMaze(mz);\n } else {\n //Turn around\n //Update player\n mz[p_row][p_col] = 'X';\n p_row -= 0;\n p_col += 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 2;\n h_col += 1;\n printMaze(mz);\n }\n }\n \n } else if (h_col -1 == p_col){\n //If facing North\n if(mz[h_row][h_col] != '#'){ \n //Take right if available\n //Update player\n mz[p_row][p_col] = 'X'; \n p_row += 0;\n p_col += 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 1;\n h_col -= 0;\n printMaze(mz); \n } else {\n //If hand position is a wall check in front of player\n if(mz[p_row-1][p_col] != '#'){\n //Update player\n mz[p_row][p_col] = 'X';\n p_row -= 1;\n p_col += 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row -= 1;\n h_col += 0;\n printMaze(mz);\n } else if (mz[p_row][p_col-1] != '#'){\n //Turn left 90 and if not a wall move up\n //Update player\n mz[p_row][p_col] = 'X';\n p_row -= 0;\n p_col -= 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row -= 1;\n h_col -= 2;\n printMaze(mz);\n } else {\n //Turn around\n //Update player\n mz[p_row][p_col] = 'X';\n p_row -= 1;\n p_col += 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 1;\n h_col -= 2;\n printMaze(mz);\n }\n }\n } else if (h_col+1 == p_col){\n //If facing South\n if(mz[h_row][h_col] != '#'){\n //Look right\n mz[p_row][p_col] = 'X'; \n p_row -= 0;\n p_col -= 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row -= 1;\n h_col += 0;\n printMaze(mz);\n } else { \n //If hand position is a wall check in front of player\n if(mz[p_row+1][p_col] != '#'){\n //Update player\n mz[p_row][p_col] = 'X';\n p_row += 1;\n p_col += 0;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 1;\n h_col += 0;\n printMaze(mz);\n } else if (mz[p_row][p_col+1] != '#'){\n //Turn left 90 and if not a wall move up\n //Update player\n mz[p_row][p_col] = 'X';\n p_row += 0;\n p_col += 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 1;\n h_col += 2;\n printMaze(mz);\n } else {\n //Turn around\n //Update player\n mz[p_row][p_col] = 'X';\n p_row -= 0;\n p_col += 1;\n if (mz[p_row][p_col] == 'F'){\n mz[p_row][p_col] = 'F';\n } else {\n mz[p_row][p_col] = 'O';\n }\n //Update hand\n h_row += 2;\n h_col += 1;\n printMaze(mz);\n }\n }\n \n }\n maze(mz, p_row, p_col, h_row, h_col); \n }\n }", "private void addUpBlock(Position p, TETile te,\n int len, int leftWid, int rightWid) {\n int x = p.x;\n int y = p.y;\n for (int j = y; j < y + len; j += 1) {\n for (int i = x - leftWid; i < x + rightWid + 1; i += 1) {\n world[i][j] = te;\n }\n }\n }", "public void placeWormOnAgar()\n {\n for (int x = 0; x < Agar.GRID_SIZE.width; x++)\n {\n for (int y = 0; y < Agar.GRID_SIZE.height; y++)\n {\n agar.wormCells[x][y] = SectorDisplay.EMPTY_CELL_VALUE;\n }\n }\n agar.wormCells[headSegment.x][headSegment.y] = Agar.WORM_SEGMENT_VALUE;\n for (int i = 0; i < NUM_BODY_SEGMENTS; i++)\n {\n BodySegment segment = bodySegments[i];\n agar.wormCells[segment.x][segment.y] = Agar.WORM_SEGMENT_VALUE;\n }\n }", "public void preSetup(){\n // Any of your pre setup before the loop starts should go here\n \n // border\n blocks[0] = new Rectangle(0, 0, 25, 600);\n blocks[1] = new Rectangle(775, 0, 25, 600);\n blocks[2] = new Rectangle(0, 0, 800, 25);\n blocks[3] = new Rectangle(0, 575, 800, 25);\n \n // starting room\n // right wall\n blocks[5] = new Rectangle(WIDTH / 2 + 75, 400, 25, 150);\n // left wall\n blocks[10] = new Rectangle(WIDTH / 2 - 100, 400, 25, 150);\n // centre\n blocks[7] = new Rectangle(WIDTH / 2 - 10, 450, 20, 150);\n // top wall\n blocks[11] = new Rectangle(WIDTH / 2 - 50, 400, 100, 25);\n \n \n // remember to copy to the other side\n // cover (west)\n blocks[4] = new Rectangle(200, 200, 25, 75);\n blocks[6] = new Rectangle(200 , 400, 25, 75);\n blocks[8] = new Rectangle(200, 310, 25, 50);\n blocks[9] = new Rectangle(200, 0, 25, 170);\n blocks[17] = new Rectangle(200 - 50, 145, 70, 25);\n blocks[23] = new Rectangle(0, 60, 100, 24);\n blocks[24] = new Rectangle(70, 500, 24, 100);\n blocks[25] = new Rectangle(70, 500, 80, 24);\n blocks[26] = new Rectangle();\n \n \n // cover (east)\n blocks[15] = new Rectangle(WIDTH - 225, 200, 25, 75);\n blocks[14] = new Rectangle(WIDTH - 225 , 400, 25, 75);\n blocks[13] = new Rectangle(WIDTH - 225, 310, 25, 50);\n blocks[12] = new Rectangle(WIDTH - 225, 0, 25, 170);\n blocks[16] = new Rectangle(WIDTH - 225, 145, 70, 25);\n blocks[27] = new Rectangle(WIDTH - 100, 60, 100, 24);\n blocks[28] = new Rectangle(WIDTH - 94, 500, 24, 100);\n blocks[29] = new Rectangle(WIDTH - 94 - (80-24), 500, 80, 24);\n blocks[30] = new Rectangle();\n \n // cover (middle)\n // vertical\n blocks[18] = new Rectangle(WIDTH/ 2 - 10, 150, 20, 125);\n blocks[22] = new Rectangle(WIDTH/ 2 - 10, 300, 20, 50);\n // horizontal\n blocks[19] = new Rectangle(WIDTH/ 2 - 100, 175, 200, 20);\n blocks[20] = new Rectangle(WIDTH/ 2 - 100, 225, 200, 20);\n blocks[21] = new Rectangle(WIDTH/ 2 - 100, 350, 200, 20);\n \n \n // extras\n blocks[31] = new Rectangle();\n blocks[32] = new Rectangle();\n \n // flag on the level\n flag[0] = new Rectangle((int)(Math.random()*((WIDTH - 40) - 40 + 1)) + 40, (int)(Math.random()*((HEIGHT - 40) - 40 + 1)) + 40, 35, 26);\n flagPole[0] = new Rectangle(flag[0].x, flag[0].y, 4, 45);\n flagLogo[0] = new Rectangle(flag[0].x + 15, flag[0].y + (13/2), 20, 15);\n \n }", "public void spawnWanderingSeeker(LogicEngine in_logicEngine)\r\n\t{\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/triangle.png\",(float)LogicEngine.SCREEN_WIDTH*Math.random(),LogicEngine.SCREEN_HEIGHT-10,0);\r\n\t\t\t\t\r\n\t\t//set animation frame\r\n\t\tship.i_animationFrame=1;\r\n\t\tship.i_animationFrameRow=0;\r\n\t\tship.i_animationFrameSizeWidth=16;\r\n\t\tship.i_animationFrameSizeHeight=16;\r\n\t\t\r\n\t\t//wander \t\r\n\t\tCustomBehaviourStep cb = new CustomBehaviourStep(new Wander(-2.5,2.5,20,0.1));\r\n\t\tship.stepHandlers.add( cb);\r\n\t\t\r\n\t\t//chase player if on medium or hard\r\n\t\tif(Difficulty.difficulty == DIFFICULTY.MEDIUM || \r\n\t\t\t\tDifficulty.difficulty == DIFFICULTY.HARD)\r\n\t\t{\t\r\n\t\t\tSeekNearestPlayerStep sps = new SeekNearestPlayerStep(100);\r\n\t\t\tship.stepHandlers.add(sps);\r\n\t\t}\r\n\t\r\n\t\tship.stepHandlers.add(new FlyStraightStep(new Vector2d(0,-2)));\r\n\t\tship.collisionHandler = new DestroyIfEnemyCollision(ship, 10, true);\r\n\t\tship.v.setMaxForce(2);\r\n\t\tship.v.setMaxVel(2);\r\n\t\t\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t}", "private boolean atLeastOneNonWallLocation() {\n\t\tfor (int x = 0; x < this.map.getMapWidth(); x++) {\n\t\t\tfor (int y = 0; y < this.map.getMapHeight(); y++) {\n\n\t\t\t\tif (this.map.getMapCell(new Location(x, y)).isWalkable()) {\n\t\t\t\t\t// If it's not a wall then we can put them there\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public void moveRobber(Tile t){\r\n for(Tile tile: tiles){\r\n tile.setRobber(false);\r\n }\r\n t.setRobber(true);\r\n }", "public void hunt() {\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(cells[i].visited == false) {\n\t\t\t\t\n\t\t\t\tint currentIndex = i;\n\t\t\t\t\n\t\t\t\tArrayList<Integer> neighbors = setVisitedNeighbors(i);\n\t\t\t\tint nextIndex = getRandomVisitedNeighborIndex(neighbors);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(neighbors.size() != 0 ) {\n\t\t\t\t\tcells[currentIndex].visited = true;\n\t\t\t\t\t\n\t\t\t\t\tif(nextIndex == NOT_EXIST) {\n\t\t\t\t\t\tbreak; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if there is NO not visited neighbors \n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -1) {\n\t\t\t\t\t\tcells[currentIndex].border[EAST] = NO_WALL; \t\t\t\t\t\t\t//neighbor is right \n\t\t\t\t\t\tcells[nextIndex].border[WEST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == width) {\n\t\t\t\t\t\tcells[currentIndex].border[NORTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is up\n\t\t\t\t\t\tcells[nextIndex].border[SOUTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -width) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[SOUTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is down\n\t\t\t\t\t\tcells[nextIndex].border[NORTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == 1) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[WEST] = NO_WALL;\t\t\t\t\t\t\t\t//neighbor is left\n\t\t\t\t\t\tcells[nextIndex].border[EAST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\tkill(nextIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void lungs(Graphics bbg, int n, int length, int x, int y, double angle){\n double r1 = angle + Math.toRadians(-45);\n double r2 = angle + Math.toRadians(45);\n double r3 = angle + Math.toRadians(135);\n double r4 = angle + Math.toRadians(-135);\n\n //length modifications of the different branches\n double l1 = length/1.3 + (l1I*5);\n double l2 = length/1.3 + (l2I*5);\n double l3 = length/1.3 + (l3I*5);\n double l4 = length/1.3 + (l4I*5);\n\n //x and y points of the end of the different branches\n int ax = (int)(x - Math.sin(r1)*l1)+(int)(l1I);\n int ay = (int)(y - Math.cos(r1)*l1)+(int)(l1I);\n int bx = (int)(x - Math.sin(r2)*l2)+(int)(l2I);\n int by = (int)(y - Math.cos(r2)*l2)+(int)(l2I);\n int cx = (int)(x - Math.sin(r3)*l3)+(int)(l3I);\n int cy = (int)(y - Math.cos(r3)*l3)+(int)(l3I);\n int dx = (int)(x - Math.sin(r4)*l4)+(int)(l4I);\n int dy = (int)(y - Math.cos(r4)*l4)+(int)(l4I);\n\n if(n == 0){\n return;\n }\n\n\n increment();\n Color fluidC = new Color(colorR,colorG,colorB);\n //bbg.setColor(new Color((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random()*255)));\n bbg.setColor(fluidC);\n\n\n //draw different branches\n bbg.drawLine(x,y,ax,ay);\n bbg.drawLine(x,y,bx,by);\n bbg.drawLine(x,y,cx,cy);\n bbg.drawLine(x,y,dx,dy);\n\n\n\n //call recursively to draw fractal\n lungs(bbg, n - 1, (int)l1, ax,ay,r1);\n lungs(bbg, n - 1, (int)l2, bx,by,r2);\n lungs(bbg, n - 1, (int)l3, cx,cy,r3);\n lungs(bbg, n - 1, (int)l4, dx,dy,r4);\n\n\n }", "private void setNeighbors()\r\n {\r\n for (int x = 0; x < length+2; ++x)\r\n {\r\n for (int y = 0; y < width+2; ++y)\r\n {\r\n // North\r\n if (!this.board[x][y].northwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y-1]);\r\n }\r\n // South\r\n if (!this.board[x][y].southwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y+1]);\r\n }\r\n // East\r\n if (!this.board[x][y].eastwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x+1][y]);\r\n }\r\n // West\r\n if (!this.board[x][y].westwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x-1][y]);\r\n }\r\n }\r\n }\r\n }", "private void drive(int e) {\r\n if (endx[e] + 120 >= width - radius[e] && directionend[e] == 0) {\r\n endx[e] += 20;\r\n endy[e] -= 20;\r\n directionend[e]++;\r\n radius[e] -= 60;\r\n directionchanged[e] = true;\r\n } else if (endy[e] + 120 >= height - radius[e] && directionend[e] == 1) {\r\n\r\n endx[e] += 20;\r\n endy[e] += 20;\r\n directionend[e]++;\r\n radius[e] -= 60;\r\n directionchanged[e] = true;\r\n } else if (endx[e] - 120 <= radius[e] && directionend[e] == 2) {\r\n endx[e] -= 20;\r\n endy[e] += 20;\r\n radius[e] -= 60;\r\n directionend[e]++;\r\n directionchanged[e] = true;\r\n } else if (endy[e] - 80 <= radius[e] && directionend[e] == 3) {\r\n endx[e] -= 20;\r\n endy[e] -= 20;\r\n radius[e] -= 60;\r\n directionend[e] = 0;\r\n directionchanged[e] = true;\r\n } else {\r\n directionchanged[e] = false;\r\n }\r\n }", "public void step()\n { \n //Remember, you need to access both row and column to specify a spot in the array\n //The scalar refers to how big the value could be\n //int someRandom = (int) (Math.random() * scalar)\n //remember that you need to watch for the edges of the array\n\t int randomRow = (int)(Math.random() * grid.length - 1);\n\t int randomCol = (int)(Math.random() * grid[0].length - 1);\n\t int randomDirection = (int)(Math.random() * 3);\n\t int randomDirectionFire = (int)(Math.random() * 4);\n\t int randomSpread = (int)(Math.random() * 100);\n\t int randomTelRow = (int)(Math.random() * grid.length);\n\t int randomTelCol = (int)(Math.random() * grid[0].length);\n\t \n\t //Sand\n\t if(grid[randomRow][randomCol] == SAND && (grid[randomRow + 1][randomCol] == EMPTY || grid[randomRow + 1][randomCol] == WATER))\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == WATER)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = WATER;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\n\t }\n\t //Water\n\t if(grid[randomRow][randomCol] == WATER && randomCol - 1 >= 0)\n\t {\n\t\t if(randomDirection == 1 && grid[randomRow + 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(randomDirection == 2 && grid[randomRow][randomCol - 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(grid[randomRow][randomCol + 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t //Helium\n\t if(grid[randomRow][randomCol] == HELIUM && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow - 1][randomCol] == WATER)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = WATER;\n\t\t }\n\t\t else if(randomDirection == 1 && grid[randomRow - 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(randomDirection == 2 && grid[randomRow][randomCol - 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(grid[randomRow][randomCol + 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t \n\t //Bounce\n\t if(grid[randomRow][randomCol] == BOUNCE)\n\t { \t\n\t\t if(randomRow + 1 >= grid[0].length - 1 || randomRow + 1 == METAL)\n\t\t {\n\t\t\t hitEdge[randomCol] = true;\n\t\t }\n\t\t else if(randomRow - 1 < 0 || randomRow - 1 == METAL)\n\t\t {\n\t\t\t hitEdge[randomCol] = false;\n\t\t }\n\t\t \n\t\t if(hitEdge[randomCol] == true)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = BOUNCE;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = BOUNCE;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t \n\t //Virus\n\t if(grid[randomRow][randomCol] == VIRUS && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = VIRUS;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t \n\t\t\t int temp = grid[randomRow + 1][randomCol];\n\t\t\t //VIRUS takeover\n\t\t\t if(grid[randomRow - 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow - 1][randomCol] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow + 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol - 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol - 1] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol + 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol + 1] = VIRUS;\n\t\t\t }\n\t\t\t //TEMP takeover\n\t\t\t grid[randomRow][randomCol] = temp;\n\t\t\t if(grid[randomRow - 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow - 1][randomCol] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow + 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol - 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol - 1] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol + 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol + 1] = temp;\n\t\t\t }\n\t }\n\t \n\t //Fire\n\t if(grid[randomRow][randomCol] == FIRE && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t { \n\t\t if(randomDirectionFire == 1)\n\t\t {\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t else if(randomDirectionFire == 2)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol - 1] = FIRE;\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t else if(randomDirectionFire == 3)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol + 1] = FIRE;\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t \n\t\t //Fire Eats Vine\n\t\t if(grid[randomRow - 1][randomCol] == VINE)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = FIRE;\n\t\t }\n\t\t if(grid[randomRow + 1][randomCol] == VINE)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = FIRE;\n\t\t }\n\t\t if(grid[randomRow][randomCol - 1] == VINE)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = FIRE;\n\t\t }\n\t\t if(grid[randomRow][randomCol + 1] == VINE)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = FIRE;\n\t\t }\n\t\t \n\t\t //Fire Blows Up Helium\n\t\t if(grid[randomRow - 1][randomCol] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t //Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow + 1][randomCol] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow][randomCol - 1] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow][randomCol + 1] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t }\n\t \n\t //Vine\n\t if(grid[randomRow][randomCol] == VINE && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == EMPTY)\n\t\t { \n\t\t\t if(randomSpread == 1)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VINE;\n\t\t\t }\n\t\t }\n\t\t else if(grid[randomRow + 1][randomCol] == WATER)\n\t\t {\n\t\t\t if(randomSpread >= 90)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VINE;\n\t\t\t\t grid[randomRow][randomCol + 1] = VINE;\n\t\t\t\t grid[randomRow][randomCol - 1] = VINE;\n\t\t\t }\n\t\t }\n\t }\n\t \n\t //Teleport\n\t if(grid[randomRow][randomCol] == TELEPORT && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t grid[randomTelRow][randomTelCol] = TELEPORT;\n\t\t grid[randomRow][randomCol] = EMPTY;\n\t }\n\t \n\t //Laser\n\t if(grid[randomRow][randomCol] == LASER && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(randomDirectionLaser == 1 && randomRow - 4 >= 0)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = LASER;\n\t\t\t grid[randomRow - 4][randomCol] = EMPTY;\n\t\t\t if(randomRow + 1 == grid.length - 1)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 2][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 3][randomCol] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else if(randomDirectionLaser == 2)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = LASER;\n\t\t\t grid[randomRow + 4][randomCol] = EMPTY;\n\t\t\t if(randomRow - 1 == 0)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 2][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 3][randomCol] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else if(randomDirectionLaser == 3 && randomCol - 4 >= 0)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = LASER;\n\t\t\t grid[randomRow][randomCol - 4] = EMPTY;\n\t\t\t if(randomCol + 1 == grid[0].length - 1)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 2] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 3] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = LASER;\n\t\t\t grid[randomRow][randomCol + 4] = EMPTY;\n\t\t\t if(randomCol - 1 == 0)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 2] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 3] = EMPTY;\n\t\t\t }\n\t\t }\n\t }\n }", "public void wrap(){\n\t\tif(this.y_location >=99){\n\t\t\tthis.y_location = this.y_location%99;\n\t\t}\n\t\telse if(this.y_location <=0){\n\t\t\tthis.y_location = 99 - (this.y_location%99);\n\t\t}\n\t\tif(this.x_location >= 99){\n\t\t\tthis.x_location = this.x_location%99;\n\t\t}\n\t\telse if(this.x_location <=0){\n\t\t\tthis.x_location = 99-(this.x_location%99);\n\t\t}\n\t}", "public void draw_Tunnel_Tile(boolean b) {\n if (b) {\n mazeEditor.mazeDrawMode = DRAW_TUNNEL_TILE;\n\n Tog1.setState(false); \n Tog2.setState(false); \n Tog3.setState(false); \n Tog5.setState(false);\n Tog6.setState(false);\n Tog7.setState(false);\n }\n }", "Road(boolean h, MP m){\n\t\t time = m.getLifeTime();\n\t\t horizontal = h; \n\t\t _MP = m;\n\t\t endPosition = _MP.createRandom(_MP.getRoadLengthMin(), _MP.getRoadLengthMax());\n\t }", "private void makeMaze() {\n\t\ttry {\n\t\t\tthis.end = ImageIO.read(new File(\"images/tiles/end_locked.png\"));\n\t\t\tint w = getWidth()/gui.getModel().getDifficulty();\n\t\t\tint h = getHeight()/gui.getModel().getDifficulty();\n\t\t\tint difficulty = gui.getModel().getDifficulty();\n\t\t\tmazeImage = new BufferedImage(difficulty*(getWidth()/difficulty), difficulty*(getHeight()/difficulty), BufferedImage.TYPE_INT_RGB);\n\t\t\tGraphics2D g = mazeImage.createGraphics();\n\t\t\tString tile = \"\";\n\t\t\tfor (BaseState s: gui.getModel().getMaze()) {\n\t\t\t\tint x = s.getX(); int y = s.getY();\n\t\t\t\t\n\t\t\t\t// check walls\n\t\t\t\tint numSides = 0;\n\t\t\t\tboolean rightWall = false;\n\t\t\t\tboolean leftWall = false;\n\t\t\t\tboolean topWall = false;\n\t\t\t\tboolean bottomWall = false;\n\t\t\t\tif (s.getRight() == null) rightWall = true;\n\t\t\t\tif (s.getLeft() == null) leftWall = true;\n\t\t\t\tif (s.getUp() == null) topWall = true;\n\t\t\t\tif (s.getDown() == null) bottomWall = true;\n\t\t\t\tif (topWall) numSides++;\n\t\t\t\tif (leftWall) numSides++;\n\t\t\t\tif (bottomWall) numSides++;\n\t\t\t\tif (rightWall) numSides++;\n\t\t\t\t\n\t\t\t\t// find tile type\n\t\t\t\tif (numSides == 3) { // dead end\n\t\t\t\t\tif (!rightWall) tile = \"images/tiles/deadend_left.bmp\";\n\t\t\t\t\telse if (!leftWall) tile = \"images/tiles/deadend_right.bmp\";\n\t\t\t\t\telse if (!topWall) tile = \"images/tiles/deadend_bottom.bmp\";\n\t\t\t\t\telse if (!bottomWall) tile = \"images/tiles/deadend_top.bmp\";\n\t\t\t\t} else if (numSides == 2) { // corner or hall\n\t\t\t\t\t//hall\n\t\t\t\t\tif (rightWall && leftWall) tile = \"images/tiles/hall_vertical.bmp\";\n\t\t\t\t\telse if (topWall && bottomWall) tile = \"images/tiles/hall_horizontal.bmp\";\n\t\t\t\t\t//corner\n\t\t\t\t\telse if (topWall && leftWall) tile = \"images/tiles/corner_top_left.bmp\";\n\t\t\t\t\telse if (topWall && rightWall) tile = \"images/tiles/corner_top_right.bmp\";\n\t\t\t\t\telse if (bottomWall && leftWall) tile = \"images/tiles/corner_bottom_left.bmp\";\n\t\t\t\t\telse if (bottomWall && rightWall) tile = \"images/tiles/corner_bottom_right.bmp\";\n\t\t\t\t} else if (numSides == 1) { // single side\n\t\t\t\t\tif (leftWall) tile = \"images/tiles/wall_left.bmp\";\n\t\t\t\t\telse if (rightWall) tile = \"images/tiles/wall_right.bmp\";\n\t\t\t\t\telse if (topWall) tile = \"images/tiles/wall_top.bmp\";\n\t\t\t\t\telse if (bottomWall) tile = \"images/tiles/wall_bottom.bmp\";\n\t\t\t\t} else { // open\n\t\t\t\t\ttile = \"images/tiles/open.bmp\";\n\t\t\t\t}\n\t\t\t\t// draw tile\n\t\t\t\tg.drawImage(ImageIO.read(new File(tile)), x*w, y*h, w, h, null);\n\t\t\t\t\n\t\t\t\t// check for ending and draw if need be\n\t\t\t\tif (s.getX() == gui.getModel().getDifficulty() - 1 && s.getY() == gui.getModel().getDifficulty() - 1) {\n\t\t\t\t\tg.drawImage(ImageIO.read(new File(\"images/tiles/end_unlocked.png\")), x*w, y*h, w, h, null);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(IOException e) {System.err.println(\"Images not found.\");}\n\t}", "private boolean collisionWithHorizontalWall() {\n return (xPos + dx > RIGHT_BORDER || xPos + dx < 0);\n }", "public void knockDownWall(Cell nei) {\n if (nei == null) return;\n\n if (nei == neiNorth) {\n setWallNorth(false);\n neiNorth.setWallSouth(false);\n return;\n }\n\n if (nei == neiSouth) {\n setWallSouth(false);\n neiSouth.setWallNorth(false);\n return;\n }\n\n if (nei == neiWest) {\n setWallWest(false);\n neiWest.setWallEast(false);\n return;\n }\n\n if (nei == neiEast) {\n setWallEast(false);\n neiEast.setWallWest(false);\n return;\n }\n\n // Error occurs\n System.err.println(\"Neighbor does not exist\");\n }", "public void markEmptyFields(int shipSize){\n\t\tint x = hitLocation3.x;\n\t\tint y = hitLocation3.y;\n\t\t\n\t\tif( hitLocation2==null && hitLocation3 !=null ){\n\t\t\tif(x-1 >= 0 && y - 1 >= 0){\n\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\t//po skosie lewy gorny\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0){\n\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\t//gorny\n\t\t\t}\n\t\t\tif(y + 1 <sizeBoard){\n\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\t//prawy\t\n\t\t\t}\n\t\t\tif(x+1 < sizeBoard && y +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y+1] = true;\t\t\t\t//po skosie dol prawy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0 && y + 1 < sizeBoard){\n\t\t\t\topponentShootTable[x-1][y+1] = true;\t\t\t\t//po skosie prawy gora\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif( x +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y] = true;\t\t\t\t// dolny\n\t\t\t\tpossibleshoots.remove(new TabLocation(x+1,y));\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x+1 <sizeBoard && y - 1 >= 0){\n\t\t\t\topponentShootTable[x+1][y-1] = true;\t\t\t//po skosie dol lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(y - 1 >= 0){\n\t\t\t\topponentShootTable[x][y-1] = true;\t\t\t//lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tboolean orientacja = false;\n\t\t\tif( hitLocation3.x == hitLocation2.x ) orientacja = true;\n\t\t\tint tempshipSize = shipSize;\n\t\t\tif( orientacja ){\n\t\t\t\t\n\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//prawy skrajny\t\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x-1, y+tempshipSize ) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x, y+tempshipSize ) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 <sizeBoard && y+tempshipSize>=0){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y+1<sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+tempshipSize) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+tempshipSize) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( x-1 >= 0 ){\n\t\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y-i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y+i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(x + 1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.y < hitLocation3.y){\n\t\t\t\t\t\tfor(int i=0; i<shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y-i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y+i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//dolny skrajny\t\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x+1 < sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x+1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(y-1 >= 0){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y+1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y+1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y+1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void placeTower();", "public boolean checkNorth(HashMap<Coordinate,MapTile> currentView){\n\t\t\tCoordinate currentPosition = new Coordinate(getPosition());\n\t\t\tfor(int i = 0; i <= wallSensitivity; i++){\n\t\t\t\tMapTile tile = currentView.get(new Coordinate(currentPosition.x, currentPosition.y+i));\n\t\t\t\tif(tile.isType(MapTile.Type.WALL)){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "private StackPane buildWall(Wall wall) {\n double x_offset = wall.getPosition().getX() * TILE_WIDTH;\n double y_offset = wall.getPosition().getY() * TILE_HEIGHT - 8;\n if (wall.getOrientation() == WallOrientation.VERTICAL) {\n x_offset -= 8;\n y_offset += 8;\n }\n ImageView imageView = getWallTextureFor(wall);\n StackPane stackPane = new StackPane();\n stackPane.setLayoutX(x_offset);\n stackPane.setLayoutY(y_offset);\n stackPane.setDisable(true);\n stackPane.getChildren().add(imageView);\n return stackPane;\n }", "public boolean checkNorth(HashMap<Coordinate,MapTile> currentView){\n\t\tCoordinate currentPosition = new Coordinate(getPosition());\n\t\tfor(int i = 0; i <= wallSensitivity; i++){\n\t\t\tMapTile tile = currentView.get(new Coordinate(currentPosition.x, currentPosition.y+i));\n\t\t\tif(tile.isType(MapTile.Type.WALL)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected void ground(double xCoord, double yCoord, double len, double width)\n {\n double x1 = (xCoord - (width/2));\n double x2 = (xCoord + (width/2));\n double y1 = (yCoord - (len/2));\n double y2 = (yCoord + (len/2));\n\n Triple pos1, pos2, pos3, pos4, col1;\n\n pos1 = new Triple(x1, y1, 0);\n pos2 = new Triple(x2, y1, 0);\n pos3 = new Triple(x2, y2, 0);\n pos4 = new Triple(x1, y2, 0);\n col1 = new Triple(0.5, 0.5, 0.5);\n\n frozenSoups.addTri(new Triangle(new Vertex(pos1, 0, 0), \n new Vertex(pos2, 0, 1), \n new Vertex(pos3, 1, 1),\n 23 ) );\n frozenSoups.addTri(new Triangle(new Vertex(pos3, 1, 1), \n new Vertex(pos4, 1, 0), \n new Vertex(pos1, 0, 0),\n 23 ) );\n }", "public void movbolitas1() {\n x += vx1;\n y += vy1;\n if (x > width || x < 0) {\n vx1 *= -1;\n }\n if (y > height || y < 0) {\n vy1 *= -1;\n }\n }" ]
[ "0.6924773", "0.64679635", "0.63557595", "0.63171625", "0.6274808", "0.61596227", "0.6158117", "0.61557835", "0.61468434", "0.61156744", "0.6047763", "0.6034618", "0.6023715", "0.6010482", "0.5989283", "0.5926015", "0.59240305", "0.5900542", "0.58812445", "0.58488107", "0.5832289", "0.5831407", "0.5827092", "0.5817253", "0.58086073", "0.58040285", "0.57773906", "0.57371986", "0.57304716", "0.570711", "0.57025313", "0.56968", "0.56920123", "0.5687378", "0.5685759", "0.56813544", "0.5677399", "0.56663895", "0.56626844", "0.5649509", "0.5641532", "0.56395257", "0.56370413", "0.56262594", "0.56250125", "0.56239915", "0.5621023", "0.561983", "0.5597149", "0.559295", "0.5589007", "0.5588697", "0.55691415", "0.55618006", "0.55591553", "0.55524945", "0.5551424", "0.5550066", "0.55477196", "0.55416363", "0.5541176", "0.55357224", "0.5531898", "0.5531489", "0.55309725", "0.55190176", "0.5517065", "0.55042845", "0.5504153", "0.55003196", "0.54991066", "0.5498189", "0.5493121", "0.54929817", "0.54809004", "0.54756606", "0.5474965", "0.5465275", "0.54624236", "0.5458981", "0.5453246", "0.54504824", "0.5447538", "0.5441451", "0.54397094", "0.5437166", "0.54359496", "0.54307383", "0.54284024", "0.54284024", "0.54256994", "0.5419781", "0.5410626", "0.54052424", "0.5403555", "0.5396551", "0.53957677", "0.53910387", "0.5385022", "0.5382992" ]
0.5461457
79
Start services which the library needs
private void startServices(){ Intent intent = new Intent(mContext, BatterySaverService.class); mContext.startService(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startBootstrapServices() {\n traceBeginAndSlog(\"StartWatchdog\");\n Watchdog watchdog = Watchdog.getInstance();\n watchdog.start();\n traceEnd();\n if (MAPLE_ENABLE) {\n this.mPrimaryZygotePreload = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$UyrPns7R814gZEylCbDKhe8It4.INSTANCE, \"PrimaryZygotePreload\");\n }\n Slog.i(TAG, \"Reading configuration...\");\n traceBeginAndSlog(\"ReadingSystemConfig\");\n SystemServerInitThreadPool.get().submit($$Lambda$YWiwiKm_Qgqb55C6tTuq_n2JzdY.INSTANCE, \"ReadingSystemConfig\");\n traceEnd();\n traceBeginAndSlog(\"StartInstaller\");\n this.installer = (Installer) this.mSystemServiceManager.startService(Installer.class);\n traceEnd();\n traceBeginAndSlog(\"DeviceIdentifiersPolicyService\");\n this.mSystemServiceManager.startService(DeviceIdentifiersPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"UriGrantsManagerService\");\n this.mSystemServiceManager.startService(UriGrantsManagerService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartActivityManager\");\n ActivityTaskManagerService atm = this.mSystemServiceManager.startService(ActivityTaskManagerService.Lifecycle.class).getService();\n this.mActivityManagerService = ActivityManagerService.Lifecycle.startService(this.mSystemServiceManager, atm);\n this.mActivityManagerService.setSystemServiceManager(this.mSystemServiceManager);\n this.mActivityManagerService.setInstaller(this.installer);\n this.mWindowManagerGlobalLock = atm.getGlobalLock();\n traceEnd();\n traceBeginAndSlog(\"StartPowerManager\");\n try {\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(\"com.android.server.power.HwPowerManagerService\");\n } catch (RuntimeException e) {\n Slog.w(TAG, \"create HwPowerManagerService failed\");\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(PowerManagerService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartThermalManager\");\n this.mSystemServiceManager.startService(ThermalManagerService.class);\n traceEnd();\n try {\n Slog.i(TAG, \"PG Manager service\");\n this.mPGManagerService = PGManagerService.getInstance(this.mSystemContext);\n } catch (Throwable e2) {\n reportWtf(\"PG Manager service\", e2);\n }\n traceBeginAndSlog(\"InitPowerManagement\");\n this.mActivityManagerService.initPowerManagement();\n traceEnd();\n traceBeginAndSlog(\"StartRecoverySystemService\");\n this.mSystemServiceManager.startService(RecoverySystemService.class);\n traceEnd();\n RescueParty.noteBoot(this.mSystemContext);\n traceBeginAndSlog(\"StartLightsService\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.lights.LightsServiceBridge\");\n } catch (RuntimeException e3) {\n Slog.w(TAG, \"create LightsServiceBridge failed\");\n this.mSystemServiceManager.startService(LightsService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSidekickService\");\n if (SystemProperties.getBoolean(\"config.enable_sidekick_graphics\", false)) {\n this.mSystemServiceManager.startService(WEAR_SIDEKICK_SERVICE_CLASS);\n }\n traceEnd();\n traceBeginAndSlog(\"StartDisplayManager\");\n this.mDisplayManagerService = (DisplayManagerService) this.mSystemServiceManager.startService(DisplayManagerService.class);\n traceEnd();\n try {\n this.mSystemServiceManager.startService(\"com.android.server.security.HwSecurityService\");\n Slog.i(TAG, \"HwSecurityService start success\");\n } catch (Exception e4) {\n Slog.e(TAG, \"can't start HwSecurityService service\");\n }\n traceBeginAndSlog(\"WaitForDisplay\");\n this.mSystemServiceManager.startBootPhase(100);\n traceEnd();\n String cryptState = (String) VoldProperties.decrypt().orElse(\"\");\n if (ENCRYPTING_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Detected encryption in progress - only parsing core apps\");\n this.mOnlyCore = true;\n } else if (ENCRYPTED_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Device encrypted - only parsing core apps\");\n this.mOnlyCore = true;\n }\n HwBootCheck.bootSceneEnd(100);\n HwBootFail.setBootTimer(false);\n HwBootCheck.bootSceneStart(105, 900000);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_start\", (int) SystemClock.elapsedRealtime());\n }\n traceBeginAndSlog(\"StartPackageManagerService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"packagemanagermain\");\n this.mPackageManagerService = PackageManagerService.main(this.mSystemContext, this.installer, this.mFactoryTestMode != 0, this.mOnlyCore);\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n this.mFirstBoot = this.mPackageManagerService.isFirstBoot();\n this.mPackageManager = this.mSystemContext.getPackageManager();\n Slog.i(TAG, \"Finish_StartPackageManagerService\");\n traceEnd();\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_ready\", (int) SystemClock.elapsedRealtime());\n HwBootCheck.addBootInfo(\"[bootinfo]\\nisFirstBoot: \" + this.mFirstBoot + \"\\nisUpgrade: \" + this.mPackageManagerService.isUpgrade());\n HwBootCheck.bootSceneStart(101, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n }\n HwBootCheck.bootSceneEnd(105);\n if (!this.mOnlyCore && !SystemProperties.getBoolean(\"config.disable_otadexopt\", false)) {\n traceBeginAndSlog(\"StartOtaDexOptService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"moveab\");\n OtaDexoptService.main(this.mSystemContext, this.mPackageManagerService);\n } catch (Throwable th) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n throw th;\n }\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n }\n traceBeginAndSlog(\"StartUserManagerService\");\n this.mSystemServiceManager.startService(UserManagerService.LifeCycle.class);\n traceEnd();\n traceBeginAndSlog(\"InitAttributerCache\");\n AttributeCache.init(this.mSystemContext);\n traceEnd();\n traceBeginAndSlog(\"SetSystemProcess\");\n this.mActivityManagerService.setSystemProcess();\n traceEnd();\n traceBeginAndSlog(\"InitWatchdog\");\n watchdog.init(this.mSystemContext, this.mActivityManagerService);\n traceEnd();\n this.mDisplayManagerService.setupSchedulerPolicies();\n traceBeginAndSlog(\"StartOverlayManagerService\");\n this.mSystemServiceManager.startService(new OverlayManagerService(this.mSystemContext, this.installer));\n traceEnd();\n traceBeginAndSlog(\"StartSensorPrivacyService\");\n this.mSystemServiceManager.startService(new SensorPrivacyService(this.mSystemContext));\n traceEnd();\n if (SystemProperties.getInt(\"persist.sys.displayinset.top\", 0) > 0) {\n this.mActivityManagerService.updateSystemUiContext();\n ((DisplayManagerInternal) LocalServices.getService(DisplayManagerInternal.class)).onOverlayChanged();\n }\n this.mSensorServiceStart = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$oG4I04QJrkzCGs6IcMTKU2211A.INSTANCE, START_SENSOR_SERVICE);\n } catch (Throwable th2) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n throw th2;\n }\n }", "public void StartAllServices()\n\t{\n\t\tm_oCommServ.StartCmdService(m_oConfig.CmdPort()); //Giving introducer port here\n\t\t// bring up the heartbeat receiver\n\t\tm_oCommServ.StartHeartBeatRecvr();\n\t\t//breing up the file report recvr\n\t\tm_oCommServ.StartFileReportRecvr();\n\t}", "private void startServices() throws Exception {\n /** Setting up subscriptions Manager **/\n /**************************************/\n ChannelListManager.getSubscriptionListManager(context);\n\n /*******************************************/\n /** Starting various services for the app **/\n /*******************************************/\n //Application-level Dissemination Channel Service\n ADCThread = new ApplevDisseminationChannelService();\n ADCThread.start();\n Intent intent;\n //BroadcastReceiveService\n intent = new Intent(context, BroadcastReceiveService.class);\n context.startService(intent);\n if (!isServiceRunning(BroadcastReceiveService.class)) {\n throw new Exception(\"BroadcastReceiveServiceNotRunning\");\n }\n //BroadcastSendService\n intent = new Intent(context, BroadcastSendService.class);\n context.startService(intent);\n if (!isServiceRunning(BroadcastSendService.class)) {\n throw new Exception(\"BroadcastSendServiceNotRunning\");\n }\n //HelloMessageService\n intent = new Intent(context, HelloMessageService.class);\n context.startService(intent);\n if (!isServiceRunning(HelloMessageService.class)) {\n throw new Exception(\"HelloMessageServiceNotRunning\");\n }\n }", "private void startSkeletons() {\n if (this.skeletons_started) return;\n\n this.add_registration_api();\n this.registration_skeleton.start();\n this.add_service_api();\n this.service_skeleton.start();\n\n this.skeletons_started = true;\n }", "private ServiceManage() {\r\n\t\tInitialThreads();\r\n\t}", "public void start() {\n\t\tstartFilesConfig(true);\n\t\tstartSpamFilterTest(false);\n\t}", "@Override\n\tprotected void initAsService() {\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(\"Initiating service...\");\n\t\t}\n\t\trunnerFuture = activityRunner.schedule(this::scanModulesHealth, 500, TimeUnit.MILLISECONDS);\n\t}", "public synchronized void startCloudServices() {\n if (!Platform.cloudServicesStarted) {\n // guarantee to execute once\n Platform.cloudServicesStarted = true;\n AppConfigReader reader = AppConfigReader.getInstance();\n String cloudServices = reader.getProperty(EventEmitter.CLOUD_SERVICES);\n if (cloudServices != null) {\n List<String> list = Utility.getInstance().split(cloudServices, \", \");\n if (!list.isEmpty()) {\n List<String> loaded = new ArrayList<>();\n SimpleClassScanner scanner = SimpleClassScanner.getInstance();\n List<ClassInfo> services = scanner.getAnnotatedClasses(CloudService.class, true);\n for (String name: list) {\n if (loaded.contains(name)) {\n log.error(\"Cloud service ({}) already loaded\", name);\n } else {\n if (startService(name, services, false)) {\n loaded.add(name);\n } else {\n log.error(\"Cloud service ({}) not found\", name);\n }\n }\n }\n if (loaded.isEmpty()) {\n log.warn(\"No Cloud services are loaded\");\n } else {\n log.info(\"Cloud services {} started\", loaded);\n }\n }\n }\n }\n }", "protected void startService() {\n\t\t//if (!isServiceRunning(Constants.SERVICE_CLASS_NAME))\n\t\tthis.startService(new Intent(this, LottoService.class));\n\t}", "public static void setupServicesAndParameters(){\n\t\t//replace services in use, e.g.:\n\t\t/*\n\t\tMap<String, ArrayList<String>> systemInterviewServicesMap = new HashMap<>();\n\t\t\n\t\t//CONTROL DEVICES\n\t\tArrayList<String> controlDevice = new ArrayList<String>();\n\t\t\tcontrolDevice.add(MyDeviceControlService.class.getCanonicalName());\n\t\tsystemInterviewServicesMap.put(CMD.CONTROL, controlDevice);\n\t\t\n\t\t//BANKING\n\t\tArrayList<String> banking = new ArrayList<String>();\n\t\t\tbanking.add(MyBankingService.class.getCanonicalName());\n\t\tsystemInterviewServicesMap.put(CMD.BANKING, banking);\n\t\t\t\n\t\tInterviewServicesMap.loadCustom(systemInterviewServicesMap);\n\t\t*/\n\t\t\n\t\t//defaults\n\t\tStart.setupServicesAndParameters();\n\t\t\n\t\t//add\n\t\t//e.g.: ParameterConfig.setHandler(PARAMETERS.ALARM_NAME, Config.parentPackage + \".parameters.AlarmName\");\n\t}", "public static int startAllServices() throws Throwable {\n\t\tint numServicesStarted = 0;\n\t\t\n\t\tlog.info(\"!!! Attempting to start API Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start API Service !!!\"); \n\t\tif (startApiService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Inventory Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Inventory Service !!!\");\n\t\tif (startInventoryService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Insurance Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Insurance Service !!!\");\n\t\tif (startInsuranceService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Enquiry Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Enquiry Service !!!\");\n\t\tif (startEnquiryService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t Runtime.getRuntime().addShutdownHook(new Thread() \n\t\t\t { \n\t\t\t public void run() \n\t\t\t { \n\t\t\t \ttry {\n\t\t\t \t\tlog.info(\"!!! Services Shutdown Hook is running !!!\");\n\t\t\t \t\t//System.out.println(\"!!! Services Shutdown Hook is running !!!\"); \n\t\t\t\t int servicesStopped = ServiceFactory.stopAllServices();\n\t\t\t\t log.info(\"!!! A total of \" + servicesStopped + \" services were shutdown !!!\");\n\t\t\t\t //System.out.println(\"!!! A total of \" + servicesStopped + \" services were shutdown !!!\"); \n\t\t\t \t} catch (Throwable ex) {\n\t\t\t \t\tex.printStackTrace();\n\t\t\t \t}\n\t\t\t } \n\t\t\t }); \n\t\t\t \n\t\t} catch (Throwable ex) {\n\t\t\tlog.error(\"!!! Error on Services Shutdown !!! : \" + ex.getMessage(), ex);\n\t\t\t//System.out.println(\"!!! Error on Services Shutdown !!! : \" + ex.getMessage());\n\t\t\t//ex.printStackTrace();\n\t\t}\n\n\t\treturn numServicesStarted;\n\t}", "private void initService() {\r\n\t}", "private void startLoggerService() {\n Intent intent = new Intent(this, GestureLoggerService.class);\n intent.putExtra(GestureLoggerService.EXTRA_START_SERVICE, true);\n\n startService(intent);\n }", "public void startService() {\r\n Log.d(LOG, \"in startService\");\r\n startService(new Intent(getBaseContext(), EventListenerService.class));\r\n startService(new Intent(getBaseContext(), ActionService.class));\r\n getListenerService();\r\n\r\n }", "private void startServiceThreads() {\n // Do after main thread name has been set\n this.metrics = new MasterMetrics();\n try {\n regionManager.start();\n serverManager.start();\n // Put up info server.\n int port = this.conf.getInt(\"hbase.master.info.port\", 60010);\n if (port >= 0) {\n String a = this.conf.get(\"hbase.master.info.bindAddress\", \"0.0.0.0\");\n this.infoServer = new InfoServer(MASTER, a, port, false);\n this.infoServer.setAttribute(MASTER, this);\n this.infoServer.start();\n }\n // Start the server so everything else is running before we start\n // receiving requests.\n this.server.start();\n } catch (IOException e) {\n if (e instanceof RemoteException) {\n try {\n e = RemoteExceptionHandler.decodeRemoteException((RemoteException) e);\n } catch (IOException ex) {\n LOG.warn(\"thread start\", ex);\n }\n }\n // Something happened during startup. Shut things down.\n this.closed.set(true);\n LOG.error(\"Failed startup\", e);\n }\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Started service threads\");\n }\n }", "public static void startServices(final Injector injector) {\n\t\tif (injector == null) throw new IllegalStateException(\"Cannot start services: no injector present!\");\n\n\t\t// Init JPA's Persistence Service, Lucene indexes and everything that has to be started\n\t\t// (see https://github.com/google/guice/wiki/ModulesShouldBeFastAndSideEffectFree)\n\t\tCollection<Key<? extends ServiceHandler>> serviceHandlerBindingKeys = _getServiceHandlersGuiceBindingKeys(injector);\n\t\tif (CollectionUtils.hasData(serviceHandlerBindingKeys)) {\n\t\t\tfor (Key<? extends ServiceHandler> key : serviceHandlerBindingKeys) {\n\t\t\t\tServiceHandler serviceHandler = injector.getInstance(key);\n\t\t\t\tlog.warn(\"\\t--START SERVICE using {} type: {}\",ServiceHandler.class.getSimpleName(),key);\n\t\t\t\ttry {\n\t\t\t\t\tserviceHandler.start();\n\t\t\t\t} catch(Throwable th) {\n\t\t\t\t\tlog.error(\"Error starting service with ServiceHandler key={}: {}\",key,th.getMessage(),th);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void start() {\n \t\tLog.info(\"Starting service of repository requests\");\n \t\ttry {\n \t\t\tresetNameSpace();\n \t\t} catch (Exception e) {\n \t\t\tLog.logStackTrace(Level.WARNING, e);\n \t\t\te.printStackTrace();\n \t\t}\n \t\t\n \t\tbyte[][]markerOmissions = new byte[2][];\n \t\tmarkerOmissions[0] = CommandMarkers.COMMAND_MARKER_REPO_START_WRITE;\n \t\tmarkerOmissions[1] = CommandMarkers.COMMAND_MARKER_BASIC_ENUMERATION;\n \t\t_markerFilter = new Exclude(markerOmissions);\n \t\t\n \t\t_periodicTimer = new Timer(true);\n \t\t_periodicTimer.scheduleAtFixedRate(new InterestTimer(), PERIOD, PERIOD);\n \n \t}", "public void startWithoutChecks() {\n service.enableMonitoring();\n for (ServiceNotifier serviceNotifier : serviceNotifiers) {\n serviceNotifier.onStart();\n }\n }", "void start() throws TestFailed\n {\n this.startSkeletons();\n }", "public void start(BundleContext context) throws Exception {\n \t\tthis.context = context;\n \t\tLogManager.setContext(context);\n \t\tlog = LogServiceUtil.getLogService(context);\n \t\t// Create the service tracker and run it.\n \t\tstc = ServiceTrackerUtil.openServiceTracker(context, HttpService.class.getName(), this);\t\t\n \t}", "protected void startService() throws Exception {\n sqlDbManager = new SqlDbManager();\n theDaemon.setDbManager(sqlDbManager);\n sqlDbManager.initService(theDaemon);\n sqlDbManager.startService();\n }", "@Override\n public void start(BundleContext context) throws Exception {\n\n\n System.out.println(\"rap02 start...\");\n// httpServiceTracker = new Rap02ServiceTracker(context, HttpService.class, null);\n// httpServiceTracker.open();\n webContainerServiceTracker = new WebContainerServiceTracker(context, WebContainer.class, null);\n webContainerServiceTracker.open();\n\n servletContextServiceTracker = new ServletContextServiceTracker(context, ServletContext.class, null);\n servletContextServiceTracker.open();\n }", "public void startup() {\n\t\tstart();\n }", "private void run() {\n try {\n traceBeginAndSlog(\"InitBeforeStartServices\");\n SystemProperties.set(SYSPROP_START_COUNT, String.valueOf(this.mStartCount));\n SystemProperties.set(SYSPROP_START_ELAPSED, String.valueOf(this.mRuntimeStartElapsedTime));\n SystemProperties.set(SYSPROP_START_UPTIME, String.valueOf(this.mRuntimeStartUptime));\n EventLog.writeEvent((int) EventLogTags.SYSTEM_SERVER_START, Integer.valueOf(this.mStartCount), Long.valueOf(this.mRuntimeStartUptime), Long.valueOf(this.mRuntimeStartElapsedTime));\n if (System.currentTimeMillis() < 86400000) {\n Slog.w(TAG, \"System clock is before 1970; setting to 1970.\");\n SystemClock.setCurrentTimeMillis(86400000);\n }\n if (!SystemProperties.get(\"persist.sys.language\").isEmpty()) {\n SystemProperties.set(\"persist.sys.locale\", Locale.getDefault().toLanguageTag());\n SystemProperties.set(\"persist.sys.language\", \"\");\n SystemProperties.set(\"persist.sys.country\", \"\");\n SystemProperties.set(\"persist.sys.localevar\", \"\");\n }\n Binder.setWarnOnBlocking(true);\n PackageItemInfo.forceSafeLabels();\n SQLiteGlobal.sDefaultSyncMode = \"FULL\";\n SQLiteCompatibilityWalFlags.init((String) null);\n Slog.i(TAG, \"Entered the Android system server!\");\n int uptimeMillis = (int) SystemClock.elapsedRealtime();\n EventLog.writeEvent((int) EventLogTags.BOOT_PROGRESS_SYSTEM_RUN, uptimeMillis);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_system_server_init\", uptimeMillis);\n Jlog.d(30, \"JL_BOOT_PROGRESS_SYSTEM_RUN\");\n }\n SystemProperties.set(\"persist.sys.dalvik.vm.lib.2\", VMRuntime.getRuntime().vmLibrary());\n VMRuntime.getRuntime().clearGrowthLimit();\n VMRuntime.getRuntime().setTargetHeapUtilization(0.8f);\n Build.ensureFingerprintProperty();\n Environment.setUserRequired(true);\n BaseBundle.setShouldDefuse(true);\n Parcel.setStackTraceParceling(true);\n BinderInternal.disableBackgroundScheduling(true);\n BinderInternal.setMaxThreads(31);\n Process.setThreadPriority(-2);\n Process.setCanSelfBackground(false);\n Looper.prepareMainLooper();\n Looper.getMainLooper().setSlowLogThresholdMs(SLOW_DISPATCH_THRESHOLD_MS, SLOW_DELIVERY_THRESHOLD_MS);\n System.loadLibrary(\"android_servers\");\n if (Build.IS_DEBUGGABLE) {\n initZygoteChildHeapProfiling();\n }\n performPendingShutdown();\n createSystemContext();\n HwFeatureLoader.SystemServiceFeature.loadFeatureFramework(this.mSystemContext);\n this.mSystemServiceManager = new SystemServiceManager(this.mSystemContext);\n this.mSystemServiceManager.setStartInfo(this.mRuntimeRestart, this.mRuntimeStartElapsedTime, this.mRuntimeStartUptime);\n LocalServices.addService(SystemServiceManager.class, this.mSystemServiceManager);\n SystemServerInitThreadPool.get();\n traceEnd();\n try {\n traceBeginAndSlog(\"StartServices\");\n startBootstrapServices();\n startCoreServices();\n startOtherServices();\n SystemServerInitThreadPool.shutdown();\n Slog.i(TAG, \"Finish_StartServices\");\n traceEnd();\n StrictMode.initVmDefaults(null);\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n int uptimeMillis2 = (int) SystemClock.elapsedRealtime();\n MetricsLogger.histogram((Context) null, \"boot_system_server_ready\", uptimeMillis2);\n if (uptimeMillis2 > 60000) {\n Slog.wtf(SYSTEM_SERVER_TIMING_TAG, \"SystemServer init took too long. uptimeMillis=\" + uptimeMillis2);\n }\n }\n LogBufferUtil.closeLogBufferAsNeed(this.mSystemContext);\n if (!VMRuntime.hasBootImageSpaces()) {\n Slog.wtf(TAG, \"Runtime is not running with a boot image!\");\n }\n Looper.loop();\n throw new RuntimeException(\"Main thread loop unexpectedly exited\");\n } catch (Throwable th) {\n Slog.i(TAG, \"Finish_StartServices\");\n traceEnd();\n throw th;\n }\n } catch (Throwable th2) {\n traceEnd();\n throw th2;\n }\n }", "public void start() {\n\n // server 환경설정\n EventLoopGroup bossGroup = new NioEventLoopGroup(bossCount);\n EventLoopGroup workerGroup = new NioEventLoopGroup();\n\n try {\n\n ServerBootstrap b = new ServerBootstrap();\n b.group(bossGroup, workerGroup)\n .channel(NioServerSocketChannel.class)\n .childHandler(new ChannelInitializer<SocketChannel>() {\n @Override\n public void initChannel(SocketChannel ch) throws Exception {\n ChannelPipeline pipeline = ch.pipeline();\n pipeline.addLast(new StringDecoder(CharsetUtil.UTF_8));\n pipeline.addLast(new StringEncoder(CharsetUtil.UTF_8));\n pipeline.addLast(new LoggingHandler(LogLevel.INFO));\n pipeline.addLast(SERVICE_HANDLER);\n }\n })\n .option(ChannelOption.SO_BACKLOG, backLog)\n .childOption(ChannelOption.SO_KEEPALIVE, true);\n\n ChannelFuture channelFuture = b.bind(tcpPort).sync();\n channelFuture.channel().closeFuture().sync();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n bossGroup.shutdownGracefully();\n workerGroup.shutdownGracefully();\n }\n\n }", "public void doStartService() throws ServiceException {\r\n super.doStartService();\r\n // Nothing to do\r\n }", "private void startServiceThreads() throws IOException {\n String n = Thread.currentThread().getName();\n UncaughtExceptionHandler handler = new UncaughtExceptionHandler() {\n public void uncaughtException(Thread t, Throwable e) {\n abort();\n LOG.fatal(\"Set stop flag in \" + t.getName(), e);\n }\n };\n Threads.setDaemonThreadRunning(this.logRoller, n + \".logRoller\",\n handler);\n Threads.setDaemonThreadRunning(this.logFlusher, n + \".logFlusher\",\n handler);\n Threads.setDaemonThreadRunning(this.cacheFlusher, n + \".cacheFlusher\",\n handler);\n Threads.setDaemonThreadRunning(this.compactSplitThread, n + \".compactor\",\n handler);\n Threads.setDaemonThreadRunning(this.workerThread, n + \".worker\", handler);\n // Leases is not a Thread. Internally it runs a daemon thread. If it gets\n // an unhandled exception, it will just exit.\n this.leases.setName(n + \".leaseChecker\");\n this.leases.start();\n // Put up info server.\n int port = this.conf.getInt(\"hbase.regionserver.info.port\", 60030);\n if (port >= 0) {\n String a = this.conf.get(\"hbase.master.info.bindAddress\", \"0.0.0.0\");\n this.infoServer = new InfoServer(\"regionserver\", a, port, false);\n this.infoServer.setAttribute(\"regionserver\", this);\n this.infoServer.start();\n }\n // Start Server. This service is like leases in that it internally runs\n // a thread.\n this.server.start();\n LOG.info(\"HRegionServer started at: \" +\n serverInfo.getServerAddress().toString());\n }", "@Override\n public synchronized void startIT() {\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());\n Tracer.emitEvent(Tracer.Event.START.getId(), Tracer.Event.START.getType());\n }\n\n // Console Log\n Thread.currentThread().setName(\"APPLICATION\");\n if (COMPSs_VERSION == null) {\n LOGGER.warn(\"Starting COMPSs Runtime\");\n } else if (COMPSs_BUILDNUMBER == null) {\n LOGGER.warn(\"Starting COMPSs Runtime v\" + COMPSs_VERSION);\n } else if (COMPSs_BUILDNUMBER.endsWith(\"rnull\")) {\n COMPSs_BUILDNUMBER = COMPSs_BUILDNUMBER.substring(0, COMPSs_BUILDNUMBER.length() - 6);\n LOGGER.warn(\"Starting COMPSs Runtime v\" + COMPSs_VERSION + \" (build \" + COMPSs_BUILDNUMBER + \")\");\n } else {\n LOGGER.warn(\"Starting COMPSs Runtime v\" + COMPSs_VERSION + \" (build \" + COMPSs_BUILDNUMBER + \")\");\n }\n\n // Init Runtime\n if (!initialized) {\n // Application\n synchronized (this) {\n LOGGER.debug(\"Initializing components\");\n\n // Initialize object registry for bindings if needed\n // String lang = System.getProperty(COMPSsConstants.LANG);\n // if (lang != COMPSsConstants.Lang.JAVA.name() && oReg == null) {\n // oReg = new ObjectRegistry(this);\n // }\n\n // Initialize main runtime components\n td = new TaskDispatcher();\n ap = new AccessProcessor(td);\n\n // Initialize runtime tools components\n if (GraphGenerator.isEnabled()) {\n graphMonitor = new GraphGenerator();\n ap.setGM(graphMonitor);\n }\n if (RuntimeMonitor.isEnabled()) {\n runtimeMonitor = new RuntimeMonitor(ap, td, graphMonitor, Long.parseLong(System.getProperty(COMPSsConstants.MONITOR)));\n }\n\n // Log initialization\n initialized = true;\n LOGGER.debug(\"Ready to process tasks\");\n }\n } else {\n // Service\n String className = Thread.currentThread().getStackTrace()[2].getClassName();\n LOGGER.debug(\"Initializing \" + className + \"Itf\");\n try {\n td.addInterface(Class.forName(className + \"Itf\"));\n } catch (ClassNotFoundException cnfe) {\n ErrorManager.fatal(\"Error adding interface \" + className + \"Itf\", cnfe);\n }\n }\n\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());\n }\n\n }", "private void loadService() {\n if (!isServiceRunning(ShakeService.class)) {\n Intent intent = new Intent(this, ShakeService.class);\n this.startService(intent);\n }\n }", "public static void main(String[] argv) throws Exception\n {\n // Create a temporary bundle cache directory and\n // make sure to clean it up on exit.\n final File cachedir = File.createTempFile(\"felix.example.servicebased\", null);\n cachedir.delete();\n Runtime.getRuntime().addShutdownHook(new Thread() {\n public void run()\n {\n deleteFileOrDir(cachedir);\n }\n });\n \n Map configMap = new StringMap(false);\n configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES,\n \"org.osgi.framework; version=1.3.0,\" +\n \"org.osgi.service.packageadmin; version=1.2.0,\" +\n \"org.osgi.service.startlevel; version=1.0.0,\" +\n \"org.osgi.service.url; version=1.0.0,\" +\n \"org.osgi.util.tracker; version=1.3.2,\" +\n \"org.apache.felix.example.servicebased.host.service; version=1.0.0,\" +\n \"javax.swing\");\n configMap.put(FelixConstants.AUTO_START_PROP + \".1\",\n \"file:../servicebased.circle/target/servicebased.circle-1.0.0.jar \" +\n \"file:../servicebased.square/target/servicebased.square-1.0.0.jar \" +\n \"file:../servicebased.triangle/target/servicebased.triangle-1.0.0.jar\");\n configMap.put(FelixConstants.LOG_LEVEL_PROP, \"1\");\n configMap.put(BundleCache.CACHE_PROFILE_DIR_PROP, cachedir.getAbsolutePath());\n \n List list = new ArrayList();\n list.add(new Activator());\n \n try\n {\n // Now create an instance of the framework.\n Felix felix = new Felix(configMap, list);\n felix.start();\n }\n catch (Exception ex)\n {\n System.err.println(\"Could not create framework: \" + ex);\n ex.printStackTrace();\n System.exit(-1);\n }\n }", "private ServiceList serviceSetup()\n {\n SIManager simgr = sm.createSIManager();\n ServiceList services = simgr.filterServices(new ServiceFilter()\n {\n public boolean accept(Service service)\n {\n return !(service instanceof AbstractService);\n }\n });\n try\n {\n services = services.sortByNumber();\n }\n catch (SortNotAvailableException ex)\n {\n // don't sort then\n }\n\n // Check to see if there are arguments\n // If length of one, then sourceID was specified\n // If length of three, then freq/prognum/modformat was specified\n if (args.length == 1)\n {\n String sid = args[0];\n if (args[0].startsWith(\"0x\")) sid = sid.substring(2, sid.length());\n try\n {\n int sourceID = Integer.parseInt(sid, 16);\n OcapLocator[] locs = { new OcapLocator(sourceID) };\n LocatorFilter filter = new LocatorFilter(locs);\n services = simgr.filterServices(filter);\n }\n catch (NumberFormatException ex)\n {\n log(\"SourceID is not in the correct format\");\n log(\"Proceeding with normal SIDump process\");\n }\n catch (Exception ex)\n {\n log(\"Exception while getting specified service: \" + ex.getMessage());\n log(\"Proceeding with normal SIDump process\");\n }\n }\n if (args.length == 3)\n {\n try\n {\n int freq = Integer.parseInt(args[0]);\n int prog = Integer.parseInt(args[1]);\n int mod = Integer.parseInt(args[2]);\n OcapLocator[] locs = { new OcapLocator(freq, prog, mod) };\n LocatorFilter filter = new LocatorFilter(locs);\n services = simgr.filterServices(filter);\n }\n catch (NumberFormatException ex)\n {\n log(\"Freq/prognum/modformat values are not valid\");\n log(\"Proceeding with normal SIDump process\");\n }\n catch (Exception ex)\n {\n log(\"Exception while getting specified service: \" + ex.getMessage());\n log(\"Proceeding with normal SIDump process\");\n }\n }\n\n return services;\n }", "public void startOsgi();", "public void start(){\n CoffeeMakerHelper coffeeMakerHelper = new CoffeeMakerHelper(inputArgs[0]);\n coffeeMakerService = coffeeMakerHelper.parseJsonFile();\n computeCoffeeMaker();\n }", "private void start() throws IOException {\n\n\n int port = 9090;\n server = ServerBuilder.forPort(port)\n .addService(new CounterServiceImpl())\n .build()\n .start();\n // logger.info(\"Server started, listening on \" + port);\n\n /* Add hook when stop application*/\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n // Use stderr here since the logger may have been reset by its JVM shutdown hook.\n // IRedis.USER_SYNC_COMMAND.\n System.err.println(\"*** shutting down gRPC server since JVM is shutting down\");\n Count.this.stop();\n System.err.println(\"*** server shut down\");\n\n }\n });\n }", "private void startService() {\n\n if (!mAlreadyStartedService ) {\n\n //mMsgView.setText(R.string.msg_location_service_started);\n\n //Start location sharing service to app server.........\n Intent intent = new Intent(this, LocationMonitoringService.class);\n startService(intent);\n\n mAlreadyStartedService = true;\n //Ends................................................\n }\n }", "public void start() {}", "public void start() {}", "public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }", "public static void windowsService(String args[]) {\n String cmd = \"start\";\n if (args.length > 0) {\n cmd = args[0];\n }\n if (\"start\".equals(cmd)) {\n engineLauncherInstance.windowsStart();\n } else {\n engineLauncherInstance.windowsStop();\n }\n }", "@Activate\n protected void start(BundleContext bundleContext) throws Exception {\n log.info(\"Service Component is activated\");\n\n // Create Stream Processor Service\n EditorDataHolder.setDebugProcessorService(new DebugProcessorService());\n EditorDataHolder.setSiddhiManager(new SiddhiManager());\n EditorDataHolder.setBundleContext(bundleContext);\n\n serviceRegistration = bundleContext.registerService(EventStreamService.class.getName(),\n new DebuggerEventStreamService(), null);\n }", "public void Start(){\n Registry registry = null;\n try{\n for(int i=0;i<nsize;i++){\n registry= LocateRegistry.getRegistry(this.ports[i]);\n PRMI stub = (PRMI) registry.lookup(\"DCMP\");\n System.out.println(\"env calls Init to man \"+i);\n stub.InitHandler(new Request(this.id, -1, 'e'));\n D++;\n }\n\n } catch(Exception e){\n return;\n }\n return;\n }", "public void startCommonService(EzBakeBaseThriftService service, String serviceName, String securityId) throws Exception {\n startService(service, serviceName, null, securityId);\n }", "protected void start() {\n }", "public void startPlugin() {\n classesDisponibles = new HashMap[types.length];\n try { // enregistrer le service d'acces aux depot de jars\n ServicesRegisterManager.registerService(Parameters.JAR_REPOSITORY_MANAGER, this);\n rescanRepository(); // creer les listes de classes disponibles a partir du depot\n }\n catch (ServiceInUseException mbiue) {\n System.err.println(\"Jar Repository Manager service created twice\");\n }\n }", "public void start( BundleContext bc ) throws Exception {\r\n\t\tinitLogger(bc);\r\n\t\t\r\n\t\tfindSearcher(bc);\r\n\t\t\r\n\t\tregisterService(bc);\r\n\t\t\r\n\t\tregisterServlets(bc);\r\n\t}", "public void service_INIT(){\n }", "@Override\r\n public synchronized void start() throws Exception {\r\n if (isStopped()) {\r\n startClients();\r\n startServers();\r\n startHelper();\r\n super.start();\r\n }\r\n }", "public static void start(Context context)\n {\n Log.v(TAG, \"Starting!!\");\n Intent intent = new Intent(context, TexTronicsManagerService.class);\n intent.setAction(Action.start.toString());\n context.startService(intent);\n }", "public void start() {\n }", "public Ice.AsyncResult begin_startService(String service, java.util.Map<String, String> __ctx);", "public void startService() {\n log_d( \"startService()\" );\n \tint state = execStartService();\n\t\tswitch( state ) {\n\t\t\tcase STATE_CONNECTED:\n\t\t\t\tshowTitleConnected( getDeviceName() );\n\t\t\t\thideButtonConnect();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tshowTitleNotConnected();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloader(loader, appServer\n .map(DevAppServer::doStartServer, getAppName() + \"Server\", getPort())\n .ignoreOut1().unsafe());\n }", "private static void setupOsgi() {\r\n FrameworkStarter.getInstance().start();\r\n }", "public void startLibrary();", "protected void initializeServices() throws Exception {\n String fileName = this.getClass().getSimpleName() + \"Output.csv\";\r\n outputFile = new File(fileName); // located in current run dir \r\n getOutputFile().delete(); // delete any previous version\r\n \r\n // Configure system properties for Velo to work properly (can also be provided as runtime args)\r\n System.setProperty(\"logfile.path\", \"./velo.log\");\r\n if(repositoryPropertiesFile == null) {\r\n System.setProperty(\"repository.properties.path\", \"./repository.properties\");\r\n } else {\r\n System.setProperty(\"repository.properties.path\", repositoryPropertiesFile.getAbsolutePath()); \r\n }\r\n \r\n // Initialize the spring container\r\n if(cmsServicesFile == null && tifServicesFile == null) {\r\n SpringContainerInitializer.loadBeanContainerFromClasspath(null);\r\n \r\n } else {\r\n List<String> beanFilePaths = new ArrayList<String>();\r\n if(cmsServicesFile != null) {\r\n beanFilePaths.add(\"file:\" + cmsServicesFile.getAbsolutePath());\r\n }\r\n if(tifServicesFile != null) {\r\n beanFilePaths.add(\"file:\" + tifServicesFile.getAbsolutePath());\r\n }\r\n SpringContainerInitializer.loadBeanContainerFromFilesystem(beanFilePaths.toArray(new String[beanFilePaths.size()]));\r\n }\r\n \r\n // set the service classes\r\n securityManager = CmsServiceLocator.getSecurityManager();\r\n resourceManager = CmsServiceLocator.getResourceManager();\r\n searchManager = CmsServiceLocator.getSearchManager();\r\n notificationManager = CmsServiceLocator.getNotificationManager();\r\n \r\n if(tifServicesFile != null) {\r\n jobLaunchService = TifServiceLocator.getJobLaunchingService();\r\n codeRegistry = TifServiceLocator.getCodeRegistry();\r\n machineRegistry = TifServiceLocator.getMachineRegistry();\r\n scriptRegistry = TifServiceLocator.getScriptRegistry();\r\n jobConfigService = TifServiceLocator.getJobConfigService();\r\n veloWorkspace = TifServiceLocator.getVeloWorkspace();\r\n }\r\n \r\n \r\n securityManager.login(username, password);\r\n\r\n }", "public Ice.AsyncResult begin_startService(String service);", "public Ice.AsyncResult begin_startService(String service, java.util.Map<String, String> __ctx, Ice.Callback __cb);", "private void start() {\n\n\t}", "public void run() throws Exception {\n logger.log(Level.FINE, \"run()\");\n /* Start the discovery prcess by creating a LookupDiscovery\n * instance configured to discover BOTH the initial and additional\n * lookup services to be started.\n */\n String[] groupsToDiscover = toGroupsArray(getAllLookupsToStart());\n logger.log(Level.FINE,\n \"starting discovery by creating a \"\n +\"LookupDiscovery to discover -- \");\n for(int i=0;i<groupsToDiscover.length;i++) {\n logger.log(Level.FINE, \" \"+groupsToDiscover[i]);\n }//end loop\n LookupDiscovery ld = new LookupDiscovery(groupsToDiscover,\n getConfig().getConfiguration());\n lookupDiscoveryList.add(ld);\n\n /* Verify that the lookup discovery utility created above is\n * operational by verifying that the INITIIAL lookups are\n * discovered.\n */\n mainListener.setLookupsToDiscover(getInitLookupsToStart());\n ld.addDiscoveryListener(mainListener);\n waitForDiscovery(mainListener);\n\n /* Terminate the lookup discovery utility */\n ld.terminate();\n logger.log(Level.FINE, \"terminated lookup discovery\");\n\n\n /* Since the lookup discovery utility was terminated, the listener\n * should receive no more events when new lookups are started that\n * belong to groups the utility is configured to discover. Thus,\n * reset the listener to expect no more events.\n */\n mainListener.clearAllEventInfo();\n /* Verify that the lookup discovery utility created above is no\n * longer operational by starting the additional lookups, and\n * verifying that the listener receives no more discovered events.\n */\n logger.log(Level.FINE,\n \"starting additional lookup services ...\");\n startAddLookups();\n /* Wait a nominal amount of time to allow any un-expected events\n * to arrive.\n */\n waitForDiscovery(mainListener);\n }", "public Ice.AsyncResult begin_startService(String service, java.util.Map<String, String> __ctx, Callback_ServiceManager_startService __cb);", "@Override\n public void run(String... args) {\n if (args != null && args.length > 0) {\n logger.info(\"Starting the LOCKSS daemon\");\n try {\n AppSpec spec = new AppSpec()\n .setService(ServiceDescr.SVC_POLLER)\n .setName(\"Poller/Crawler Service\")\n .setArgs(args)\n .setSpringApplicatonContext(getApplicationContext())\n .setAppManagers(myManagerDescs)\n .addAppConfig(PARAM_START_PLUGINS, \"true\")\n .addAppConfig(PluginManager.PARAM_START_ALL_AUS, \"true\");\n logger.info(\"Calling LockssApp.startStatic...\");\n lockssApp = LockssApp.startStatic(LockssDaemon.class, spec);\n } catch (Exception ex) {\n logger.error(\"LockssApp.startStatic failed: \", ex);\n }\n }\n else {\n logger.info(\"No args provided, daemon not started.\");\n // No: Do nothing. This happens when a test is started and before the\n // test setup has got a chance to inject the appropriate command line\n // parameters.\n }\n }", "public void startService(String service, java.util.Map<String, String> __ctx)\r\n throws AlreadyStartedException,\r\n NoSuchServiceException;", "private void startDiscovery() {\n client.startDiscovery(getResources().getString(R.string.service_id), endpointDiscoveryCallback, new DiscoveryOptions(STRATEGY));\n }", "public void start() {\n\n }", "public void start()\n {\n }", "protected void startCoreModule() {\n LOGGER.info(\"Start metric service at level: {}\", METRIC_CONFIG.getMetricLevel().name());\n // load metric manager\n loadManager();\n // load metric reporter\n loadReporter();\n // do start all reporter without first time\n startAllReporter();\n }", "@Test\n\tpublic void bodyUseService() {\n\t\tLOG.info(\"[#759] bodyUseService part 1\");\n\n\t\tFuture<List<Service>> asyncServices = null;\n\t\tList<Service> services = new ArrayList<Service>();\n\n\t\ttry {\n\t\t\t// Start the service\n\t\t\tLOG.info(\"[#759] Calculator service starting\");\n\t\t\tFuture<ServiceControlResult> asyncStartResult = TestCase759.serviceControl.startService(calculatorServiceId);\n\t\t\tServiceControlResult startResult = asyncStartResult.get();\n\t\t\t// Service can't be started\n\t\t\tif (!startResult.getMessage().equals(ResultMessage.SUCCESS)) {\n\t\t\t\tthrow new Exception(\"Can't start the service. Returned value: \"+startResult.getMessage());\n\t\t\t}\n\t\t\tLOG.info(\"[#759] Calculator service started\");\n\n\t\t\t// -- Test case is now ready to consume the service\n\t\t\t// The injection of ICalc will launch the UpperTester\n\t\t}\n\t\tcatch (ServiceDiscoveryException e) {\n\t\t\tLOG.info(\"[#759] ServiceDiscoveryException\", e);\n\t\t\tfail(\"[#759] ServiceDiscoveryException: \"+e.getMessage());\n\t\t\treturn;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tLOG.info(\"[#759] Preamble installService: Unknown Exception\", e);\n\t\t\tfail(\"[#759] Preamble installService: Unknown Exception: \"+e.getMessage());\n\t\t\treturn;\n\t\t}\n\t}", "public void start() {\n\t\tinitializeComponents();\r\n\r\n\t\tint userChoice;\r\n\r\n\t\tdo {\r\n\t\t\t// Display start menu\r\n\t\t\tview.displayMainMenu();\r\n\r\n\t\t\t// Get users choice\r\n\t\t\tuserChoice = view.requestUserChoice();\r\n\r\n\t\t\t// Run the respective service\r\n\t\t\tswitch (userChoice) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tservice.register();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tservice.login();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tservice.forgotPassword();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tservice.logout();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tservice.displayAllUserInfo(); // Secret method\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"Invalid choice\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (userChoice != 4);\r\n\t}", "@Override\n public void start() {\n // only start once, this is not foolproof as the active flag is set only\n // when the watchdog loop is entered\n if ( isActive() ) {\n return;\n }\n\n Log.info( \"Running server with \" + server.getMappings().size() + \" mappings\" );\n try {\n server.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start server on port '\" + server.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start server:\\n\" + ioe );\n System.exit( 1 );\n }\n\n if ( redirectServer != null ) {\n try {\n redirectServer.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start redirection server on port '\" + redirectServer.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start redirection server:\\n\" + ioe );\n }\n }\n\n // Save the name of the thread that is running this class\n final String oldName = Thread.currentThread().getName();\n\n // Rename this thread to the name of this class\n Thread.currentThread().setName( NAME );\n\n // very important to get park(millis) to operate\n current_thread = Thread.currentThread();\n\n // Parse through the configuration and initialize all the components\n initComponents();\n\n // if we have no components defined, install a wedge to keep the server open\n if ( components.size() == 0 ) {\n Wedge wedge = new Wedge();\n wedge.setLoader( this );\n components.put( wedge, getConfig() );\n activate( wedge, getConfig() );\n }\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.components_initialized\" ) );\n\n final StringBuffer b = new StringBuffer( NAME );\n b.append( \" v\" );\n b.append( VERSION.toString() );\n b.append( \" initialized - Loader:\" );\n b.append( Loader.API_NAME );\n b.append( \" v\" );\n b.append( Loader.API_VERSION );\n b.append( \" - Runtime: \" );\n b.append( System.getProperty( \"java.version\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"java.vendor\" ) );\n b.append( \")\" );\n b.append( \" - Platform: \" );\n b.append( System.getProperty( \"os.arch\" ) );\n b.append( \" OS: \" );\n b.append( System.getProperty( \"os.name\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"os.version\" ) );\n b.append( \")\" );\n Log.info( b );\n\n // enter a loop performing watchdog and maintenance functions\n watchdog();\n\n // The watchdog loop has exited, so we are done processing\n terminateComponents();\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.terminated\" ) );\n\n // Rename the thread back to what it was called before we were being run\n Thread.currentThread().setName( oldName );\n\n }", "public AppiumDriverLocalService StartServer()\n\t{\n\t\tservice = AppiumDriverLocalService.buildDefaultService();\n\t\tservice.start();\n\t\treturn service;\n\t}", "public void start() {\n\n\t}", "public interface ServiceManager {\n /**\n * Stop the registered services. The service with the highest level will be stoppped first.\n */\n public void stop();\n\n /**\n * First stop and than start. Also resets all managed singletons.\n * \n */\n public void restart();\n}", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start() {\n system = ActorSystem.create(\"http-server\", config);\n\n Settings settings = SettingsExtension.SettingsExtensionProvider.get(system);\n\n vHostHandlers = settings.vHostConfigs()\n .stream()\n .map(vc -> new AkkaTcpHandler(system, vc))\n .collect(Collectors.toList());\n\n vHostHandlers.forEach(VHostHandler::start);\n\n Runtime.getRuntime().addShutdownHook(new Thread(this::terminate));\n }", "public TestService(ServiceConfiguration config) {\n this.config = config;\n System.out.println(\"starting service...\");\n this.start();\n }", "protected abstract void doStart();", "public static Kernel start(int port)\n {\n Kernel app = Kernel.newInstance();\n Container container = app.getContainer();\n\n // Forms\n container.add(new ServiceDefinition<>(AnnualReviewType.class));\n container.add(new ServiceDefinition<>(UserType.class));\n\n // Managers\n container.add(new ServiceDefinition<>(AccessDecisionManager.class, YuconzAccessDecisionManager.class));\n container.add(new ServiceDefinition<>(YuconzAuthenticationManager.class));\n container.add(new ServiceDefinition<>(Hibernate.class));\n container.add(new ServiceDefinition<>(LogManager.class))\n .addMethodCallDefinitions(new MethodCallDefinition(\n \"setAuthenticationManager\",\n new ServiceReference<>(YuconzAuthenticationManager.class)\n ));\n container.add(new ServiceDefinition<>(RecordManager.class));\n container.add(new ServiceDefinition<>(AnnualReviewManager.class));\n container.add(new ServiceDefinition<>(FormManager.class));\n\n container.add(new ServiceDefinition<>(AuthorisationManager.class))\n .addMethodCallDefinitions(new MethodCallDefinition(\n \"setAuthenticationManager\",\n new ServiceReference<>(YuconzAuthenticationManager.class)\n ));\n\n // Resolvers\n container.add(new ServiceDefinition<>(UserResolver.class));\n container.add(new ServiceDefinition<>(RecordResolver.class));\n\n // JTwig Functions\n container.add(new ServiceDefinition<>(CurrentUserFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(CurrentRoleFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(FormRenderFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(FormStartRenderFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(FormEndRenderFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(ActivePageFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(IsGrantedFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(RangeFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(ServiceFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(LocalDateFunction.class)).addTag(\"jtwig.function\");\n\n // Voters\n container.add(new ServiceDefinition<>(PersonalDetailsVoter.class)).addTag(\"authentication.voter\");\n container.add(new ServiceDefinition<>(RecordVoter.class)).addTag(\"authentication.voter\");\n container.add(new ServiceDefinition<>(AnnualReviewVoter.class)).addTag(\"authentication.voter\");\n container.add(new ServiceDefinition<>(AuthorisationVoter.class)).addTag(\"authentication.voter\");\n\n container.getServiceDefinition(FrameworkServer.class).setConfigurationReference(new PlainReference<>(new Configuration()\n {\n @Override\n public int getPort()\n {\n return port;\n }\n }));\n\n app.boot();\n\n Router router = container.get(Router.class);\n\n // Records\n router.registerController(AppController.class);\n router.registerController(StaticController.class);\n router.registerController(AuthenticationController.class);\n router.registerController(DashboardController.class);\n router.registerController(EmployeesController.class);\n router.registerController(RecordController.class);\n router.registerController(AnnualReviewController.class);\n\n FormManager formManager = container.get(FormManager.class);\n\n formManager.getRenderers().removeIf(r -> r.getClass().equals(ChoiceRenderer.class));\n formManager.addRenderer(CustomChoiceRenderer.class);\n formManager.addRenderer(DateRenderer.class);\n\n app.start();\n\n return app;\n }", "public void startup(){}", "public InitService() {\n super(\"InitService\");\n }", "private void startService() {\n startService(new Intent(this, BackgroundMusicService.class));\n }", "public void start() throws Exception;", "private void startServerService() {\n Intent intent = new Intent(this, MainServiceForServer.class);\n // Call bindService(..) method to bind service with UI.\n this.bindService(intent, serverServiceConnection, Context.BIND_AUTO_CREATE);\n Utils.log(\"Server Service Starting...\");\n\n //Disable Start Server Button And Enable Stop and Message Button\n messageButton.setEnabled(true);\n stopServerButton.setEnabled(true);\n startServerButton.setEnabled(false);\n\n\n }", "@Override\n\tpublic void start() throws ServiceException\n\t{\n\t\t\n\t}", "public StartedService() {\n super(\"StartedService\");\n }", "public void startService() {\n\t\tListenThread listenThread = new ListenThread();\r\n\t\tlistenThread.start();\r\n\t\tSelfVideoThread selfVideoThread = new SelfVideoThread();\r\n\t\tselfVideoThread.start();\r\n\t\tif(remote!=\"\"){\r\n\t\t\tString[] remotes = remote.split(\",\");\r\n\t\t\tString[] remotePorts = remotePort.split(\",\");\r\n\t\t\tfor(int i = 0; i < remotes.length; i++){\r\n\t\t\t\tString currentRemote = remotes[i];\r\n\t\t\t\tint currentRemotePort = 6262;\r\n\t\t\t\tif(i<remotePorts.length){\r\n\t\t\t\t\tcurrentRemotePort = Integer.valueOf(remotePorts[i]);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n//\t\t\t\tcreatTCPLink(currentRemote, currentRemotePort);\r\n\t\t\t\t\r\n\t\t\t\tSocket socket = null;\r\n\t\t\t\tJSONObject process = new JSONObject();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsocket = new Socket(currentRemote, currentRemotePort);\r\n\t\t\t\t\tThread sendVedio = new SendVideo(socket, width, height, rate);\r\n\t\t\t\t\tsendVedio.start();\r\n\t\t\t\t\tThread receiveVedio = new ReceiveVideo(socket);\r\n\t\t\t\t\treceiveVedio.start();\r\n\t\t\t\t\tsockets.add(socket);\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} finally {\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "Service newService();", "public void start(){\n }", "private void startOtherServices() {\n Object obj;\n String str;\n String str2;\n boolean tuiEnable;\n TelephonyRegistry telephonyRegistry;\n VibratorService vibrator;\n InputManagerService inputManager;\n WindowManagerService wm;\n AlarmManagerService wm2;\n boolean safeMode;\n ILockSettings lockSettings;\n IConnectivityManager iConnectivityManager;\n INetworkManagementService iNetworkManagementService;\n IpSecService ipSecService;\n INetworkPolicyManager iNetworkPolicyManager;\n MediaRouterService mediaRouter;\n CountryDetectorService countryDetector;\n NetworkTimeUpdateService networkTimeUpdater;\n INetworkStatsService iNetworkStatsService;\n LocationManagerService location;\n Resources.Theme systemTheme;\n IpSecService ipSecService2;\n INetworkManagementService iNetworkManagementService2;\n IpSecService ipSecService3;\n IpSecService ipSecService4;\n INetworkPolicyManager iNetworkPolicyManager2;\n INetworkStatsService iNetworkStatsService2;\n IConnectivityManager iConnectivityManager2;\n IBinder iBinder;\n INotificationManager notification;\n IBinder iBinder2;\n MediaRouterService mediaRouter2;\n boolean hasFeatureFace;\n boolean hasFeatureIris;\n boolean hasFeatureFingerprint;\n MediaRouterService mediaRouter3;\n Class<SystemService> serviceClass;\n MediaRouterService mediaRouter4;\n Throwable e;\n ?? mediaRouterService;\n NetworkTimeUpdateService networkTimeUpdater2;\n Throwable e2;\n IBinder iBinder3;\n Throwable e3;\n IBinder iBinder4;\n Throwable e4;\n Throwable e5;\n Throwable e6;\n Throwable e7;\n Throwable e8;\n ?? r2;\n IBinder iBinder5;\n Throwable e9;\n Throwable e10;\n Throwable e11;\n IpSecService ipSecService5;\n Throwable e12;\n ?? create;\n Throwable e13;\n VibratorService vibrator2;\n RuntimeException e14;\n TelephonyRegistry telephonyRegistry2;\n ?? vibratorService;\n InputManagerService inputManager2;\n ?? r9;\n Context context = this.mSystemContext;\n INetworkStatsService iNetworkStatsService3 = null;\n WindowManagerService wm3 = null;\n IBinder iBinder6 = null;\n NetworkTimeUpdateService networkTimeUpdater3 = null;\n InputManagerService inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n inputManager3 = null;\n MmsServiceBroker mmsService = null;\n AlarmManagerService alarmManager = null;\n this.mHwRogEx = HwServiceFactory.getHwRogEx();\n boolean disableSystemTextClassifier = SystemProperties.getBoolean(\"config.disable_systemtextclassifier\", false);\n boolean disableNetworkTime = SystemProperties.getBoolean(\"config.disable_networktime\", false);\n boolean disableCameraService = SystemProperties.getBoolean(\"config.disable_cameraservice\", false);\n boolean disableSlices = SystemProperties.getBoolean(\"config.disable_slices\", false);\n boolean tuiEnable2 = SystemProperties.getBoolean(\"ro.vendor.tui.service\", false);\n boolean isEmulator = SystemProperties.get(\"ro.kernel.qemu\").equals(ENCRYPTED_STATE);\n boolean enableRms = SystemProperties.getBoolean(\"ro.config.enable_rms\", false);\n boolean enableIaware = SystemProperties.getBoolean(\"ro.config.enable_iaware\", false);\n boolean isChinaArea = \"CN\".equalsIgnoreCase(SystemProperties.get(\"ro.product.locale.region\", \"\"));\n boolean isWatch = context.getPackageManager().hasSystemFeature(\"android.hardware.type.watch\");\n boolean isArc = context.getPackageManager().hasSystemFeature(\"org.chromium.arc\");\n boolean enableVrService = context.getPackageManager().hasSystemFeature(\"android.hardware.vr.high_performance\");\n boolean isStartSysSvcCallRecord = \"3\".equals(SystemProperties.get(\"ro.logsystem.usertype\", \"0\")) && \"true\".equals(SystemProperties.get(\"ro.syssvccallrecord.enable\", \"false\"));\n if (Build.IS_DEBUGGABLE) {\n if (SystemProperties.getBoolean(\"debug.crash_system\", false)) {\n throw new RuntimeException();\n }\n }\n try {\n if (MAPLE_ENABLE) {\n try {\n Slog.d(TAG, \"wait primary zygote preload default resources\");\n ConcurrentUtils.waitForFutureNoInterrupt(this.mPrimaryZygotePreload, \"Primary Zygote preload\");\n Slog.d(TAG, \"primary zygote preload default resources finished\");\n this.mPrimaryZygotePreload = null;\n } catch (RuntimeException e15) {\n e14 = e15;\n str2 = \"false\";\n telephonyRegistry = null;\n vibrator2 = null;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n }\n }\n try {\n this.mZygotePreload = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$NlJmG18aPrQduhRqASIdcn7G0z8.INSTANCE, \"SecondaryZygotePreload\");\n traceBeginAndSlog(\"StartKeyAttestationApplicationIdProviderService\");\n ServiceManager.addService(\"sec_key_att_app_id_provider\", (IBinder) new KeyAttestationApplicationIdProviderService(context));\n traceEnd();\n traceBeginAndSlog(\"StartKeyChainSystemService\");\n this.mSystemServiceManager.startService(KeyChainSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSchedulingPolicyService\");\n ServiceManager.addService(\"scheduling_policy\", (IBinder) new SchedulingPolicyService());\n traceEnd();\n if (hasSystemServerFeature(\"telecomloader\")) {\n traceBeginAndSlog(\"StartTelecomLoaderService\");\n this.mSystemServiceManager.startService(TelecomLoaderService.class);\n traceEnd();\n }\n if (hasSystemServerFeature(\"telephonyregistry\")) {\n traceBeginAndSlog(\"StartTelephonyRegistry\");\n if (HwSystemManager.mPermissionEnabled == 0) {\n r9 = new TelephonyRegistry(context);\n } else {\n HwServiceFactory.IHwTelephonyRegistry itr = HwServiceFactory.getHwTelephonyRegistry();\n if (itr != null) {\n r9 = itr.getInstance(context);\n } else {\n r9 = new TelephonyRegistry(context);\n }\n }\n ServiceManager.addService(\"telephony.registry\", (IBinder) r9);\n traceEnd();\n telephonyRegistry2 = r9;\n } else {\n telephonyRegistry2 = null;\n }\n try {\n traceBeginAndSlog(\"StartEntropyMixer\");\n this.mEntropyMixer = new EntropyMixer(context);\n traceEnd();\n this.mContentResolver = context.getContentResolver();\n traceBeginAndSlog(\"StartAccountManagerService\");\n this.mSystemServiceManager.startService(ACCOUNT_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartContentService\");\n this.mSystemServiceManager.startService(CONTENT_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"InstallSystemProviders\");\n this.mActivityManagerService.installSystemProviders();\n SQLiteCompatibilityWalFlags.reset();\n traceEnd();\n traceBeginAndSlog(\"StartDropBoxManager\");\n this.mSystemServiceManager.startService(DropBoxManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartVibratorService\");\n vibratorService = new VibratorService(context);\n } catch (RuntimeException e16) {\n e14 = e16;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = null;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7 = null;\n LocationManagerService location2 = null;\n CountryDetectorService countryDetector2 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n try {\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n } catch (Throwable e17) {\n reportWtf(\"starting StorageManagerService\", e17);\n }\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n try {\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n } catch (Throwable e18) {\n reportWtf(\"starting StorageStatsService\", e18);\n }\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config = wm.computeNewConfiguration(0);\n DisplayMetrics metrics = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics);\n context.getResources().updateConfiguration(config, metrics);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e19) {\n e14 = e19;\n str2 = \"false\";\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n telephonyRegistry = null;\n vibrator2 = null;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72 = null;\n LocationManagerService location22 = null;\n CountryDetectorService countryDetector22 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2);\n context.getResources().updateConfiguration(config2, metrics2);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n try {\n ServiceManager.addService(\"vibrator\", (IBinder) vibratorService);\n traceEnd();\n if (hasSystemServerFeature(\"dynamicsystem\")) {\n try {\n traceBeginAndSlog(\"StartDynamicSystemService\");\n try {\n ServiceManager.addService(\"dynamic_system\", (IBinder) new DynamicSystemService(context));\n traceEnd();\n } catch (RuntimeException e20) {\n e14 = e20;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder722 = null;\n LocationManagerService location222 = null;\n CountryDetectorService countryDetector222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22);\n context.getResources().updateConfiguration(config22, metrics22);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e21) {\n e14 = e21;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7222 = null;\n LocationManagerService location2222 = null;\n CountryDetectorService countryDetector2222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222);\n context.getResources().updateConfiguration(config222, metrics222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n }\n if (!isWatch && hasSystemServerFeature(\"consumerir\")) {\n traceBeginAndSlog(\"StartConsumerIrService\");\n ServiceManager.addService(\"consumer_ir\", (IBinder) new ConsumerIrService(context));\n traceEnd();\n }\n try {\n traceBeginAndSlog(\"StartAlarmManagerService\");\n alarmManager = HwServiceFactory.getHwAlarmManagerService(context);\n if (alarmManager == null) {\n try {\n alarmManager = new AlarmManagerService(context);\n } catch (RuntimeException e22) {\n e14 = e22;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72222 = null;\n LocationManagerService location22222 = null;\n CountryDetectorService countryDetector22222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222);\n context.getResources().updateConfiguration(config2222, metrics2222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n }\n } catch (RuntimeException e23) {\n e14 = e23;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder722222 = null;\n LocationManagerService location222222 = null;\n CountryDetectorService countryDetector222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222);\n context.getResources().updateConfiguration(config22222, metrics22222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n try {\n this.mSystemServiceManager.startService(alarmManager);\n traceEnd();\n this.mActivityManagerService.setAlarmManager(alarmManager);\n traceBeginAndSlog(\"StartInputManagerService\");\n InputManagerService inputManager4 = HwServiceFactory.getHwInputManagerService().getInstance(context, null);\n if (inputManager4 == null) {\n inputManager2 = new InputManagerService(context);\n } else {\n inputManager2 = inputManager4;\n }\n try {\n traceEnd();\n traceBeginAndSlog(\"StartHwSysResManagerService\");\n if (enableRms || enableIaware) {\n try {\n this.mSystemServiceManager.startService(\"com.android.server.rms.HwSysResManagerService\");\n } catch (Throwable e24) {\n Slog.e(TAG, e24.toString());\n }\n }\n traceEnd();\n traceBeginAndSlog(\"StartWindowManagerService\");\n ConcurrentUtils.waitForFutureNoInterrupt(this.mSensorServiceStart, START_SENSOR_SERVICE);\n this.mSensorServiceStart = null;\n try {\n Slog.i(TAG, \"initial SystemService \" + Class.forName(\"android.os.SystemService\"));\n } catch (ClassNotFoundException e25) {\n Slog.i(TAG, \"initial SystemService fail because : \" + e25.getMessage());\n } catch (RuntimeException e26) {\n e14 = e26;\n str2 = \"false\";\n inputManager3 = inputManager2;\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7222222 = null;\n LocationManagerService location2222222 = null;\n CountryDetectorService countryDetector2222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222);\n context.getResources().updateConfiguration(config222222, metrics222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n telephonyRegistry = telephonyRegistry2;\n str2 = \"false\";\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator = vibratorService;\n try {\n WindowManagerService wm4 = WindowManagerService.main(context, inputManager2, !this.mFirstBoot, this.mOnlyCore, HwPolicyFactory.getHwPhoneWindowManager(), this.mActivityManagerService.mActivityTaskManager);\n try {\n if (this.mHwRogEx != null) {\n try {\n this.mHwRogEx.initRogModeAndProcessMultiDpi(wm4, context);\n } catch (RuntimeException e27) {\n e14 = e27;\n wm3 = wm4;\n vibrator2 = vibrator;\n alarmManager = alarmManager;\n inputManager3 = inputManager2;\n }\n }\n ServiceManager.addService(\"window\", wm4, false, 17);\n ?? r8 = inputManager2;\n try {\n ServiceManager.addService(\"input\", (IBinder) r8, false, 1);\n traceEnd();\n traceBeginAndSlog(\"SetWindowManagerService\");\n this.mActivityManagerService.setWindowManager(wm4);\n traceEnd();\n traceBeginAndSlog(\"WindowManagerServiceOnInitReady\");\n wm4.onInitReady();\n traceEnd();\n SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$JQH6ND0PqyyiRiz7lXLvUmRhwRM.INSTANCE, START_HIDL_SERVICES);\n if (!isWatch && enableVrService) {\n traceBeginAndSlog(\"StartVrManagerService\");\n this.mSystemServiceManager.startService(VrManagerService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartInputManager\");\n r8.setWindowManagerCallbacks(wm4.getInputManagerCallback());\n r8.start();\n traceEnd();\n traceBeginAndSlog(\"DisplayManagerWindowManagerAndInputReady\");\n this.mDisplayManagerService.windowManagerAndInputReady();\n traceEnd();\n if (this.mFactoryTestMode == 1) {\n Slog.i(TAG, \"No Bluetooth Service (factory test)\");\n } else if (!context.getPackageManager().hasSystemFeature(\"android.hardware.bluetooth\")) {\n Slog.i(TAG, \"No Bluetooth Service (Bluetooth Hardware Not Present)\");\n } else {\n traceBeginAndSlog(\"StartBluetoothService\");\n this.mSystemServiceManager.startService(BluetoothService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"IpConnectivityMetrics\");\n this.mSystemServiceManager.startService(IpConnectivityMetrics.class);\n traceEnd();\n traceBeginAndSlog(\"NetworkWatchlistService\");\n this.mSystemServiceManager.startService(NetworkWatchlistService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"pinner\")) {\n traceBeginAndSlog(\"PinnerService\");\n ((PinnerService) this.mSystemServiceManager.startService(PinnerService.class)).setInstaller(this.installer);\n traceEnd();\n }\n traceBeginAndSlog(\"ZRHungServiceBridge\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.zrhung.ZRHungServiceBridge\");\n } catch (Throwable th) {\n Slog.e(TAG, \"Fail to begin and Slog ZRHungServiceBridge\");\n }\n traceEnd();\n traceBeginAndSlog(\"SignedConfigService\");\n SignedConfigService.registerUpdateReceiver(this.mSystemContext);\n traceEnd();\n if (!SystemProperties.get(\"ro.config.hw_fold_disp\").isEmpty() || !SystemProperties.get(\"persist.sys.fold.disp.size\").isEmpty()) {\n traceBeginAndSlog(\"HwFoldScreenManagerService\");\n try {\n this.mSystemServiceManager.startService(\"com.huawei.server.fsm.HwFoldScreenManagerService\");\n } catch (Throwable th2) {\n Slog.e(TAG, \"Failed to start HwFoldScreenManagerService.\");\n }\n traceEnd();\n }\n if (isWatch) {\n traceBeginAndSlog(\"HwWatchConnectivityService\");\n try {\n this.mSystemServiceManager.startService(\"com.huawei.android.server.HwWatchConnectivityServiceBridge\");\n } catch (Throwable th3) {\n Slog.e(TAG, \"Failed to start HwWatchConnectivityService.\");\n }\n traceEnd();\n }\n wm = wm4;\n inputManager = r8;\n wm2 = alarmManager;\n } catch (RuntimeException e28) {\n e14 = e28;\n wm3 = wm4;\n vibrator2 = vibrator;\n alarmManager = alarmManager;\n inputManager3 = r8;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72222222 = null;\n LocationManagerService location22222222 = null;\n CountryDetectorService countryDetector22222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222);\n context.getResources().updateConfiguration(config2222222, metrics2222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e29) {\n e14 = e29;\n inputManager3 = inputManager2;\n wm3 = wm4;\n vibrator2 = vibrator;\n alarmManager = alarmManager;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder722222222 = null;\n LocationManagerService location222222222 = null;\n CountryDetectorService countryDetector222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222);\n context.getResources().updateConfiguration(config22222222, metrics22222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e30) {\n e14 = e30;\n inputManager3 = inputManager2;\n vibrator2 = vibrator;\n alarmManager = alarmManager;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7222222222 = null;\n LocationManagerService location2222222222 = null;\n CountryDetectorService countryDetector2222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222);\n context.getResources().updateConfiguration(config222222222, metrics222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e31) {\n e14 = e31;\n str2 = \"false\";\n inputManager3 = inputManager2;\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72222222222 = null;\n LocationManagerService location22222222222 = null;\n CountryDetectorService countryDetector22222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222);\n context.getResources().updateConfiguration(config2222222222, metrics2222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e32) {\n e14 = e32;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder722222222222 = null;\n LocationManagerService location222222222222 = null;\n CountryDetectorService countryDetector222222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222);\n context.getResources().updateConfiguration(config22222222222, metrics22222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e33) {\n e14 = e33;\n str2 = \"false\";\n telephonyRegistry = telephonyRegistry2;\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n vibrator2 = vibratorService;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder7222222222222 = null;\n LocationManagerService location2222222222222 = null;\n CountryDetectorService countryDetector2222222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222);\n context.getResources().updateConfiguration(config222222222222, metrics222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (RuntimeException e34) {\n e14 = e34;\n str2 = \"false\";\n tuiEnable = tuiEnable2;\n obj = \"\";\n str = \"0\";\n telephonyRegistry = null;\n vibrator2 = null;\n Slog.e(\"System\", \"******************************************\");\n Slog.e(\"System\", \"************ Failure starting core service\", e14);\n vibrator = vibrator2;\n wm2 = alarmManager;\n wm = wm3;\n inputManager = inputManager3;\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n }\n IBinder iBinder72222222222222 = null;\n LocationManagerService location22222222222222 = null;\n CountryDetectorService countryDetector22222222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n wm.displayReady();\n traceEnd();\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n this.mPackageManagerService.performFstrimIfNeeded();\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n }\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222);\n context.getResources().updateConfiguration(config2222222222222, metrics2222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n safeMode = wm.detectSafeMode();\n if (safeMode) {\n this.mActivityManagerService.enterSafeMode();\n Settings.Global.putInt(context.getContentResolver(), \"airplane_mode_on\", 1);\n }\n IBinder iBinder722222222222222 = null;\n LocationManagerService location222222222222222 = null;\n CountryDetectorService countryDetector222222222222222 = null;\n lockSettings = null;\n if (this.mFactoryTestMode != 1) {\n traceBeginAndSlog(\"StartInputMethodManagerLifecycle\");\n if (InputMethodSystemProperty.MULTI_CLIENT_IME_ENABLED) {\n this.mSystemServiceManager.startService(MultiClientInputMethodManagerService.Lifecycle.class);\n } else {\n this.mSystemServiceManager.startService(InputMethodManagerService.Lifecycle.class);\n }\n if (isChinaArea) {\n try {\n Slog.i(TAG, \"Secure Input Method Service\");\n this.mSystemServiceManager.startService(\"com.android.server.inputmethod.HwSecureInputMethodManagerService$MyLifecycle\");\n } catch (Throwable e35) {\n reportWtf(\"starting Secure Input Manager Service\", e35);\n }\n }\n traceEnd();\n if (hasSystemServerFeature(\"accessibility\")) {\n traceBeginAndSlog(\"StartAccessibilityManagerService\");\n try {\n this.mSystemServiceManager.startService(ACCESSIBILITY_MANAGER_SERVICE_CLASS);\n } catch (Throwable e36) {\n reportWtf(\"starting Accessibility Manager\", e36);\n }\n traceEnd();\n }\n }\n traceBeginAndSlog(\"MakeDisplayReady\");\n try {\n wm.displayReady();\n } catch (Throwable e37) {\n reportWtf(\"making display ready\", e37);\n }\n traceEnd();\n if (this.mFactoryTestMode != 1 && !str.equals(SystemProperties.get(\"system_init.startmountservice\"))) {\n traceBeginAndSlog(\"StartStorageManagerService\");\n this.mSystemServiceManager.startService(STORAGE_MANAGER_SERVICE_CLASS);\n IStorageManager.Stub.asInterface(ServiceManager.getService(\"mount\"));\n traceEnd();\n traceBeginAndSlog(\"StartStorageStatsService\");\n this.mSystemServiceManager.startService(STORAGE_STATS_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartUiModeManager\");\n this.mSystemServiceManager.startService(UiModeManagerService.class);\n traceEnd();\n HwBootCheck.bootSceneEnd(101);\n HwBootFail.setBootTimer(false);\n if (!this.mOnlyCore) {\n traceBeginAndSlog(\"UpdatePackagesIfNeeded\");\n if (HwTvUtils.isBootTimeOpt()) {\n Slog.i(TAG, \"boottimeopt ignore dexopt\");\n } else {\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"dexopt\");\n this.mPackageManagerService.updatePackagesIfNeeded();\n } catch (Throwable th4) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"dexopt\");\n throw th4;\n }\n Watchdog.getInstance().resumeWatchingCurrentThread(\"dexopt\");\n }\n traceEnd();\n }\n traceBeginAndSlog(\"PerformFstrimIfNeeded\");\n try {\n this.mPackageManagerService.performFstrimIfNeeded();\n } catch (Throwable e38) {\n reportWtf(\"performing fstrim\", e38);\n }\n traceEnd();\n HwBootCheck.bootSceneStart(102, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n if (this.mFactoryTestMode != 1) {\n traceBeginAndSlog(\"StartLockSettingsService\");\n try {\n this.mSystemServiceManager.startService(LOCK_SETTINGS_SERVICE_CLASS);\n lockSettings = ILockSettings.Stub.asInterface(ServiceManager.getService(\"lock_settings\"));\n } catch (Throwable e39) {\n reportWtf(\"starting LockSettingsService service\", e39);\n }\n traceEnd();\n boolean hasPdb = !SystemProperties.get(PERSISTENT_DATA_BLOCK_PROP).equals(obj);\n boolean hasGsi = SystemProperties.getInt(GSI_RUNNING_PROP, 0) > 0;\n if (!hasPdb || hasGsi) {\n ipSecService2 = null;\n } else {\n traceBeginAndSlog(\"StartPersistentDataBlock\");\n ipSecService2 = null;\n this.mSystemServiceManager.startService(PersistentDataBlockService.class);\n traceEnd();\n }\n if (hasSystemServerFeature(\"testharness\")) {\n traceBeginAndSlog(\"StartTestHarnessMode\");\n this.mSystemServiceManager.startService(TestHarnessModeService.class);\n traceEnd();\n }\n if (hasPdb || OemLockService.isHalPresent()) {\n traceBeginAndSlog(\"StartOemLockService\");\n this.mSystemServiceManager.startService(OemLockService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartDeviceIdleController\");\n this.mSystemServiceManager.startService(DeviceIdleController.class);\n traceEnd();\n traceBeginAndSlog(\"StartDevicePolicyManager\");\n this.mSystemServiceManager.startService(DevicePolicyManagerService.Lifecycle.class);\n traceEnd();\n if (!isWatch && hasSystemServerFeature(\"statusbar\")) {\n traceBeginAndSlog(\"StartStatusBarManagerService\");\n try {\n iBinder722222222222222 = HwServiceFactory.createHwStatusBarManagerService(context, wm);\n ServiceManager.addService(\"statusbar\", iBinder722222222222222);\n } catch (Throwable e40) {\n reportWtf(\"starting StatusBarManagerService\", e40);\n }\n traceEnd();\n }\n startContentCaptureService(context);\n startAttentionService(context);\n startSystemCaptionsManagerService(context);\n if (hasSystemServerFeature(\"appprediction\")) {\n traceBeginAndSlog(\"StartAppPredictionService\");\n this.mSystemServiceManager.startService(APP_PREDICTION_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartContentSuggestionsService\");\n this.mSystemServiceManager.startService(CONTENT_SUGGESTIONS_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"InitNetworkStackClient\");\n try {\n NetworkStackClient.getInstance().init();\n } catch (Throwable e41) {\n reportWtf(\"initializing NetworkStackClient\", e41);\n }\n traceEnd();\n traceBeginAndSlog(\"StartNetworkManagementService\");\n try {\n iNetworkManagementService2 = NetworkManagementService.create(context);\n try {\n ServiceManager.addService(\"network_management\", iNetworkManagementService2);\n } catch (Throwable th5) {\n e13 = th5;\n }\n } catch (Throwable th6) {\n e13 = th6;\n iNetworkManagementService2 = null;\n reportWtf(\"starting NetworkManagement Service\", e13);\n iNetworkManagementService2 = iNetworkManagementService2;\n traceEnd();\n traceBeginAndSlog(\"StartIpSecService\");\n create = IpSecService.create(context);\n try {\n ServiceManager.addService(INetd.IPSEC_INTERFACE_PREFIX, (IBinder) create);\n ipSecService3 = create;\n } catch (Throwable th7) {\n e12 = th7;\n ipSecService5 = create;\n }\n traceEnd();\n if (hasSystemServerFeature(\"text\")) {\n }\n if (!disableSystemTextClassifier) {\n }\n traceBeginAndSlog(\"StartNetworkScoreService\");\n this.mSystemServiceManager.startService(NetworkScoreService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkStatsService\");\n iNetworkStatsService3 = NetworkStatsService.create(context, iNetworkManagementService2);\n ServiceManager.addService(\"netstats\", iNetworkStatsService3);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkPolicyManagerService\");\n iNetworkPolicyManager2 = HwServiceFactory.getHwNetworkPolicyManagerService().getInstance(context, this.mActivityManagerService, iNetworkManagementService2);\n try {\n ServiceManager.addService(\"netpolicy\", iNetworkPolicyManager2);\n } catch (Throwable th8) {\n e11 = th8;\n }\n traceEnd();\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.rtt\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.aware\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.direct\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.lowpan\")) {\n }\n if (!this.mPackageManager.hasSystemFeature(\"android.hardware.ethernet\")) {\n }\n traceBeginAndSlog(\"StartEthernet\");\n this.mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartConnectivityService\");\n iConnectivityManager2 = HwServiceFactory.getHwConnectivityManager().createHwConnectivityService(context, iNetworkManagementService2, iNetworkStatsService3, iNetworkPolicyManager2);\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n try {\n ServiceManager.addService(\"connectivity\", iConnectivityManager2, false, 6);\n iNetworkPolicyManager2.bindConnectivityManager(iConnectivityManager2);\n } catch (Throwable th9) {\n e10 = th9;\n }\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n iBinder5 = NsdService.create(context);\n try {\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n } catch (Throwable th10) {\n e9 = th10;\n reportWtf(\"starting Service Discovery Service\", e9);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification2 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n try {\n ServiceManager.addService(\"serial\", iBinder4);\n } catch (Throwable th11) {\n e4 = th11;\n }\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager = this.mSystemServiceManager;\n Context context2 = this.mSystemContext;\n systemServiceManager.startService(new RoleManagerService(context2, new LegacyRoleResolutionPolicy(context2)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222);\n context.getResources().updateConfiguration(config22222222222222, metrics22222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification22 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n try {\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n } catch (Throwable th12) {\n e4 = th12;\n iBinder4 = null;\n Slog.e(TAG, \"Failure starting SerialService\", e4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2 = this.mSystemServiceManager;\n Context context22 = this.mSystemContext;\n systemServiceManager2.startService(new RoleManagerService(context22, new LegacyRoleResolutionPolicy(context22)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222);\n context.getResources().updateConfiguration(config222222222222222, metrics222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n try {\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n } catch (Throwable th13) {\n e3 = th13;\n Slog.e(TAG, \"Failure starting HardwarePropertiesManagerService\", e3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22 = this.mSystemServiceManager;\n Context context222 = this.mSystemContext;\n systemServiceManager22.startService(new RoleManagerService(context222, new LegacyRoleResolutionPolicy(context222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222);\n context.getResources().updateConfiguration(config2222222222222222, metrics2222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222 = this.mSystemServiceManager;\n Context context2222 = this.mSystemContext;\n systemServiceManager222.startService(new RoleManagerService(context2222, new LegacyRoleResolutionPolicy(context2222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n try {\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n } catch (Throwable th14) {\n e = th14;\n mediaRouter4 = mediaRouterService;\n }\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222);\n context.getResources().updateConfiguration(config22222222222222222, metrics22222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartIpSecService\");\n try {\n create = IpSecService.create(context);\n ServiceManager.addService(INetd.IPSEC_INTERFACE_PREFIX, (IBinder) create);\n ipSecService3 = create;\n } catch (Throwable th15) {\n e12 = th15;\n ipSecService5 = ipSecService2;\n reportWtf(\"starting IpSec Service\", e12);\n ipSecService3 = ipSecService5;\n traceEnd();\n if (hasSystemServerFeature(\"text\")) {\n }\n if (!disableSystemTextClassifier) {\n }\n traceBeginAndSlog(\"StartNetworkScoreService\");\n this.mSystemServiceManager.startService(NetworkScoreService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkStatsService\");\n iNetworkStatsService3 = NetworkStatsService.create(context, iNetworkManagementService2);\n ServiceManager.addService(\"netstats\", iNetworkStatsService3);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkPolicyManagerService\");\n iNetworkPolicyManager2 = HwServiceFactory.getHwNetworkPolicyManagerService().getInstance(context, this.mActivityManagerService, iNetworkManagementService2);\n ServiceManager.addService(\"netpolicy\", iNetworkPolicyManager2);\n traceEnd();\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.rtt\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.aware\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.direct\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.lowpan\")) {\n }\n if (!this.mPackageManager.hasSystemFeature(\"android.hardware.ethernet\")) {\n }\n traceBeginAndSlog(\"StartEthernet\");\n this.mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartConnectivityService\");\n iConnectivityManager2 = HwServiceFactory.getHwConnectivityManager().createHwConnectivityService(context, iNetworkManagementService2, iNetworkStatsService3, iNetworkPolicyManager2);\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n ServiceManager.addService(\"connectivity\", iConnectivityManager2, false, 6);\n iNetworkPolicyManager2.bindConnectivityManager(iConnectivityManager2);\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n iBinder5 = NsdService.create(context);\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222 = this.mSystemServiceManager;\n Context context22222 = this.mSystemContext;\n systemServiceManager2222.startService(new RoleManagerService(context22222, new LegacyRoleResolutionPolicy(context22222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222, metrics222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n if (hasSystemServerFeature(\"text\")) {\n traceBeginAndSlog(\"StartTextServicesManager\");\n ipSecService4 = ipSecService3;\n this.mSystemServiceManager.startService(TextServicesManagerService.Lifecycle.class);\n traceEnd();\n } else {\n ipSecService4 = ipSecService3;\n }\n if (!disableSystemTextClassifier) {\n traceBeginAndSlog(\"StartTextClassificationManagerService\");\n this.mSystemServiceManager.startService(TextClassificationManagerService.Lifecycle.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartNetworkScoreService\");\n this.mSystemServiceManager.startService(NetworkScoreService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartNetworkStatsService\");\n try {\n iNetworkStatsService3 = NetworkStatsService.create(context, iNetworkManagementService2);\n ServiceManager.addService(\"netstats\", iNetworkStatsService3);\n } catch (Throwable e42) {\n reportWtf(\"starting NetworkStats Service\", e42);\n }\n traceEnd();\n traceBeginAndSlog(\"StartNetworkPolicyManagerService\");\n try {\n iNetworkPolicyManager2 = HwServiceFactory.getHwNetworkPolicyManagerService().getInstance(context, this.mActivityManagerService, iNetworkManagementService2);\n ServiceManager.addService(\"netpolicy\", iNetworkPolicyManager2);\n } catch (Throwable th16) {\n e11 = th16;\n iNetworkPolicyManager2 = null;\n reportWtf(\"starting NetworkPolicy Service\", e11);\n iNetworkPolicyManager2 = iNetworkPolicyManager2;\n traceEnd();\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.rtt\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.aware\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.direct\")) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.lowpan\")) {\n }\n if (!this.mPackageManager.hasSystemFeature(\"android.hardware.ethernet\")) {\n }\n traceBeginAndSlog(\"StartEthernet\");\n this.mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartConnectivityService\");\n iConnectivityManager2 = HwServiceFactory.getHwConnectivityManager().createHwConnectivityService(context, iNetworkManagementService2, iNetworkStatsService3, iNetworkPolicyManager2);\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n ServiceManager.addService(\"connectivity\", iConnectivityManager2, false, 6);\n iNetworkPolicyManager2.bindConnectivityManager(iConnectivityManager2);\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n iBinder5 = NsdService.create(context);\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification2222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22222 = this.mSystemServiceManager;\n Context context222222 = this.mSystemContext;\n systemServiceManager22222.startService(new RoleManagerService(context222222, new LegacyRoleResolutionPolicy(context222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222, metrics2222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi\")) {\n traceBeginAndSlog(\"StartWifi\");\n this.mSystemServiceManager.startService(WIFI_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartWifiScanning\");\n this.mSystemServiceManager.startService(\"com.android.server.wifi.scanner.WifiScanningService\");\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.rtt\")) {\n traceBeginAndSlog(\"StartRttService\");\n this.mSystemServiceManager.startService(\"com.android.server.wifi.rtt.RttService\");\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.aware\")) {\n traceBeginAndSlog(\"StartWifiAware\");\n this.mSystemServiceManager.startService(WIFI_AWARE_SERVICE_CLASS);\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.wifi.direct\")) {\n traceBeginAndSlog(\"StartWifiP2P\");\n this.mSystemServiceManager.startService(WIFI_P2P_SERVICE_CLASS);\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.lowpan\")) {\n traceBeginAndSlog(\"StartLowpan\");\n this.mSystemServiceManager.startService(LOWPAN_SERVICE_CLASS);\n traceEnd();\n }\n if (!this.mPackageManager.hasSystemFeature(\"android.hardware.ethernet\") || this.mPackageManager.hasSystemFeature(\"android.hardware.usb.host\")) {\n traceBeginAndSlog(\"StartEthernet\");\n this.mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartConnectivityService\");\n try {\n iConnectivityManager2 = HwServiceFactory.getHwConnectivityManager().createHwConnectivityService(context, iNetworkManagementService2, iNetworkStatsService3, iNetworkPolicyManager2);\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n ServiceManager.addService(\"connectivity\", iConnectivityManager2, false, 6);\n iNetworkPolicyManager2.bindConnectivityManager(iConnectivityManager2);\n } catch (Throwable th17) {\n e10 = th17;\n iNetworkManagementService = iNetworkManagementService2;\n iNetworkStatsService2 = iNetworkStatsService3;\n iConnectivityManager2 = null;\n reportWtf(\"starting Connectivity Service\", e10);\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n iBinder5 = NsdService.create(context);\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification22222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222222 = this.mSystemServiceManager;\n Context context2222222 = this.mSystemContext;\n systemServiceManager222222.startService(new RoleManagerService(context2222222, new LegacyRoleResolutionPolicy(context2222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222, metrics22222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartNsdService\");\n try {\n iBinder5 = NsdService.create(context);\n ServiceManager.addService(\"servicediscovery\", iBinder5);\n iBinder = iBinder5;\n } catch (Throwable th18) {\n e9 = th18;\n iBinder5 = null;\n reportWtf(\"starting Service Discovery Service\", e9);\n iBinder = iBinder5;\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification222222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n }\n if (hasSystemServerFeature(\"location\")) {\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222222 = this.mSystemServiceManager;\n Context context22222222 = this.mSystemContext;\n systemServiceManager2222222.startService(new RoleManagerService(context22222222, new LegacyRoleResolutionPolicy(context22222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222, metrics222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSystemUpdateManagerService\");\n try {\n ServiceManager.addService(\"system_update\", (IBinder) new SystemUpdateManagerService(context));\n } catch (Throwable e43) {\n reportWtf(\"starting SystemUpdateManagerService\", e43);\n }\n traceEnd();\n traceBeginAndSlog(\"StartUpdateLockService\");\n try {\n ServiceManager.addService(\"updatelock\", (IBinder) new UpdateLockService(context));\n } catch (Throwable e44) {\n reportWtf(\"starting UpdateLockService\", e44);\n }\n traceEnd();\n traceBeginAndSlog(\"StartNotificationManager\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.notification.HwNotificationManagerService\");\n } catch (RuntimeException e45) {\n this.mSystemServiceManager.startService(NotificationManagerService.class);\n }\n SystemNotificationChannels.removeDeprecated(context);\n SystemNotificationChannels.createAll(context);\n INotificationManager notification2222222 = INotificationManager.Stub.asInterface(ServiceManager.getService(\"notification\"));\n traceEnd();\n traceBeginAndSlog(\"StartDeviceMonitor\");\n this.mSystemServiceManager.startService(DeviceStorageMonitorService.class);\n traceEnd();\n Slog.i(TAG, \"TUI Connect enable \" + tuiEnable);\n if (tuiEnable) {\n notification = notification2222222;\n try {\n ServiceManager.addService(\"tui\", (IBinder) new TrustedUIService(context));\n } catch (Throwable e46) {\n Slog.e(TAG, \"Failure starting TUI Service \", e46);\n }\n } else {\n notification = notification2222222;\n }\n if (hasSystemServerFeature(\"location\")) {\n traceBeginAndSlog(\"StartLocationManagerService\");\n try {\n HwServiceFactory.IHwLocationManagerService hwLocation = HwServiceFactory.getHwLocationManagerService();\n if (hwLocation != null) {\n r2 = hwLocation.getInstance(context);\n } else {\n r2 = new LocationManagerService(context);\n }\n try {\n ServiceManager.addService(\"location\", (IBinder) r2);\n location222222222222222 = r2;\n } catch (Throwable th19) {\n e8 = th19;\n location222222222222222 = r2;\n reportWtf(\"starting Location Manager\", e8);\n traceEnd();\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22222222 = this.mSystemServiceManager;\n Context context222222222 = this.mSystemContext;\n systemServiceManager22222222.startService(new RoleManagerService(context222222222, new LegacyRoleResolutionPolicy(context222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222222, metrics2222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (Throwable th20) {\n e8 = th20;\n reportWtf(\"starting Location Manager\", e8);\n traceEnd();\n if (hasSystemServerFeature(\"countrydetector\")) {\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222222222 = this.mSystemServiceManager;\n Context context2222222222 = this.mSystemContext;\n systemServiceManager222222222.startService(new RoleManagerService(context2222222222, new LegacyRoleResolutionPolicy(context2222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222222, metrics22222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n }\n if (hasSystemServerFeature(\"countrydetector\")) {\n traceBeginAndSlog(\"StartCountryDetectorService\");\n try {\n ?? countryDetectorService = new CountryDetectorService(context);\n try {\n ServiceManager.addService(\"country_detector\", (IBinder) countryDetectorService);\n countryDetector222222222222222 = countryDetectorService;\n } catch (Throwable th21) {\n e7 = th21;\n countryDetector222222222222222 = countryDetectorService;\n reportWtf(\"starting Country Detector\", e7);\n traceEnd();\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222222222 = this.mSystemServiceManager;\n Context context22222222222 = this.mSystemContext;\n systemServiceManager2222222222.startService(new RoleManagerService(context22222222222, new LegacyRoleResolutionPolicy(context22222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222222, metrics222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (Throwable th22) {\n e7 = th22;\n reportWtf(\"starting Country Detector\", e7);\n traceEnd();\n if (hasSystemServerFeature(\"timedetector\")) {\n }\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22222222222 = this.mSystemServiceManager;\n Context context222222222222 = this.mSystemContext;\n systemServiceManager22222222222.startService(new RoleManagerService(context222222222222, new LegacyRoleResolutionPolicy(context222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222222222, metrics2222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n }\n if (hasSystemServerFeature(\"timedetector\")) {\n traceBeginAndSlog(\"StartTimeDetectorService\");\n try {\n try {\n this.mSystemServiceManager.startService(TIME_DETECTOR_SERVICE_CLASS);\n } catch (Throwable th23) {\n e6 = th23;\n }\n } catch (Throwable th24) {\n e6 = th24;\n reportWtf(\"starting StartTimeDetectorService service\", e6);\n traceEnd();\n if (!isWatch) {\n }\n if (context.getResources().getBoolean(17891453)) {\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222222222222 = this.mSystemServiceManager;\n Context context2222222222222 = this.mSystemContext;\n systemServiceManager222222222222.startService(new RoleManagerService(context2222222222222, new LegacyRoleResolutionPolicy(context2222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222222222, metrics22222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n }\n if (!isWatch) {\n traceBeginAndSlog(\"StartSearchManagerService\");\n try {\n this.mSystemServiceManager.startService(SEARCH_MANAGER_SERVICE_CLASS);\n } catch (Throwable e47) {\n reportWtf(\"starting Search Service\", e47);\n }\n traceEnd();\n }\n if (context.getResources().getBoolean(17891453)) {\n traceBeginAndSlog(\"StartWallpaperManagerService\");\n this.mSystemServiceManager.startService(WALLPAPER_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartAudioService\");\n if (isArc) {\n this.mSystemServiceManager.startService(AudioService.Lifecycle.class);\n iNetworkPolicyManager = iNetworkPolicyManager2;\n iConnectivityManager = iConnectivityManager2;\n } else {\n String className = context.getResources().getString(17039829);\n try {\n SystemServiceManager systemServiceManager3 = this.mSystemServiceManager;\n iNetworkPolicyManager = iNetworkPolicyManager2;\n try {\n StringBuilder sb = new StringBuilder();\n sb.append(className);\n iConnectivityManager = iConnectivityManager2;\n try {\n sb.append(\"$Lifecycle\");\n systemServiceManager3.startService(sb.toString());\n } catch (Throwable th25) {\n e5 = th25;\n }\n } catch (Throwable th26) {\n e5 = th26;\n iConnectivityManager = iConnectivityManager2;\n reportWtf(\"starting \" + className, e5);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222222222222 = this.mSystemServiceManager;\n Context context22222222222222 = this.mSystemContext;\n systemServiceManager2222222222222.startService(new RoleManagerService(context22222222222222, new LegacyRoleResolutionPolicy(context22222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222222222, metrics222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (Throwable th27) {\n e5 = th27;\n iNetworkPolicyManager = iNetworkPolicyManager2;\n iConnectivityManager = iConnectivityManager2;\n reportWtf(\"starting \" + className, e5);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n }\n traceBeginAndSlog(\"StartAdbService\");\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager22222222222222 = this.mSystemServiceManager;\n Context context222222222222222 = this.mSystemContext;\n systemServiceManager22222222222222.startService(new RoleManagerService(context222222222222222, new LegacyRoleResolutionPolicy(context222222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222222222222, metrics2222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.broadcastradio\")) {\n traceBeginAndSlog(\"StartBroadcastRadioService\");\n this.mSystemServiceManager.startService(BroadcastRadioService.class);\n traceEnd();\n }\n if (hasSystemServerFeature(\"dockobserver\")) {\n traceBeginAndSlog(\"StartDockObserver\");\n this.mSystemServiceManager.startService(DockObserver.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartWiredAccessoryManager\");\n try {\n inputManager.setWiredAccessoryCallbacks(new WiredAccessoryManager(context, inputManager));\n } catch (Throwable e48) {\n reportWtf(\"starting WiredAccessoryManager\", e48);\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.midi\")) {\n traceBeginAndSlog(\"StartMidiManager\");\n this.mSystemServiceManager.startService(MIDI_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartAdbService\");\n try {\n this.mSystemServiceManager.startService(ADB_SERVICE_CLASS);\n } catch (Throwable th28) {\n Slog.e(TAG, \"Failure starting AdbService\");\n }\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.usb.host\") || this.mPackageManager.hasSystemFeature(\"android.hardware.usb.accessory\") || isEmulator) {\n traceBeginAndSlog(\"StartUsbService\");\n this.mSystemServiceManager.startService(USB_SERVICE_CLASS);\n traceEnd();\n }\n if (!isWatch && hasSystemServerFeature(\"serial\")) {\n traceBeginAndSlog(\"StartSerialService\");\n iBinder4 = new SerialService(context);\n ServiceManager.addService(\"serial\", iBinder4);\n traceEnd();\n iBinder6 = iBinder4;\n }\n traceBeginAndSlog(\"StartHardwarePropertiesManagerService\");\n try {\n iBinder3 = new HardwarePropertiesManagerService(context);\n ServiceManager.addService(\"hardware_properties\", iBinder3);\n iBinder2 = iBinder3;\n } catch (Throwable th29) {\n e3 = th29;\n iBinder3 = null;\n Slog.e(TAG, \"Failure starting HardwarePropertiesManagerService\", e3);\n iBinder2 = iBinder3;\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n }\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager222222222222222 = this.mSystemServiceManager;\n Context context2222222222222222 = this.mSystemContext;\n systemServiceManager222222222222222.startService(new RoleManagerService(context2222222222222222, new LegacyRoleResolutionPolicy(context2222222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n }\n if (!disableNetworkTime) {\n }\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222222222222, metrics22222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n traceBeginAndSlog(\"StartTwilightService\");\n this.mSystemServiceManager.startService(TwilightService.class);\n traceEnd();\n traceBeginAndSlog(\"StartColorDisplay\");\n this.mSystemServiceManager.startService(ColorDisplayService.class);\n traceEnd();\n traceBeginAndSlog(\"StartJobScheduler\");\n this.mSystemServiceManager.startService(JobSchedulerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartSoundTrigger\");\n this.mSystemServiceManager.startService(SoundTriggerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartTrustManager\");\n this.mSystemServiceManager.startService(TrustManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.backup\")) {\n traceBeginAndSlog(\"StartBackupManager\");\n this.mSystemServiceManager.startService(BACKUP_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.app_widgets\") || context.getResources().getBoolean(17891433)) {\n traceBeginAndSlog(\"StartAppWidgetService\");\n this.mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartRoleManagerService\");\n SystemServiceManager systemServiceManager2222222222222222 = this.mSystemServiceManager;\n Context context22222222222222222 = this.mSystemContext;\n systemServiceManager2222222222222222.startService(new RoleManagerService(context22222222222222222, new LegacyRoleResolutionPolicy(context22222222222222222)));\n traceEnd();\n traceBeginAndSlog(\"StartVoiceRecognitionManager\");\n this.mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS);\n traceEnd();\n if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) {\n traceBeginAndSlog(\"StartGestureLauncher\");\n this.mSystemServiceManager.startService(GestureLauncherService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartSensorNotification\");\n this.mSystemServiceManager.startService(SensorNotificationService.class);\n traceEnd();\n traceBeginAndSlog(\"StartContextHubSystemService\");\n this.mSystemServiceManager.startService(ContextHubSystemService.class);\n traceEnd();\n traceBeginAndSlog(\"setupHwServices\");\n HwServiceFactory.setupHwServices(context);\n traceEnd();\n traceBeginAndSlog(\"StartDiskStatsService\");\n try {\n ServiceManager.addService(\"diskstats\", new DiskStatsService(context));\n } catch (Throwable e49) {\n reportWtf(\"starting DiskStats Service\", e49);\n }\n traceEnd();\n traceBeginAndSlog(\"RuntimeService\");\n try {\n ServiceManager.addService(\"runtime\", new RuntimeService(context));\n } catch (Throwable e50) {\n reportWtf(\"starting RuntimeService\", e50);\n }\n traceEnd();\n if (this.mOnlyCore && context.getResources().getBoolean(17891452)) {\n traceBeginAndSlog(\"StartTimeZoneRulesManagerService\");\n this.mSystemServiceManager.startService(TIME_ZONE_RULES_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (!disableNetworkTime) {\n traceBeginAndSlog(\"StartNetworkTimeUpdateService\");\n try {\n networkTimeUpdater2 = new NewNetworkTimeUpdateService(context);\n try {\n Slog.d(TAG, \"Using networkTimeUpdater class=\" + networkTimeUpdater2.getClass());\n ServiceManager.addService(\"network_time_update_service\", networkTimeUpdater2);\n networkTimeUpdater3 = networkTimeUpdater2;\n } catch (Throwable th30) {\n e2 = th30;\n reportWtf(\"starting NetworkTimeUpdate service\", e2);\n networkTimeUpdater3 = networkTimeUpdater2;\n traceEnd();\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config222222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222222222222, metrics222222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n } catch (Throwable th31) {\n e2 = th31;\n networkTimeUpdater2 = null;\n reportWtf(\"starting NetworkTimeUpdate service\", e2);\n networkTimeUpdater3 = networkTimeUpdater2;\n traceEnd();\n traceBeginAndSlog(\"CertBlacklister\");\n new CertBlacklister(context);\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n }\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config2222222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics2222222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics2222222222222222222222222222222);\n context.getResources().updateConfiguration(config2222222222222222222222222222222, metrics2222222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes2222222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n }\n traceBeginAndSlog(\"CertBlacklister\");\n try {\n new CertBlacklister(context);\n } catch (Throwable e51) {\n reportWtf(\"starting CertBlacklister\", e51);\n }\n traceEnd();\n if (hasSystemServerFeature(\"emergencyaffordance\")) {\n traceBeginAndSlog(\"StartEmergencyAffordanceService\");\n this.mSystemServiceManager.startService(EmergencyAffordanceService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartDreamManager\");\n this.mSystemServiceManager.startService(DreamManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"AddGraphicsStatsService\");\n ServiceManager.addService(GraphicsStatsService.GRAPHICS_STATS_SERVICE, (IBinder) new GraphicsStatsService(context));\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.software.print\")) {\n traceBeginAndSlog(\"StartPrintManager\");\n this.mSystemServiceManager.startService(PRINT_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.companion_device_setup\")) {\n traceBeginAndSlog(\"StartCompanionDeviceManager\");\n this.mSystemServiceManager.startService(COMPANION_DEVICE_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n traceBeginAndSlog(\"StartRestrictionManager\");\n this.mSystemServiceManager.startService(RestrictionsManagerService.class);\n traceEnd();\n traceBeginAndSlog(\"StartMediaSessionService\");\n this.mSystemServiceManager.startService(MediaSessionService.class);\n traceEnd();\n if (this.mPackageManager.hasSystemFeature(\"android.hardware.hdmi.cec\")) {\n traceBeginAndSlog(\"StartHdmiControlService\");\n this.mSystemServiceManager.startService(HdmiControlService.class);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.live_tv\") || this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n traceBeginAndSlog(\"StartTvInputManager\");\n this.mSystemServiceManager.startService(TvInputManagerService.class);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.picture_in_picture\")) {\n traceBeginAndSlog(\"StartMediaResourceMonitor\");\n this.mSystemServiceManager.startService(MediaResourceMonitorService.class);\n traceEnd();\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.leanback\")) {\n traceBeginAndSlog(\"StartTvRemoteService\");\n this.mSystemServiceManager.startService(TvRemoteService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartMediaRouterService\");\n try {\n mediaRouterService = new MediaRouterService(context);\n ServiceManager.addService(\"media_router\", (IBinder) mediaRouterService);\n mediaRouter2 = mediaRouterService;\n } catch (Throwable th32) {\n e = th32;\n mediaRouter4 = null;\n reportWtf(\"starting MediaRouterService\", e);\n mediaRouter2 = mediaRouter4;\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n }\n if (hasFeatureIris) {\n }\n if (hasFeatureFingerprint) {\n }\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n BackgroundDexOptService.schedule(context);\n traceEnd();\n if (!isWatch) {\n }\n if (!isWatch) {\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n if (!isWatch) {\n }\n if (!disableSlices) {\n }\n if (!disableCameraService) {\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n }\n if (hasSystemServerFeature(\"helper\")) {\n }\n if (hasSystemServerFeature(\"mms\")) {\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n vibrator.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n wm.systemReady();\n traceEnd();\n if (safeMode) {\n }\n Configuration config22222222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics22222222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics22222222222222222222222222222222);\n context.getResources().updateConfiguration(config22222222222222222222222222222222, metrics22222222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes22222222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n while (r13 < r7) {\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }\n traceEnd();\n hasFeatureFace = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.face\");\n hasFeatureIris = this.mPackageManager.hasSystemFeature(\"android.hardware.biometrics.iris\");\n hasFeatureFingerprint = this.mPackageManager.hasSystemFeature(\"android.hardware.fingerprint\");\n if (!hasFeatureFace) {\n traceBeginAndSlog(\"StartFaceSensor\");\n mediaRouter3 = mediaRouter2;\n this.mSystemServiceManager.startService(FaceService.class);\n traceEnd();\n } else {\n mediaRouter3 = mediaRouter2;\n }\n if (hasFeatureIris) {\n traceBeginAndSlog(\"StartIrisSensor\");\n this.mSystemServiceManager.startService(IrisService.class);\n traceEnd();\n }\n if (hasFeatureFingerprint) {\n traceBeginAndSlog(\"StartFingerprintSensor\");\n try {\n HwServiceFactory.IHwFingerprintService ifs = HwServiceFactory.getHwFingerprintService();\n if (ifs != null) {\n Class<SystemService> serviceClass2 = ifs.createServiceClass();\n Slog.i(TAG, \"serviceClass doesn't null\");\n serviceClass = serviceClass2;\n } else {\n Slog.e(TAG, \"HwFingerPrintService is null!\");\n serviceClass = null;\n }\n if (serviceClass != null) {\n Slog.i(TAG, \"start HwFingerPrintService\");\n this.mSystemServiceManager.startService(serviceClass);\n } else {\n this.mSystemServiceManager.startService(FingerprintService.class);\n }\n Slog.i(TAG, \"FingerPrintService ready\");\n } catch (Throwable e52) {\n Slog.e(TAG, \"Start fingerprintservice error\", e52);\n }\n traceEnd();\n }\n if (hasFeatureFace || hasFeatureIris || hasFeatureFingerprint) {\n traceBeginAndSlog(\"StartBiometricService\");\n this.mSystemServiceManager.startService(BiometricService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartBackgroundDexOptService\");\n try {\n BackgroundDexOptService.schedule(context);\n } catch (Throwable e53) {\n reportWtf(\"starting StartBackgroundDexOptService\", e53);\n }\n traceEnd();\n if (!isWatch) {\n traceBeginAndSlog(\"StartDynamicCodeLoggingService\");\n try {\n DynamicCodeLoggingService.schedule(context);\n } catch (Throwable e54) {\n reportWtf(\"starting DynamicCodeLoggingService\", e54);\n }\n traceEnd();\n }\n if (!isWatch) {\n traceBeginAndSlog(\"StartPruneInstantAppsJobService\");\n try {\n PruneInstantAppsJobService.schedule(context);\n } catch (Throwable e55) {\n reportWtf(\"StartPruneInstantAppsJobService\", e55);\n }\n traceEnd();\n }\n traceBeginAndSlog(\"StartShortcutServiceLifecycle\");\n this.mSystemServiceManager.startService(ShortcutService.Lifecycle.class);\n traceEnd();\n if (hasSystemServerFeature(\"launcherapps\")) {\n traceBeginAndSlog(\"StartLauncherAppsService\");\n this.mSystemServiceManager.startService(LauncherAppsService.class);\n traceEnd();\n }\n if (hasSystemServerFeature(\"crossprofileapps\")) {\n traceBeginAndSlog(\"StartCrossProfileAppsService\");\n this.mSystemServiceManager.startService(CrossProfileAppsService.class);\n traceEnd();\n }\n traceBeginAndSlog(\"StartJankShieldService\");\n HwServiceFactory.addJankShieldService(context);\n traceEnd();\n location = location222222222222222;\n iNetworkStatsService = iNetworkStatsService2;\n ipSecService = ipSecService4;\n mediaRouter = mediaRouter3;\n countryDetector = countryDetector222222222222222;\n networkTimeUpdater = networkTimeUpdater3;\n } else {\n ipSecService = null;\n iNetworkPolicyManager = null;\n iConnectivityManager = null;\n location = null;\n iNetworkManagementService = null;\n iNetworkStatsService = null;\n mediaRouter = null;\n countryDetector = null;\n networkTimeUpdater = null;\n }\n if (!isWatch) {\n traceBeginAndSlog(\"StartMediaProjectionManager\");\n this.mSystemServiceManager.startService(MediaProjectionManagerService.class);\n traceEnd();\n }\n if (!disableSlices) {\n traceBeginAndSlog(\"StartSliceManagerService\");\n this.mSystemServiceManager.startService(SLICE_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (!disableCameraService) {\n traceBeginAndSlog(\"StartCameraServiceProxy\");\n this.mSystemServiceManager.startService(CameraServiceProxy.class);\n traceEnd();\n }\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.type.embedded\")) {\n traceBeginAndSlog(\"StartIoTSystemService\");\n this.mSystemServiceManager.startService(IOT_SERVICE_CLASS);\n traceEnd();\n }\n if (hasSystemServerFeature(\"helper\")) {\n traceBeginAndSlog(\"StartStatsCompanionService\");\n this.mSystemServiceManager.startService(StatsCompanionService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartIncidentCompanionService\");\n this.mSystemServiceManager.startService(IncidentCompanionService.class);\n traceEnd();\n if (safeMode) {\n this.mActivityManagerService.enterSafeMode();\n }\n }\n if (hasSystemServerFeature(\"mms\")) {\n traceBeginAndSlog(\"StartMmsService\");\n traceEnd();\n mmsService = (MmsServiceBroker) this.mSystemServiceManager.startService(MmsServiceBroker.class);\n }\n if (this.mPackageManager.hasSystemFeature(\"android.software.autofill\")) {\n traceBeginAndSlog(\"StartAutoFillService\");\n this.mSystemServiceManager.startService(AUTO_FILL_MANAGER_SERVICE_CLASS);\n traceEnd();\n }\n if (\"true\".equals(SystemProperties.get(\"bastet.service.enable\", str2))) {\n try {\n traceBeginAndSlog(\"StartBastetService\");\n this.mSystemServiceManager.startService(\"com.android.server.HwBastetService\");\n traceEnd();\n } catch (Throwable th33) {\n Slog.w(TAG, \"HwBastetService not exists.\");\n }\n }\n traceBeginAndSlog(\"StartClipboardService\");\n this.mSystemServiceManager.startService(ClipboardService.class);\n traceEnd();\n if (isStartSysSvcCallRecord) {\n traceBeginAndSlog(\"startSysSvcCallRecordService\");\n startSysSvcCallRecordService();\n traceEnd();\n }\n traceBeginAndSlog(\"AppServiceManager\");\n this.mSystemServiceManager.startService(AppBindingService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"MakeVibratorServiceReady\");\n try {\n vibrator.systemReady();\n } catch (Throwable e56) {\n reportWtf(\"making Vibrator Service ready\", e56);\n }\n traceEnd();\n traceBeginAndSlog(\"MakeLockSettingsServiceReady\");\n if (lockSettings != null) {\n try {\n lockSettings.systemReady();\n } catch (Throwable e57) {\n reportWtf(\"making Lock Settings Service ready\", e57);\n }\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseLockSettingsReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_LOCK_SETTINGS_READY);\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseSystemServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);\n traceEnd();\n traceBeginAndSlog(\"MakeWindowManagerServiceReady\");\n try {\n wm.systemReady();\n } catch (Throwable e58) {\n reportWtf(\"making Window Manager Service ready\", e58);\n }\n traceEnd();\n if (safeMode) {\n this.mActivityManagerService.showSafeModeOverlay();\n }\n Configuration config222222222222222222222222222222222 = wm.computeNewConfiguration(0);\n DisplayMetrics metrics222222222222222222222222222222222 = new DisplayMetrics();\n ((WindowManager) context.getSystemService(\"window\")).getDefaultDisplay().getMetrics(metrics222222222222222222222222222222222);\n context.getResources().updateConfiguration(config222222222222222222222222222222222, metrics222222222222222222222222222222222);\n systemTheme = context.getTheme();\n if (systemTheme.getChangingConfigurations() != 0) {\n systemTheme.rebase();\n }\n traceBeginAndSlog(\"MakePowerManagerServiceReady\");\n try {\n this.mPowerManagerService.systemReady(this.mActivityManagerService.getAppOpsService());\n } catch (Throwable e59) {\n reportWtf(\"making Power Manager Service ready\", e59);\n }\n traceEnd();\n traceBeginAndSlog(\"MakePGManagerServiceReady\");\n try {\n this.mPGManagerService.systemReady(this.mActivityManagerService, this.mPowerManagerService, location, wm2);\n } catch (Throwable e60) {\n reportWtf(\"making PG Manager Service ready\", e60);\n }\n traceEnd();\n traceBeginAndSlog(\"StartPermissionPolicyService\");\n this.mSystemServiceManager.startService(PermissionPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"MakePackageManagerServiceReady\");\n this.mPackageManagerService.systemReady();\n traceEnd();\n traceBeginAndSlog(\"MakeDisplayManagerServiceReady\");\n try {\n this.mDisplayManagerService.systemReady(safeMode, this.mOnlyCore);\n } catch (Throwable e61) {\n reportWtf(\"making Display Manager Service ready\", e61);\n }\n traceEnd();\n this.mSystemServiceManager.setSafeMode(safeMode);\n traceBeginAndSlog(\"StartDeviceSpecificServices\");\n String[] classes222222222222222222222222222222222 = this.mSystemContext.getResources().getStringArray(17236007);\n for (String className2 : classes222222222222222222222222222222222) {\n traceBeginAndSlog(\"StartDeviceSpecificServices \" + className2);\n try {\n this.mSystemServiceManager.startService(className2);\n } catch (Throwable e62) {\n reportWtf(\"starting \" + className2, e62);\n }\n traceEnd();\n }\n traceEnd();\n traceBeginAndSlog(\"StartBootPhaseDeviceSpecificServicesReady\");\n this.mSystemServiceManager.startBootPhase(SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY);\n traceEnd();\n this.mActivityManagerService.systemReady(new Runnable(context, wm, safeMode, iConnectivityManager, iNetworkManagementService, iNetworkPolicyManager, ipSecService, iNetworkStatsService, location, countryDetector, networkTimeUpdater, inputManager, telephonyRegistry, mediaRouter, mmsService, enableIaware) {\n /* class com.android.server.$$Lambda$SystemServer$izZXvNBS1sgFBFNX1EVoO0g0o1M */\n private final /* synthetic */ Context f$1;\n private final /* synthetic */ CountryDetectorService f$10;\n private final /* synthetic */ NetworkTimeUpdateService f$11;\n private final /* synthetic */ InputManagerService f$12;\n private final /* synthetic */ TelephonyRegistry f$13;\n private final /* synthetic */ MediaRouterService f$14;\n private final /* synthetic */ MmsServiceBroker f$15;\n private final /* synthetic */ boolean f$16;\n private final /* synthetic */ WindowManagerService f$2;\n private final /* synthetic */ boolean f$3;\n private final /* synthetic */ ConnectivityService f$4;\n private final /* synthetic */ NetworkManagementService f$5;\n private final /* synthetic */ NetworkPolicyManagerService f$6;\n private final /* synthetic */ IpSecService f$7;\n private final /* synthetic */ NetworkStatsService f$8;\n private final /* synthetic */ LocationManagerService f$9;\n\n {\n this.f$1 = r4;\n this.f$2 = r5;\n this.f$3 = r6;\n this.f$4 = r7;\n this.f$5 = r8;\n this.f$6 = r9;\n this.f$7 = r10;\n this.f$8 = r11;\n this.f$9 = r12;\n this.f$10 = r13;\n this.f$11 = r14;\n this.f$12 = r15;\n this.f$13 = r16;\n this.f$14 = r17;\n this.f$15 = r18;\n this.f$16 = r19;\n }\n\n @Override // java.lang.Runnable\n public final void run() {\n SystemServer.this.lambda$startOtherServices$5$SystemServer(this.f$1, this.f$2, this.f$3, this.f$4, this.f$5, this.f$6, this.f$7, this.f$8, this.f$9, this.f$10, this.f$11, this.f$12, this.f$13, this.f$14, this.f$15, this.f$16);\n }\n }, BOOT_TIMINGS_TRACE_LOG);\n }", "private void initService() {\n connection = new AppServiceConnection();\n Intent i = new Intent(this, AppService.class);\n boolean ret = bindService(i, connection, Context.BIND_AUTO_CREATE);\n Log.d(TAG, \"initService() bound with \" + ret);\n }" ]
[ "0.7382372", "0.72641224", "0.6916299", "0.69105077", "0.6756857", "0.6687017", "0.65771085", "0.6533889", "0.65172917", "0.6502176", "0.6482514", "0.6479377", "0.6460147", "0.6458242", "0.6440663", "0.64315987", "0.64102143", "0.6355701", "0.6351254", "0.63084626", "0.6296666", "0.62913054", "0.6286581", "0.62857926", "0.6277679", "0.6256996", "0.6254958", "0.62427455", "0.62305576", "0.62256366", "0.6182105", "0.61800796", "0.61620486", "0.61566496", "0.6147141", "0.6130689", "0.6130689", "0.6107113", "0.61052424", "0.6101426", "0.6097528", "0.6088632", "0.6084344", "0.6075849", "0.6072992", "0.6050148", "0.6047031", "0.6043827", "0.6042682", "0.60257596", "0.6021437", "0.6019779", "0.60060346", "0.599947", "0.5983708", "0.5979214", "0.59749514", "0.59686077", "0.5968039", "0.5967936", "0.5966802", "0.59659886", "0.59636194", "0.5960904", "0.59593004", "0.5950915", "0.59399366", "0.5935837", "0.5924418", "0.59227026", "0.59079295", "0.59027874", "0.5901361", "0.5901361", "0.5901361", "0.5901361", "0.5901361", "0.5901361", "0.5901361", "0.5901361", "0.5901361", "0.5901361", "0.5901361", "0.5901361", "0.5887316", "0.5878608", "0.5878239", "0.5875059", "0.58670604", "0.5864321", "0.58568525", "0.58550364", "0.58500224", "0.5847169", "0.58370566", "0.58366096", "0.5831986", "0.583193", "0.5829344", "0.5811655" ]
0.6971139
2
Fixture initialization (common initialization for all tests).
@Before public void setUp() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@BeforeAll\n static void init() {\n }", "@Before\n public void init() {\n }", "@Before\n\tpublic void init() {\n\t}", "@BeforeClass\n public static void init() {\n InitializrMetadataBuilder initializrMetadataBuilder = InitializrMetadataBuilder.fromInitializrProperties(\n InitializerMetadataTest.load(\n InitializerMetadataTest.loadProperties(new ClassPathResource(\"application-test-default.yml\"))));\n initializrMetadata = initializrMetadataBuilder.build();\n }", "@BeforeSuite(alwaysRun=true)\r\n\tpublic void initSetUp() throws FileNotFoundException, IOException {\r\n\t\tinitialize();\r\n\t}", "@Test\n\tpublic void testInit() {\n\t\t/*\n\t\t * This test is just use to initialize everything and ensure a better\n\t\t * performance measure for all the other tests.\n\t\t */\n\t}", "@Before\n @Override\n public void init() {\n }", "@BeforeClass\n public static void startUp() {\n // \"override\" parent startUp\n resourceInitialization();\n }", "@Before\n public void init(){\n }", "@BeforeClass\n\tpublic static void init() {\n\t\ttry {\n\t\t\tif (emf == null) {\n\t\t\t\temf = Persistence.createEntityManagerFactory(\"application\");\n\t\t\t\tif (em == null) {\n\t\t\t\t\tem = loadConfiguration(emf);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@BeforeEach\n void init() {\n carte = new Carte();\n planning = new Planning(carte);\n }", "@BeforeEach\n\tvoid init() {\n\t\tthis.repo.deleteAll();\n\t\tthis.testLists = new TDLists(listTitle, listSubtitle);\n\t\tthis.testListsWithId = this.repo.save(this.testLists);\n\t\tthis.tdListsDTO = this.mapToDTO(testListsWithId);\n\t\tthis.id = this.testListsWithId.getId();\n\t}", "@Before\n public void init() {\n this.testMethodName = this.getTestMethodName();\n this.initialize();\n }", "@Before\n public void setup() {\n Helpers.fillData();\n }", "@Before\n public void init() {\n final Map<String, DataType> defaultTypes = new HashMap<>();\n defaultTypes.put(\"frieda\", StringCell.TYPE);\n defaultTypes.put(\"berta\", StringCell.TYPE);\n ReadAdapterFactory<String, String> readAdapterFactory = new ReadAdapterFactory<String, String>() {\n\n @Override\n public ReadAdapter<String, String> createReadAdapter() {\n return new TestReadAdapter();\n }\n\n @Override\n public ProducerRegistry<String, ? extends ReadAdapter<String, String>> getProducerRegistry() {\n return m_producerRegistry;\n }\n\n @Override\n public Map<String, DataType> getDefaultTypeMap() {\n return defaultTypes;\n }\n\n };\n m_testInstance = new DefaultTypeMappingFactory<>(readAdapterFactory);\n }", "@BeforeTest\r\n\tpublic void setupenvi() throws IOException {\r\n\t\tsetup();\r\n\t\tinit();\r\n\t}", "@Before\n public void initialize() {\n kata4 = new Kata4();\n }", "@Test\n public void init() {\n }", "protected void setUp()\n {\n /* Add any necessary initialization code here (e.g., open a socket). */\n }", "@BeforeClass\n\tpublic static void init() {\n\t\ttestProduct = new Product();\n\t\ttestProduct.setPrice(1000);\n\t\ttestProduct.setName(\"Moto 360\");\n\t\ttestProduct.setDescrip(\"Moto 360 smart watch for smart generation.\");\n\n\t\ttestReview = new Review();\n\t\ttestReview.setHeadline(\"Excellent battery life\");\n\t\ttestReview.setContent(\"Moto 360 has an excellent battery life of 10 days per full charge.\");\n\t}", "protected void setUp()\r\n {\r\n /* Add any necessary initialization code here (e.g., open a socket). */\r\n }", "@Before\n\t public void setUp() {\n\t }", "@Before\n\tpublic void initialize() {\n\t\tnullParserSQLGenerator = new SQLStringGenerator(null);\n\t\toneArgParserSQLGenerator = new SQLStringGenerator(new OneArgParser());\n\t}", "@BeforeClass\n\t public void setUp() {\n\t }", "public SwerveAutoTest() {\n // Initialize base classes.\n // All via self-construction.\n\n // Initialize class members.\n // All via self-construction.\n }", "@BeforeEach\n public void initialize()\n {\n serviceProvider = new ServiceProvider();\n ResourceTypeFactory resourceTypeFactory = new ResourceTypeFactory();\n schemaFactory = Assertions.assertDoesNotThrow(resourceTypeFactory::getSchemaFactory);\n resourceTypeFactory.registerResourceType(null,\n JsonHelper.loadJsonDocument(ClassPathReferences.USER_RESOURCE_TYPE_JSON),\n JsonHelper.loadJsonDocument(ClassPathReferences.USER_SCHEMA_JSON),\n JsonHelper.loadJsonDocument(ClassPathReferences.ENTERPRISE_USER_SCHEMA_JSON));\n resourceTypeFactory.registerResourceType(null,\n JsonHelper.loadJsonDocument(ClassPathReferences.GROUP_RESOURCE_TYPE_JSON),\n JsonHelper.loadJsonDocument(ClassPathReferences.GROUP_SCHEMA_JSON));\n }", "@Before\n public void setUp() {\n fixture = new WordCounter(testMap);\n }", "@Before\r\n\t public void setUp(){\n\t }", "@BeforeEach\n void setUp() {\n seed = new Random().nextInt();\n random = new Random().nextInt();\n rng = new Random(seed);\n int strSize = rng.nextInt(20);\n hello = RandomStringUtils.random(strSize, 0, Character.MAX_CODE_POINT, true, false, null, rng);\n int binarySize = rng.nextInt(20)+1;\n binary = RandomStringUtils.random(binarySize, ZeroOne);\n st = new TString(hello);\n bot = new Bool(true);\n bof = new Bool(false);\n bi = new Binary(binary);\n i = new Int(seed); //seed is a random number\n decimal = seed+0.1; //transformed to double\n f = new Float(decimal);\n g = new Float(random);\n j = new Int(random);\n Null = new NullType();\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\tsubGen = new SubsetGenerator();\n\t}", "@Before\r\n\tpublic void setup() {\r\n\t}", "@BeforeClass\n\tpublic static void setup() {\n\n\t}", "@BeforeClass public static void initialiseScenario(){\n SelectionScenario.initialiseScenario();\n }", "public void setUp() {\n\n\t}", "@BeforeClass\n\tpublic static void setup() {\n\t\tdataMunger = new DataMunger();\n\n\t}", "@BeforeEach\n\tpublic void init() throws SQLException, IOException {\n\t\ttestBook = bookDaoImpl.create(SAMPLE_TITLE, null, null);\n\t\ttestBranch = branchDaoImpl.create(SAMPLE_BRANCH_NAME, SAMPLE_BRANCH_ADDRESS);\n\t\tcopiesDaoImpl.setCopies(testBranch, testBook, NUM_COPIES);\n\t}", "@Before\n\tpublic void setup() {\n\t\tinit(rule.getProcessEngine());\n\t}", "@BeforeClass\n\t\tpublic static void setUp() {\n\t\t\tboard = Board.getInstance();\n\t\t\t// set the file names to use my config files\n\t\t\tboard.setConfigFiles(\"ourConfigFiles/GameBoard.csv\", \"ourConfigFiles/Rooms.txt\");\t\t\n\t\t\t// Initialize will load BOTH config files \n\t\t\tboard.setCardFiles(\"ourConfigFiles/Players.txt\", \"ourConfigFiles/Weapons.txt\");\t\t\n\t\t\t// Initialize will load BOTH config files \n\t\t\tboard.initialize();\n\t\t}", "@BeforeClass\n\tpublic static void setUp() {\n\t\tsbu = Sbu.getUniqueSbu(\"SBU\");\n\t\tbiblio = new Biblioteca(\"Biblioteca\", \"viaBteca\", sbu);\n\t\tmanager = new ManagerSistema(\"codiceFiscaleManager\", \"NomeManager\", \"CognomeManager\", \n\t\t\t\t\"IndirizzoManager\", new Date(), \"34012899967\", \n\t\t\t\t\"[email protected]\", \"passwordM\", sbu);\n\t\tbibliotecario = new Bibliotecario(\"codiceFiscaleB1\", \"nomeB1\", \"cognomeB1\", \"indirizzoB1\", \n\t\t\t\tnew Date(), \"340609797\", \"[email protected]\", \n\t\t\t\t\"passwordB1\", biblio);\n\t}", "@BeforeClass\r\n public static void initTextFixture(){\r\n entityManagerFactory = Persistence.createEntityManagerFactory(\"itmd4515PU\");\r\n }", "@BeforeClass\n\tpublic static void setUpImmutableFixture() {\n\t\t\n\t}", "@Before\n\tpublic final void setUp() {\n\t\tint numLegs = 4;\n\t\tanimal = new Animal(\"Possum\", \"Mammal\", \"male\", numLegs);\n\t\ttestForest = new Forest(\"Hamner Forest Park\", \"Alpine Forest\", \n\t\t\t\t\"Warm, Mountain-like\");\n\t}", "@BeforeEach\n\tpublic void init() throws NotJpgException {\n\t\t// fixture\n\t\timagePath = \"src/main/resources/skillvssalary.jpeg\";\n\t\timagePath2 = \"src/main/resources/success.jpg\";\n\t\tnotImage = \"src/main/resources/dwa\";\n\t\tphoto = new Photo(imagePath);\n\t}", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Override\r\n protected void setUp()\r\n {\r\n island = new Island(5,5);\r\n position = new Position(island, 4,4);\r\n seed = new BirdFood(position, \"seed\", \"Crunchy Seeds\", 1.0, 2.0, 1.5);\r\n }", "@Before\n\tpublic void initBeforeEachTestMethod()\n\t{\n\t\ttileScorer_STUDENT = new TileScorerImpl_Moran(ScrabbleEliteConfiguration_Moran.getEliteTileToPointsMap());\n\t\ttileTranslator_STUDENT = new TileTranslatorImpl_Moran(ScrabbleEliteConfiguration_Moran.getEliteTileToTranslationSetMap());\n\t\tdictionary_STUDENT = new DictionaryImpl_Moran(ScrabbleEliteConfiguration_Moran.getEliteWordList());\n\t\tscrabbleWordScorer_STUDENT = new ScrabbleWordScorerImpl_Moran(tileScorer_STUDENT, tileTranslator_STUDENT, dictionary_STUDENT);\n\t}", "public void setUp()\r\n {\r\n //empty on purpose\r\n }", "@BeforeClass\n public void initCommonFixture(ITestContext testContext) {\n Object obj = testContext.getSuite().getAttribute(SuiteAttribute.CLIENT.getName());\n if (null != obj) {\n this.client = Client.class.cast(obj);\n }\n obj = testContext.getSuite().getAttribute(SuiteAttribute.TEST_SUBJECT.getName());\n if (null == obj) {\n throw new SkipException(\"Test subject not found in ITestContext.\");\n }\n }", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "@BeforeEach\n void init() {\n log.info(\"init\");\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Test\n public void testInitialize() {\n \n \n }", "protected void setUp() {\n\t}", "@BeforeClass\n public static void initTestFixture() throws Exception {\n entityManagerFactory = Persistence.createEntityManagerFactory(\"test\");\n entityManager = entityManagerFactory.createEntityManager();\n }", "@BeforeClass (alwaysRun = true)\n public void dataPreparation()\n {\n serverHealth.isServerReachable();\n serverHealth.assertServerIsOnline();\n\n // Before we start testing the live indexing we need to use the reindexing component to index the system nodes.\n Step.STEP(\"Index system nodes.\");\n AlfrescoStackInitializer.reindexEverything();\n\n Step.STEP(\"Create a test user and private site.\");\n testUser = dataUser.createRandomTestUser();\n testSite = helper.createPrivateSite(testUser);\n }", "@BeforeEach\n public void setup() {\n }", "@Before\n\tpublic void init() {\n\t\tuserDao=new UsersDAO();\n\t\tentityManager=mock(EntityManager.class);\n\t\tuserDao.setEntityManager(entityManager);\n\t\t\n\t}", "@BeforeEach\n public void setup() {\n token = new TokenInfo();\n token.setNetid(\"lbecheanu\");\n token.setRole(\"student\");\n }", "@Before\n\tpublic void setup() \n\t{\n\t\tsuper.setup();\n\t\t\n }", "@BeforeEach\n\tpublic void setup() {\n\t\tnome = \"cliente1 da Silva\";\n\t\tdocumentoValido = \"22492552020\";\n\t\tdocumentoInvalido = \"465801940\";\n\t\tdocumentoJaCadastrado = \"465.801.940-06\";\n\t\temail = \"[email protected]\";\n\t\t\n\t\tlogradouro = \"Rua das meninas, 15\";\n\t\tbairro = \"Jose pinheiro\";\n\t\tcomplemento = \"Proximo a loteria\";\n\t\tuf = \"PB\";\n\t\t\n\t\tsalario = new BigDecimal(2000);\n\t\tsalarioNegativo = new BigDecimal(-1);\n\t\tsalarioZerado = new BigDecimal(0);\n\t\t\n\t}", "@Before\r\n public void setupTestCases() {\r\n instance = new ShoppingListArray();\r\n }", "@Before\n public void setup() {\n }", "@BeforeAll\n public static void init() {\n LogStub.init();\n Log.enableFailQuick(false);\n }", "@Before\n public void setup() {\n kata4 = new SpinWords();\n }", "@Before\r\n\tpublic void initializeDefaultMockObjects()\r\n\t{\r\n\t\tconfigs = new ArrayList<Config>();\r\n\t\tscreenshots = new ArrayList<Screenshot>();\r\n\t\tprocessedImages = new ArrayList<ProcessedImage>();\r\n\t\ttestExecutions = new ArrayList<TestExecution>();\r\n\t\ttestEnvironments = new ArrayList<TestEnvironment>();\r\n\r\n\t\tinitializeDefaultTestExecution();\r\n\t\tinitializeDefaultTestEnvironment();\r\n\t\tinitializeDefaultScreenshot();\r\n\t}", "@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t}", "@Before\n public void setUp()\n {\n\n // Create countries\n country1 = new Country(\"Country 1\", null);\n country2 = new Country(\"Country 2\", null);\n country1.setGame(game);\n country2.setGame(game);\n\n // Create Cities\n cityA = new City(\"City A\", 80, country1);\n cityB = new City(\"City B\", 60, country1);\n cityC = new City(\"City C\", 40, country1);\n\n }", "@Before\n\tpublic void setUpMutableFixture() {\n\t\tcmcSystem = new CMCSystem(new OrderDAOImpl());\n\t\tschedule = cmcSystem.getScheduler();\n\t\tassemblyLine = cmcSystem.getAssemblyLine(0);\n\t}", "@Before\n\tpublic void setup() {\n\n\t\tclient = ClientBuilder.newClient();\n\n\t}", "@Before\n\tpublic void setup() {\n\t\tdatabase = new DatabaseLogic();\n\t}", "@Before\n\tpublic void setUp() {\n\t}", "@BeforeEach\r\n\tpublic void setUp() {\r\n\t\tplatform = new Platform();\r\n\t\tbastide = new Person(\"Rémi Bastide\");\r\n\t\thistoire = new Course(\"Histoire\", 15);\r\n\t\tgeo = new Course(\"Géographie\", 20);\r\n\t\tplatform.addCourse(histoire);\r\n\t\tplatform.addCourse(geo);\r\n\t\tplatform.registerStudent(bastide);\r\n\t}", "protected void setUp() {\n\n }", "@BeforeAll\n public static void initAll() {\n emf = Persistence.createEntityManagerFactory(\"test-resource-local\");\n propertyName = User_.username.getName();\n emf.close();\n validator = Validation.buildDefaultValidatorFactory().getValidator();\n }", "@Before\r\n\tpublic void setUp() {\n\t}", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@BeforeClass\n public static void setUp() {\n }", "@BeforeEach\n\tpublic void setup() {\n\t\tuser= new Utente(\"Nome\",\n\t\t\t\t\"Cognome\",\n\t\t\t\t\"mail\",\n\t\t\t\tLocalDateTime.now(),\n\t\t\t\t\"CodiceFiscale\",\n\t\t\t\t\"Username\", \n\t\t\t\t\"password\");\n\t\tuser_diverso= new Utente(\"Nome\",\n\t\t\t\t\"Cognome\",\n\t\t\t\t\"mail\",\n\t\t\t\tLocalDateTime.now(),\n\t\t\t\t\"CodiceFiscale\",\n\t\t\t\t\"Username_diverso\", \n\t\t\t\t\"password\");\n\t\tuser_uguale= new Utente(\"Nome\",\n\t\t\t\t\"Cognome\",\n\t\t\t\t\"mail\",\n\t\t\t\tLocalDateTime.now(),\n\t\t\t\t\"CodiceFiscale\",\n\t\t\t\t\"Username\", \n\t\t\t\t\"password\");\n\t\t\n\t\tfruitore =new Fruitore(user);\n\t\tfruitore_uguale =new Fruitore(user_uguale);\n\t\tfruitore_diverso =new Fruitore(user_diverso);\n\t}", "@BeforeSuite\n public void initiateData() throws FileNotFoundException, IOException {\n jsonTestData = new JsonClass();\n userDirectory = System.getProperty(\"user.dir\");\n String log4jConfigFile = userDirectory + File.separator + \"src\" + File.separator + \"test\" + File.separator + \"resources\" + File.separator\n + \"log4j.properties\";\n ConfigurationSource source = new ConfigurationSource(new FileInputStream(log4jConfigFile));\n Configurator.initialize(null, source);\n logger = Logger.getLogger(getClass());\n }", "@Before\n\tpublic void initialize() {\n\t\tCategory category= new Category();// = SAMPLE_CATEGORY1;\n\t\tcategory.setCategoryName(SAMPLE_CATEGORY1.getCategoryName());\n\t\tcategory.setCompanyReferenceNumber(SAMPLE_COMPANY.getCompanyReferenceNumber());\n\t\tcomServ.saveOrUpdate(SAMPLE_COMPANY);\n\t\tcatServ.saveOrUpdate(category);\n\t\tappServ.saveOrUpdate(SAMPLE_APPLICATION1);\n\t\t\n\t}", "@Before\n public void setUp()\n {\n m_instance = ConversationRepository.getInstance();\n m_fileSystem = FileSystem.getInstance();\n }", "@BeforeAll\n public static void setUp(){\n baseURI = ConfigurationReader.getProperty(\"spartan.base_url\");\n basePath = \"/api\" ;\n }", "@Before\n public void startUp() {\n registry = new DeserializerRegistryImpl();\n registry.init();\n }", "protected void testInit() {\n this.auths = CitiesDataType.getTestAuths();\n this.documentKey = CityField.EVENT_ID.name();\n }", "protected void testInit() {\n this.auths = CitiesDataType.getTestAuths();\n this.documentKey = CityField.EVENT_ID.name();\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@BeforeEach\n\tpublic void setup() {\n\t\t\n\t\trisorsa= new Film(1,1);\n\t\tuser=new Utente(\"nome\",\"cognome\",\"mail\",LocalDateTime.now(),\"cf\",\"user\",\"psw\");\n\t\tfruitore = new Fruitore(user);\n\t\t\n\t\trisorsa_diversa= new Film(2,1);\n\t\tuser_diverso=new Utente(\"nome\",\"cognome\",\"mail\",LocalDateTime.now(),\"cf\",\"user_diverso\",\"psw\");\n\t\tfruitore_diverso = new Fruitore(user_diverso);\n\t\t\n\t\tprestito= new Prestito(risorsa, fruitore);\n\t\tprestito_diverso= new Prestito(risorsa_diversa, fruitore_diverso);\n\t}" ]
[ "0.75034183", "0.7310419", "0.7300194", "0.7290766", "0.72479784", "0.72159034", "0.71773154", "0.716951", "0.7117647", "0.70500344", "0.703414", "0.70302707", "0.6992388", "0.69710135", "0.69579", "0.6936861", "0.6903842", "0.6903006", "0.6893639", "0.68809694", "0.6874737", "0.6849172", "0.6841465", "0.6840006", "0.683618", "0.6808288", "0.6806074", "0.67990494", "0.67950916", "0.67912143", "0.67837965", "0.67780316", "0.6771469", "0.6761575", "0.67563564", "0.67482984", "0.6746665", "0.67390174", "0.6732006", "0.67250884", "0.6722964", "0.6720027", "0.6719466", "0.6710439", "0.6710439", "0.6710439", "0.6710439", "0.6710439", "0.67050695", "0.6704975", "0.6691185", "0.6684481", "0.6683615", "0.6682627", "0.66796535", "0.66796535", "0.66796535", "0.6675021", "0.66701", "0.66559863", "0.6647267", "0.66460365", "0.6644958", "0.6643301", "0.663631", "0.6633243", "0.6623531", "0.6617884", "0.66161746", "0.6616172", "0.66154754", "0.6591106", "0.6590308", "0.6588897", "0.6584518", "0.65842605", "0.6578846", "0.65783954", "0.6577168", "0.6574845", "0.65747386", "0.6573447", "0.6573447", "0.6573447", "0.6573447", "0.657226", "0.65701264", "0.6569399", "0.6569249", "0.65690154", "0.65587187", "0.6556197", "0.65559405", "0.65559405", "0.65536344", "0.65536344", "0.65536344", "0.65536344", "0.65536344", "0.65491194" ]
0.6860498
21
/ Registers any rendering code. Does nothing serverside
public void registerRenderer() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void render() {\n\t\t// do nothing... as we should\n\t}", "protected void render(){}", "public void render()\r\n\t{\n\t}", "protected void render() {\n\t\tString accion = Thread.currentThread().getStackTrace()[2].getMethodName();\n\t\trender(accion);\n\t}", "public void render() {\n }", "public void render() {\r\n\r\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\r\n\tpublic void render() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void simpleRender(RenderManager rm) {\n\t}", "private void render() {\n\n StateManager.getState().render();\n }", "@Override\n\tpublic void render() {\n\t\t\n\t}", "public static void index() {\r\n render();\r\n }", "@Override\r\n\tpublic void render() {\n\r\n\t}", "@Override\n\tpublic void render () {\n\n\t}", "protected void preRender()\n {\n // subclass\n }", "void dynamicRendering();", "public void render();", "public void registerRenders() {\n }", "@Override\n public void render() {\n super.render();\n }", "@Override\n public void render() {\n super.render();\n }", "@Override\n\tpublic void render () {\n super.render();\n\t}", "public void render() {\n\t\tscreen.background(255);\n\t\thandler.render();\n\t}", "public void registerRenderInformation()\n\t{\n\t //unused server side. -- see ClientProxy for implementation\n\t}", "@Override\n\tpublic void render() {\n\t\tScreen.render();\n\t}", "public void registerRenderers() {\n\n\t}", "@Override\n\tpublic void forceRender() {\n\n\t}", "@Override\n public void render() { super.render(); }", "public abstract void render(Renderer renderer);", "@Override\n\tpublic void renderSource() {\n\t\t\n\t}", "public void prerender() {\n }", "public void prerender() {\n }", "@Override\n public void prerender() {\n }", "public void registerRenderInformation() {\n\t}", "public void startRendering() {\n if (!justRendered) {\n justRendered = true;\n \n if (Flags.wireFrame) p.render_wireFrame();\n else p.render();\n }\n }", "public void render(CliContext ctx);", "@Override\n public void beforeRender()\n {\n\n }", "void renderLoop(RenderLoopCallback renderLoop);", "public void render(){\n//\t\tsetCards();\n//\t\tsetMurderInfo();\n\t}", "@Override\n public void render() {\n if (renderInterrupted) {\n log.debug(\"render()\");\n renderInterrupted = false;\n }\n\n }", "public void render(){\n\t\tBufferStrategy bs = frame.getBufferStrategy();\n\t\tif(bs == null){\n\t\t\tframe.createBufferStrategy(3);\n\t\t\treturn;\n\t\t}\n\t\trenderGraphics(bs);\n\t}", "public void render() {\n renderHud();\n }", "void setupRender() {\n\t\tif (!init()) {\n\t\t\tisAccess = false;\n\t\t\treturn;\n\t\t}\n\t}", "public static void requestRenderFromNUI() {\r\n\t\tif (m_Handler != null) {\t\t\t\r\n\t\t\ts_lRequestTicks = System.currentTimeMillis();\r\n\t\t\tm_SkiaView.postInvalidate();\r\n\t\t}\r\n\t}", "@Override\n public void enrichRenderQueue(RenderQueue renderQueue) {\n }", "@Override\n\tpublic void render(Graphics g)\n\t{\n\t}", "@Override\n \tprotected void controlRender(RenderManager rm, ViewPort vp) {\n \n \t}", "@Override\r\n protected void controlRender(RenderManager rm, ViewPort vp) {\n }", "public native void initRendering();", "public native void initRendering();", "protected void render() {\n\t\tentities.render();\n\t\t// Render GUI\n\t\tentities.renderGUI();\n\n\t\t// Flips the page between the two buffers\n\t\ts.drawToGraphics((Graphics2D) Window.strategy.getDrawGraphics());\n\t\tWindow.strategy.show();\n\t}", "@Override\n protected boolean isRenderScriptEnable() {\n return true;\n }", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "@Override\r\n\tpublic void index() {\n\t\trender(\"index.jsp\");\r\n\t}", "@Override\n\tpublic void tick() {\n\t\trenderer.render(this);\n\t}", "@Override\n\tprotected void controlRender(RenderManager rm, ViewPort vp) {\n\t\t\n\t}", "public void render () \n\t{ \n\t\trenderWorld(batch);\n\t\trenderGui(batch);\n\t}", "public abstract void renderInterface();", "private void render() {\n\n\tbs=display.getCanvas().getBufferStrategy();\t\n\t\n\tif(bs==null) \n\t {\t\n\t\tdisplay.getCanvas().createBufferStrategy(3);\n\t\treturn ;\n\t }\n\t\n\tg=bs.getDrawGraphics();\n\n\t//Clear Screen\n\tg.clearRect(0, 0, width, height);\n\t\n\tif(State.getState()!=null )\n\t\tState.getState().render(g);\n\t\n\t//End Drawing!\n\tbs.show();\n\tg.dispose();\n\t\n\t}", "public void render() {\n uiBatch.begin();\n for (int x = 0; x < uiManager.getUIComponents().size();x++) {\n uiManager.getUIComponent(x).render(uiBatch, Assets.patch);\n }\n if (uiManager.dialogue != null) {\n uiManager.dialogue.render(uiBatch, Assets.patch);\n }\n if (!uiManager.notifications.isEmpty()) {\n uiManager.notifications.get(0).render(uiBatch, Assets.patch);\n }\n uiManager.partyMenu.render(uiBatch, Assets.patch);\n uiBatch.end();\n }", "public static void add() {\n\t\trender();\n\t}", "@Override\n protected void controlRender(RenderManager rm, ViewPort vp) {\n }", "@Override\n public void renderStatic(GC gc, ViewPort vp) {\n\n }", "void addRenderEngine(String context, LoginRenderEngine vengine);", "@Override\r\n public void render(HttpServletRequest request, HttpServletResponse response, Object result) throws Throwable\r\n {\n \r\n }", "protected abstract void render(Graphics g);", "@Override\r\n public void onRender() {\n try {\r\n if (this.isLookupMode) { \r\n //查找返回模式\r\n this.pageActionList.clear();\r\n String divID =\"\";\r\n for(String key : this.divMap.keySet()) {\r\n Control control = this.divMap.get(key);\r\n if (control.getName().equals(this.lookupControlID)) {\r\n divID = key;\r\n break;\r\n }\r\n }\r\n //增加查找返回操作\r\n ActionButton newLink = new ActionButton(this.getClass(),\"lookup\",\"确认选择\",\"\",null);\r\n newLink.setOnClick(\"javascript:doLookupSelectDiv('\"+divID+\"','\"+this.lookupCallback+\"')\");\r\n newLink.setAttribute(\"class\",\"icon\"); \r\n this.regPageButton(newLink);\r\n }\r\n } catch (BizException e) {\r\n throw e;\r\n } catch (Exception ex) {\r\n throw new BizException(BizException.SYSTEM, \"渲染页面失败\", ex);\r\n }\r\n }", "private void render() {\n final int numBuffers = 3;\n BufferStrategy bs = this.getBufferStrategy(); // starts value at null\n if (bs == null) {\n this.createBufferStrategy(numBuffers); // 3: buffer creations\n return;\n }\n Graphics g = bs.getDrawGraphics();\n\n g.setColor(Color.black); // stops flashing background\n g.fillRect(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);\n\n handler.render(g);\n\n if (gameStart == GAME_STATE.Game) {\n hud.render(g);\n } else if (gameStart == GAME_STATE.Menu || gameStart == GAME_STATE.Help || gameStart == GAME_STATE.GameOver || gameStart == GAME_STATE.GameVictory) {\n menu.render(g);\n }\n\n g.dispose();\n bs.show();\n }", "public void requestrender() {\n\t\trender(g2d);\r\n\t\tGraphics g = getGraphics();\r\n\t\tg.drawImage(image , 0 , 0, null);\r\n\t\tg.dispose();\r\n\t\t\r\n\t}", "@Override\n\tpublic void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException\n\t{\n\t\tmapRenderSystem.process();\n\t\trenderingSystem.process();\n\t\tanimationRenderSystem.process();\t\t\n\t\tspellRenderSystem.process();\n\t\tHUDRenderSystem.process();\n\n\t}", "private void doBeforeRenderResponse(final PhaseEvent arg0) {\n\t}", "public static void create() {\r\n render();\r\n }", "protected void onComponentRendered()\n\t{\n\t}", "void setupRender() {\n\t\t_highlightFacilityId = _facilityId;\n\t}", "private void render() {\n\t\tBufferStrategy buffStrat = display.getCanvas().getBufferStrategy();\n\t\tif(buffStrat == null) {\n\t\t\tdisplay.getCanvas().createBufferStrategy(3); //We will have 3 buffered screens for the game\n\t\t\treturn;\n\t\t}\n\n\t\t//A bufferstrategy prevents flickering since it preloads elements onto the display.\n\t\t//A graphics object is a paintbrush style object\n\t\tGraphics g = buffStrat.getDrawGraphics();\n\t\t//Clear the screen\n\t\tg.clearRect(0, 0, width, height); //Clear for further rendering\n\t\t\n\t\tif(State.getState() !=null) {\n\t\t\tState.getState().render(g);\n\t\t}\n\t\t//Drawings to be done in this space\n\t\t\n\t\t\n\t\t\n\t\tbuffStrat.show();\n\t\tg.dispose();\n\t}", "public void render(Callable<Object> callable) {\n\t\trenderQueue.enqueue(callable);\n\t}", "public void render(Graphics g) {\n\t}", "private void processRenderFunction() {\n if (!hasInterface(processingEnv, component.asType(), HasRender.class)) {\n return;\n }\n\n componentExposedTypeBuilder.addMethod(MethodSpec\n .methodBuilder(\"vg$render\")\n .addModifiers(Modifier.PUBLIC)\n .addAnnotation(JsMethod.class)\n .returns(VNode.class)\n .addParameter(CreateElementFunction.class, \"createElementFunction\")\n .addStatement(\"return super.render(new $T(createElementFunction))\", VNodeBuilder.class)\n .build());\n\n addMethodToProto(\"vg$render\");\n\n // Register the render method\n optionsBuilder.addStatement(\"options.addHookMethod($S, p.$L)\", \"render\", \"vg$render\");\n }", "public void render() {\r\n\t\t\r\n\t\tif (page >= 0 && page < pages.length) {\r\n\t\t\tTextures.renderQuad(pages[page][(updates / 90) % pages[page].length], 32, 32, 1024, 512);\r\n\t\t}\r\n\t}", "@Override\n public void render() {\n GUI.clearScreen();\n if (assetManager.update()) {\n switch (gameState) {\n case MENU:\n GUI.menuLoop();\n break;\n case PAUSE:\n case GAME:\n gameLoop();\n break;\n case LOAD:\n World.load();\n gameState = GameState.GAME;\n break;\n }\n } else {\n GUI.splashScreen(assetManager.getProgress());\n }\n DrawManager.end();\n }", "public void render(GameContainer gc, GameManager gm, Renderer r) {\n }", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "@Override\n public final void renderOn(KmHtmlBuilder out)\n {\n preRender();\n renderControlOn(out);\n renderPostDomOn(out);\n renderPostRenderOn(out);\n }", "void onRender(RenderArguments arguments);", "@Override\r\n\tpublic void accept(iRenderVisitor visitor) {\n\t\tvisitor.render(this);\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void render() {\r\n\t\turi = ActionContext.getContextPath() + uri;\r\n\t\ttry {\r\n\t\t\tResponse.getServletResponse().sendRedirect(uri);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new RenderException(\"Redirect to [\" + uri + \"] error!\", e);\r\n\t\t}\r\n\t}", "public static void registerRenders() {\n for(Block block : modBlocks)\n BlockHelper.registerRender(block);\n }", "void render(Window window) throws Exception;", "public void onRenderTick() {\n updateLang();\n updateRenderEngine();\n }", "void render(Graphics g);", "public interface ISpecialRender\n{\n\tvoid render(Stack stack, World world, BlockState state, int x, int y, int z);\n}", "public abstract void render(Graphics g);", "@Override\n\tpublic void render(Graphics g) {\n\t\tworld.render(g);\n\t}", "protected abstract Render render(Param param, int pass);" ]
[ "0.7371571", "0.7160382", "0.69761026", "0.68687594", "0.6868639", "0.68588465", "0.6737682", "0.6737682", "0.6737682", "0.6737682", "0.6737682", "0.6737682", "0.6686931", "0.6657918", "0.6655326", "0.6603905", "0.65638417", "0.65456414", "0.65101767", "0.649822", "0.6491594", "0.64679617", "0.6435481", "0.63935155", "0.63935155", "0.6373394", "0.63591343", "0.6357831", "0.6316665", "0.63138187", "0.62881416", "0.6287278", "0.625862", "0.6230404", "0.62241656", "0.62241656", "0.62123704", "0.6189873", "0.61868256", "0.61820674", "0.6127579", "0.6073823", "0.60697544", "0.6037297", "0.6018966", "0.59987044", "0.59625775", "0.5959027", "0.5952448", "0.59501976", "0.5937692", "0.59322095", "0.5931721", "0.5931721", "0.592846", "0.59220344", "0.59193116", "0.59193116", "0.58920336", "0.58747244", "0.584908", "0.58474296", "0.583841", "0.58332855", "0.5816851", "0.5807935", "0.57869226", "0.5762291", "0.57487684", "0.57468355", "0.57467175", "0.5743893", "0.5731729", "0.5727004", "0.5718023", "0.5715075", "0.57143223", "0.57099557", "0.57094824", "0.5688956", "0.5683638", "0.5681792", "0.56778866", "0.5663163", "0.56390846", "0.56213146", "0.5617264", "0.56080514", "0.56076616", "0.559946", "0.55989087", "0.55975455", "0.5589711", "0.5588389", "0.55846316", "0.55767834", "0.55716664", "0.55610037", "0.55593646" ]
0.64067566
24
/ Ties an internal name to a visible one. Does nothing serverside
public void addNames() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLocallyAccessibleName( String name );", "public void setInternalName(String name);", "public String getInternalName();", "public void setAccessibleName(String name) {\n // Not supported\n }", "public final void setInternalName(String internalName){\n peripheralInternalName = internalName;\n }", "public void setCustomNameVisible ( boolean flag ) {\n\t\texecute ( handle -> handle.setCustomNameVisible ( flag ) );\n\t}", "@Override\n public String toString() {\n return internalName;\n }", "public void setDisplayName(String name);", "String getNameInternal()\n {\n return name;\n }", "public String getSummonerInternalNameByName(String name) {\n return client.sendRpcAndWait(SERVICE, \"getSummonerInternalNameByName\", name);\n }", "protected abstract String name ();", "public void setDisplayName(String name) {\r\n\t}", "protected abstract String getName();", "public void setDisplayName(String name) {\n\t}", "public boolean isCustomNameVisible ( ) {\n\t\treturn extract ( handle -> handle.isCustomNameVisible ( ) );\n\t}", "@Override\n\tpublic void setName(String arg0) {\n\n\t}", "private boolean isInternal(String name) {\n return name.startsWith(\"java.\")\n || name.startsWith(\"javax.\")\n || name.startsWith(\"com.sun.\")\n || name.startsWith(\"javax.\")\n || name.startsWith(\"oracle.\");\n }", "public void setDisplayName (String name) {\n impl.setDisplayName (name);\n }", "private void testAccessibleName(Component comp, AccessibleContext comp_AC) {\n String name = comp_AC.getAccessibleName();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testAccessibleName()> - accessibleName=\"+name);\n \n if (testSettings.AP_accessibleName && (name == null)){\n noName.add(comp);\n }\n }", "public void setNickname(java.lang.String param) {\n localNicknameTracker = true;\n\n this.localNickname = param;\n }", "public String getAccessibleName() {\n if (accessibleName != null) {\n return accessibleName;\n } else {\n if (getLabel() == null) {\n return super.getAccessibleName();\n } else {\n return getLabel();\n }\n }\n }", "public String getNotchianName();", "public interface Nameable\n{\n\t/**\n\t * Returns the name of the NamedObj\n\t * @see NamedObj\n\t * @return The name of the NamedObj\n\t * */\n\tpublic String getName();\n\t\n\t/**\n\t * Set the name of the NamedObj. This must be unique inside the context of its container.\n\t * @param name Name of the NamedObj\n\t * @throws Exception if name it is not unique\n\t * @see NamedObj\n\t * */\n\tpublic void setName(String name) throws Exception;\n}", "abstract public String named();", "@Override\n\tpublic void setDisplayName(TangentPlayer pl) {\n\t\tgetPlayer().setDisplayName(pl.getName());\n\t}", "protected String revealedId (String name)\n {\n return name;\n }", "String getDisplay_name();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "public final java.lang.String getDisplayName() { throw new RuntimeException(\"Stub!\"); }", "public void setMainName (String name){\n this.name = name;\n }", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "abstract String name();", "@Override\n\tpublic void setName(String name) {\n\t\t\n\t}", "public void setName(String arg0) {\n\t\t\n\t}", "protected abstract void setMyName(String name);", "public String getDisplayName();", "public String getDisplayName();", "public String getDisplayName();", "public String getDisplayName();", "public void name(String nam) {\r\n\t\tname = nam;\r\n\t}", "String displayName();", "String displayName();", "public void setObjectName(java.lang.String param){\n localObjectNameTracker = true;\n \n this.localObjectName=param;\n \n\n }", "public String myGetPlayerName(String name) { \n Player caddPlayer = getServer().getPlayerExact(name);\n String pName;\n if(caddPlayer == null) {\n caddPlayer = getServer().getPlayer(name);\n if(caddPlayer == null) {\n pName = name;\n } else {\n pName = caddPlayer.getName();\n }\n } else {\n pName = caddPlayer.getName();\n }\n return pName;\n }", "public abstract String getRawName();", "public void setRealName(String realName) {\n this.realName = realName;\n }", "public void setRealName(String realName) {\n this.realName = realName;\n }", "abstract String getName();", "public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }", "public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }", "public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }", "protected Object needsAnAlias(Object original)\n {\n return JMXObjectNameFix.needsAnAlias(original);\n }", "public void referToSpecialist(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "void updateDisplayName();", "private void NameShow(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString find = request.getParameter(\"find\") == \"\" ? \"^^^^\" : request.getParameter(\"find\");\r\n\t\tSystem.out.println(find);\r\n\t\tint page = request.getParameter(\"page\") == \"\" || request.getParameter(\"page\") == null ? 1\r\n\t\t\t\t: Integer.valueOf(request.getParameter(\"page\"));\r\n\t\tList<Notice> list = service.selectByName(find);\r\n\t\trequest.setAttribute(\"count\", list.size());\r\n\t\trequest.setAttribute(\"list\", list);\r\n\t\trequest.setAttribute(\"nameshow\", \"nameshow\");\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/GongGaoGuanLi.jsp\").forward(request, resp);\r\n\t}", "public final String getInternalName(){\n return peripheralFriendlyName;\n }", "public String getName(){\n \treturn this.name().replace(\"_\", \" \");\n }", "public abstract String shortName();", "void getName(String name);", "@Override\n public String named() {\n return \"soul\";\n }", "ChangeName.RelayToFriend getChangeNameRelay();", "public void setSearchNameTextFieldVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_searchNameTextField_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_searchNameTextField_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setSearchNameTextFieldVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public String map(String internalName) {\n return maps.map(internalName.replace('/', '.')).getName()\n .replace('.', '/');\n }", "@Override\n public void setName(String name) {\n \n }", "public void setName(String nm){\n\t\tname = nm;\n\t}", "public void setName(final String pName){this.aName = pName;}", "public void setReal_name(String real_name) {\n this.real_name = real_name;\n }", "public final void setName(String name) {_name = name;}", "public void setName(java.lang.String param) {\r\n localNameTracker = true;\r\n\r\n this.localName = param;\r\n\r\n\r\n }", "public NsName getName () { return name; }", "String getLinkName();", "protected abstract Object doLocalLookup( Name name )\n throws NamingException;", "public static void setNameFilter(String nameFilter) {\r\n PCCTRL.nameFilter = nameFilter;\r\n }", "public String getName()\r\n/* 91: */ {\r\n/* 92:112 */ return k_() ? aL() : \"container.minecart\";\r\n/* 93: */ }", "public void setAccessibleDescription(String name) {\n // Not supported\n }", "public void setName(String name)\n/* */ {\n/* 84 */ this._name = name;\n/* */ }", "@Override\r\n public void setName(String name) {\n }", "String getName() ;", "public void setName(java.lang.String aName);", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();" ]
[ "0.68501574", "0.68216914", "0.6636512", "0.63285923", "0.57560104", "0.5728346", "0.56437916", "0.5618041", "0.559233", "0.55873626", "0.55778015", "0.55762875", "0.55450636", "0.55269945", "0.5506764", "0.5486562", "0.54844177", "0.5464377", "0.54572326", "0.54567474", "0.54517967", "0.5443729", "0.54283875", "0.54137796", "0.53941804", "0.5366561", "0.53543586", "0.5353622", "0.5353622", "0.5353622", "0.5353622", "0.5353622", "0.5353622", "0.5351628", "0.53418994", "0.5330832", "0.5330832", "0.5330832", "0.5330832", "0.5330832", "0.5330832", "0.5318737", "0.53141576", "0.5305815", "0.5302522", "0.5299205", "0.5299205", "0.5299205", "0.5299205", "0.52932024", "0.5287241", "0.5287241", "0.52767843", "0.52750105", "0.5269363", "0.5263922", "0.5263922", "0.52634114", "0.5262454", "0.5262454", "0.5262454", "0.52605987", "0.52559507", "0.5253267", "0.5253265", "0.52482605", "0.5247985", "0.52438504", "0.524288", "0.52410716", "0.5239952", "0.5234579", "0.5234097", "0.52328485", "0.5230453", "0.52253985", "0.5216827", "0.521661", "0.5214635", "0.5213139", "0.5206492", "0.5204911", "0.5204257", "0.5203977", "0.52007765", "0.519356", "0.5189705", "0.5189189", "0.5186626", "0.5183743", "0.5183743", "0.5183743", "0.5183743", "0.5183743", "0.5183743", "0.5183743", "0.5183743", "0.5183743", "0.5183743", "0.5183743", "0.5183743" ]
0.0
-1